Skip to content

Commit 42d59d7

Browse files
j-bahrfacebook-github-bot
authored andcommitted
Migrate google java format from 1.7 -> 1.21.0 (#1771)
Summary: X-link: facebookexternal/OculusManufacturing#524 X-link: facebookexternal/fbpay#3 X-link: facebook/screenshot-tests-for-android#324 Pull Request resolved: #1771 X-link: facebook/igl#68 X-link: facebook/mariana-trench#153 X-link: facebook/fresco#2757 X-link: facebook/litho#974 X-link: facebook/react-native#42754 X-link: facebook/hhvm#9431 X-link: WhatsApp/eqwalizer#52 X-link: facebookincubator/spectrum#1858 X-link: fbsamples/metapay#1 X-link: facebookincubator/fbjni#95 X-link: facebookincubator/Battery-Metrics#30 X-link: facebook/ktfmt#440 X-link: facebook/flipper#5456 X-link: facebook/hermes#1290 X-link: facebook/TextLayoutBuilder#35 X-link: facebook/SoLoader#122 allow-large-files This diff migrates google java format form 1.7 to 1.21.0. 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.21.0 Reviewed By: IanChilds Differential Revision: D52786052 fbshipit-source-id: b675ae215084f340b93dfe628e329e696ca0616e
1 parent 126f918 commit 42d59d7

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-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",

extension/android/src/main/java/org/pytorch/executorch/EValue.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ public static EValue from(Tensor tensor) {
136136
iv.mData = tensor;
137137
return iv;
138138
}
139+
139140
/** Creates a new {@code EValue} of type {@code bool}. */
140141
@DoNotStrip
141142
public static EValue from(boolean value) {

extension/android/src/main/java/org/pytorch/executorch/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)