diff --git a/flink-formats/flink-protobuf/pom.xml b/flink-formats/flink-protobuf/pom.xml index f25d37bd964bc7..d83a0e19d8a0b0 100644 --- a/flink-formats/flink-protobuf/pom.xml +++ b/flink-formats/flink-protobuf/pom.xml @@ -61,6 +61,7 @@ under the License. com.google.protobuf protobuf-java ${protobuf.version} + provided org.codehaus.janino diff --git a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/OuterMultiProtoToRowTest.java b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/OuterMultiProtoToRowTest.java index a15fc4e49682c0..695ffb652b59a4 100644 --- a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/OuterMultiProtoToRowTest.java +++ b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/OuterMultiProtoToRowTest.java @@ -51,7 +51,7 @@ public void testSimple() throws Exception { .setD(0.1f) .setE(0.01) .setF("haha") - .setG(ByteString.copyFrom(new byte[]{1})) + .setG(ByteString.copyFrom(new byte[] {1})) .build(); RowData row = deserializationSchema.deserialize(simple.toByteArray()); diff --git a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/Pb3ToRowTest.java b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/Pb3ToRowTest.java index 7e7b59572aceb1..12e38ce37a24fb 100644 --- a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/Pb3ToRowTest.java +++ b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/Pb3ToRowTest.java @@ -56,7 +56,7 @@ public void testMessage() throws Exception { .setF(Corpus.IMAGES) .setG(innerMessageTest) .addH(innerMessageTest) - .setI(ByteString.copyFrom(new byte[]{100})) + .setI(ByteString.copyFrom(new byte[] {100})) .putMap1("a", "b") .putMap1("c", "d") .putMap2("f", innerMessageTest) diff --git a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToMultipleLevelMessageProtoBytesTest.java b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToMultipleLevelMessageProtoBytesTest.java index 1c30bbe958f56e..920e47c3f996db 100644 --- a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToMultipleLevelMessageProtoBytesTest.java +++ b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToMultipleLevelMessageProtoBytesTest.java @@ -26,6 +26,7 @@ import org.junit.Test; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; public class RowToMultipleLevelMessageProtoBytesTest { diff --git a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedMessageProtoBytesTest.java b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedMessageProtoBytesTest.java index e5b9c44bf499f8..41602c4073a32b 100644 --- a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedMessageProtoBytesTest.java +++ b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedMessageProtoBytesTest.java @@ -28,12 +28,14 @@ import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class RowToRepeatedMessageProtoBytesTest { @Test public void testRepeatedMessage() throws Exception { RowData subRow = GenericRowData.of(1, 2L); RowData subRow2 = GenericRowData.of(3, 4L); - ArrayData tmp = new GenericArrayData(new Object[]{subRow, subRow2}); + ArrayData tmp = new GenericArrayData(new Object[] {subRow, subRow2}); RowData row = GenericRowData.of(tmp); RowType rowType = PbRowTypeInformation.generateRowType(RepeatedMessageTest.getDescriptor()); diff --git a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedProtoBytesTest.java b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedProtoBytesTest.java index aaf93c1ed4769e..17ddd89c69a444 100644 --- a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedProtoBytesTest.java +++ b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToRepeatedProtoBytesTest.java @@ -28,13 +28,15 @@ import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class RowToRepeatedProtoBytesTest { @Test public void testSimple() throws Exception { RowData row = GenericRowData.of( 1, - new GenericArrayData(new Object[]{1L, 2L, 3L}), + new GenericArrayData(new Object[] {1L, 2L, 3L}), false, 0.1f, 0.01, @@ -59,7 +61,7 @@ public void testEmptyArray() throws Exception { RowData row = GenericRowData.of( 1, - new GenericArrayData(new Object[]{}), + new GenericArrayData(new Object[] {}), false, 0.1f, 0.01, diff --git a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToSimpleProtoBytesTest.java b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToSimpleProtoBytesTest.java index 65ce3342860eca..1292e7e9bda67c 100644 --- a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToSimpleProtoBytesTest.java +++ b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/RowToSimpleProtoBytesTest.java @@ -42,7 +42,7 @@ public void testSimple() throws Exception { 0.1f, 0.01, StringData.fromString("hello"), - new byte[]{1}, + new byte[] {1}, StringData.fromString("IMAGES"), 1); diff --git a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/SimpleProtoToRowTest.java b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/SimpleProtoToRowTest.java index a103a354be20a2..1313ae26af8459 100644 --- a/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/SimpleProtoToRowTest.java +++ b/flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/SimpleProtoToRowTest.java @@ -51,7 +51,7 @@ public void testSimple() throws Exception { .setD(0.1f) .setE(0.01) .setF("haha") - .setG(ByteString.copyFrom(new byte[]{1})) + .setG(ByteString.copyFrom(new byte[] {1})) .setH(SimpleTest.Corpus.IMAGES) .setFAbc7D(1) // test fieldNameToJsonName .build();