Skip to content

Commit

Permalink
Migrate google java format from 1.7 -> 1.21.0 (facebook#5456)
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

Pull Request resolved: facebook#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 dcff1a9 commit e3d0143
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ public void insertSampleData(SQLiteDatabase db) {
contentValues.put("column1", "Long text data for testing resizing");
contentValues.put(
"column2",
"extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra extra Long text data for testing resizing");
"extra extra extra extra extra extra extra extra extra extra extra extra extra extra"
+ " extra extra extra extra extra extra extra extra extra extra extra extra extra"
+ " extra extra extra extra extra extra extra extra extra Long text data for testing"
+ " resizing");
db.insert("db2_first_table", null, contentValues);
db.insert("db2_second_table", null, contentValues);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static CrashReporterPlugin getInstance() {

return crashreporterPlugin;
}

/*
* Activity to be used to display incoming messages
*/
Expand All @@ -42,6 +43,7 @@ public void setActivity(Activity activity) {
public void onConnect(FlipperConnection connection) {
mConnection = connection;
}

// This function is called from Litho's error boundary.
public void sendExceptionMessage(Thread paramThread, Throwable paramThrowable) {
if (mConnection != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static IDE fromString(final String ide) {
public interface ExtensionCommand {
/** The command to respond to */
String command();

/** The corresponding FlipperReceiver for the command */
FlipperReceiver receiver(ObjectTracker tracker, FlipperConnection connection);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ public String getAXName(T node) throws Exception {
return "";
}

/** @return The number of children this node exposes in the inspector. */
/**
* @return The number of children this node exposes in the inspector.
*/
public abstract int getChildCount(T node) throws Exception;

/** Gets child at index for AX tree. Ignores non-view children. */
public int getAXChildCount(T node) throws Exception {
return getChildCount(node);
}

/** @return The child at index. */
/**
* @return The child at index.
*/
public abstract Object getChildAt(T node, int index) throws Exception;

/** Gets child at index for AX tree. Ignores non-view children. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public interface Touch {
*/
void continueWithOffset(int childIndex, int offsetX, int offsetY);

/** @return Whether or not this Touch is contained within the provided bounds. */
/**
* @return Whether or not this Touch is contained within the provided bounds.
*/
boolean containedIn(int l, int t, int r, int b);
}
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ public void testCommandGetTableInfo() throws Exception {
new FlipperObject.Builder()
.put(
"definition",
"CREATE TABLE first_table (_id INTEGER PRIMARY KEY AUTOINCREMENT,column1 TEXT,column2 TEXT)")
"CREATE TABLE first_table (_id INTEGER PRIMARY KEY AUTOINCREMENT,column1"
+ " TEXT,column2 TEXT)")
.build()));
}

Expand Down

0 comments on commit e3d0143

Please sign in to comment.