Skip to content

Commit

Permalink
Migrate google java format from 1.7 -> 1.21.0
Browse files Browse the repository at this point in the history
Summary:
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
j-bahr authored and facebook-github-bot committed Mar 20, 2024
1 parent d6784cc commit 09d41db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public void test() {
String inputClassString = BytecodeProcessing.bytecodeMethodsToString(inputClass);
String inputClassStringDesugared =
inputClassString.replace(
"INVOKEVIRTUAL java/lang/invoke/MethodHandle.invokeExact (Ljava/lang/String;CC)Ljava/lang/String;",
"INVOKEVIRTUAL java/lang/invoke/MethodHandle.invokeExact"
+ " (Ljava/lang/String;CC)Ljava/lang/String;",
"POP\n POP\n POP");
String outputClassString = BytecodeProcessing.bytecodeMethodsToString(writer.toByteArray());
assertThat(inputClassStringDesugared).isEqualTo(outputClassString);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private class Tree {
public Tree c;
public Tree d;
public Tree e;
};
}

public Tree widened_source_sink_depth(Tree argument) {
Origin.sink(argument.a.b.c.d.e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static Object propagate(Object x) {
private static class Tree {
public Tree foo;
public Tree bar;
};
}

static Tree return_sink_foo(Tree tree) {
return tree;
Expand Down

0 comments on commit 09d41db

Please sign in to comment.