Format Java code in xplat/js/react-native-github

Summary:
This diff formats the Java class files inside xplat/js/react-native-github. Since google-java-format was enabled in D16071401 we want to codemode the existing code so that users don't have to deal with formatter lint noise at diff-time.

```arc f --paths-cmd 'hg files -I "**/*.java"'```

drop-conflicts

Reviewed By: cpojer

Differential Revision: D16071725

fbshipit-source-id: fc6e3852e45742c109f0c5ac4065d64201c74204
This commit is contained in:
Oleksandr Melnykov
2019-07-02 04:13:35 -07:00
committed by Facebook Github Bot
parent 61e95e5cbf
commit 6c0f73b322
681 changed files with 14085 additions and 16368 deletions
@@ -1,16 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.facebook.common.logging;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import javax.annotation.Nullable;
public final class FakeLoggingDelegate implements LoggingDelegate {
@@ -21,11 +19,7 @@ public final class FakeLoggingDelegate implements LoggingDelegate {
public final String msg;
public final @Nullable Throwable tr;
private LogLine(
int priority,
String tag,
String msg,
@Nullable Throwable tr) {
private LogLine(int priority, String tag, String msg, @Nullable Throwable tr) {
this.priority = priority;
this.tag = tag;
@@ -34,35 +28,30 @@ public final class FakeLoggingDelegate implements LoggingDelegate {
}
}
public static final int ASSERT = FLog.ASSERT;
public static final int DEBUG = FLog.DEBUG;
public static final int ERROR = FLog.ERROR;
public static final int INFO = FLog.INFO;
public static final int ASSERT = FLog.ASSERT;
public static final int DEBUG = FLog.DEBUG;
public static final int ERROR = FLog.ERROR;
public static final int INFO = FLog.INFO;
public static final int VERBOSE = FLog.VERBOSE;
public static final int WARN = FLog.WARN;
public static final int WARN = FLog.WARN;
/**
* There is no log level for Terrible Failures (we emit them at the Error
* Log-level), but to test that WTF errors are being logged, we are making up
* a new log level here, guaranteed to be larger than any of the other log
* levels.
* There is no log level for Terrible Failures (we emit them at the Error Log-level), but to test
* that WTF errors are being logged, we are making up a new log level here, guaranteed to be
* larger than any of the other log levels.
*/
public static final int WTF =
1 + Collections.max(Arrays.asList(ASSERT, DEBUG, ERROR, INFO, VERBOSE, WARN));
1 + Collections.max(Arrays.asList(ASSERT, DEBUG, ERROR, INFO, VERBOSE, WARN));
private int mMinLogLevel = FLog.VERBOSE;
private final ArrayList<LogLine> mLogs = new ArrayList<>();
/** Test Harness */
private static boolean matchLogQuery(
int priority,
String tag,
@Nullable String throwMsg,
LogLine line) {
int priority, String tag, @Nullable String throwMsg, LogLine line) {
return priority == line.priority
&& tag.equals(line.tag)
&& (throwMsg == null || throwMsg.equals(line.tr.getMessage()));
&& tag.equals(line.tag)
&& (throwMsg == null || throwMsg.equals(line.tr.getMessage()));
}
public boolean logContains(int priority, String tag, String throwMsg) {
@@ -76,7 +65,6 @@ public final class FakeLoggingDelegate implements LoggingDelegate {
}
/** LoggingDelegate API */
public int getMinimumLoggingLevel() {
return mMinLogLevel;
}