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:16:46 -07:00
committed by Facebook Github Bot
parent 61e95e5cbf
commit 6c0f73b322
681 changed files with 14082 additions and 16365 deletions
@@ -1,56 +1,47 @@
/**
* 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.react.uimanager;
import java.util.Map;
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.touch.JSResponderHandler;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactTestHelper;
import com.facebook.react.bridge.JavaOnlyMap;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.uimanager.annotations.ReactProp;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.RobolectricTestRunner;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.rule.PowerMockRule;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.fest.assertions.api.Assertions.offset;
/**
* Verify {@link View} view property being applied properly by {@link SimpleViewManager}
*/
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.JavaOnlyMap;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactTestHelper;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.touch.JSResponderHandler;
import com.facebook.react.uimanager.annotations.ReactProp;
import java.util.Map;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.rule.PowerMockRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
/** Verify {@link View} view property being applied properly by {@link SimpleViewManager} */
@RunWith(RobolectricTestRunner.class)
@PowerMockIgnore({"org.mockito.*", "org.robolectric.*", "androidx.*", "android.*"})
public class SimpleViewPropertyTest {
@Rule
public PowerMockRule rule = new PowerMockRule();
@Rule public PowerMockRule rule = new PowerMockRule();
private static class ConcreteViewManager extends SimpleViewManager<View> {
@ReactProp(name = "foo")
public void setFoo(View view, boolean foo) {
}
public void setFoo(View view, boolean foo) {}
@ReactProp(name = "bar")
public void setBar(View view, ReadableMap bar) {
}
public void setBar(View view, ReadableMap bar) {}
@Override
protected View createViewInstance(ThemedReactContext reactContext) {
@@ -103,10 +94,10 @@ public class SimpleViewPropertyTest {
assertThat(view.getBackground()).isEqualTo(null);
mManager.updateProperties(view, buildStyles("backgroundColor", 12));
assertThat(((ColorDrawable)view.getBackground()).getColor()).isEqualTo(12);
assertThat(((ColorDrawable) view.getBackground()).getColor()).isEqualTo(12);
mManager.updateProperties(view, buildStyles("backgroundColor", null));
assertThat(((ColorDrawable)view.getBackground()).getColor()).isEqualTo(0);
assertThat(((ColorDrawable) view.getBackground()).getColor()).isEqualTo(0);
}
@Test