Skip to content

Commit 522392c

Browse files
j-bahrfacebook-github-bot
authored andcommitted
Migrate google java format from 1.7 -> 1.19.2
Summary: X-link: facebook/flipper#5456 X-link: facebook/hermes#1290 X-link: facebook/TextLayoutBuilder#35 X-link: facebook/SoLoader#122 This diff migrates google java format form 1.7 to 1.19.2. This update will allow for new language features from java 17 and 21. This diff also formats all necessary files. Changelog: [Internal][Changed] - Updated format from google-java-format 1.7 -> 1.19.2 Reviewed By: IanChilds Differential Revision: D52786052
1 parent c99e5a5 commit 522392c

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

examples/demo-apps/android/ExecuTorchDemo/app/src/main/java/com/example/executorchdemo/ImageNetClasses.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ public class ImageNetClasses {
191191
"Scottish deerhound, deerhound",
192192
"Weimaraner",
193193
"Staffordshire bullterrier, Staffordshire bull terrier",
194-
"American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier",
194+
"American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull"
195+
+ " terrier",
195196
"Bedlington terrier",
196197
"Border terrier",
197198
"Kerry blue terrier",
@@ -330,7 +331,8 @@ public class ImageNetClasses {
330331
"cicada, cicala",
331332
"leafhopper",
332333
"lacewing, lacewing fly",
333-
"dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk",
334+
"dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake"
335+
+ " doctor, mosquito hawk, skeeter hawk",
334336
"damselfly",
335337
"admiral",
336338
"ringlet, ringlet butterfly",
@@ -360,7 +362,8 @@ public class ImageNetClasses {
360362
"water buffalo, water ox, Asiatic buffalo, Bubalus bubalis",
361363
"bison",
362364
"ram, tup",
363-
"bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis",
365+
"bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis"
366+
+ " canadensis",
364367
"ibex, Capra ibex",
365368
"hartebeest",
366369
"impala, Aepyceros melampus",
@@ -423,7 +426,8 @@ public class ImageNetClasses {
423426
"analog clock",
424427
"apiary, bee house",
425428
"apron",
426-
"ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin",
429+
"ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel,"
430+
+ " trash bin",
427431
"assault rifle, assault gun",
428432
"backpack, back pack, knapsack, packsack, rucksack, haversack",
429433
"bakery, bakeshop, bakehouse",
@@ -491,7 +495,8 @@ public class ImageNetClasses {
491495
"carpenter's kit, tool kit",
492496
"carton",
493497
"car wheel",
494-
"cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM",
498+
"cash machine, cash dispenser, automated teller machine, automatic teller machine,"
499+
+ " automated teller, automatic teller, ATM",
495500
"cassette",
496501
"cassette player",
497502
"castle",
@@ -997,7 +1002,8 @@ public class ImageNetClasses {
9971002
"scuba diver",
9981003
"rapeseed",
9991004
"daisy",
1000-
"yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum",
1005+
"yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium"
1006+
+ " parviflorum",
10011007
"corn",
10021008
"acorn",
10031009
"hip, rose hip, rosehip",

examples/demo-apps/android/ExecuTorchDemo/app/src/main/java/com/example/executorchdemo/executor/EValue.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,15 @@ public boolean isDictLongKey() {
149149
public static EValue optionalNull() {
150150
return new EValue(TYPE_CODE_NULL);
151151
}
152+
152153
/** Creates a new {@code EValue} of type {@code Tensor}. */
153154
@DoNotStrip
154155
public static EValue from(Tensor tensor) {
155156
final EValue iv = new EValue(TYPE_CODE_TENSOR);
156157
iv.mData = tensor;
157158
return iv;
158159
}
160+
159161
/** Creates a new {@code EValue} of type {@code bool}. */
160162
@DoNotStrip
161163
public static EValue from(boolean value) {
@@ -171,13 +173,15 @@ public static EValue from(long value) {
171173
iv.mData = value;
172174
return iv;
173175
}
176+
174177
/** Creates a new {@code EValue} of type {@code float}. */
175178
@DoNotStrip
176179
public static EValue from(double value) {
177180
final EValue iv = new EValue(TYPE_CODE_DOUBLE);
178181
iv.mData = value;
179182
return iv;
180183
}
184+
181185
/** Creates a new {@code EValue} of type {@code str}. */
182186
@DoNotStrip
183187
public static EValue from(String value) {
@@ -193,13 +197,15 @@ public static EValue listFrom(boolean... list) {
193197
iv.mData = list;
194198
return iv;
195199
}
200+
196201
/** Creates a new {@code EValue} of type {@code List[int]}. */
197202
@DoNotStrip
198203
public static EValue listFrom(long... list) {
199204
final EValue iv = new EValue(TYPE_CODE_LONG_LIST);
200205
iv.mData = list;
201206
return iv;
202207
}
208+
203209
/** Creates a new {@code EValue} of type {@code List[float]}. */
204210
@DoNotStrip
205211
public static EValue listFrom(double... list) {
@@ -233,6 +239,7 @@ public static EValue listFrom(EValue... array) {
233239
iv.mData = array;
234240
return iv;
235241
}
242+
236243
/** Creates a new {@code EValue} of type {@code Tuple[T0, T1, ...]}. */
237244
@DoNotStrip
238245
public static EValue tupleFrom(EValue... array) {
@@ -248,6 +255,7 @@ public static EValue dictStringKeyFrom(Map<String, EValue> map) {
248255
iv.mData = map;
249256
return iv;
250257
}
258+
251259
/** Creates a new {@code EValue} of type {@code Dict[int, V]}. */
252260
@DoNotStrip
253261
public static EValue dictLongKeyFrom(Map<Long, EValue> map) {

examples/demo-apps/android/ExecuTorchDemo/app/src/main/java/com/example/executorchdemo/executor/Tensor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ public long[] shape() {
362362
return Arrays.copyOf(shape, shape.length);
363363
}
364364

365-
/** @return data type of this tensor. */
365+
/**
366+
* @return data type of this tensor.
367+
*/
366368
public abstract DType dtype();
367369

368370
// Called from native
@@ -646,6 +648,7 @@ private static void checkShapeAndDataCapacityConsistency(int dataCapacity, long[
646648
numel,
647649
Arrays.toString(shape));
648650
}
651+
649652
// endregion checks
650653

651654
// Called from native

0 commit comments

Comments
 (0)