Skip to content

Commit

Permalink
Migrate google java format from 1.7 -> 1.21.0 (pytorch#1771)
Browse files Browse the repository at this point in the history
Summary:
X-link: facebook/screenshot-tests-for-android#324

Pull Request resolved: pytorch#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

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
  • Loading branch information
Jeff Bahr authored and facebook-github-bot committed Mar 22, 2024
1 parent a6aefc0 commit 97782fc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ public class ImageNetClasses {
"Scottish deerhound, deerhound",
"Weimaraner",
"Staffordshire bullterrier, Staffordshire bull terrier",
"American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier",
"American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull"
+ " terrier",
"Bedlington terrier",
"Border terrier",
"Kerry blue terrier",
Expand Down Expand Up @@ -330,7 +331,8 @@ public class ImageNetClasses {
"cicada, cicala",
"leafhopper",
"lacewing, lacewing fly",
"dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk",
"dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake"
+ " doctor, mosquito hawk, skeeter hawk",
"damselfly",
"admiral",
"ringlet, ringlet butterfly",
Expand Down Expand Up @@ -360,7 +362,8 @@ public class ImageNetClasses {
"water buffalo, water ox, Asiatic buffalo, Bubalus bubalis",
"bison",
"ram, tup",
"bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis",
"bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis"
+ " canadensis",
"ibex, Capra ibex",
"hartebeest",
"impala, Aepyceros melampus",
Expand Down Expand Up @@ -423,7 +426,8 @@ public class ImageNetClasses {
"analog clock",
"apiary, bee house",
"apron",
"ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin",
"ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel,"
+ " trash bin",
"assault rifle, assault gun",
"backpack, back pack, knapsack, packsack, rucksack, haversack",
"bakery, bakeshop, bakehouse",
Expand Down Expand Up @@ -491,7 +495,8 @@ public class ImageNetClasses {
"carpenter's kit, tool kit",
"carton",
"car wheel",
"cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM",
"cash machine, cash dispenser, automated teller machine, automatic teller machine,"
+ " automated teller, automatic teller, ATM",
"cassette",
"cassette player",
"castle",
Expand Down Expand Up @@ -997,7 +1002,8 @@ public class ImageNetClasses {
"scuba diver",
"rapeseed",
"daisy",
"yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum",
"yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium"
+ " parviflorum",
"corn",
"acorn",
"hip, rose hip, rosehip",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public static EValue from(Tensor tensor) {
iv.mData = tensor;
return iv;
}

/** Creates a new {@code EValue} of type {@code bool}. */
@DoNotStrip
public static EValue from(boolean value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ public long[] shape() {
return Arrays.copyOf(shape, shape.length);
}

/** @return data type of this tensor. */
/**
* @return data type of this tensor.
*/
public abstract DType dtype();

// Called from native
Expand Down Expand Up @@ -646,6 +648,7 @@ private static void checkShapeAndDataCapacityConsistency(int dataCapacity, long[
numel,
Arrays.toString(shape));
}

// endregion checks

// Called from native
Expand Down

0 comments on commit 97782fc

Please sign in to comment.