arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [5/5] arrow git commit: ARROW-1304: [Java] Fix Indentation, WhitespaceAround and EmptyLineSeparator checkstyle warnings in Java
Date Mon, 07 Aug 2017 19:05:58 GMT
ARROW-1304: [Java] Fix Indentation, WhitespaceAround and EmptyLineSeparator checkstyle warnings in Java

Author: Li Jin <ice.xelloss@gmail.com>

Closes #930 from icexelloss/checkstyle-fix-ARROW-1304 and squashes the following commits:

0ba9e03f [Li Jin] ARROW-1304: [Java] Reformat java code with google_checks.xml to improve checkstyle


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/7a4026a2
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/7a4026a2
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/7a4026a2

Branch: refs/heads/master
Commit: 7a4026a2b43b164ac28c96e1e796c02ca9efe496
Parents: f9d9833
Author: Li Jin <ice.xelloss@gmail.com>
Authored: Mon Aug 7 15:05:48 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Mon Aug 7 15:05:48 2017 -0400

----------------------------------------------------------------------
 .../src/main/java/io/netty/buffer/ArrowBuf.java |    4 +-
 .../org/apache/arrow/memory/Accountant.java     |    4 +-
 .../apache/arrow/memory/AllocationManager.java  |    1 +
 .../org/apache/arrow/memory/BaseAllocator.java  |    3 +-
 .../apache/arrow/memory/BufferAllocator.java    |    6 +-
 .../apache/arrow/memory/util/HistoricalLog.java |    7 +-
 .../org/apache/arrow/memory/TestAccountant.java |    1 +
 .../apache/arrow/memory/TestBaseAllocator.java  |   91 +-
 .../org/apache/arrow/memory/TestEndianess.java  |    2 +
 .../java/org/apache/arrow/tools/EchoServer.java |    4 +-
 .../org/apache/arrow/tools/FileRoundtrip.java   |    1 +
 .../org/apache/arrow/tools/Integration.java     |    4 +-
 .../org/apache/arrow/tools/EchoServerTest.java  |   20 +-
 .../org/apache/arrow/vector/AddOrGetResult.java |    1 +
 .../apache/arrow/vector/AllocationHelper.java   |   18 +-
 .../arrow/vector/BaseDataValueVector.java       |    6 +-
 .../apache/arrow/vector/BaseValueVector.java    |   17 +-
 .../java/org/apache/arrow/vector/BitVector.java |   45 +-
 .../org/apache/arrow/vector/BufferBacked.java   |    1 +
 .../org/apache/arrow/vector/FieldVector.java    |    7 +-
 .../apache/arrow/vector/FixedWidthVector.java   |   11 +-
 .../org/apache/arrow/vector/NullableVector.java |    1 +
 .../vector/NullableVectorDefinitionSetter.java  |    1 +
 .../arrow/vector/SchemaChangeCallBack.java      |    1 +
 .../org/apache/arrow/vector/ValueVector.java    |   29 +-
 .../arrow/vector/VariableWidthVector.java       |    8 +-
 .../org/apache/arrow/vector/VectorLoader.java   |    7 +-
 .../apache/arrow/vector/VectorSchemaRoot.java   |    5 +-
 .../org/apache/arrow/vector/VectorTrimmer.java  |    1 +
 .../org/apache/arrow/vector/VectorUnloader.java |    1 +
 .../org/apache/arrow/vector/ZeroVector.java     |   34 +-
 .../vector/complex/AbstractContainerVector.java |    6 +-
 .../arrow/vector/complex/AbstractMapVector.java |   54 +-
 .../vector/complex/BaseRepeatedValueVector.java |   19 +-
 .../vector/complex/EmptyValuePopulator.java     |    7 +-
 .../vector/complex/FixedSizeListVector.java     |    7 +-
 .../apache/arrow/vector/complex/ListVector.java |   15 +-
 .../apache/arrow/vector/complex/MapVector.java  |   21 +-
 .../arrow/vector/complex/NullableMapVector.java |   17 +-
 .../arrow/vector/complex/Positionable.java      |    2 +
 .../arrow/vector/complex/PromotableVector.java  |    1 +
 .../complex/RepeatedFixedWidthVectorLike.java   |    5 +-
 .../vector/complex/RepeatedValueVector.java     |    7 +-
 .../RepeatedVariableWidthVectorLike.java        |    8 +-
 .../apache/arrow/vector/complex/StateTool.java  |    1 +
 .../arrow/vector/complex/VectorWithOrdinal.java |    1 +
 .../vector/complex/impl/AbstractBaseReader.java |    9 +-
 .../vector/complex/impl/AbstractBaseWriter.java |    1 +
 .../vector/complex/impl/ComplexWriterImpl.java  |  145 +-
 .../complex/impl/MapOrListWriterImpl.java       |    1 +
 .../complex/impl/NullableMapReaderImpl.java     |   11 +-
 .../complex/impl/NullableMapWriterFactory.java  |   31 +-
 .../vector/complex/impl/PromotableWriter.java   |    7 +-
 .../complex/impl/SingleListReaderImpl.java      |    3 +-
 .../complex/impl/SingleMapReaderImpl.java       |   25 +-
 .../complex/impl/UnionFixedSizeListReader.java  |    1 +
 .../vector/complex/impl/UnionListReader.java    |    1 +
 .../vector/complex/reader/FieldReader.java      |    2 +-
 .../vector/complex/writer/FieldWriter.java      |    2 +
 .../arrow/vector/dictionary/Dictionary.java     |    9 +-
 .../vector/dictionary/DictionaryEncoder.java    |   11 +-
 .../vector/dictionary/DictionaryProvider.java   |    3 +-
 .../apache/arrow/vector/file/ArrowBlock.java    |   19 +-
 .../arrow/vector/file/ArrowFileReader.java      |    3 +-
 .../arrow/vector/file/ArrowFileWriter.java      |    3 +-
 .../apache/arrow/vector/file/ArrowFooter.java   |   30 +-
 .../apache/arrow/vector/file/ArrowMagic.java    |    1 +
 .../apache/arrow/vector/file/ArrowReader.java   |   22 +-
 .../apache/arrow/vector/file/ArrowWriter.java   |   17 +-
 .../vector/file/InvalidArrowFileException.java  |    1 +
 .../apache/arrow/vector/file/ReadChannel.java   |   17 +-
 .../arrow/vector/file/SeekableReadChannel.java  |   23 +-
 .../apache/arrow/vector/file/WriteChannel.java  |   11 +-
 .../arrow/vector/file/json/JsonFileReader.java  |  175 +--
 .../arrow/vector/file/json/JsonFileWriter.java  |   32 +-
 .../arrow/vector/holders/ComplexHolder.java     |    1 +
 .../vector/holders/RepeatedListHolder.java      |    3 +-
 .../arrow/vector/holders/RepeatedMapHolder.java |    3 +-
 .../arrow/vector/holders/UnionHolder.java       |    1 +
 .../arrow/vector/holders/ValueHolder.java       |    1 +
 .../apache/arrow/vector/schema/ArrowBuffer.java |   19 +-
 .../vector/schema/ArrowDictionaryBatch.java     |   80 +-
 .../arrow/vector/schema/ArrowFieldNode.java     |    3 +-
 .../arrow/vector/schema/ArrowMessage.java       |   14 +-
 .../arrow/vector/schema/ArrowRecordBatch.java   |   17 +-
 .../arrow/vector/schema/ArrowVectorType.java    |    6 +-
 .../arrow/vector/schema/FBSerializable.java     |    1 +
 .../arrow/vector/schema/FBSerializables.java    |    1 +
 .../apache/arrow/vector/schema/TypeLayout.java  |   87 +-
 .../arrow/vector/schema/VectorLayout.java       |   35 +-
 .../arrow/vector/stream/ArrowStreamReader.java  |   57 +-
 .../arrow/vector/stream/ArrowStreamWriter.java  |   32 +-
 .../arrow/vector/stream/MessageSerializer.java  |  101 +-
 .../org/apache/arrow/vector/types/DateUnit.java |    2 +
 .../vector/types/FloatingPointPrecision.java    |    2 +
 .../apache/arrow/vector/types/IntervalUnit.java |    2 +
 .../org/apache/arrow/vector/types/TimeUnit.java |    2 +
 .../org/apache/arrow/vector/types/Types.java    |   85 +-
 .../apache/arrow/vector/types/UnionMode.java    |    2 +
 .../vector/types/pojo/DictionaryEncoding.java   |    1 +
 .../apache/arrow/vector/types/pojo/Field.java   |   13 +-
 .../arrow/vector/types/pojo/FieldType.java      |    4 +
 .../apache/arrow/vector/types/pojo/Schema.java  |    7 +-
 .../ByteArrayReadableSeekableByteChannel.java   |    3 +-
 .../arrow/vector/util/ByteFunctionHelpers.java  |   31 +-
 .../org/apache/arrow/vector/util/CallBack.java  |    1 +
 .../apache/arrow/vector/util/DateUtility.java   | 1270 +++++++++---------
 .../arrow/vector/util/DecimalUtility.java       |   59 +-
 .../arrow/vector/util/DictionaryUtility.java    |    6 +-
 .../arrow/vector/util/JsonStringArrayList.java  |    3 +-
 .../arrow/vector/util/JsonStringHashMap.java    |    7 +-
 .../arrow/vector/util/MapWithOrdinal.java       |    9 +-
 .../util/OversizedAllocationException.java      |    2 +-
 .../util/SchemaChangeRuntimeException.java      |    1 +
 .../java/org/apache/arrow/vector/util/Text.java |  258 ++--
 .../apache/arrow/vector/util/TransferPair.java  |    4 +
 .../org/apache/arrow/vector/util/Validator.java |    7 +-
 .../main/java/org/joda/time/LocalDateTimes.java |    2 +-
 .../apache/arrow/vector/DirtyRootAllocator.java |    1 +
 .../org/apache/arrow/vector/TestBitVector.java  |   36 +-
 .../vector/TestBufferOwnershipTransfer.java     |   11 +-
 .../apache/arrow/vector/TestDecimalVector.java  |    2 +
 .../arrow/vector/TestDictionaryVector.java      |    7 +-
 .../arrow/vector/TestFixedSizeListVector.java   |    1 +
 .../org/apache/arrow/vector/TestListVector.java |   83 +-
 .../TestOversizedAllocationForValueVector.java  |    2 +-
 .../apache/arrow/vector/TestUnionVector.java    |   37 +-
 .../java/org/apache/arrow/vector/TestUtils.java |    3 +-
 .../apache/arrow/vector/TestValueVector.java    |   13 +-
 .../apache/arrow/vector/TestVectorReAlloc.java  |    1 +
 .../arrow/vector/TestVectorUnloadLoad.java      |   26 +-
 .../complex/impl/TestPromotableWriter.java      |    3 +-
 .../complex/writer/TestComplexWriter.java       |   17 +-
 .../apache/arrow/vector/file/BaseFileTest.java  |   79 +-
 .../apache/arrow/vector/file/TestArrowFile.java |   51 +-
 .../arrow/vector/file/TestArrowFooter.java      |    3 +-
 .../vector/file/TestArrowReaderWriter.java      |    9 +-
 .../arrow/vector/file/TestArrowStream.java      |    3 +-
 .../arrow/vector/file/TestArrowStreamPipe.java  |   21 +-
 .../arrow/vector/file/json/TestJSONFile.java    |   11 +-
 .../apache/arrow/vector/pojo/TestConvert.java   |    9 +-
 .../vector/stream/MessageSerializerTest.java    |    7 +-
 .../arrow/vector/types/pojo/TestSchema.java     |   27 +-
 .../apache/arrow/vector/util/TestValidator.java |   57 +-
 144 files changed, 2102 insertions(+), 1792 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java
