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,27 +1,24 @@
/**
* 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 static org.fest.assertions.api.Assertions.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import static org.fest.assertions.api.Assertions.assertThat;
/**
* Test for {@link MatrixMathHelper}
*/
/** Test for {@link MatrixMathHelper} */
@RunWith(RobolectricTestRunner.class)
public class MatrixMathHelperTest {
private void verifyZRotatedMatrix(double degrees, double rotX, double rotY, double rotZ) {
MatrixMathHelper.MatrixDecompositionContext ctx =
new MatrixMathHelper.MatrixDecompositionContext();
new MatrixMathHelper.MatrixDecompositionContext();
double[] matrix = createRotateZ(degreesToRadians(degrees));
MatrixMathHelper.decomposeMatrix(matrix, ctx);
assertThat(ctx.rotationDegrees).containsSequence(rotX, rotY, rotZ);
@@ -29,7 +26,7 @@ public class MatrixMathHelperTest {
private void verifyYRotatedMatrix(double degrees, double rotX, double rotY, double rotZ) {
MatrixMathHelper.MatrixDecompositionContext ctx =
new MatrixMathHelper.MatrixDecompositionContext();
new MatrixMathHelper.MatrixDecompositionContext();
double[] matrix = createRotateY(degreesToRadians(degrees));
MatrixMathHelper.decomposeMatrix(matrix, ctx);
assertThat(ctx.rotationDegrees).containsSequence(rotX, rotY, rotZ);
@@ -37,15 +34,16 @@ public class MatrixMathHelperTest {
private void verifyXRotatedMatrix(double degrees, double rotX, double rotY, double rotZ) {
MatrixMathHelper.MatrixDecompositionContext ctx =
new MatrixMathHelper.MatrixDecompositionContext();
new MatrixMathHelper.MatrixDecompositionContext();
double[] matrix = createRotateX(degreesToRadians(degrees));
MatrixMathHelper.decomposeMatrix(matrix, ctx);
assertThat(ctx.rotationDegrees).containsSequence(rotX, rotY, rotZ);
}
private void verifyRotatedMatrix(double degreesX, double degreesY, double degreesZ, double rotX, double rotY, double rotZ) {
private void verifyRotatedMatrix(
double degreesX, double degreesY, double degreesZ, double rotX, double rotY, double rotZ) {
MatrixMathHelper.MatrixDecompositionContext ctx =
new MatrixMathHelper.MatrixDecompositionContext();
new MatrixMathHelper.MatrixDecompositionContext();
double[] matrixX = createRotateX(degreesToRadians(degreesX));
double[] matrixY = createRotateY(degreesToRadians(degreesY));
double[] matrixZ = createRotateZ(degreesToRadians(degreesZ));
@@ -61,15 +59,14 @@ public class MatrixMathHelperTest {
public void testDecomposing4x4MatrixToProduceAccurateZaxisAngles() {
MatrixMathHelper.MatrixDecompositionContext ctx =
new MatrixMathHelper.MatrixDecompositionContext();
new MatrixMathHelper.MatrixDecompositionContext();
MatrixMathHelper.decomposeMatrix(
new double[]{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1},
ctx);
new double[] {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, ctx);
assertThat(ctx.rotationDegrees).containsSequence(0d, 0d, 0d);
double[] angles = new double[]{30, 45, 60, 75, 90, 100, 115, 120, 133, 167};
double[] angles = new double[] {30, 45, 60, 75, 90, 100, 115, 120, 133, 167};
for (double angle : angles) {
verifyZRotatedMatrix(angle, 0d, 0d, angle);
verifyZRotatedMatrix(-angle, 0d, 0d, -angle);
@@ -103,7 +100,7 @@ public class MatrixMathHelperTest {
@Test
public void testDecomposing4x4MatrixToProduceAccurateYaxisAngles() {
double[] angles = new double[]{30, 45, 60, 75, 90};
double[] angles = new double[] {30, 45, 60, 75, 90};
for (double angle : angles) {
verifyYRotatedMatrix(angle, 0d, angle, 0d);
verifyYRotatedMatrix(-angle, 0d, -angle, 0d);
@@ -120,7 +117,7 @@ public class MatrixMathHelperTest {
@Test
public void testDecomposing4x4MatrixToProduceAccurateXaxisAngles() {
double[] angles = new double[]{30, 45, 60, 75, 90, 100, 110, 120, 133, 167};
double[] angles = new double[] {30, 45, 60, 75, 90, 100, 110, 120, 133, 167};
for (double angle : angles) {
verifyXRotatedMatrix(angle, angle, 0d, 0d);
verifyXRotatedMatrix(-angle, -angle, 0d, 0d);