From 222ce247033d5e3b2f7da9cd97a35432e819f220 Mon Sep 17 00:00:00 2001 From: Hongze Zhang Date: Fri, 17 Dec 2021 11:43:47 +0800 Subject: [PATCH] fix --- .../dataset/file/TestFileSystemDataset.java | 30 ++++++++----------- java/pom.xml | 26 ++++++++-------- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/java/dataset/src/test/java/org/apache/arrow/dataset/file/TestFileSystemDataset.java b/java/dataset/src/test/java/org/apache/arrow/dataset/file/TestFileSystemDataset.java index af3338aff0305..0e0d0b784ff93 100644 --- a/java/dataset/src/test/java/org/apache/arrow/dataset/file/TestFileSystemDataset.java +++ b/java/dataset/src/test/java/org/apache/arrow/dataset/file/TestFileSystemDataset.java @@ -368,24 +368,20 @@ private void checkParquetReadResult(Schema schema, List expected, try (VectorSchemaRoot vsr = VectorSchemaRoot.create(schema, rootAllocator())) { VectorLoader loader = new VectorLoader(vsr); for (ArrowRecordBatch batch : actual) { - try { - assertEquals(fieldCount, batch.getNodes().size()); - loader.load(batch); - int batchRowCount = vsr.getRowCount(); - for (int i = 0; i < fieldCount; i++) { - FieldVector vector = vsr.getVector(i); - for (int j = 0; j < batchRowCount; j++) { - Object object = vector.getObject(j); - Object expectedObject = expectedRemovable.get(j).get(i); - assertEquals(Objects.toString(expectedObject), - Objects.toString(object)); - } + assertEquals(fieldCount, batch.getNodes().size()); + loader.load(batch); + int batchRowCount = vsr.getRowCount(); + for (int i = 0; i < fieldCount; i++) { + FieldVector vector = vsr.getVector(i); + for (int j = 0; j < batchRowCount; j++) { + Object object = vector.getObject(j); + Object expectedObject = expectedRemovable.get(j).get(i); + assertEquals(Objects.toString(expectedObject), + Objects.toString(object)); } - for (int i = 0; i < batchRowCount; i++) { - expectedRemovable.poll(); - } - } finally { - batch.close(); + } + for (int i = 0; i < batchRowCount; i++) { + expectedRemovable.poll(); } } assertTrue(expectedRemovable.isEmpty()); diff --git a/java/pom.xml b/java/pom.xml index 007f4533ad35a..09a0530dd14bb 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -740,19 +740,19 @@ org.apache.maven.plugins maven-compiler-plugin - - - -XDcompilePolicy=simple - -Xplugin:ErrorProne - - - - com.google.errorprone - error_prone_core - 2.4.0 - - - + + + + + + + + + + + + +