----------------------------------------------------------------------
diff --git a/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java b/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java
index 09886a6..6d17430 100644
--- a/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java
+++ b/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java
@@ -406,12 +406,12 @@ public final class ArrowBuf extends AbstractByteBuf implements AutoCloseable {
 
   @Override
   public ByteBuffer[] nioBuffers() {
-    return new ByteBuffer[]{nioBuffer()};
+    return new ByteBuffer[] {nioBuffer()};
   }
 
   @Override
   public ByteBuffer[] nioBuffers(int index, int length) {
-    return new ByteBuffer[]{nioBuffer(index, length)};
+    return new ByteBuffer[] {nioBuffer(index, length)};
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java
----------------------------------------------------------------------
diff --git a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java
index 89329b2..5bd6b9f 100644
--- a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java
+++ b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java
@@ -249,9 +249,9 @@ class Accountant implements AutoCloseable {
     return peakAllocation.get();
   }
 
-  public long getHeadroom(){
+  public long getHeadroom() {
     long localHeadroom = allocationLimit.get() - locallyHeldMemory.get();
-    if(parent == null){
+    if (parent == null) {
       return localHeadroom;
     }
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java
----------------------------------------------------------------------
diff --git a/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java b/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java
index 70ca1dc..c528937 100644
--- a/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java
+++ b/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java
@@ -328,6 +328,7 @@ public class AllocationManager {
      * Decrement the ledger's reference count. If the ledger is decremented to zero, this ledger
      * should release its
      * ownership back to the AllocationManager
+     *
      * @param decrement amout to decrease the reference count by
      * @return the new reference count
      */

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java
----------------------------------------------------------------------
diff --git a/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java b/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java
index b38cf67..2749b6f 100644
--- a/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java
+++ b/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java
@@ -274,8 +274,7 @@ public abstract class BaseAllocator extends Accountant implements BufferAllocato
         throw new OutOfMemoryException(e);
       }
       throw e;
-    }
-    finally {
+    } finally {
       if (!success) {
         releaseBytes(actualRequestSize);
       }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java
----------------------------------------------------------------------
diff --git a/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java b/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java
index 8a40441..b23a6e4 100644
--- a/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java
+++ b/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java
@@ -117,9 +117,8 @@ public interface BufferAllocator extends AutoCloseable {
    * Create an allocation reservation. A reservation is a way of building up
    * a request for a buffer whose size is not known in advance. See
    *
-   * @see AllocationReservation
-   *
    * @return the newly created reservation
+   * @see AllocationReservation
    */
   public AllocationReservation newReservation();
 
@@ -128,6 +127,7 @@ public interface BufferAllocator extends AutoCloseable {
    * special because we don't
    * worry about them leaking or managing reference counts on them since they don't actually
    * point to any memory.
+   *
    * @return the empty buffer
    */
   public ArrowBuf getEmpty();
@@ -136,6 +136,7 @@ public interface BufferAllocator extends AutoCloseable {
    * Return the name of this allocator. This is a human readable name that can help debugging.
    * Typically provides
    * coordinates about where this allocator was created
+   *
    * @return the name of the allocator
    */
   public String getName();
@@ -145,6 +146,7 @@ public interface BufferAllocator extends AutoCloseable {
    * that an allocator is
    * over its limit, all consumers of that allocator should aggressively try to addrss the
    * overlimit situation.
+   *
    * @return whether or not this allocator (or one if its parents) is over its limits
    */
   public boolean isOverLimit();

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java
----------------------------------------------------------------------
diff --git a/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java b/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java
index 0452dc9..10a64cd 100644
--- a/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java
+++ b/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java
@@ -97,7 +97,7 @@ public class HistoricalLog {
    * includes the identifying string provided at construction time, and all the recorded
    * events with their stack traces.
    *
-   * @param sb {@link StringBuilder} to write to
+   * @param sb                {@link StringBuilder} to write to
    * @param includeStackTrace whether to include the stacktrace of each event in the history
    */
   public void buildHistory(final StringBuilder sb, boolean includeStackTrace) {
@@ -106,8 +106,9 @@ public class HistoricalLog {
 
   /**
    * build the history and write it to sb
-   * @param sb output
-   * @param indent starting indent (usually "")
+   *
+   * @param sb                output
+   * @param indent            starting indent (usually "")
    * @param includeStackTrace whether to include the stacktrace of each event.
    */
   public synchronized void buildHistory(

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

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/test/java/org/apache/arrow/memory/TestBaseAllocator.java
----------------------------------------------------------------------
diff --git a/java/memory/src/test/java/org/apache/arrow/memory/TestBaseAllocator.java b/java/memory/src/test/java/org/apache/arrow/memory/TestBaseAllocator.java
index 59b7be8..76f2c50 100644
--- a/java/memory/src/test/java/org/apache/arrow/memory/TestBaseAllocator.java
+++ b/java/memory/src/test/java/org/apache/arrow/memory/TestBaseAllocator.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.memory;
 
 import static org.junit.Assert.assertEquals;
@@ -59,13 +60,13 @@ public class TestBaseAllocator {
 
   @Test
   public void test_privateMax() throws Exception {
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
       final ArrowBuf arrowBuf1 = rootAllocator.buffer(MAX_ALLOCATION / 2);
       assertNotNull("allocation failed", arrowBuf1);
 
-      try(final BufferAllocator childAllocator =
-          rootAllocator.newChildAllocator("noLimits", 0, MAX_ALLOCATION)) {
+      try (final BufferAllocator childAllocator =
+               rootAllocator.newChildAllocator("noLimits", 0, MAX_ALLOCATION)) {
         final ArrowBuf arrowBuf2 = childAllocator.buffer(MAX_ALLOCATION / 2);
         assertNotNull("allocation failed", arrowBuf2);
         arrowBuf2.release();
@@ -75,11 +76,11 @@ public class TestBaseAllocator {
     }
   }
 
-  @Test(expected=IllegalStateException.class)
+  @Test(expected = IllegalStateException.class)
   public void testRootAllocator_closeWithOutstanding() throws Exception {
     try {
-      try(final RootAllocator rootAllocator =
-          new RootAllocator(MAX_ALLOCATION)) {
+      try (final RootAllocator rootAllocator =
+               new RootAllocator(MAX_ALLOCATION)) {
         final ArrowBuf arrowBuf = rootAllocator.buffer(512);
         assertNotNull("allocation failed", arrowBuf);
       }
@@ -100,8 +101,8 @@ public class TestBaseAllocator {
 
   @Test
   public void testRootAllocator_getEmpty() throws Exception {
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
       final ArrowBuf arrowBuf = rootAllocator.buffer(0);
       assertNotNull("allocation failed", arrowBuf);
       assertEquals("capacity was non-zero", 0, arrowBuf.capacity());
@@ -112,8 +113,8 @@ public class TestBaseAllocator {
   @Ignore // TODO(DRILL-2740)
   @Test(expected = IllegalStateException.class)
   public void testAllocator_unreleasedEmpty() throws Exception {
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
       @SuppressWarnings("unused")
       final ArrowBuf arrowBuf = rootAllocator.buffer(0);
     }
@@ -121,8 +122,8 @@ public class TestBaseAllocator {
 
   @Test
   public void testAllocator_transferOwnership() throws Exception {
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
       final BufferAllocator childAllocator1 =
           rootAllocator.newChildAllocator("changeOwnership1", 0, MAX_ALLOCATION);
       final BufferAllocator childAllocator2 =
@@ -197,7 +198,7 @@ public class TestBaseAllocator {
     }
   }
 
-  @Test(expected=IllegalStateException.class)
+  @Test(expected = IllegalStateException.class)
   public void testRootAllocator_createChildDontClose() throws Exception {
     try {
       try (final RootAllocator rootAllocator = new RootAllocator(MAX_ALLOCATION)) {
@@ -232,22 +233,22 @@ public class TestBaseAllocator {
 
     final int nBufs = 8;
     final ArrowBuf[] arrowBufs = new ArrowBuf[nBufs];
-    for(int i = 0; i < arrowBufs.length; ++i) {
+    for (int i = 0; i < arrowBufs.length; ++i) {
       ArrowBuf arrowBufi = allocator.buffer(MAX_ALLOCATION / nBufs);
       assertNotNull("allocation failed", arrowBufi);
       arrowBufs[i] = arrowBufi;
     }
-    for(ArrowBuf arrowBufi : arrowBufs) {
+    for (ArrowBuf arrowBufi : arrowBufs) {
       arrowBufi.release();
     }
   }
 
   @Test
   public void testAllocator_manyAllocations() throws Exception {
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
-      try(final BufferAllocator childAllocator =
-          rootAllocator.newChildAllocator("manyAllocations", 0, MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
+      try (final BufferAllocator childAllocator =
+               rootAllocator.newChildAllocator("manyAllocations", 0, MAX_ALLOCATION)) {
         allocateAndFree(childAllocator);
       }
     }
@@ -255,10 +256,10 @@ public class TestBaseAllocator {
 
   @Test
   public void testAllocator_overAllocate() throws Exception {
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
-      try(final BufferAllocator childAllocator =
-          rootAllocator.newChildAllocator("overAllocate", 0, MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
+      try (final BufferAllocator childAllocator =
+               rootAllocator.newChildAllocator("overAllocate", 0, MAX_ALLOCATION)) {
         allocateAndFree(childAllocator);
 
         try {
@@ -273,10 +274,10 @@ public class TestBaseAllocator {
 
   @Test
   public void testAllocator_overAllocateParent() throws Exception {
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
-      try(final BufferAllocator childAllocator =
-          rootAllocator.newChildAllocator("overAllocateParent", 0, MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
+      try (final BufferAllocator childAllocator =
+               rootAllocator.newChildAllocator("overAllocateParent", 0, MAX_ALLOCATION)) {
         final ArrowBuf arrowBuf1 = rootAllocator.buffer(MAX_ALLOCATION / 2);
         assertNotNull("allocation failed", arrowBuf1);
         final ArrowBuf arrowBuf2 = childAllocator.buffer(MAX_ALLOCATION / 2);
@@ -326,7 +327,7 @@ public class TestBaseAllocator {
 
       try (final BufferAllocator childAllocator = rootAllocator.newChildAllocator("createSlices", 0, MAX_ALLOCATION)) {
         try (final BufferAllocator childAllocator2 =
-            childAllocator.newChildAllocator("createSlices", 0, MAX_ALLOCATION)) {
+                 childAllocator.newChildAllocator("createSlices", 0, MAX_ALLOCATION)) {
           final ArrowBuf arrowBuf1 = childAllocator2.buffer(MAX_ALLOCATION / 8);
           @SuppressWarnings("unused")
           final ArrowBuf arrowBuf2 = arrowBuf1.slice(MAX_ALLOCATION / 16, MAX_ALLOCATION / 16);
@@ -345,8 +346,8 @@ public class TestBaseAllocator {
   @Test
   public void testAllocator_sliceRanges() throws Exception {
 //    final AllocatorOwner allocatorOwner = new NamedOwner("sliceRanges");
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
       // Populate a buffer with byte values corresponding to their indices.
       final ArrowBuf arrowBuf = rootAllocator.buffer(256);
       assertEquals(256, arrowBuf.capacity());
@@ -362,7 +363,7 @@ public class TestBaseAllocator {
 //      assertEquals(256, slice3.capacity());
 //      assertEquals(256, slice3.writableBytes());
 
-      for(int i = 0; i < 256; ++i) {
+      for (int i = 0; i < 256; ++i) {
         arrowBuf.writeByte(i);
       }
       assertEquals(0, arrowBuf.readerIndex());
@@ -373,18 +374,18 @@ public class TestBaseAllocator {
       final ArrowBuf slice1 = (ArrowBuf) arrowBuf.slice();
       assertEquals(0, slice1.readerIndex());
       assertEquals(256, slice1.readableBytes());
-      for(int i = 0; i < 10; ++i) {
+      for (int i = 0; i < 10; ++i) {
         assertEquals(i, slice1.readByte());
       }
       assertEquals(256 - 10, slice1.readableBytes());
-      for(int i = 0; i < 256; ++i) {
+      for (int i = 0; i < 256; ++i) {
         assertEquals((byte) i, slice1.getByte(i));
       }
 
       final ArrowBuf slice2 = arrowBuf.slice(25, 25);
       assertEquals(0, slice2.readerIndex());
       assertEquals(25, slice2.readableBytes());
-      for(int i = 25; i < 50; ++i) {
+      for (int i = 25; i < 50; ++i) {
         assertEquals(i, slice2.readByte());
       }
 
@@ -404,32 +405,32 @@ public class TestBaseAllocator {
   @Test
   public void testAllocator_slicesOfSlices() throws Exception {
 //    final AllocatorOwner allocatorOwner = new NamedOwner("slicesOfSlices");
-    try(final RootAllocator rootAllocator =
-        new RootAllocator(MAX_ALLOCATION)) {
+    try (final RootAllocator rootAllocator =
+             new RootAllocator(MAX_ALLOCATION)) {
       // Populate a buffer with byte values corresponding to their indices.
       final ArrowBuf arrowBuf = rootAllocator.buffer(256);
-      for(int i = 0; i < 256; ++i) {
+      for (int i = 0; i < 256; ++i) {
         arrowBuf.writeByte(i);
       }
 
       // Slice it up.
       final ArrowBuf slice0 = arrowBuf.slice(0, arrowBuf.capacity());
-      for(int i = 0; i < 256; ++i) {
+      for (int i = 0; i < 256; ++i) {
         assertEquals((byte) i, arrowBuf.getByte(i));
       }
 
       final ArrowBuf slice10 = slice0.slice(10, arrowBuf.capacity() - 10);
-      for(int i = 10; i < 256; ++i) {
+      for (int i = 10; i < 256; ++i) {
         assertEquals((byte) i, slice10.getByte(i - 10));
       }
 
       final ArrowBuf slice20 = slice10.slice(10, arrowBuf.capacity() - 20);
-      for(int i = 20; i < 256; ++i) {
+      for (int i = 20; i < 256; ++i) {
         assertEquals((byte) i, slice20.getByte(i - 20));
       }
 
-      final ArrowBuf slice30 = slice20.slice(10,  arrowBuf.capacity() - 30);
-      for(int i = 30; i < 256; ++i) {
+      final ArrowBuf slice30 = slice20.slice(10, arrowBuf.capacity() - 30);
+      for (int i = 30; i < 256; ++i) {
         assertEquals((byte) i, slice30.getByte(i - 30));
       }
 
@@ -556,8 +557,8 @@ public class TestBaseAllocator {
   public void testAllocator_unclaimedReservation() throws Exception {
     try (final RootAllocator rootAllocator = new RootAllocator(MAX_ALLOCATION)) {
       try (final BufferAllocator childAllocator1 =
-          rootAllocator.newChildAllocator("unclaimedReservation", 0, MAX_ALLOCATION)) {
-        try(final AllocationReservation reservation = childAllocator1.newReservation()) {
+               rootAllocator.newChildAllocator("unclaimedReservation", 0, MAX_ALLOCATION)) {
+        try (final AllocationReservation reservation = childAllocator1.newReservation()) {
           assertTrue(reservation.add(64));
         }
         rootAllocator.verify();

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/memory/src/test/java/org/apache/arrow/memory/TestEndianess.java
----------------------------------------------------------------------
diff --git a/java/memory/src/test/java/org/apache/arrow/memory/TestEndianess.java b/java/memory/src/test/java/org/apache/arrow/memory/TestEndianess.java
index 25357dc..accd15e 100644
--- a/java/memory/src/test/java/org/apache/arrow/memory/TestEndianess.java
+++ b/java/memory/src/test/java/org/apache/arrow/memory/TestEndianess.java
@@ -15,9 +15,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.memory;
 
 import static org.junit.Assert.assertEquals;
+
 import io.netty.buffer.ByteBuf;
 
 import org.apache.arrow.memory.BufferAllocator;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/tools/src/main/java/org/apache/arrow/tools/EchoServer.java
----------------------------------------------------------------------
diff --git a/java/tools/src/main/java/org/apache/arrow/tools/EchoServer.java b/java/tools/src/main/java/org/apache/arrow/tools/EchoServer.java
index 24079b6..c53f0ea 100644
--- a/java/tools/src/main/java/org/apache/arrow/tools/EchoServer.java
+++ b/java/tools/src/main/java/org/apache/arrow/tools/EchoServer.java
@@ -73,7 +73,9 @@ public class EchoServer {
         LOGGER.info("Closed connection with client");
       }
     } catch (java.net.SocketException ex) {
-      if (!closed) throw ex;
+      if (!closed) {
+        throw ex;
+      }
     } finally {
       serverSocket.close();
       LOGGER.info("Server closed.");

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/tools/src/main/java/org/apache/arrow/tools/FileRoundtrip.java
----------------------------------------------------------------------
diff --git a/java/tools/src/main/java/org/apache/arrow/tools/FileRoundtrip.java b/java/tools/src/main/java/org/apache/arrow/tools/FileRoundtrip.java
index 135d492..7d71b0b 100644
--- a/java/tools/src/main/java/org/apache/arrow/tools/FileRoundtrip.java
+++ b/java/tools/src/main/java/org/apache/arrow/tools/FileRoundtrip.java
@@ -44,6 +44,7 @@ public class FileRoundtrip {
   private final Options options;
   private final PrintStream out;
   private final PrintStream err;
+
   FileRoundtrip(PrintStream out, PrintStream err) {
     this.out = out;
     this.err = err;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/tools/src/main/java/org/apache/arrow/tools/Integration.java
----------------------------------------------------------------------
diff --git a/java/tools/src/main/java/org/apache/arrow/tools/Integration.java b/java/tools/src/main/java/org/apache/arrow/tools/Integration.java
index 7d4c86f..d2b35e6 100644
--- a/java/tools/src/main/java/org/apache/arrow/tools/Integration.java
+++ b/java/tools/src/main/java/org/apache/arrow/tools/Integration.java
@@ -94,7 +94,7 @@ public class Integration {
   }
 
   static void extractDictionaryEncodings(List<Field> fields, List<DictionaryEncoding> encodings) {
-    for (Field field: fields) {
+    for (Field field : fields) {
       DictionaryEncoding encoding = field.getDictionary();
       if (encoding != null) {
         encodings.add(encoding);
@@ -214,7 +214,7 @@ public class Integration {
           boolean hasMoreArrow = iterator.hasNext();
           if (hasMoreJSON || hasMoreArrow) {
             throw new IllegalArgumentException("Unexpected RecordBatches. Total: " + totalBatches
-                                               + " J:" + hasMoreJSON + " "
+                + " J:" + hasMoreJSON + " "
                 + "A:" + hasMoreArrow);
           }
         }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/tools/src/test/java/org/apache/arrow/tools/EchoServerTest.java
----------------------------------------------------------------------
diff --git a/java/tools/src/test/java/org/apache/arrow/tools/EchoServerTest.java b/java/tools/src/test/java/org/apache/arrow/tools/EchoServerTest.java
index d7f6388..467965a 100644
--- a/java/tools/src/test/java/org/apache/arrow/tools/EchoServerTest.java
+++ b/java/tools/src/test/java/org/apache/arrow/tools/EchoServerTest.java
@@ -158,16 +158,16 @@ public class EchoServerTest {
   public void testFlatDictionary() throws IOException {
     DictionaryEncoding writeEncoding = new DictionaryEncoding(1L, false, null);
     try (BufferAllocator allocator = new RootAllocator(Long.MAX_VALUE);
-        NullableIntVector writeVector =
-            new NullableIntVector(
-                "varchar",
-                new FieldType(true, MinorType.INT.getType(), writeEncoding, null),
-                allocator);
-        NullableVarCharVector writeDictionaryVector =
-            new NullableVarCharVector(
-                "dict",
-                FieldType.nullable(VARCHAR.getType()),
-                allocator)) {
+         NullableIntVector writeVector =
+             new NullableIntVector(
+                 "varchar",
+                 new FieldType(true, MinorType.INT.getType(), writeEncoding, null),
+                 allocator);
+         NullableVarCharVector writeDictionaryVector =
+             new NullableVarCharVector(
+                 "dict",
+                 FieldType.nullable(VARCHAR.getType()),
+                 allocator)) {
       writeVector.allocateNewSafe();
       NullableIntVector.Mutator mutator = writeVector.getMutator();
       mutator.set(0, 0);

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/AddOrGetResult.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/AddOrGetResult.java b/java/vector/src/main/java/org/apache/arrow/vector/AddOrGetResult.java
index 388eb9c..a5b5c9d 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/AddOrGetResult.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/AddOrGetResult.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.base.Preconditions;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/AllocationHelper.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/AllocationHelper.java b/java/vector/src/main/java/org/apache/arrow/vector/AllocationHelper.java
index 15c3a02..2a0f39d 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/AllocationHelper.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/AllocationHelper.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.vector.complex.RepeatedFixedWidthVectorLike;
@@ -27,32 +28,33 @@ public class AllocationHelper {
     allocate(v, valueCount, bytesPerValue, 5);
   }
 
-  public static void allocatePrecomputedChildCount(ValueVector v, int valueCount, int bytesPerValue, int childValCount){
-    if(v instanceof FixedWidthVector) {
+  public static void allocatePrecomputedChildCount(ValueVector v, int valueCount, int bytesPerValue, int childValCount) {
+    if (v instanceof FixedWidthVector) {
       ((FixedWidthVector) v).allocateNew(valueCount);
     } else if (v instanceof VariableWidthVector) {
       ((VariableWidthVector) v).allocateNew(valueCount * bytesPerValue, valueCount);
-    } else if(v instanceof RepeatedFixedWidthVectorLike) {
+    } else if (v instanceof RepeatedFixedWidthVectorLike) {
       ((RepeatedFixedWidthVectorLike) v).allocateNew(valueCount, childValCount);
-    } else if(v instanceof RepeatedVariableWidthVectorLike) {
+    } else if (v instanceof RepeatedVariableWidthVectorLike) {
       ((RepeatedVariableWidthVectorLike) v).allocateNew(childValCount * bytesPerValue, valueCount, childValCount);
     } else {
       v.allocateNew();
     }
   }
 
-  public static void allocate(ValueVector v, int valueCount, int bytesPerValue, int repeatedPerTop){
+  public static void allocate(ValueVector v, int valueCount, int bytesPerValue, int repeatedPerTop) {
     allocatePrecomputedChildCount(v, valueCount, bytesPerValue, repeatedPerTop * valueCount);
   }
 
   /**
    * Allocates the exact amount if v is fixed width, otherwise falls back to dynamic allocation
-   * @param v value vector we are trying to allocate
-   * @param valueCount  size we are trying to allocate
+   *
+   * @param v          value vector we are trying to allocate
+   * @param valueCount size we are trying to allocate
    * @throws org.apache.arrow.memory.OutOfMemoryException if it can't allocate the memory
    */
   public static void allocateNew(ValueVector v, int valueCount) {
-    if (v instanceof  FixedWidthVector) {
+    if (v instanceof FixedWidthVector) {
       ((FixedWidthVector) v).allocateNew(valueCount);
     } else {
       v.allocateNew();

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java
index 88e0249..01340f6 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.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 java.util.ArrayList;
@@ -84,7 +85,7 @@ public abstract class BaseDataValueVector extends BaseValueVector implements Buf
     if (getBufferSize() == 0) {
       out = new ArrowBuf[0];
     } else {
-      out = new ArrowBuf[]{data};
+      out = new ArrowBuf[] {data};
       data.readerIndex(0);
       if (clear) {
         data.retain(1);
@@ -123,5 +124,6 @@ public abstract class BaseDataValueVector extends BaseValueVector implements Buf
    * This method has a similar effect of allocateNew() without actually clearing and reallocating
    * the value vector. The purpose is to move the value vector to a "mutate" state
    */
-  public void reset() {}
+  public void reset() {
+  }
 }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java
index 2a61403..05d2aa9 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.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 java.util.Iterator;
@@ -66,7 +67,8 @@ public abstract class BaseValueVector implements ValueVector {
   }
 
   public abstract static class BaseAccessor implements ValueVector.Accessor {
-    protected BaseAccessor() { }
+    protected BaseAccessor() {
+    }
 
     @Override
     public boolean isNull(int index) {
@@ -79,7 +81,7 @@ public abstract class BaseValueVector implements ValueVector {
       int nullCount = 0;
       for (int i = 0; i < getValueCount(); i++) {
         if (isNull(i)) {
-          nullCount ++;
+          nullCount++;
         }
       }
       return nullCount;
@@ -87,14 +89,17 @@ public abstract class BaseValueVector implements ValueVector {
   }
 
   public abstract static class BaseMutator implements ValueVector.Mutator {
-    protected BaseMutator() { }
+    protected BaseMutator() {
+    }
 
     @Override
-    public void generateTestData(int values) {}
+    public void generateTestData(int values) {
+    }
 
     //TODO: consider making mutator stateless(if possible) on another issue.
     @Override
-    public void reset() {}
+    public void reset() {
+    }
   }
 
   @Override
@@ -103,7 +108,7 @@ public abstract class BaseValueVector implements ValueVector {
   }
 
   public static boolean checkBufRefs(final ValueVector vv) {
-    for(final ArrowBuf buffer : vv.getBuffers(false)) {
+    for (final ArrowBuf buffer : vv.getBuffers(false)) {
       if (buffer.refCnt() <= 0) {
         throw new IllegalStateException("zero refcount");
       }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java
index f34ef2c..e80ca82 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/BitVector.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;
@@ -115,7 +116,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
 
   @Override
   public int getValueCapacity() {
-    return (int)Math.min((long)Integer.MAX_VALUE, data.capacity() * 8L);
+    return (int) Math.min((long) Integer.MAX_VALUE, data.capacity() * 8L);
   }
 
   private int getByteIndex(int index) {
@@ -165,8 +166,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
   /**
    * Allocate a new memory space for this vector. Must be called prior to using the ValueVector.
    *
-   * @param valueCount
-   *          The number of values which can be contained within this vector.
+   * @param valueCount The number of values which can be contained within this vector.
    */
   @Override
   public void allocateNew(int valueCount) {
@@ -195,7 +195,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
       throw new OversizedAllocationException("Requested amount of memory is more than max allowed allocation size");
     }
 
-    final int curSize = (int)newAllocationSize;
+    final int curSize = (int) newAllocationSize;
     final ArrowBuf newBuf = allocator.buffer(curSize);
     newBuf.setZero(0, newBuf.capacity());
     newBuf.setBytes(0, data, 0, data.capacity());
@@ -287,7 +287,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
           target.data.setByte(byteSize - 1, ((this.data.getByte(firstByte + byteSize - 1) & 0xFF) >>> offset));
         } else {
           target.data.setByte(byteSize - 1,
-                  (((this.data.getByte(firstByte + byteSize - 1) & 0xFF) >>> offset) + (this.data.getByte(firstByte + byteSize) << (8 - offset))));
+              (((this.data.getByte(firstByte + byteSize - 1) & 0xFF) >>> offset) + (this.data.getByte(firstByte + byteSize) << (8 - offset))));
         }
       }
     }
@@ -342,15 +342,14 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
     /**
      * Get the byte holding the desired bit, then mask all other bits. Iff the result is 0, the bit was not set.
      *
-     * @param index
-     *          position of the bit in the vector
+     * @param index position of the bit in the vector
      * @return 1 if set, otherwise 0
      */
     public final int get(int index) {
       int byteIndex = index >> 3;
       byte b = data.getByte(byteIndex);
       int bitIndex = index & 7;
-      return Long.bitCount(b &  (1L << bitIndex));
+      return Long.bitCount(b & (1L << bitIndex));
     }
 
     @Override
@@ -379,6 +378,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
 
     /**
      * Get the number nulls, this correspond to the number of bits set to 0 in the vector
+     *
      * @return the number of bits set to 0
      */
     @Override
@@ -414,10 +414,8 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
     /**
      * Set the bit at the given index to the specified value.
      *
-     * @param index
-     *          position of the bit to set
-     * @param value
-     *          value to set (either 1 or 0)
+     * @param index position of the bit to set
+     * @param value value to set (either 1 or 0)
      */
     public final void set(int index, int value) {
       int byteIndex = byteIndex(index);
@@ -448,8 +446,9 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
 
     /**
      * set count bits to 1 in data starting at firstBitIndex
+     *
      * @param firstBitIndex the index of the first bit to set
-     * @param count the number of bits to set
+     * @param count         the number of bits to set
      */
     public void setRangeToOne(int firstBitIndex, int count) {
       int starByteIndex = byteIndex(firstBitIndex);
@@ -473,7 +472,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
           final byte bitMask = (byte) (0xFFL << startByteBitIndex);
           currentByte |= bitMask;
           data.setByte(starByteIndex, currentByte);
-          ++ starByteIndex;
+          ++starByteIndex;
         }
 
         // fill in one full byte at a time
@@ -518,28 +517,28 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
     }
 
     public void setSafe(int index, int value) {
-      while(index >= getValueCapacity()) {
+      while (index >= getValueCapacity()) {
         reAlloc();
       }
       set(index, value);
     }
 
     public void setSafeToOne(int index) {
-      while(index >= getValueCapacity()) {
+      while (index >= getValueCapacity()) {
         reAlloc();
       }
       setToOne(index);
     }
 
     public void setSafe(int index, BitHolder holder) {
-      while(index >= getValueCapacity()) {
+      while (index >= getValueCapacity()) {
         reAlloc();
       }
       set(index, holder.value);
     }
 
     public void setSafe(int index, NullableBitHolder holder) {
-      while(index >= getValueCapacity()) {
+      while (index >= getValueCapacity()) {
         reAlloc();
       }
       set(index, holder.value);
@@ -550,7 +549,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
       int currentValueCapacity = getValueCapacity();
       BitVector.this.valueCount = valueCount;
       int idx = getSizeFromCount(valueCount);
-      while(valueCount > getValueCapacity()) {
+      while (valueCount > getValueCapacity()) {
         reAlloc();
       }
       if (valueCount > 0 && currentValueCapacity > valueCount * 2) {
@@ -564,7 +563,7 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
     @Override
     public final void generateTestData(int values) {
       boolean even = true;
-      for(int i = 0; i < values; i++, even = !even) {
+      for (int i = 0; i < values; i++, even = !even) {
         if (even) {
           set(i, 1);
         }
@@ -576,10 +575,10 @@ public final class BitVector extends BaseDataValueVector implements FixedWidthVe
       setValueCount(size);
       boolean even = true;
       final int valueCount = getAccessor().getValueCount();
-      for(int i = 0; i < valueCount; i++, even = !even) {
-        if(even){
+      for (int i = 0; i < valueCount; i++, even = !even) {
+        if (even) {
           set(i, (byte) 1);
-        }else{
+        } else {
           set(i, (byte) 0);
         }
       }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java b/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java
index 3c8b321..a0dbf2b 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.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.vector.schema.ArrowFieldNode;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java b/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java
index 6c2c830..af7a791 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.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 java.util.List;
@@ -33,12 +34,14 @@ public interface FieldVector extends ValueVector {
   /**
    * Initializes the child vectors
    * to be later loaded with loadBuffers
+   *
    * @param children the schema
    */
   void initializeChildrenFromFields(List<Field> children);
 
   /**
    * the returned list is the same size as the list passed to initializeChildrenFromFields
+   *
    * @return the children according to schema (empty for primitive types)
    */
   List<FieldVector> getChildrenFromFields();
@@ -46,13 +49,15 @@ public interface FieldVector extends ValueVector {
   /**
    * loads data in the vectors
    * (ownBuffers must be the same size as getFieldVectors())
-   * @param fieldNode the fieldNode
+   *
+   * @param fieldNode  the fieldNode
    * @param ownBuffers the buffers for this Field (own buffers only, children not included)
    */
   void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers);
 
   /**
    * (same size as getFieldVectors() since it is their content)
+   *
    * @return the buffers containing the data for this vector (ready for reading)
    */
   List<ArrowBuf> getFieldBuffers();

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/FixedWidthVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/FixedWidthVector.java b/java/vector/src/main/java/org/apache/arrow/vector/FixedWidthVector.java
index 5905700..ec410fc 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/FixedWidthVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/FixedWidthVector.java
@@ -15,21 +15,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 
-public interface FixedWidthVector extends ValueVector{
+public interface FixedWidthVector extends ValueVector {
 
   /**
    * Allocate a new memory space for this vector.  Must be called prior to using the ValueVector.
    *
-   * @param valueCount   Number of values in the vector.
+   * @param valueCount Number of values in the vector.
    */
   void allocateNew(int valueCount);
 
-/**
- * Zero out the underlying buffer backing this vector.
- */
+  /**
+   * Zero out the underlying buffer backing this vector.
+   */
   void zeroVector();
 
 }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/NullableVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/NullableVector.java b/java/vector/src/main/java/org/apache/arrow/vector/NullableVector.java
index b49e916..b2455e9 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/NullableVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/NullableVector.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 public interface NullableVector extends ValueVector {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/NullableVectorDefinitionSetter.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/NullableVectorDefinitionSetter.java b/java/vector/src/main/java/org/apache/arrow/vector/NullableVectorDefinitionSetter.java
index b819c5d..1e0746a 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/NullableVectorDefinitionSetter.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/NullableVectorDefinitionSetter.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
 public interface NullableVectorDefinitionSetter {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/SchemaChangeCallBack.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/SchemaChangeCallBack.java b/java/vector/src/main/java/org/apache/arrow/vector/SchemaChangeCallBack.java
index 6fdcda2..54c0c59 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/SchemaChangeCallBack.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/SchemaChangeCallBack.java
@@ -42,6 +42,7 @@ public class SchemaChangeCallBack implements CallBack {
   /**
    * Returns the value of schema-changed state, <strong>resetting</strong> the
    * schema-changed state to {@code false}.
+   *
    * @return the previous schema-changed state
    */
   public boolean getSchemaChangedAndReset() {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java
index 3812c0b..0c95bcf 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.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 java.io.Closeable;
@@ -40,11 +41,11 @@ import io.netty.buffer.ArrowBuf;
  * There are a few "rules" around vectors:
  *
  * <ul>
- *   <li>values need to be written in order (e.g. index 0, 1, 2, 5)</li>
- *   <li>null vectors start with all values as null before writing anything</li>
- *   <li>for variable width types, the offset vector should be all zeros before writing</li>
- *   <li>you must call setValueCount before a vector can be read</li>
- *   <li>you should never write to a vector once it has been read.</li>
+ * <li>values need to be written in order (e.g. index 0, 1, 2, 5)</li>
+ * <li>null vectors start with all values as null before writing anything</li>
+ * <li>for variable width types, the offset vector should be all zeros before writing</li>
+ * <li>you must call setValueCount before a vector can be read</li>
+ * <li>you should never write to a vector once it has been read.</li>
  * </ul>
  *
  * Please note that the current implementation doesn't enforce those rules, hence we may find few places that
@@ -58,12 +59,14 @@ import io.netty.buffer.ArrowBuf;
 public interface ValueVector extends Closeable, Iterable<ValueVector> {
   /**
    * Allocate new buffers. ValueVector implements logic to determine how much to allocate.
+   *
    * @throws OutOfMemoryException Thrown if no memory can be allocated.
    */
   void allocateNew() throws OutOfMemoryException;
 
   /**
    * Allocates new buffers. ValueVector implements logic to determine how much to allocate.
+   *
    * @return Returns true if allocation was successful.
    */
   boolean allocateNewSafe();
@@ -78,12 +81,14 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
 
   /**
    * Set the initial record capacity
+   *
    * @param numRecords the initial record capacity.
    */
   void setInitialCapacity(int numRecords);
 
   /**
    * Returns the maximum number of values that can be stored in this vector instance.
+   *
    * @return the maximum number of values that can be stored in this vector instance.
    */
   int getValueCapacity();
@@ -101,6 +106,7 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
 
   /**
    * Get information about how this field is materialized.
+   *
    * @return the field corresponding to this vector
    */
   Field getField();
@@ -109,6 +115,7 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
 
   /**
    * to transfer quota responsibility
+   *
    * @param allocator the target allocator
    * @return a {@link org.apache.arrow.vector.util.TransferPair transfer pair}, creating a new target vector of
    * the same type.
@@ -121,6 +128,7 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
 
   /**
    * makes a new transfer pair used to transfer underlying buffers
+   *
    * @param target the target for the transfer
    * @return a new {@link org.apache.arrow.vector.util.TransferPair transfer pair} that is used to transfer underlying
    * buffers into the target vector.
@@ -167,9 +175,9 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
    * Return the underlying buffers associated with this vector. Note that this doesn't impact the reference counts for
    * this buffer so it only should be used for in-context access. Also note that this buffer changes regularly thus
    * external classes shouldn't hold a reference to it (unless they change it).
-   * @param clear Whether to clear vector before returning; the buffers will still be refcounted;
-   *   but the returned array will be the only reference to them
    *
+   * @param clear Whether to clear vector before returning; the buffers will still be refcounted;
+   *              but the returned array will be the only reference to them
    * @return The underlying {@link io.netty.buffer.ArrowBuf buffers} that is used by this vector instance.
    */
   ArrowBuf[] getBuffers(boolean clear);
@@ -181,8 +189,7 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
     /**
      * Get the Java Object representation of the element at the specified position. Useful for testing.
      *
-     * @param index
-     *          Index of the value to get
+     * @param index Index of the value to get
      * @return the friendly java type
      */
     Object getObject(int index);
@@ -211,7 +218,7 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
     /**
      * Sets the number of values that is stored in this vector to the given value count.
      *
-     * @param valueCount  value count to set.
+     * @param valueCount value count to set.
      */
     void setValueCount(int valueCount);
 
@@ -221,8 +228,8 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> {
     void reset();
 
     /**
-     * @deprecated  this has nothing to do with value vector abstraction and should be removed.
      * @param values the number of values to generate
+     * @deprecated this has nothing to do with value vector abstraction and should be removed.
      */
     @Deprecated
     void generateTestData(int values);

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/VariableWidthVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VariableWidthVector.java b/java/vector/src/main/java/org/apache/arrow/vector/VariableWidthVector.java
index ed164b5..04c00b7 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/VariableWidthVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/VariableWidthVector.java
@@ -15,20 +15,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector;
 
-public interface VariableWidthVector extends ValueVector{
+public interface VariableWidthVector extends ValueVector {
 
   /**
    * Allocate a new memory space for this vector.  Must be called prior to using the ValueVector.
    *
-   * @param totalBytes   Desired size of the underlying data buffer.
-   * @param valueCount   Number of values in the vector.
+   * @param totalBytes Desired size of the underlying data buffer.
+   * @param valueCount Number of values in the vector.
    */
   void allocateNew(int totalBytes, int valueCount);
 
   /**
    * Provide the maximum amount of variable width bytes that can be stored in this vector.
+   *
    * @return the byte capacity of this vector
    */
   int getByteCapacity();

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java b/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java
index e640c7c..58fc80b 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.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 com.google.common.base.Preconditions.checkArgument;
@@ -41,6 +42,7 @@ public class VectorLoader {
 
   /**
    * will create children in root based on schema
+   *
    * @param root the root to add vectors to based on schema
    */
   public VectorLoader(VectorSchemaRoot root) {
@@ -50,12 +52,13 @@ public class VectorLoader {
   /**
    * Loads the record batch in the vectors
    * will not close the record batch
+   *
    * @param recordBatch the batch to load
    */
   public void load(ArrowRecordBatch recordBatch) {
     Iterator<ArrowBuf> buffers = recordBatch.getBuffers().iterator();
     Iterator<ArrowFieldNode> nodes = recordBatch.getNodes().iterator();
-    for (FieldVector fieldVector: root.getFieldVectors()) {
+    for (FieldVector fieldVector : root.getFieldVectors()) {
       loadBuffers(fieldVector, fieldVector.getField(), buffers, nodes);
     }
     root.setRowCount(recordBatch.getLength());
@@ -77,7 +80,7 @@ public class VectorLoader {
       vector.loadFieldBuffers(fieldNode, ownBuffers);
     } catch (RuntimeException e) {
       throw new IllegalArgumentException("Could not load buffers for field " +
-            field + ". error message: " + e.getMessage(), e);
+          field + ". error message: " + e.getMessage(), e);
     }
     List<Field> children = field.getChildren();
     if (children.size() > 0) {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java b/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java
index 73deb0b..0c8868c 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.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 java.util.ArrayList;
@@ -67,7 +68,7 @@ public class VectorSchemaRoot implements AutoCloseable {
     }
     if (fieldVectors.size() != schema.getFields().size()) {
       throw new IllegalArgumentException("The root vector did not create the right number of children. found " +
-        fieldVectors.size() + " expected " + schema.getFields().size());
+          fieldVectors.size() + " expected " + schema.getFields().size());
     }
     return new VectorSchemaRoot(schema, fieldVectors, 0);
   }
@@ -102,7 +103,7 @@ public class VectorSchemaRoot implements AutoCloseable {
         ex = chain(ex, e);
       }
     }
-    if (ex!= null) {
+    if (ex != null) {
       throw ex;
     }
   }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/VectorTrimmer.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VectorTrimmer.java b/java/vector/src/main/java/org/apache/arrow/vector/VectorTrimmer.java
index 055857e..ada471e 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/VectorTrimmer.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/VectorTrimmer.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 io.netty.buffer.ByteBuf;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/VectorUnloader.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VectorUnloader.java b/java/vector/src/main/java/org/apache/arrow/vector/VectorUnloader.java
index 9965245..f8385a7 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/VectorUnloader.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/VectorUnloader.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 java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/ZeroVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ZeroVector.java b/java/vector/src/main/java/org/apache/arrow/vector/ZeroVector.java
index 01e22f2..cce7389 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/ZeroVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/ZeroVector.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 java.util.Collections;
@@ -42,10 +43,12 @@ public class ZeroVector implements FieldVector {
 
   private final TransferPair defaultPair = new TransferPair() {
     @Override
-    public void transfer() { }
+    public void transfer() {
+    }
 
     @Override
-    public void splitAndTransfer(int startIndex, int length) { }
+    public void splitAndTransfer(int startIndex, int length) {
+    }
 
     @Override
     public ValueVector getTo() {
@@ -53,7 +56,8 @@ public class ZeroVector implements FieldVector {
     }
 
     @Override
-    public void copyValueSafe(int from, int to) { }
+    public void copyValueSafe(int from, int to) {
+    }
   };
 
   private final Accessor defaultAccessor = new Accessor() {
@@ -80,22 +84,28 @@ public class ZeroVector implements FieldVector {
 
   private final Mutator defaultMutator = new Mutator() {
     @Override
-    public void setValueCount(int valueCount) { }
+    public void setValueCount(int valueCount) {
+    }
 
     @Override
-    public void reset() { }
+    public void reset() {
+    }
 
     @Override
-    public void generateTestData(int values) { }
+    public void generateTestData(int values) {
+    }
   };
 
-  public ZeroVector() { }
+  public ZeroVector() {
+  }
 
   @Override
-  public void close() { }
+  public void close() {
+  }
 
   @Override
-  public void clear() { }
+  public void clear() {
+  }
 
   @Override
   public Field getField() {
@@ -144,7 +154,8 @@ public class ZeroVector implements FieldVector {
   }
 
   @Override
-  public void reAlloc() {}
+  public void reAlloc() {
+  }
 
   @Override
   public BufferAllocator getAllocator() {
@@ -152,7 +163,8 @@ public class ZeroVector implements FieldVector {
   }
 
   @Override
-  public void setInitialCapacity(int numRecords) { }
+  public void setInitialCapacity(int numRecords) {
+  }
 
   @Override
   public int getValueCapacity() {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java
index 2aeeca2..db0ff86 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.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;
 
 import org.apache.arrow.memory.BufferAllocator;
@@ -58,6 +59,7 @@ public abstract class AbstractContainerVector implements ValueVector {
 
   /**
    * Returns a {@link org.apache.arrow.vector.ValueVector} corresponding to the given field name if exists or null.
+   *
    * @param name the name of the child to return
    * @return the corresponding FieldVector
    */
@@ -68,9 +70,9 @@ public abstract class AbstractContainerVector implements ValueVector {
   /**
    * Clears out all underlying child vectors.
    */
- @Override
+  @Override
   public void close() {
-    for (ValueVector vector:(Iterable<ValueVector>)this) {
+    for (ValueVector vector : (Iterable<ValueVector>) this) {
       vector.close();
     }
   }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractMapVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractMapVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractMapVector.java
index 4b6d82c..26b0f90 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractMapVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractMapVector.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;
 
 import java.util.ArrayList;
@@ -42,7 +43,7 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
   private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(AbstractContainerVector.class);
 
   // Maintains a map with key as field name and value is the vector itself
-  private final MapWithOrdinal<String, FieldVector> vectors =  new MapWithOrdinal<>();
+  private final MapWithOrdinal<String, FieldVector> vectors = new MapWithOrdinal<>();
 
   protected AbstractMapVector(String name, BufferAllocator allocator, CallBack callBack) {
     super(name, allocator, callBack);
@@ -50,7 +51,7 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
 
   @Override
   public void close() {
-    for(final ValueVector valueVector : vectors.values()) {
+    for (final ValueVector valueVector : vectors.values()) {
       valueVector.close();
     }
     vectors.clear();
@@ -83,7 +84,7 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
 
   @Override
   public void reAlloc() {
-    for (final ValueVector v: vectors.values()) {
+    for (final ValueVector v : vectors.values()) {
       v.reAlloc();
     }
   }
@@ -94,27 +95,26 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
    *
    * Execution takes place in the following order:
    * <ul>
-   *   <li>
-   *     if field is new, create and insert a new vector of desired type.
-   *   </li>
-   *   <li>
-   *     if field exists and existing vector is of desired vector type, return the vector.
-   *   </li>
-   *   <li>
-   *     if field exists and null filled, clear the existing vector; create and insert a new vector of desired type.
-   *   </li>
-   *   <li>
-   *     otherwise, throw an {@link java.lang.IllegalStateException}
-   *   </li>
+   * <li>
+   * if field is new, create and insert a new vector of desired type.
+   * </li>
+   * <li>
+   * if field exists and existing vector is of desired vector type, return the vector.
+   * </li>
+   * <li>
+   * if field exists and null filled, clear the existing vector; create and insert a new vector of desired type.
+   * </li>
+   * <li>
+   * otherwise, throw an {@link java.lang.IllegalStateException}
+   * </li>
    * </ul>
    *
    * @param childName the name of the field
    * @param fieldType the type for the vector
-   * @param clazz class of expected vector type
-   * @param <T> class type of expected vector type
-   * @throws java.lang.IllegalStateException raised if there is a hard schema change
-   *
+   * @param clazz     class of expected vector type
+   * @param <T>       class type of expected vector type
    * @return resultant {@link org.apache.arrow.vector.ValueVector}
+   * @throws java.lang.IllegalStateException raised if there is a hard schema change
    */
   @Override
   public <T extends FieldVector> T addOrGet(String childName, FieldType fieldType, Class<T> clazz) {
@@ -151,6 +151,7 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
 
   /**
    * Returns a {@link org.apache.arrow.vector.ValueVector} corresponding to the given ordinal identifier.
+   *
    * @param id the ordinal of the child to return
    * @return the corresponding child
    */
@@ -161,7 +162,8 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
   /**
    * Returns a {@link org.apache.arrow.vector.ValueVector} instance of subtype of T corresponding to the given
    * field name if exists or null.
-   * @param name the name of the child to return
+   *
+   * @param name  the name of the child to return
    * @param clazz the expected type of the child
    * @return the child corresponding to this name
    */
@@ -191,7 +193,8 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
    * Inserts the vector with the given name if it does not exist else replaces it with the new value.
    *
    * Note that this method does not enforce any vector type check nor throws a schema change exception.
-   * @param name the name of the child to add
+   *
+   * @param name   the name of the child to add
    * @param vector the vector to add as a child
    */
   protected void putChild(String name, FieldVector vector) {
@@ -200,8 +203,9 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
 
   /**
    * Inserts the input vector into the map if it does not exist, replaces if it exists already
-   * @param name  field name
-   * @param vector  vector to be inserted
+   *
+   * @param name   field name
+   * @param vector vector to be inserted
    */
   protected void putVector(String name, FieldVector vector) {
     final ValueVector old = vectors.put(
@@ -210,7 +214,7 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
     );
     if (old != null && old != vector) {
       logger.debug("Field [{}] mutated from [{}] to [{}]", name, old.getClass().getSimpleName(),
-                   vector.getClass().getSimpleName());
+          vector.getClass().getSimpleName());
     }
   }
 
@@ -298,7 +302,7 @@ public abstract class AbstractMapVector extends AbstractContainerVector {
 
   @Override
   public int getBufferSize() {
-    int actualBufSize = 0 ;
+    int actualBufSize = 0;
 
     for (final ValueVector v : vectors.values()) {
       for (final ArrowBuf buf : v.getBuffers(false)) {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java
index 3bfa8e7..8e2877f 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.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;
 
 import java.util.Collections;
@@ -144,7 +145,7 @@ public abstract class BaseRepeatedValueVector extends BaseValueVector implements
   public ArrowBuf[] getBuffers(boolean clear) {
     final ArrowBuf[] buffers = ObjectArrays.concat(offsets.getBuffers(false), vector.getBuffers(false), ArrowBuf.class);
     if (clear) {
-      for (ArrowBuf buffer:buffers) {
+      for (ArrowBuf buffer : buffers) {
         buffer.retain();
       }
       clear();
@@ -156,7 +157,7 @@ public abstract class BaseRepeatedValueVector extends BaseValueVector implements
    * @return 1 if inner vector is explicitly set via #addOrGetVector else 0
    */
   public int size() {
-    return vector == DEFAULT_DATA_VECTOR ? 0:1;
+    return vector == DEFAULT_DATA_VECTOR ? 0 : 1;
   }
 
   public <T extends ValueVector> AddOrGetResult<T> addOrGetVector(FieldType fieldType) {
@@ -166,8 +167,8 @@ public abstract class BaseRepeatedValueVector extends BaseValueVector implements
       // returned vector must have the same field
       created = true;
       if (callBack != null &&
-        // not a schema change if changing from ZeroVector to ZeroVector
-        (fieldType.getType().getTypeID() != ArrowTypeID.Null)) {
+          // not a schema change if changing from ZeroVector to ZeroVector
+          (fieldType.getType().getTypeID() != ArrowTypeID.Null)) {
         callBack.doWork();
       }
     }
@@ -178,7 +179,7 @@ public abstract class BaseRepeatedValueVector extends BaseValueVector implements
       throw new SchemaChangeRuntimeException(msg);
     }
 
-    return new AddOrGetResult<>((T)vector, created);
+    return new AddOrGetResult<>((T) vector, created);
   }
 
   protected void replaceDataVector(FieldVector v) {
@@ -200,7 +201,7 @@ public abstract class BaseRepeatedValueVector extends BaseValueVector implements
 
     @Override
     public int getInnerValueCountAt(int index) {
-      return offsets.getAccessor().get(index+1) - offsets.getAccessor().get(index);
+      return offsets.getAccessor().get(index + 1) - offsets.getAccessor().get(index);
     }
 
     @Override
@@ -222,15 +223,15 @@ public abstract class BaseRepeatedValueVector extends BaseValueVector implements
         offsets.reAlloc();
       }
       int offset = offsets.getAccessor().get(index);
-      offsets.getMutator().setSafe(index+1, offset);
-      setValueCount(index+1);
+      offsets.getMutator().setSafe(index + 1, offset);
+      setValueCount(index + 1);
       return offset;
     }
 
     @Override
     public void setValueCount(int valueCount) {
       // TODO: populate offset end points
-      offsets.getMutator().setValueCount(valueCount == 0 ? 0 : valueCount+1);
+      offsets.getMutator().setValueCount(valueCount == 0 ? 0 : valueCount + 1);
       final int childValueCount = valueCount == 0 ? 0 : offsets.getAccessor().get(valueCount);
       vector.getMutator().setValueCount(childValueCount);
     }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/complex/EmptyValuePopulator.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/EmptyValuePopulator.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/EmptyValuePopulator.java
index df69975..a76fbbe 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/EmptyValuePopulator.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/EmptyValuePopulator.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;
 
 import org.apache.arrow.vector.UInt4Vector;
@@ -34,8 +35,8 @@ public class EmptyValuePopulator {
   /**
    * Marks all values since the last set as empty. The last set value is obtained from underlying offsets vector.
    *
-   * @param lastIndex  the last index (inclusive) in the offsets vector until which empty population takes place
-   * @throws java.lang.IndexOutOfBoundsException  if lastIndex is negative or greater than offsets capacity.
+   * @param lastIndex the last index (inclusive) in the offsets vector until which empty population takes place
+   * @throws java.lang.IndexOutOfBoundsException if lastIndex is negative or greater than offsets capacity.
    */
   public void populate(int lastIndex) {
     if (lastIndex < 0) {
@@ -48,7 +49,7 @@ public class EmptyValuePopulator {
     for (int i = lastSet; i < lastIndex; i++) {
       mutator.setSafe(i + 1, previousEnd);
     }
-    mutator.setValueCount(lastIndex+1);
+    mutator.setValueCount(lastIndex + 1);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java
index b6d938f..3f0f1b0 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java
@@ -16,6 +16,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  ******************************************************************************/
+
 package org.apache.arrow.vector.complex;
 
 import static java.util.Collections.singletonList;
@@ -240,7 +241,7 @@ public class FixedSizeListVector extends BaseValueVector implements FieldVector,
   public ArrowBuf[] getBuffers(boolean clear) {
     final ArrowBuf[] buffers = ObjectArrays.concat(bits.getBuffers(false), vector.getBuffers(false), ArrowBuf.class);
     if (clear) {
-      for (ArrowBuf buffer: buffers) {
+      for (ArrowBuf buffer : buffers) {
         buffer.retain();
       }
       clear();
@@ -267,7 +268,7 @@ public class FixedSizeListVector extends BaseValueVector implements FieldVector,
     // returned vector must have the same field
     if (!Objects.equals(vector.getField().getType(), type.getType())) {
       final String msg = String.format("Inner vector type mismatch. Requested type: [%s], actual type: [%s]",
-        type.getType(), vector.getField().getType());
+          type.getType(), vector.getField().getType());
       throw new SchemaChangeRuntimeException(msg);
     }
 
@@ -301,7 +302,7 @@ public class FixedSizeListVector extends BaseValueVector implements FieldVector,
       }
       final List<Object> vals = new JsonStringArrayList<>(listSize);
       final ValueVector.Accessor valuesAccessor = vector.getAccessor();
-      for(int i = 0; i < listSize; i++) {
+      for (int i = 0; i < listSize; i++) {
         vals.add(valuesAccessor.getObject(index * listSize + i));
       }
       return vals;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
index fdeac39..7b6b97a 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
@@ -16,6 +16,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  ******************************************************************************/
+
 package org.apache.arrow.vector.complex;
 
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -199,7 +200,7 @@ public class ListVector extends BaseRepeatedValueVector implements FieldVector,
         to.addOrGetVector(vector.getField().getFieldType());
       }
       dataTransferPair = getDataVector().makeTransferPair(to.getDataVector());
-      pairs = new TransferPair[] { bitsTransferPair, offsetsTransferPair, dataTransferPair };
+      pairs = new TransferPair[] {bitsTransferPair, offsetsTransferPair, dataTransferPair};
     }
 
     @Override
@@ -316,9 +317,9 @@ public class ListVector extends BaseRepeatedValueVector implements FieldVector,
   @Override
   public ArrowBuf[] getBuffers(boolean clear) {
     final ArrowBuf[] buffers = ObjectArrays.concat(offsets.getBuffers(false), ObjectArrays.concat(bits.getBuffers(false),
-            vector.getBuffers(false), ArrowBuf.class), ArrowBuf.class);
+        vector.getBuffers(false), ArrowBuf.class), ArrowBuf.class);
     if (clear) {
-      for (ArrowBuf buffer:buffers) {
+      for (ArrowBuf buffer : buffers) {
         buffer.retain();
       }
       clear();
@@ -351,7 +352,7 @@ public class ListVector extends BaseRepeatedValueVector implements FieldVector,
       final int start = offsetsAccessor.get(index);
       final int end = offsetsAccessor.get(index + 1);
       final ValueVector.Accessor valuesAccessor = getDataVector().getAccessor();
-      for(int i = start; i < end; i++) {
+      for (int i = start; i < end; i++) {
         vals.add(valuesAccessor.getObject(i));
       }
       return vals;
@@ -388,7 +389,7 @@ public class ListVector extends BaseRepeatedValueVector implements FieldVector,
      * End the current value
      *
      * @param index index of the value to end
-     * @param size number of elements in the list that was written
+     * @param size  number of elements in the list that was written
      */
     public void endValue(int index, int size) {
       offsets.getMutator().set(index + 1, offsets.getAccessor().get(index + 1) + size);
@@ -414,7 +415,9 @@ public class ListVector extends BaseRepeatedValueVector implements FieldVector,
       lastSet = value;
     }
 
-    public int getLastSet() { return lastSet; }
+    public int getLastSet() {
+      return lastSet;
+    }
   }
 
 }


Mime
View raw message