arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [1/5] arrow git commit: ARROW-1304: [Java] Fix Indentation, WhitespaceAround and EmptyLineSeparator checkstyle warnings in Java
Date Mon, 07 Aug 2017 19:05:54 GMT
Repository: arrow
Updated Branches:
  refs/heads/master f9d983391 -> 7a4026a2b


http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/DirtyRootAllocator.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/DirtyRootAllocator.java b/java/vector/src/test/java/org/apache/arrow/vector/DirtyRootAllocator.java
index f775f1d..febd59f 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/DirtyRootAllocator.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/DirtyRootAllocator.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import org.apache.arrow.memory.BufferManager;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestBitVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestBitVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestBitVector.java
index 194b785..495bed3 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestBitVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestBitVector.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.junit.Assert.assertEquals;
@@ -75,11 +76,10 @@ public class TestBitVector {
       sourceVector.allocateNew(40);
 
       /* populate the bitvector -- 010101010101010101010101..... */
-      for(int i = 0; i < 40; i++) {
-        if((i & 1) ==  1) {
+      for (int i = 0; i < 40; i++) {
+        if ((i & 1) == 1) {
           sourceMutator.set(i, 1);
-        }
-        else {
+        } else {
           sourceMutator.set(i, 0);
         }
       }
@@ -87,18 +87,17 @@ public class TestBitVector {
       sourceMutator.setValueCount(40);
 
       /* check the vector output */
-      for(int i = 0; i < 40; i++) {
+      for (int i = 0; i < 40; i++) {
         int result = sourceAccessor.get(i);
-        if((i & 1) ==  1) {
+        if ((i & 1) == 1) {
           assertEquals(Integer.toString(1), Integer.toString(result));
-        }
-        else {
+        } else {
           assertEquals(Integer.toString(0), Integer.toString(result));
         }
       }
 
       final TransferPair transferPair = sourceVector.getTransferPair(allocator);
-      final BitVector toVector = (BitVector)transferPair.getTo();
+      final BitVector toVector = (BitVector) transferPair.getTo();
       final BitVector.Accessor toAccessor = toVector.getAccessor();
       final BitVector.Mutator toMutator = toVector.getMutator();
 
@@ -110,13 +109,13 @@ public class TestBitVector {
        *    (2.1) the length is a multiple of 8
        *    (2.2) the length is not a multiple of 8
        */
-      final int[][] transferLengths = {  {0, 8},     /* (1) */
-                                         {8, 10},    /* (1) */
-                                         {18, 0},    /* zero length scenario */
-                                         {18, 8},    /* (2.1) */
-                                         {26, 0},    /* zero length scenario */
-                                         {26, 14}    /* (2.2) */
-                                      };
+      final int[][] transferLengths = {{0, 8},     /* (1) */
+          {8, 10},    /* (1) */
+          {18, 0},    /* zero length scenario */
+          {18, 8},    /* (2.1) */
+          {26, 0},    /* zero length scenario */
+          {26, 14}    /* (2.2) */
+      };
 
       for (final int[] transferLength : transferLengths) {
         final int start = transferLength[0];
@@ -127,10 +126,9 @@ public class TestBitVector {
         /* check the toVector output after doing splitAndTransfer */
         for (int i = 0; i < length; i++) {
           int result = toAccessor.get(i);
-          if((i & 1) == 1) {
+          if ((i & 1) == 1) {
             assertEquals(Integer.toString(1), Integer.toString(result));
-          }
-          else {
+          } else {
             assertEquals(Integer.toString(0), Integer.toString(result));
           }
         }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestBufferOwnershipTransfer.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestBufferOwnershipTransfer.java b/java/vector/src/test/java/org/apache/arrow/vector/TestBufferOwnershipTransfer.java
index 08e3700..54fc306 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestBufferOwnershipTransfer.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestBufferOwnershipTransfer.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.junit.Assert.assertEquals;
@@ -65,7 +66,7 @@ public class TestBufferOwnershipTransfer {
     v1.makeTransferPair(v2).transfer();
 
     assertEquals(0, childAllocator1.getAllocatedMemory());
-    int expected = 8*4096 + 4*4096 + 4096;
+    int expected = 8 * 4096 + 4 * 4096 + 4096;
     assertEquals(expected, childAllocator2.getAllocatedMemory());
   }
 
@@ -90,11 +91,11 @@ public class TestBufferOwnershipTransfer {
     final Pointer<Boolean> trigger1 = new Pointer<>();
     final Pointer<Boolean> trigger2 = new Pointer<>();
     final ListVector v1 = new ListVector("v1", allocator,
-            FieldType.nullable(ArrowType.Null.INSTANCE),
-            newTriggerCallback(trigger1));
+        FieldType.nullable(ArrowType.Null.INSTANCE),
+        newTriggerCallback(trigger1));
     final ListVector v2 = new ListVector("v2", allocator,
-            FieldType.nullable(ArrowType.Null.INSTANCE),
-            newTriggerCallback(trigger2));
+        FieldType.nullable(ArrowType.Null.INSTANCE),
+        newTriggerCallback(trigger2));
 
     v1.makeTransferPair(v2).transfer();
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestDecimalVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestDecimalVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestDecimalVector.java
index b98c24d..774fbe0 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestDecimalVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestDecimalVector.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.junit.Assert.assertEquals;
@@ -39,6 +40,7 @@ public class TestDecimalVector {
       intValues[2 * i] = -1 * (1 << i + 1);
     }
   }
+
   private int scale = 3;
 
   @Test

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestDictionaryVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestDictionaryVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestDictionaryVector.java
index 3bf3b1c..f2db9ba 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestDictionaryVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestDictionaryVector.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.apache.arrow.vector.TestUtils.newNullableVarCharVector;
@@ -35,8 +36,8 @@ public class TestDictionaryVector {
   private BufferAllocator allocator;
 
   byte[] zero = "foo".getBytes(StandardCharsets.UTF_8);
-  byte[] one  = "bar".getBytes(StandardCharsets.UTF_8);
-  byte[] two  = "baz".getBytes(StandardCharsets.UTF_8);
+  byte[] one = "bar".getBytes(StandardCharsets.UTF_8);
+  byte[] two = "baz".getBytes(StandardCharsets.UTF_8);
 
   @Before
   public void init() {
@@ -74,7 +75,7 @@ public class TestDictionaryVector {
 
       Dictionary dictionary = new Dictionary(dictionaryVector, new DictionaryEncoding(1L, false, null));
 
-      try(final ValueVector encoded = (FieldVector) DictionaryEncoder.encode(vector, dictionary)) {
+      try (final ValueVector encoded = (FieldVector) DictionaryEncoder.encode(vector, dictionary)) {
         // verify indices
         assertEquals(NullableIntVector.class, encoded.getClass());
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestFixedSizeListVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestFixedSizeListVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestFixedSizeListVector.java
index 304db9d..5677f25 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestFixedSizeListVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestFixedSizeListVector.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import com.google.common.collect.Lists;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestListVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestListVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestListVector.java
index eb30fdd..fdb576e 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestListVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestListVector.java
@@ -15,12 +15,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
 
 import org.apache.arrow.memory.BufferAllocator;
 import org.apache.arrow.vector.complex.ListVector;
@@ -100,11 +101,11 @@ public class TestListVector {
 
       /* index 0 */
       Object result = accessor.getObject(0);
-      ArrayList<Long> resultSet = (ArrayList<Long>)result;
+      ArrayList<Long> resultSet = (ArrayList<Long>) result;
       assertEquals(3, resultSet.size());
-      assertEquals(new Long(1), (Long)resultSet.get(0));
-      assertEquals(new Long(2), (Long)resultSet.get(1));
-      assertEquals(new Long(3), (Long)resultSet.get(2));
+      assertEquals(new Long(1), (Long) resultSet.get(0));
+      assertEquals(new Long(2), (Long) resultSet.get(1));
+      assertEquals(new Long(3), (Long) resultSet.get(2));
 
       /* index 1 */
       result = accessor.getObject(1);
@@ -112,7 +113,7 @@ public class TestListVector {
 
       /* index 2 */
       result = accessor.getObject(2);
-      resultSet = (ArrayList<Long>)result;
+      resultSet = (ArrayList<Long>) result;
       assertEquals(0, resultSet.size());
     }
   }
@@ -130,11 +131,11 @@ public class TestListVector {
 
       /* get inner vectors; bitVector and offsetVector */
       List<BufferBacked> innerVectors = listVector.getFieldInnerVectors();
-      BitVector bitVector = (BitVector)innerVectors.get(0);
-      UInt4Vector offsetVector = (UInt4Vector)innerVectors.get(1);
+      BitVector bitVector = (BitVector) innerVectors.get(0);
+      UInt4Vector offsetVector = (UInt4Vector) innerVectors.get(1);
 
       /* get the underlying data vector -- NullableBigIntVector */
-      NullableBigIntVector dataVector = (NullableBigIntVector)listVector.getDataVector();
+      NullableBigIntVector dataVector = (NullableBigIntVector) listVector.getDataVector();
 
       /* check current lastSet */
       assertEquals(Integer.toString(0), Integer.toString(listVector.getMutator().getLastSet()));
@@ -220,36 +221,36 @@ public class TestListVector {
       assertEquals(Integer.toString(0), Integer.toString(offset));
 
       Object actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(10), (Long)actual);
+      assertEquals(new Long(10), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(11), (Long)actual);
+      assertEquals(new Long(11), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(12), (Long)actual);
+      assertEquals(new Long(12), (Long) actual);
 
       index++;
       offset = offsetAccessor.get(index);
       assertEquals(Integer.toString(3), Integer.toString(offset));
 
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(13), (Long)actual);
+      assertEquals(new Long(13), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(14), (Long)actual);
+      assertEquals(new Long(14), (Long) actual);
 
       index++;
       offset = offsetAccessor.get(index);
       assertEquals(Integer.toString(5), Integer.toString(offset));
 
       actual = valueAccessor.getObject(offsetAccessor.get(index));
-      assertEquals(new Long(15), (Long)actual);
+      assertEquals(new Long(15), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(16), (Long)actual);
+      assertEquals(new Long(16), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(17), (Long)actual);
+      assertEquals(new Long(17), (Long) actual);
 
       index++;
       offset = offsetAccessor.get(index);
@@ -313,10 +314,10 @@ public class TestListVector {
       assertEquals(5, listVector.getMutator().getLastSet());
 
       /* get offsetVector */
-      UInt4Vector offsetVector = (UInt4Vector)listVector.getOffsetVector();
+      UInt4Vector offsetVector = (UInt4Vector) listVector.getOffsetVector();
 
       /* get dataVector */
-      NullableBigIntVector dataVector = (NullableBigIntVector)listVector.getDataVector();
+      NullableBigIntVector dataVector = (NullableBigIntVector) listVector.getDataVector();
 
       /* check the vector output */
       final UInt4Vector.Accessor offsetAccessor = offsetVector.getAccessor();
@@ -332,13 +333,13 @@ public class TestListVector {
       assertEquals(Integer.toString(0), Integer.toString(offset));
 
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(10), (Long)actual);
+      assertEquals(new Long(10), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(11), (Long)actual);
+      assertEquals(new Long(11), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(12), (Long)actual);
+      assertEquals(new Long(12), (Long) actual);
 
       /* index 1 */
       index++;
@@ -347,10 +348,10 @@ public class TestListVector {
       assertEquals(Integer.toString(3), Integer.toString(offset));
 
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(13), (Long)actual);
+      assertEquals(new Long(13), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(14), (Long)actual);
+      assertEquals(new Long(14), (Long) actual);
 
       /* index 2 */
       index++;
@@ -359,16 +360,16 @@ public class TestListVector {
       assertEquals(Integer.toString(5), Integer.toString(offset));
 
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(15), (Long)actual);
+      assertEquals(new Long(15), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(16), (Long)actual);
+      assertEquals(new Long(16), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(17), (Long)actual);
+      assertEquals(new Long(17), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(18), (Long)actual);
+      assertEquals(new Long(18), (Long) actual);
 
       /* index 3 */
       index++;
@@ -377,7 +378,7 @@ public class TestListVector {
       assertEquals(Integer.toString(9), Integer.toString(offset));
 
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(19), (Long)actual);
+      assertEquals(new Long(19), (Long) actual);
 
       /* index 4 */
       index++;
@@ -386,16 +387,16 @@ public class TestListVector {
       assertEquals(Integer.toString(10), Integer.toString(offset));
 
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(20), (Long)actual);
+      assertEquals(new Long(20), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(21), (Long)actual);
+      assertEquals(new Long(21), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(22), (Long)actual);
+      assertEquals(new Long(22), (Long) actual);
       offset++;
       actual = valueAccessor.getObject(offset);
-      assertEquals(new Long(23), (Long)actual);
+      assertEquals(new Long(23), (Long) actual);
 
       /* index 5 */
       index++;
@@ -423,26 +424,26 @@ public class TestListVector {
           transferPair.splitAndTransfer(start, splitLength);
 
           /* get offsetVector of toVector */
-          UInt4Vector offsetVector1 = (UInt4Vector)toVector.getOffsetVector();
+          UInt4Vector offsetVector1 = (UInt4Vector) toVector.getOffsetVector();
           UInt4Vector.Accessor offsetAccessor1 = offsetVector1.getAccessor();
 
           /* get dataVector of toVector */
-          NullableBigIntVector dataVector1 = (NullableBigIntVector)toVector.getDataVector();
+          NullableBigIntVector dataVector1 = (NullableBigIntVector) toVector.getDataVector();
           NullableBigIntVector.Accessor valueAccessor1 = dataVector1.getAccessor();
 
-          for(int i = 0; i < splitLength; i++) {
+          for (int i = 0; i < splitLength; i++) {
             dataLength1 = offsetAccessor.get(start + i + 1) - offsetAccessor.get(start + i);
             dataLength2 = offsetAccessor1.get(i + 1) - offsetAccessor1.get(i);
 
             assertEquals("Different data lengths at index: " + i + " and start: " + start,
-                         dataLength1, dataLength2);
+                dataLength1, dataLength2);
 
             offset1 = offsetAccessor.get(start + i);
             offset2 = offsetAccessor1.get(i);
 
-            for(int j = 0; j < dataLength1; j++) {
+            for (int j = 0; j < dataLength1; j++) {
               assertEquals("Different data at indexes: " + offset1 + " and " + offset2,
-                            valueAccessor.getObject(offset1), valueAccessor1.getObject(offset2));
+                  valueAccessor.getObject(offset1), valueAccessor1.getObject(offset2));
 
               offset1++;
               offset2++;
@@ -515,7 +516,7 @@ public class TestListVector {
 
       /* get listVector value at index 0 -- the value itself is a listvector */
       Object result = accessor.getObject(0);
-      ArrayList<ArrayList<Long>> resultSet = (ArrayList<ArrayList<Long>>)result;
+      ArrayList<ArrayList<Long>> resultSet = (ArrayList<ArrayList<Long>>) result;
       ArrayList<Long> list;
 
       assertEquals(2, resultSet.size());              /* 2 inner lists at index 0 */
@@ -535,7 +536,7 @@ public class TestListVector {
 
        /* get listVector value at index 1 -- the value itself is a listvector */
       result = accessor.getObject(1);
-      resultSet = (ArrayList<ArrayList<Long>>)result;
+      resultSet = (ArrayList<ArrayList<Long>>) result;
 
       assertEquals(3, resultSet.size());              /* 3 inner lists at index 1 */
       assertEquals(1, resultSet.get(0).size());       /* size of first inner list */

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestOversizedAllocationForValueVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestOversizedAllocationForValueVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestOversizedAllocationForValueVector.java
index 9baebc5..ba2ebbf 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestOversizedAllocationForValueVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestOversizedAllocationForValueVector.java
@@ -90,7 +90,7 @@ public class TestOversizedAllocationForValueVector {
     // common: value count < MAX_VALUE_ALLOCATION
     try {
       vector.allocateNew(expectedValueCapacity);
-      for (int i=0; i<3;i++) {
+      for (int i = 0; i < 3; i++) {
         vector.reAlloc(); // expand buffer size
       }
       assertEquals(Integer.MAX_VALUE, vector.getValueCapacity());

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestUnionVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestUnionVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestUnionVector.java
index a515924..a75b196 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestUnionVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestUnionVector.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.junit.Assert.assertEquals;
@@ -98,7 +99,7 @@ public class TestUnionVector {
       mutator.setSafe(5, newBitHolder(false));
       mutator.setValueCount(6);
 
-      try(UnionVector destVector = new UnionVector(EMPTY_SCHEMA_PATH, allocator, null)) {
+      try (UnionVector destVector = new UnionVector(EMPTY_SCHEMA_PATH, allocator, null)) {
         TransferPair pair = srcVector.makeTransferPair(destVector);
 
         // Creating the transfer should transfer the type of the field at least.
@@ -111,7 +112,7 @@ public class TestUnionVector {
 
         // now check the values are transferred
         assertEquals(srcVector.getAccessor().getValueCount(), destVector.getAccessor().getValueCount());
-        for(int i=0; i<srcVector.getAccessor().getValueCount(); i++) {
+        for (int i = 0; i < srcVector.getAccessor().getValueCount(); i++) {
           assertEquals("Different values at index " + i, srcVector.getAccessor().get(i), destVector.getAccessor().get(i));
         }
       }
@@ -172,18 +173,18 @@ public class TestUnionVector {
       assertEquals(false, sourceAccessor.isNull(9));
       assertEquals(50, sourceAccessor.getObject(9));
 
-      try(UnionVector toVector = new UnionVector(EMPTY_SCHEMA_PATH, allocator, null)) {
+      try (UnionVector toVector = new UnionVector(EMPTY_SCHEMA_PATH, allocator, null)) {
 
         final TransferPair transferPair = sourceVector.makeTransferPair(toVector);
         final UnionVector.Accessor toAccessor = toVector.getAccessor();
 
-        final int[][] transferLengths = { {0, 3},
-                                          {3, 1},
-                                          {4, 2},
-                                          {6, 1},
-                                          {7, 1},
-                                          {8, 2}
-                                        };
+        final int[][] transferLengths = {{0, 3},
+            {3, 1},
+            {4, 2},
+            {6, 1},
+            {7, 1},
+            {8, 2}
+        };
 
         for (final int[] transferLength : transferLengths) {
           final int start = transferLength[0];
@@ -194,7 +195,7 @@ public class TestUnionVector {
           /* check the toVector output after doing the splitAndTransfer */
           for (int i = 0; i < length; i++) {
             assertEquals("Different data at indexes: " + (start + i) + "and " + i, sourceAccessor.getObject(start + i),
-                         toAccessor.getObject(i));
+                toAccessor.getObject(i));
           }
         }
       }
@@ -264,17 +265,17 @@ public class TestUnionVector {
       assertEquals(false, sourceAccessor.isNull(9));
       assertEquals(30.5f, sourceAccessor.getObject(9));
 
-      try(UnionVector toVector = new UnionVector(EMPTY_SCHEMA_PATH, allocator, null)) {
+      try (UnionVector toVector = new UnionVector(EMPTY_SCHEMA_PATH, allocator, null)) {
 
         final TransferPair transferPair = sourceVector.makeTransferPair(toVector);
         final UnionVector.Accessor toAccessor = toVector.getAccessor();
 
-        final int[][] transferLengths = { {0, 2},
-                                          {2, 1},
-                                          {3, 2},
-                                          {5, 3},
-                                          {8, 2}
-                                        };
+        final int[][] transferLengths = {{0, 2},
+            {2, 1},
+            {3, 2},
+            {5, 3},
+            {8, 2}
+        };
 
         for (final int[] transferLength : transferLengths) {
           final int start = transferLength[0];

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestUtils.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestUtils.java b/java/vector/src/test/java/org/apache/arrow/vector/TestUtils.java
index b79f2da..15f5117 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestUtils.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestUtils.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import org.apache.arrow.memory.BufferAllocator;
@@ -25,7 +26,7 @@ import org.apache.arrow.vector.types.pojo.FieldType;
 public class TestUtils {
 
   public static NullableVarCharVector newNullableVarCharVector(String name, BufferAllocator allocator) {
-    return (NullableVarCharVector)FieldType.nullable(new ArrowType.Utf8()).createNewSingleVector(name, allocator, null);
+    return (NullableVarCharVector) FieldType.nullable(new ArrowType.Utf8()).createNewSingleVector(name, allocator, null);
   }
 
   public static <T> T newVector(Class<T> c, String name, ArrowType type, BufferAllocator allocator) {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestValueVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestValueVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestValueVector.java
index 159d534..72214ed 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestValueVector.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestValueVector.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.apache.arrow.vector.TestUtils.newNullableVarCharVector;
@@ -394,7 +395,7 @@ public class TestValueVector {
   }
 
   private void validateRange(int length, int start, int count) {
-    String desc = "[" + start + ", "  + (start + count) + ") ";
+    String desc = "[" + start + ", " + (start + count) + ") ";
     try (BitVector bitVector = new BitVector("bits", allocator)) {
       bitVector.reset();
       bitVector.allocateNew(length);
@@ -489,7 +490,7 @@ public class TestValueVector {
   @Test
   public void testCopyFromWithNulls() {
     try (final NullableVarCharVector vector = newVector(NullableVarCharVector.class, EMPTY_SCHEMA_PATH, MinorType.VARCHAR, allocator);
-          final NullableVarCharVector vector2 = newVector(NullableVarCharVector.class, EMPTY_SCHEMA_PATH, MinorType.VARCHAR, allocator)) {
+         final NullableVarCharVector vector2 = newVector(NullableVarCharVector.class, EMPTY_SCHEMA_PATH, MinorType.VARCHAR, allocator)) {
       vector.allocateNew();
 
       for (int i = 0; i < 4095; i++) {
@@ -608,15 +609,15 @@ public class TestValueVector {
       VectorUnloader vectorUnloader = new VectorUnloader(schemaRoot1);
 
       try (
-              ArrowRecordBatch recordBatch = vectorUnloader.getRecordBatch();
-              BufferAllocator finalVectorsAllocator = allocator.newChildAllocator("new vector", 0, Long.MAX_VALUE);
-              VectorSchemaRoot schemaRoot2 = VectorSchemaRoot.create(schema, finalVectorsAllocator);
+          ArrowRecordBatch recordBatch = vectorUnloader.getRecordBatch();
+          BufferAllocator finalVectorsAllocator = allocator.newChildAllocator("new vector", 0, Long.MAX_VALUE);
+          VectorSchemaRoot schemaRoot2 = VectorSchemaRoot.create(schema, finalVectorsAllocator);
       ) {
 
         VectorLoader vectorLoader = new VectorLoader(schemaRoot2);
         vectorLoader.load(recordBatch);
 
-        NullableVarCharVector vector2 = (NullableVarCharVector)schemaRoot2.getVector(fieldName);
+        NullableVarCharVector vector2 = (NullableVarCharVector) schemaRoot2.getVector(fieldName);
         NullableVarCharVector.Mutator mutator2 = vector2.getMutator();
 
         /*

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java
index a5d5527..4ac7536 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java
index f369465..7facf73 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 import static java.util.Arrays.asList;
@@ -176,8 +177,9 @@ public class TestVectorUnloadLoad {
 
   /**
    * The validity buffer can be empty if:
-   *  - all values are defined
-   *  - all values are null
+   * - all values are defined
+   * - all values are null
+   *
    * @throws IOException
    */
   @Test
@@ -185,7 +187,7 @@ public class TestVectorUnloadLoad {
     Schema schema = new Schema(asList(
         new Field("intDefined", FieldType.nullable(new ArrowType.Int(32, true)), Collections.<Field>emptyList()),
         new Field("intNull", FieldType.nullable(new ArrowType.Int(32, true)), Collections.<Field>emptyList())
-                                     ));
+    ));
     int count = 10;
     ArrowBuf validity = allocator.buffer(10).slice(0, 0);
     ArrowBuf[] values = new ArrowBuf[2];
@@ -208,8 +210,8 @@ public class TestVectorUnloadLoad {
 
       vectorLoader.load(recordBatch);
 
-      NullableIntVector intDefinedVector = (NullableIntVector)newRoot.getVector("intDefined");
-      NullableIntVector intNullVector = (NullableIntVector)newRoot.getVector("intNull");
+      NullableIntVector intDefinedVector = (NullableIntVector) newRoot.getVector("intDefined");
+      NullableIntVector intNullVector = (NullableIntVector) newRoot.getVector("intNull");
       for (int i = 0; i < count; i++) {
         assertFalse("#" + i, intDefinedVector.getAccessor().isNull(i));
         assertEquals("#" + i, i, intDefinedVector.getAccessor().get(i));
@@ -244,20 +246,20 @@ public class TestVectorUnloadLoad {
   public void testUnloadLoadDuplicates() throws IOException {
     int count = 10;
     Schema schema = new Schema(asList(
-      new Field("duplicate", FieldType.nullable(new ArrowType.Int(32, true)), Collections.<Field>emptyList()),
-      new Field("duplicate", FieldType.nullable(new ArrowType.Int(32, true)), Collections.<Field>emptyList())
+        new Field("duplicate", FieldType.nullable(new ArrowType.Int(32, true)), Collections.<Field>emptyList()),
+        new Field("duplicate", FieldType.nullable(new ArrowType.Int(32, true)), Collections.<Field>emptyList())
     ));
 
     try (
-      BufferAllocator originalVectorsAllocator = allocator.newChildAllocator("original vectors", 0, Integer.MAX_VALUE);
+        BufferAllocator originalVectorsAllocator = allocator.newChildAllocator("original vectors", 0, Integer.MAX_VALUE);
     ) {
       List<FieldVector> sources = new ArrayList<>();
-      for (Field field: schema.getFields()) {
+      for (Field field : schema.getFields()) {
         FieldVector vector = field.createVector(originalVectorsAllocator);
         vector.allocateNew();
         sources.add(vector);
         NullableIntVector.Mutator mutator = (NullableIntVector.Mutator) vector.getMutator();
-        for (int i =  0; i < count; i++) {
+        for (int i = 0; i < count; i++) {
           mutator.set(i, i);
         }
         mutator.setValueCount(count);
@@ -266,8 +268,8 @@ public class TestVectorUnloadLoad {
       try (VectorSchemaRoot root = new VectorSchemaRoot(schema.getFields(), sources, count)) {
         VectorUnloader vectorUnloader = new VectorUnloader(root);
         try (ArrowRecordBatch recordBatch = vectorUnloader.getRecordBatch();
-                BufferAllocator finalVectorsAllocator = allocator.newChildAllocator("final vectors", 0, Integer.MAX_VALUE);
-                VectorSchemaRoot newRoot = VectorSchemaRoot.create(schema, finalVectorsAllocator);) {
+             BufferAllocator finalVectorsAllocator = allocator.newChildAllocator("final vectors", 0, Integer.MAX_VALUE);
+             VectorSchemaRoot newRoot = VectorSchemaRoot.create(schema, finalVectorsAllocator);) {
           // load it
           VectorLoader vectorLoader = new VectorLoader(newRoot);
           vectorLoader.load(recordBatch);

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/complex/impl/TestPromotableWriter.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/complex/impl/TestPromotableWriter.java b/java/vector/src/test/java/org/apache/arrow/vector/complex/impl/TestPromotableWriter.java
index e826fa5..97efb7d 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/complex/impl/TestPromotableWriter.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/complex/impl/TestPromotableWriter.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.complex.impl;
 
 import static org.junit.Assert.assertEquals;
@@ -67,7 +68,7 @@ public class TestPromotableWriter {
       writer.setPosition(1);
       writer.bit("A").writeBit(1);
 
-      writer.decimal("dec", 10,10);
+      writer.decimal("dec", 10, 10);
 
       writer.setPosition(2);
       writer.integer("A").writeInt(10);

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java b/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java
index 5a9c80d..f81cd55 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.complex.writer;
 
 import static org.junit.Assert.*;
@@ -217,7 +218,7 @@ public class TestComplexWriter {
     for (int i = 0; i < COUNT; i++) {
       listWriter.startList();
       for (int j = 0; j < i % 7; j++) {
-        if (j%2 == 0) {
+        if (j % 2 == 0) {
           listWriter.writeInt(j);
         } else {
           IntHolder holder = new IntHolder();
@@ -259,7 +260,7 @@ public class TestComplexWriter {
       listReader.setPosition(i);
       if (i % 2 == 0) {
         assertTrue("index is set: " + i, listReader.isSet());
-        assertEquals("correct length at: " + i, i % 7, ((List<?>)listReader.readObject()).size());
+        assertEquals("correct length at: " + i, i % 7, ((List<?>) listReader.readObject()).size());
       } else {
         assertFalse("index is not set: " + i, listReader.isSet());
         assertNull("index is not set: " + i, listReader.readObject());
@@ -529,10 +530,10 @@ public class TestComplexWriter {
 
   private Set<String> getFieldNames(List<Field> fields) {
     Set<String> fieldNames = new HashSet<>();
-    for (Field field: fields) {
+    for (Field field : fields) {
       fieldNames.add(field.getName());
       if (!field.getChildren().isEmpty()) {
-        for (String name: getFieldNames(field.getChildren())) {
+        for (String name : getFieldNames(field.getChildren())) {
           fieldNames.add(field.getName() + "::" + name);
         }
       }
@@ -698,7 +699,7 @@ public class TestComplexWriter {
 
   private void checkTimestampTZField(Field field, String name, String tz) {
     checkTimestampField(field, name);
-    Assert.assertEquals(tz, ((Timestamp)field.getType()).getTimezone());
+    Assert.assertEquals(tz, ((Timestamp) field.getType()).getTimezone());
   }
 
   @Test
@@ -824,13 +825,13 @@ public class TestComplexWriter {
     TransferPair tp = mapVector.getTransferPair(allocator);
     tp.splitAndTransfer(0, 1);
     MapVector toMapVector = (MapVector) tp.getTo();
-    JsonStringHashMap<?,?> toMapValue = (JsonStringHashMap<?,?>) toMapVector.getAccessor().getObject(0);
+    JsonStringHashMap<?, ?> toMapValue = (JsonStringHashMap<?, ?>) toMapVector.getAccessor().getObject(0);
     JsonStringArrayList<?> object = (JsonStringArrayList<?>) toMapValue.get("list");
     assertEquals(1, object.get(0));
     assertEquals(2, object.get(1));
-    JsonStringHashMap<?,?> innerMap = (JsonStringHashMap<?,?>) object.get(2);
+    JsonStringHashMap<?, ?> innerMap = (JsonStringHashMap<?, ?>) object.get(2);
     assertEquals(1, innerMap.get("a"));
-    innerMap = (JsonStringHashMap<?,?>) object.get(3);
+    innerMap = (JsonStringHashMap<?, ?>) object.get(3);
     assertEquals(2, innerMap.get("a"));
   }
 }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/file/BaseFileTest.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/file/BaseFileTest.java b/java/vector/src/test/java/org/apache/arrow/vector/file/BaseFileTest.java
index 3f717cb..732bd98 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/file/BaseFileTest.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/file/BaseFileTest.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.file;
 
 import java.nio.charset.StandardCharsets;
@@ -155,7 +156,7 @@ public class BaseFileTest {
         Assert.assertNull(intVal);
       }
       Assert.assertEquals(Long.valueOf(i), root.getVector("bigInt").getAccessor().getObject(i));
-      Assert.assertEquals(i % 3, ((List<?>)root.getVector("list").getAccessor().getObject(i)).size());
+      Assert.assertEquals(i % 3, ((List<?>) root.getVector("list").getAccessor().getObject(i)).size());
       NullableTimeStampMilliHolder h = new NullableTimeStampMilliHolder();
       FieldReader mapReader = root.getVector("map").getReader();
       mapReader.setPosition(i);
@@ -198,11 +199,11 @@ public class BaseFileTest {
     Assert.assertEquals(count, root.getRowCount());
     printVectors(root.getFieldVectors());
     for (int i = 0; i < count; i++) {
-      long dateVal = ((NullableDateMilliVector)root.getVector("date")).getAccessor().get(i);
+      long dateVal = ((NullableDateMilliVector) root.getVector("date")).getAccessor().get(i);
       LocalDateTime dt = makeDateTimeFromCount(i);
       LocalDateTime dateExpected = dt.minusMillis(dt.getMillisOfDay());
       Assert.assertEquals(DateUtility.toMillis(dateExpected), dateVal);
-      long timeVal = ((NullableTimeMilliVector)root.getVector("time")).getAccessor().get(i);
+      long timeVal = ((NullableTimeMilliVector) root.getVector("time")).getAccessor().get(i);
       Assert.assertEquals(dt.getMillisOfDay(), timeVal);
       Object timestampMilliVal = root.getVector("timestamp-milli").getAccessor().getObject(i);
       Assert.assertEquals(dt, timestampMilliVal);
@@ -450,20 +451,20 @@ public class BaseFileTest {
     for (int i = 0; i < count; i++) {
       unionReader.setPosition(i);
       switch (i % 4) {
-      case 0:
-        Assert.assertEquals(i, unionReader.readInteger().intValue());
-        break;
-      case 1:
-        Assert.assertEquals(i, unionReader.readLong().longValue());
-        break;
-      case 2:
-        Assert.assertEquals(i % 3, unionReader.size());
-        break;
-      case 3:
-        NullableTimeStampMilliHolder h = new NullableTimeStampMilliHolder();
-        unionReader.reader("timestamp").read(h);
-        Assert.assertEquals(i, h.value);
-        break;
+        case 0:
+          Assert.assertEquals(i, unionReader.readInteger().intValue());
+          break;
+        case 1:
+          Assert.assertEquals(i, unionReader.readLong().longValue());
+          break;
+        case 2:
+          Assert.assertEquals(i % 3, unionReader.size());
+          break;
+        case 3:
+          NullableTimeStampMilliHolder h = new NullableTimeStampMilliHolder();
+          unionReader.reader("timestamp").read(h);
+          Assert.assertEquals(i, h.value);
+          break;
       }
     }
   }
@@ -483,28 +484,28 @@ public class BaseFileTest {
     MapWriter mapWriter = rootWriter.map("union");
     for (int i = 0; i < count; i++) {
       switch (i % 4) {
-      case 0:
-        intWriter.setPosition(i);
-        intWriter.writeInt(i);
-        break;
-      case 1:
-        bigIntWriter.setPosition(i);
-        bigIntWriter.writeBigInt(i);
-        break;
-      case 2:
-        listWriter.setPosition(i);
-        listWriter.startList();
-        for (int j = 0; j < i % 3; j++) {
-          listWriter.varChar().writeVarChar(0, 3, varchar);
-        }
-        listWriter.endList();
-        break;
-      case 3:
-        mapWriter.setPosition(i);
-        mapWriter.start();
-        mapWriter.timeStampMilli("timestamp").writeTimeStampMilli(i);
-        mapWriter.end();
-        break;
+        case 0:
+          intWriter.setPosition(i);
+          intWriter.writeInt(i);
+          break;
+        case 1:
+          bigIntWriter.setPosition(i);
+          bigIntWriter.writeBigInt(i);
+          break;
+        case 2:
+          listWriter.setPosition(i);
+          listWriter.startList();
+          for (int j = 0; j < i % 3; j++) {
+            listWriter.varChar().writeVarChar(0, 3, varchar);
+          }
+          listWriter.endList();
+          break;
+        case 3:
+          mapWriter.setPosition(i);
+          mapWriter.start();
+          mapWriter.timeStampMilli("timestamp").writeTimeStampMilli(i);
+          mapWriter.end();
+          break;
       }
     }
     writer.setValueCount(count);

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFile.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFile.java b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFile.java
index 90fb5d2..c483ba7 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFile.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFile.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.file;
 
 import java.io.ByteArrayInputStream;
@@ -107,19 +108,19 @@ public class TestArrowFile extends BaseFileTest {
     // read
     try (BufferAllocator readerAllocator = allocator.newChildAllocator("reader", 0, Integer.MAX_VALUE);
          FileInputStream fileInputStream = new FileInputStream(file);
-         ArrowFileReader arrowReader = new ArrowFileReader(fileInputStream.getChannel(), readerAllocator){
-            @Override
-            protected ArrowMessage readMessage(SeekableReadChannel in, BufferAllocator allocator) throws IOException {
-              ArrowMessage message = super.readMessage(in, allocator);
-              if (message != null) {
-                ArrowRecordBatch batch = (ArrowRecordBatch) message;
-                List<ArrowBuffer> buffersLayout = batch.getBuffersLayout();
-                for (ArrowBuffer arrowBuffer : buffersLayout) {
-                  Assert.assertEquals(0, arrowBuffer.getOffset() % 8);
-                }
-              }
-              return message;
-            }
+         ArrowFileReader arrowReader = new ArrowFileReader(fileInputStream.getChannel(), readerAllocator) {
+           @Override
+           protected ArrowMessage readMessage(SeekableReadChannel in, BufferAllocator allocator) throws IOException {
+             ArrowMessage message = super.readMessage(in, allocator);
+             if (message != null) {
+               ArrowRecordBatch batch = (ArrowRecordBatch) message;
+               List<ArrowBuffer> buffersLayout = batch.getBuffersLayout();
+               for (ArrowBuffer arrowBuffer : buffersLayout) {
+                 Assert.assertEquals(0, arrowBuffer.getOffset() % 8);
+               }
+             }
+             return message;
+           }
          }) {
       Schema schema = arrowReader.getVectorSchemaRoot().getSchema();
       LOGGER.debug("reading schema: " + schema);
@@ -134,7 +135,7 @@ public class TestArrowFile extends BaseFileTest {
     // Read from stream.
     try (BufferAllocator readerAllocator = allocator.newChildAllocator("reader", 0, Integer.MAX_VALUE);
          ByteArrayInputStream input = new ByteArrayInputStream(stream.toByteArray());
-         ArrowStreamReader arrowReader = new ArrowStreamReader(input, readerAllocator){
+         ArrowStreamReader arrowReader = new ArrowStreamReader(input, readerAllocator) {
            @Override
            protected ArrowMessage readMessage(ReadChannel in, BufferAllocator allocator) throws IOException {
              ArrowMessage message = super.readMessage(in, allocator);
@@ -203,17 +204,17 @@ public class TestArrowFile extends BaseFileTest {
   public void testWriteReadMultipleRBs() throws IOException {
     File file = new File("target/mytest_multiple.arrow");
     ByteArrayOutputStream stream = new ByteArrayOutputStream();
-    int[] counts = { 10, 5 };
+    int[] counts = {10, 5};
 
     // write
     try (BufferAllocator originalVectorAllocator = allocator.newChildAllocator("original vectors", 0, Integer.MAX_VALUE);
          MapVector parent = MapVector.empty("parent", originalVectorAllocator);
-         FileOutputStream fileOutputStream = new FileOutputStream(file)){
+         FileOutputStream fileOutputStream = new FileOutputStream(file)) {
       writeData(counts[0], parent);
       VectorSchemaRoot root = new VectorSchemaRoot(parent.getChild("root"));
 
-      try(ArrowFileWriter fileWriter = new ArrowFileWriter(root, null, fileOutputStream.getChannel());
-          ArrowStreamWriter streamWriter = new ArrowStreamWriter(root, null, stream)) {
+      try (ArrowFileWriter fileWriter = new ArrowFileWriter(root, null, fileOutputStream.getChannel());
+           ArrowStreamWriter streamWriter = new ArrowStreamWriter(root, null, stream)) {
         fileWriter.start();
         streamWriter.start();
 
@@ -318,7 +319,7 @@ public class TestArrowFile extends BaseFileTest {
       root.getFieldVectors().get(0).allocateNew();
       NullableTinyIntVector.Mutator mutator = (NullableTinyIntVector.Mutator) root.getFieldVectors().get(0).getMutator();
       for (int i = 0; i < 16; i++) {
-        mutator.set(i, i < 8 ? 1 : 0, (byte)(i + 1));
+        mutator.set(i, i < 8 ? 1 : 0, (byte) (i + 1));
       }
       mutator.setValueCount(16);
       root.setRowCount(16);
@@ -367,7 +368,7 @@ public class TestArrowFile extends BaseFileTest {
     NullableTinyIntVector vector = (NullableTinyIntVector) root.getFieldVectors().get(0);
     for (int i = 0; i < 16; i++) {
       if (i < 8) {
-        Assert.assertEquals((byte)(i + 1), vector.getAccessor().get(i));
+        Assert.assertEquals((byte) (i + 1), vector.getAccessor().get(i));
       } else {
         Assert.assertTrue(vector.getAccessor().isNull(i));
       }
@@ -384,7 +385,7 @@ public class TestArrowFile extends BaseFileTest {
     childFields.add(new Field("float-child", new FieldType(true, new ArrowType.FloatingPoint(FloatingPointPrecision.SINGLE), null, metadata(2)), null));
     childFields.add(new Field("int-child", new FieldType(false, new ArrowType.Int(32, true), null, metadata(3)), null));
     childFields.add(new Field("list-child", new FieldType(true, ArrowType.List.INSTANCE, null, metadata(4)),
-                              ImmutableList.of(new Field("l1", FieldType.nullable(new ArrowType.Int(16 ,true)), null))));
+        ImmutableList.of(new Field("l1", FieldType.nullable(new ArrowType.Int(16, true)), null))));
     Field field = new Field("meta", new FieldType(true, ArrowType.Struct.INSTANCE, null, metadata(0)), childFields);
     Map<String, String> metadata = new HashMap<>();
     metadata.put("s1", "v1");
@@ -425,7 +426,7 @@ public class TestArrowFile extends BaseFileTest {
       Assert.assertEquals(originalSchema.getCustomMetadata(), schema.getCustomMetadata());
       Field top = schema.getFields().get(0);
       Assert.assertEquals(metadata(0), top.getMetadata());
-      for (int i = 0; i < 4; i ++) {
+      for (int i = 0; i < 4; i++) {
         Assert.assertEquals(metadata(i + 1), top.getChildren().get(i).getMetadata());
       }
     }
@@ -441,7 +442,7 @@ public class TestArrowFile extends BaseFileTest {
       Assert.assertEquals(originalSchema.getCustomMetadata(), schema.getCustomMetadata());
       Field top = schema.getFields().get(0);
       Assert.assertEquals(metadata(0), top.getMetadata());
-      for (int i = 0; i < 4; i ++) {
+      for (int i = 0; i < 4; i++) {
         Assert.assertEquals(metadata(i + 1), top.getChildren().get(i).getMetadata());
       }
     }
@@ -475,7 +476,7 @@ public class TestArrowFile extends BaseFileTest {
       }
 
       // Need to close dictionary vectors
-      for (long id: provider.getDictionaryIds()) {
+      for (long id : provider.getDictionaryIds()) {
         provider.lookup(id).getVector().close();
       }
     }
@@ -534,7 +535,7 @@ public class TestArrowFile extends BaseFileTest {
       }
 
       // Need to close dictionary vectors
-      for (long id: provider.getDictionaryIds()) {
+      for (long id : provider.getDictionaryIds()) {
         provider.lookup(id).getVector().close();
       }
     }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFooter.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFooter.java b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFooter.java
index 3014e64..4612465 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFooter.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowFooter.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.file;
 
 import static java.util.Arrays.asList;
@@ -40,7 +41,7 @@ public class TestArrowFooter {
   public void test() {
     Schema schema = new Schema(asList(
         new Field("a", FieldType.nullable(new ArrowType.Int(8, true)), Collections.<Field>emptyList())
-        ));
+    ));
     ArrowFooter footer = new ArrowFooter(schema, Collections.<ArrowBlock>emptyList(), Collections.<ArrowBlock>emptyList());
     ArrowFooter newFooter = roundTrip(footer);
     assertEquals(footer, newFooter);

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowReaderWriter.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowReaderWriter.java b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowReaderWriter.java
index 55629d5..65332aa 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowReaderWriter.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowReaderWriter.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.file;
 
 import static java.nio.channels.Channels.newChannel;
@@ -77,15 +78,15 @@ public class TestArrowReaderWriter {
     FieldVector vector = TestUtils.newVector(FieldVector.class, "testField", type, allocator);
     vector.initializeChildrenFromFields(schema.getFields().get(0).getChildren());
 
-    byte[] validity = new byte[] { (byte) 255, 0};
+    byte[] validity = new byte[] {(byte) 255, 0};
     // second half is "undefined"
-    byte[] values = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
+    byte[] values = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
 
     ByteArrayOutputStream out = new ByteArrayOutputStream();
     try (VectorSchemaRoot root = new VectorSchemaRoot(schema.getFields(), asList(vector), 16);
          ArrowFileWriter writer = new ArrowFileWriter(root, null, newChannel(out))) {
       ArrowBuf validityb = buf(validity);
-      ArrowBuf valuesb =  buf(values);
+      ArrowBuf valuesb = buf(values);
       writer.writeRecordBatch(new ArrowRecordBatch(16, asList(new ArrowFieldNode(16, 8)), asList(validityb, valuesb)));
     }
 
@@ -113,7 +114,7 @@ public class TestArrowReaderWriter {
       // Read just the header. This demonstrates being able to read without need to
       // deserialize the buffer.
       ByteBuffer headerBuffer = ByteBuffer.allocate(recordBatches.get(0).getMetadataLength());
-      headerBuffer.put(byteArray, (int)recordBatches.get(0).getOffset(), headerBuffer.capacity());
+      headerBuffer.put(byteArray, (int) recordBatches.get(0).getOffset(), headerBuffer.capacity());
       headerBuffer.position(4);
       Message messageFB = Message.getRootAsMessage(headerBuffer);
       RecordBatch recordBatchFB = (RecordBatch) messageFB.header(new RecordBatch());

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStream.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStream.java b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStream.java
index 7e9afd3..e2efabe 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStream.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStream.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.file;
 
 import static java.util.Arrays.asList;
@@ -71,7 +72,7 @@ public class TestArrowStream extends BaseFileTest {
       root.getFieldVectors().get(0).allocateNew();
       NullableTinyIntVector.Mutator mutator = (NullableTinyIntVector.Mutator) root.getFieldVectors().get(0).getMutator();
       for (int i = 0; i < 16; i++) {
-        mutator.set(i, i < 8 ? 1 : 0, (byte)(i + 1));
+        mutator.set(i, i < 8 ? 1 : 0, (byte) (i + 1));
       }
       mutator.setValueCount(16);
       root.setRowCount(16);

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStreamPipe.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStreamPipe.java b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStreamPipe.java
index 20d4482..a19c379 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStreamPipe.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/file/TestArrowStreamPipe.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.file;
 
 import static org.junit.Assert.assertEquals;
@@ -65,7 +66,7 @@ public class TestArrowStreamPipe {
           // Send a changing batch id first
           mutator.set(0, j);
           for (int i = 1; i < 16; i++) {
-            mutator.set(i, i < 8 ? 1 : 0, (byte)(i + 1));
+            mutator.set(i, i < 8 ? 1 : 0, (byte) (i + 1));
           }
           mutator.setValueCount(16);
           root.setRowCount(16);
@@ -80,7 +81,9 @@ public class TestArrowStreamPipe {
       }
     }
 
-    public long bytesWritten() { return writer.bytesWritten(); }
+    public long bytesWritten() {
+      return writer.bytesWritten();
+    }
   }
 
   private final class ReaderThread extends Thread {
@@ -104,6 +107,7 @@ public class TestArrowStreamPipe {
           }
           return message;
         }
+
         @Override
         public boolean loadNextBatch() throws IOException {
           if (!super.loadNextBatch()) {
@@ -113,10 +117,10 @@ public class TestArrowStreamPipe {
             VectorSchemaRoot root = getVectorSchemaRoot();
             Assert.assertEquals(16, root.getRowCount());
             NullableTinyIntVector vector = (NullableTinyIntVector) root.getFieldVectors().get(0);
-            Assert.assertEquals((byte)(batchesRead - 1), vector.getAccessor().get(0));
+            Assert.assertEquals((byte) (batchesRead - 1), vector.getAccessor().get(0));
             for (int i = 1; i < 16; i++) {
               if (i < 8) {
-                Assert.assertEquals((byte)(i + 1), vector.getAccessor().get(i));
+                Assert.assertEquals((byte) (i + 1), vector.getAccessor().get(i));
               } else {
                 Assert.assertTrue(vector.getAccessor().isNull(i));
               }
@@ -143,8 +147,13 @@ public class TestArrowStreamPipe {
       }
     }
 
-    public int getBatchesRead() { return batchesRead; }
-    public long bytesRead() { return reader.bytesRead(); }
+    public int getBatchesRead() {
+      return batchesRead;
+    }
+
+    public long bytesRead() {
+      return reader.bytesRead();
+    }
   }
 
   // Starts up a producer and consumer thread to read/write batches.

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/file/json/TestJSONFile.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/file/json/TestJSONFile.java b/java/vector/src/test/java/org/apache/arrow/vector/file/json/TestJSONFile.java
index 311cada..24b2138 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/file/json/TestJSONFile.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/file/json/TestJSONFile.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.file.json;
 
 import java.io.File;
@@ -53,7 +54,7 @@ public class TestJSONFile extends BaseFileTest {
     // read
     try (
         BufferAllocator readerAllocator = allocator.newChildAllocator("reader", 0, Integer.MAX_VALUE);
-        ) {
+    ) {
       JsonFileReader reader = new JsonFileReader(file, readerAllocator);
       Schema schema = reader.start();
       LOGGER.debug("reading schema: " + schema);
@@ -109,7 +110,7 @@ public class TestJSONFile extends BaseFileTest {
     try (
         BufferAllocator readerAllocator = allocator.newChildAllocator("reader", 0, Integer.MAX_VALUE);
         BufferAllocator vectorAllocator = allocator.newChildAllocator("final vectors", 0, Integer.MAX_VALUE);
-        ) {
+    ) {
       JsonFileReader reader = new JsonFileReader(file, readerAllocator);
       Schema schema = reader.start();
       LOGGER.debug("reading schema: " + schema);
@@ -174,7 +175,7 @@ public class TestJSONFile extends BaseFileTest {
       }
 
       // Need to close dictionary vectors
-      for (long id: provider.getDictionaryIds()) {
+      for (long id : provider.getDictionaryIds()) {
         provider.lookup(id).getVector().close();
       }
     }
@@ -215,7 +216,7 @@ public class TestJSONFile extends BaseFileTest {
       }
 
       // Need to close dictionary vectors
-      for (long id: provider.getDictionaryIds()) {
+      for (long id : provider.getDictionaryIds()) {
         provider.lookup(id).getVector().close();
       }
     }
@@ -240,7 +241,7 @@ public class TestJSONFile extends BaseFileTest {
   public void testSetStructLength() throws IOException {
     File file = new File("../../integration/data/struct_example.json");
     try (
-            BufferAllocator readerAllocator = allocator.newChildAllocator("reader", 0, Integer.MAX_VALUE);
+        BufferAllocator readerAllocator = allocator.newChildAllocator("reader", 0, Integer.MAX_VALUE);
     ) {
       JsonFileReader reader = new JsonFileReader(file, readerAllocator);
       Schema schema = reader.start();

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java b/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java
index 62c21f7..f98aeac 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.pojo;
 
 import static org.apache.arrow.vector.types.FloatingPointPrecision.DOUBLE;
@@ -92,15 +93,15 @@ public class TestConvert {
     childrenBuilder.add(new Field("child3", FieldType.nullable(new Struct()), ImmutableList.<Field>of(
         new Field("child3.1", FieldType.nullable(Utf8.INSTANCE), null),
         new Field("child3.2", FieldType.nullable(new FloatingPoint(DOUBLE)), ImmutableList.<Field>of())
-        )));
+    )));
     childrenBuilder.add(new Field("child4", FieldType.nullable(new List()), ImmutableList.<Field>of(
         new Field("child4.1", FieldType.nullable(Utf8.INSTANCE), null)
-        )));
-    childrenBuilder.add(new Field("child5", FieldType.nullable(new Union(UnionMode.Sparse, new int[] { MinorType.TIMESTAMPMILLI.ordinal(), MinorType.FLOAT8.ordinal() } )), ImmutableList.<Field>of(
+    )));
+    childrenBuilder.add(new Field("child5", FieldType.nullable(new Union(UnionMode.Sparse, new int[] {MinorType.TIMESTAMPMILLI.ordinal(), MinorType.FLOAT8.ordinal()})), ImmutableList.<Field>of(
         new Field("child5.1", FieldType.nullable(new Timestamp(TimeUnit.MILLISECOND, null)), null),
         new Field("child5.2", FieldType.nullable(new FloatingPoint(DOUBLE)), ImmutableList.<Field>of()),
         new Field("child5.3", true, new Timestamp(TimeUnit.MILLISECOND, "UTC"), null)
-        )));
+    )));
     Schema initialSchema = new Schema(childrenBuilder.build());
     run(initialSchema);
   }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java b/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
index 9678423..f968768 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/stream/MessageSerializerTest.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.stream;
 
 import static java.util.Arrays.asList;
@@ -107,13 +108,13 @@ public class MessageSerializerTest {
 
   @Test
   public void testSerializeRecordBatch() throws IOException {
-    byte[] validity = new byte[] { (byte)255, 0};
+    byte[] validity = new byte[] {(byte) 255, 0};
     // second half is "undefined"
-    byte[] values = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
+    byte[] values = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
 
     BufferAllocator alloc = new RootAllocator(Long.MAX_VALUE);
     ArrowBuf validityb = buf(alloc, validity);
-    ArrowBuf valuesb =  buf(alloc, values);
+    ArrowBuf valuesb = buf(alloc, values);
 
     ArrowRecordBatch batch = new ArrowRecordBatch(
         16, asList(new ArrowFieldNode(16, 8)), asList(validityb, valuesb));

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java b/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
index 84cc107..43b0907 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/types/pojo/TestSchema.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.types.pojo;
 
 import static java.util.Arrays.asList;
@@ -66,7 +67,7 @@ public class TestSchema {
         field("g", new Timestamp(TimeUnit.MILLISECOND, "UTC")),
         field("h", new Timestamp(TimeUnit.MICROSECOND, null)),
         field("i", new Interval(IntervalUnit.DAY_TIME))
-        ));
+    ));
     roundTrip(schema);
     assertEquals(
         "Schema<a: Int(8, true) not null, b: Struct<c: Int(16, true), d: Utf8>, e: List<Date(MILLISECOND)>, f: FloatingPoint(SINGLE), g: Timestamp(MILLISECOND, UTC), h: Timestamp(MICROSECOND, null), i: Interval(DAY_TIME)>",
@@ -95,7 +96,7 @@ public class TestSchema {
         field("q", new Timestamp(TimeUnit.MILLISECOND, "UTC")),
         field("r", new Timestamp(TimeUnit.MICROSECOND, null)),
         field("s", new Interval(IntervalUnit.DAY_TIME))
-        ));
+    ));
     roundTrip(schema);
   }
 
@@ -103,7 +104,7 @@ public class TestSchema {
   public void testUnion() throws IOException {
     Schema schema = new Schema(asList(
         field("d", new Union(UnionMode.Sparse, new int[] {1, 2, 3}), field("da", new Null()))
-        ));
+    ));
     roundTrip(schema);
     contains(schema, "Sparse");
   }
@@ -113,7 +114,7 @@ public class TestSchema {
     Schema schema = new Schema(asList(
         field("a", new Date(DateUnit.DAY)),
         field("b", new Date(DateUnit.MILLISECOND))
-        ));
+    ));
     roundTrip(schema);
     assertEquals(
         "Schema<a: Date(DAY), b: Date(MILLISECOND)>",
@@ -123,15 +124,15 @@ public class TestSchema {
   @Test
   public void testTime() throws IOException {
     Schema schema = new Schema(asList(
-            field("a", new Time(TimeUnit.SECOND, 32)),
-            field("b", new Time(TimeUnit.MILLISECOND, 32)),
-            field("c", new Time(TimeUnit.MICROSECOND, 64)),
-            field("d", new Time(TimeUnit.NANOSECOND, 64))
+        field("a", new Time(TimeUnit.SECOND, 32)),
+        field("b", new Time(TimeUnit.MILLISECOND, 32)),
+        field("c", new Time(TimeUnit.MICROSECOND, 64)),
+        field("d", new Time(TimeUnit.NANOSECOND, 64))
     ));
     roundTrip(schema);
     assertEquals(
-            "Schema<a: Time(SECOND, 32), b: Time(MILLISECOND, 32), c: Time(MICROSECOND, 64), d: Time(NANOSECOND, 64)>",
-            schema.toString());
+        "Schema<a: Time(SECOND, 32), b: Time(MILLISECOND, 32), c: Time(MICROSECOND, 64), d: Time(NANOSECOND, 64)>",
+        schema.toString());
   }
 
   @Test
@@ -145,7 +146,7 @@ public class TestSchema {
         field("f", new Timestamp(TimeUnit.MILLISECOND, null)),
         field("g", new Timestamp(TimeUnit.MICROSECOND, null)),
         field("h", new Timestamp(TimeUnit.NANOSECOND, null))
-        ));
+    ));
     roundTrip(schema);
     assertEquals(
         "Schema<a: Timestamp(SECOND, UTC), b: Timestamp(MILLISECOND, UTC), c: Timestamp(MICROSECOND, UTC), d: Timestamp(NANOSECOND, UTC), e: Timestamp(SECOND, null), f: Timestamp(MILLISECOND, null), g: Timestamp(MICROSECOND, null), h: Timestamp(NANOSECOND, null)>",
@@ -157,7 +158,7 @@ public class TestSchema {
     Schema schema = new Schema(asList(
         field("a", new Interval(IntervalUnit.YEAR_MONTH)),
         field("b", new Interval(IntervalUnit.DAY_TIME))
-        ));
+    ));
     roundTrip(schema);
     contains(schema, "YEAR_MONTH", "DAY_TIME");
   }
@@ -168,7 +169,7 @@ public class TestSchema {
         field("a", new FloatingPoint(FloatingPointPrecision.HALF)),
         field("b", new FloatingPoint(FloatingPointPrecision.SINGLE)),
         field("c", new FloatingPoint(FloatingPointPrecision.DOUBLE))
-        ));
+    ));
     roundTrip(schema);
     contains(schema, "HALF", "SINGLE", "DOUBLE");
   }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/test/java/org/apache/arrow/vector/util/TestValidator.java
----------------------------------------------------------------------
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/util/TestValidator.java b/java/vector/src/test/java/org/apache/arrow/vector/util/TestValidator.java
index 7cf638e..95b0809 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/util/TestValidator.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/util/TestValidator.java
@@ -16,6 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.arrow.vector.util;
 
 import static org.apache.arrow.vector.util.Validator.equalEnough;
@@ -26,32 +27,32 @@ import org.junit.Test;
 
 public class TestValidator {
 
-    @Test
-    public void testFloatComp() {
-        assertTrue(equalEnough(912.4140000000002F, 912.414F));
-        assertTrue(equalEnough(912.4140000000002D, 912.414D));
-        assertTrue(equalEnough(912.414F, 912.4140000000002F));
-        assertTrue(equalEnough(912.414D, 912.4140000000002D));
-        assertFalse(equalEnough(912.414D, 912.4140001D));
-        assertFalse(equalEnough(null, 912.414D));
-        assertTrue(equalEnough((Float)null, null));
-        assertTrue(equalEnough((Double)null, null));
-        assertFalse(equalEnough(912.414D, null));
-        assertFalse(equalEnough(Double.MAX_VALUE, Double.MIN_VALUE));
-        assertFalse(equalEnough(Double.MIN_VALUE, Double.MAX_VALUE));
-        assertTrue(equalEnough(Double.MAX_VALUE, Double.MAX_VALUE));
-        assertTrue(equalEnough(Double.MIN_VALUE, Double.MIN_VALUE));
-        assertTrue(equalEnough(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
-        assertFalse(equalEnough(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
-        assertTrue(equalEnough(Double.NaN, Double.NaN));
-        assertFalse(equalEnough(1.0, Double.NaN));
-        assertFalse(equalEnough(Float.MAX_VALUE, Float.MIN_VALUE));
-        assertFalse(equalEnough(Float.MIN_VALUE, Float.MAX_VALUE));
-        assertTrue(equalEnough(Float.MAX_VALUE, Float.MAX_VALUE));
-        assertTrue(equalEnough(Float.MIN_VALUE, Float.MIN_VALUE));
-        assertTrue(equalEnough(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY));
-        assertFalse(equalEnough(Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY));
-        assertTrue(equalEnough(Float.NaN, Float.NaN));
-        assertFalse(equalEnough(1.0F, Float.NaN));
-    }
+  @Test
+  public void testFloatComp() {
+    assertTrue(equalEnough(912.4140000000002F, 912.414F));
+    assertTrue(equalEnough(912.4140000000002D, 912.414D));
+    assertTrue(equalEnough(912.414F, 912.4140000000002F));
+    assertTrue(equalEnough(912.414D, 912.4140000000002D));
+    assertFalse(equalEnough(912.414D, 912.4140001D));
+    assertFalse(equalEnough(null, 912.414D));
+    assertTrue(equalEnough((Float) null, null));
+    assertTrue(equalEnough((Double) null, null));
+    assertFalse(equalEnough(912.414D, null));
+    assertFalse(equalEnough(Double.MAX_VALUE, Double.MIN_VALUE));
+    assertFalse(equalEnough(Double.MIN_VALUE, Double.MAX_VALUE));
+    assertTrue(equalEnough(Double.MAX_VALUE, Double.MAX_VALUE));
+    assertTrue(equalEnough(Double.MIN_VALUE, Double.MIN_VALUE));
+    assertTrue(equalEnough(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
+    assertFalse(equalEnough(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
+    assertTrue(equalEnough(Double.NaN, Double.NaN));
+    assertFalse(equalEnough(1.0, Double.NaN));
+    assertFalse(equalEnough(Float.MAX_VALUE, Float.MIN_VALUE));
+    assertFalse(equalEnough(Float.MIN_VALUE, Float.MAX_VALUE));
+    assertTrue(equalEnough(Float.MAX_VALUE, Float.MAX_VALUE));
+    assertTrue(equalEnough(Float.MIN_VALUE, Float.MIN_VALUE));
+    assertTrue(equalEnough(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY));
+    assertFalse(equalEnough(Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY));
+    assertTrue(equalEnough(Float.NaN, Float.NaN));
+    assertFalse(equalEnough(1.0F, Float.NaN));
+  }
 }


Mime
View raw message