arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [3/5] arrow git commit: ARROW-1304: [Java] Fix Indentation, WhitespaceAround and EmptyLineSeparator checkstyle warnings in Java
Date Mon, 07 Aug 2017 19:05:56 GMT
http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowFieldNode.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowFieldNode.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowFieldNode.java
index 72ce982..3ed384e 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowFieldNode.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowFieldNode.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 import org.apache.arrow.flatbuf.FieldNode;
@@ -34,7 +35,7 @@ public class ArrowFieldNode implements FBSerializable {
 
   @Override
   public int writeTo(FlatBufferBuilder builder) {
-    return FieldNode.createFieldNode(builder, (long)length, (long)nullCount);
+    return FieldNode.createFieldNode(builder, (long) length, (long) nullCount);
   }
 
   public int getNullCount() {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowMessage.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowMessage.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowMessage.java
index d307428..f59b4b6 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowMessage.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowMessage.java
@@ -15,16 +15,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 public interface ArrowMessage extends FBSerializable, AutoCloseable {
 
-    public int computeBodyLength();
+  public int computeBodyLength();
+
+  public <T> T accepts(ArrowMessageVisitor<T> visitor);
 
-    public <T> T accepts(ArrowMessageVisitor<T> visitor);
+  public static interface ArrowMessageVisitor<T> {
+    public T visit(ArrowDictionaryBatch message);
 
-    public static interface ArrowMessageVisitor<T> {
-        public T visit(ArrowDictionaryBatch message);
-        public T visit(ArrowRecordBatch message);
-    }
+    public T visit(ArrowRecordBatch message);
+  }
 }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowRecordBatch.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowRecordBatch.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowRecordBatch.java
index 6a716fa..d2f3782 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowRecordBatch.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowRecordBatch.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 import static org.apache.arrow.vector.schema.FBSerializables.writeAllStructsToVector;
@@ -36,10 +37,14 @@ public class ArrowRecordBatch implements ArrowMessage {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(ArrowRecordBatch.class);
 
-  /** number of records */
+  /**
+   * number of records
+   */
   private final int length;
 
-  /** Nodes correspond to the pre-ordered flattened logical schema */
+  /**
+   * Nodes correspond to the pre-ordered flattened logical schema
+   */
   private final List<ArrowFieldNode> nodes;
 
   private final List<ArrowBuf> buffers;
@@ -53,8 +58,8 @@ public class ArrowRecordBatch implements ArrowMessage {
   }
 
   /**
-   * @param length how many rows in this batch
-   * @param nodes field level info
+   * @param length  how many rows in this batch
+   * @param nodes   field level info
    * @param buffers will be retained until this recordBatch is closed
    */
   public ArrowRecordBatch(int length, List<ArrowFieldNode> nodes, List<ArrowBuf> buffers, boolean alignBuffers) {
@@ -119,7 +124,9 @@ public class ArrowRecordBatch implements ArrowMessage {
   }
 
   @Override
-  public <T> T accepts(ArrowMessageVisitor<T> visitor) { return visitor.visit(this); }
+  public <T> T accepts(ArrowMessageVisitor<T> visitor) {
+    return visitor.visit(this);
+  }
 
   /**
    * releases the buffers

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowVectorType.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowVectorType.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowVectorType.java
index 68da705..9d2fdfa 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowVectorType.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/ArrowVectorType.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 import java.util.Map;
@@ -34,10 +35,11 @@ public class ArrowVectorType {
   public static final ArrowVectorType TYPE = new ArrowVectorType(VectorType.TYPE);
 
   private static final Map<String, ArrowVectorType> typeByName;
+
   static {
-    ArrowVectorType[] types = { DATA, OFFSET, VALIDITY, TYPE };
+    ArrowVectorType[] types = {DATA, OFFSET, VALIDITY, TYPE};
     Builder<String, ArrowVectorType> builder = ImmutableMap.builder();
-    for (ArrowVectorType type: types) {
+    for (ArrowVectorType type : types) {
       builder.put(type.getName(), type);
     }
     typeByName = builder.build();

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializable.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializable.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializable.java
index d23ed91..91d60ea 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializable.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializable.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 import com.google.flatbuffers.FlatBufferBuilder;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializables.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializables.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializables.java
index 31c17ad..ae5aa55 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializables.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/FBSerializables.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/TypeLayout.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/TypeLayout.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/TypeLayout.java
index 24840ec..29407bf 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/TypeLayout.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/TypeLayout.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 import static java.util.Arrays.asList;
@@ -61,11 +62,13 @@ public class TypeLayout {
   public static TypeLayout getTypeLayout(final ArrowType arrowType) {
     TypeLayout layout = arrowType.accept(new ArrowTypeVisitor<TypeLayout>() {
 
-      @Override public TypeLayout visit(Int type) {
+      @Override
+      public TypeLayout visit(Int type) {
         return newFixedWidthTypeLayout(dataVector(type.getBitWidth()));
       }
 
-      @Override public TypeLayout visit(Union type) {
+      @Override
+      public TypeLayout visit(Union type) {
         List<VectorLayout> vectors;
         switch (type.getMode()) {
           case Dense:
@@ -74,12 +77,12 @@ public class TypeLayout {
                 validityVector(),
                 typeVector(),
                 offsetVector() // offset to find the vector
-                );
+            );
             break;
           case Sparse:
             vectors = asList(
                 typeVector() // type of the value at the index or 0 if null
-                );
+            );
             break;
           default:
             throw new UnsupportedOperationException("Unsupported Union Mode: " + type.getMode());
@@ -87,64 +90,73 @@ public class TypeLayout {
         return new TypeLayout(vectors);
       }
 
-      @Override public TypeLayout visit(Struct type) {
+      @Override
+      public TypeLayout visit(Struct type) {
         List<VectorLayout> vectors = asList(
             validityVector()
-            );
+        );
         return new TypeLayout(vectors);
       }
 
-      @Override public TypeLayout visit(Timestamp type) {
+      @Override
+      public TypeLayout visit(Timestamp type) {
         return newFixedWidthTypeLayout(dataVector(64));
       }
 
-      @Override public TypeLayout visit(org.apache.arrow.vector.types.pojo.ArrowType.List type) {
+      @Override
+      public TypeLayout visit(org.apache.arrow.vector.types.pojo.ArrowType.List type) {
         List<VectorLayout> vectors = asList(
             validityVector(),
             offsetVector()
-            );
+        );
         return new TypeLayout(vectors);
       }
 
-      @Override public TypeLayout visit(FixedSizeList type) {
+      @Override
+      public TypeLayout visit(FixedSizeList type) {
         List<VectorLayout> vectors = asList(
             validityVector()
-            );
+        );
         return new TypeLayout(vectors);
       }
 
-      @Override public TypeLayout visit(FloatingPoint type) {
+      @Override
+      public TypeLayout visit(FloatingPoint type) {
         int bitWidth;
         switch (type.getPrecision()) {
-        case HALF:
-          bitWidth = 16;
-          break;
-        case SINGLE:
-          bitWidth = 32;
-          break;
-        case DOUBLE:
-          bitWidth = 64;
-          break;
-        default:
-          throw new UnsupportedOperationException("Unsupported Precision: " + type.getPrecision());
+          case HALF:
+            bitWidth = 16;
+            break;
+          case SINGLE:
+            bitWidth = 32;
+            break;
+          case DOUBLE:
+            bitWidth = 64;
+            break;
+          default:
+            throw new UnsupportedOperationException("Unsupported Precision: " + type.getPrecision());
         }
         return newFixedWidthTypeLayout(dataVector(bitWidth));
       }
 
-      @Override public TypeLayout visit(Decimal type) {
+      @Override
+      public TypeLayout visit(Decimal type) {
         // TODO: check size
         return newFixedWidthTypeLayout(dataVector(64)); // actually depends on the type fields
       }
 
-      @Override public TypeLayout visit(Bool type) {
+      @Override
+      public TypeLayout visit(Bool type) {
         return newFixedWidthTypeLayout(booleanVector());
       }
 
-      @Override public TypeLayout visit(Binary type) {
+      @Override
+      public TypeLayout visit(Binary type) {
         return newVariableWidthTypeLayout();
       }
 
-      @Override public TypeLayout visit(Utf8 type) {
+      @Override
+      public TypeLayout visit(Utf8 type) {
         return newVariableWidthTypeLayout();
       }
 
@@ -178,12 +190,12 @@ public class TypeLayout {
       @Override
       public TypeLayout visit(Interval type) { // TODO: check size
         switch (type.getUnit()) {
-        case DAY_TIME:
-          return newFixedWidthTypeLayout(dataVector(64));
-        case YEAR_MONTH:
-          return newFixedWidthTypeLayout(dataVector(64));
-        default:
-          throw new UnsupportedOperationException("Unknown unit " + type.getUnit());
+          case DAY_TIME:
+            return newFixedWidthTypeLayout(dataVector(64));
+          case YEAR_MONTH:
+            return newFixedWidthTypeLayout(dataVector(64));
+          default:
+            throw new UnsupportedOperationException("Unknown unit " + type.getUnit());
         }
       }
 
@@ -228,12 +240,15 @@ public class TypeLayout {
 
   @Override
   public boolean equals(Object obj) {
-    if (this == obj)
+    if (this == obj) {
       return true;
-    if (obj == null)
+    }
+    if (obj == null) {
       return false;
-    if (getClass() != obj.getClass())
+    }
+    if (getClass() != obj.getClass()) {
       return false;
+    }
     TypeLayout other = (TypeLayout) obj;
     return vectors.equals(other.vectors);
   }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/schema/VectorLayout.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/schema/VectorLayout.java b/java/vector/src/main/java/org/apache/arrow/vector/schema/VectorLayout.java
index 2073795..0871baf 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/schema/VectorLayout.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/schema/VectorLayout.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.schema;
 
 import static org.apache.arrow.vector.schema.ArrowVectorType.DATA;
@@ -48,16 +49,16 @@ public class VectorLayout implements FBSerializable {
 
   public static VectorLayout dataVector(int typeBitWidth) {
     switch (typeBitWidth) {
-    case 8:
-      return VALUES_8;
-    case 16:
-      return VALUES_16;
-    case 32:
-      return VALUES_32;
-    case 64:
-      return VALUES_64;
-    default:
-      throw new IllegalArgumentException("only 8, 16, 32, or 64 bits supported");
+      case 8:
+        return VALUES_8;
+      case 16:
+        return VALUES_16;
+      case 32:
+        return VALUES_32;
+      case 64:
+        return VALUES_64;
+      default:
+        throw new IllegalArgumentException("only 8, 16, 32, or 64 bits supported");
     }
   }
 
@@ -81,7 +82,7 @@ public class VectorLayout implements FBSerializable {
   private VectorLayout(@JsonProperty("type") ArrowVectorType type, @JsonProperty("typeBitWidth") int typeBitWidth) {
     super();
     this.type = Preconditions.checkNotNull(type);
-    this.typeBitWidth = (short)typeBitWidth;
+    this.typeBitWidth = (short) typeBitWidth;
     if (typeBitWidth <= 0) {
       throw new IllegalArgumentException("bitWidth invalid: " + typeBitWidth);
     }
@@ -111,18 +112,22 @@ public class VectorLayout implements FBSerializable {
 
   @Override
   public boolean equals(Object obj) {
-    if (this == obj)
+    if (this == obj) {
       return true;
-    if (obj == null)
+    }
+    if (obj == null) {
       return false;
-    if (getClass() != obj.getClass())
+    }
+    if (getClass() != obj.getClass()) {
       return false;
+    }
     VectorLayout other = (VectorLayout) obj;
     return type.equals(other.type) && (typeBitWidth == other.typeBitWidth);
   }
 
   @Override
-  public int writeTo(FlatBufferBuilder builder) {;
+  public int writeTo(FlatBufferBuilder builder) {
+    ;
     return org.apache.arrow.flatbuf.VectorLayout.createVectorLayout(builder, typeBitWidth, type.getType());
   }
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamReader.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamReader.java b/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamReader.java
index 641978a..5b63000 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamReader.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamReader.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 java.io.IOException;
@@ -33,31 +34,33 @@ import org.apache.arrow.vector.types.pojo.Schema;
  */
 public class ArrowStreamReader extends ArrowReader<ReadChannel> {
 
-    /**
-    * Constructs a streaming read, reading bytes from 'in'. Non-blocking.
-    * @param in the stream to read from
-    * @param allocator to allocate new buffers
-    */
-    public ArrowStreamReader(ReadableByteChannel in, BufferAllocator allocator) {
-        super(new ReadChannel(in), allocator);
-    }
-
-    public ArrowStreamReader(InputStream in, BufferAllocator allocator) {
-        this(Channels.newChannel(in), allocator);
-    }
-
-    /**
-     * Reads the schema message from the beginning of the stream.
-     * @param in to allocate new buffers
-     * @return the deserialized arrow schema
-     */
-    @Override
-    protected Schema readSchema(ReadChannel in) throws IOException {
-        return MessageSerializer.deserializeSchema(in);
-    }
-
-    @Override
-    protected ArrowMessage readMessage(ReadChannel in, BufferAllocator allocator) throws IOException {
-        return MessageSerializer.deserializeMessageBatch(in, allocator);
-    }
+  /**
+   * Constructs a streaming read, reading bytes from 'in'. Non-blocking.
+   *
+   * @param in        the stream to read from
+   * @param allocator to allocate new buffers
+   */
+  public ArrowStreamReader(ReadableByteChannel in, BufferAllocator allocator) {
+    super(new ReadChannel(in), allocator);
+  }
+
+  public ArrowStreamReader(InputStream in, BufferAllocator allocator) {
+    this(Channels.newChannel(in), allocator);
+  }
+
+  /**
+   * Reads the schema message from the beginning of the stream.
+   *
+   * @param in to allocate new buffers
+   * @return the deserialized arrow schema
+   */
+  @Override
+  protected Schema readSchema(ReadChannel in) throws IOException {
+    return MessageSerializer.deserializeSchema(in);
+  }
+
+  @Override
+  protected ArrowMessage readMessage(ReadChannel in, BufferAllocator allocator) throws IOException {
+    return MessageSerializer.deserializeMessageBatch(in, allocator);
+  }
 }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamWriter.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamWriter.java b/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamWriter.java
index ea29cd9..b854cd2 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamWriter.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/stream/ArrowStreamWriter.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 org.apache.arrow.memory.BufferAllocator;
@@ -35,22 +36,23 @@ import java.util.List;
 
 public class ArrowStreamWriter extends ArrowWriter {
 
-    public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, OutputStream out) {
-       this(root, provider, Channels.newChannel(out));
-    }
+  public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, OutputStream out) {
+    this(root, provider, Channels.newChannel(out));
+  }
 
-    public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out) {
-       super(root, provider, out);
-    }
+  public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out) {
+    super(root, provider, out);
+  }
 
-    @Override
-    protected void startInternal(WriteChannel out) throws IOException {}
+  @Override
+  protected void startInternal(WriteChannel out) throws IOException {
+  }
 
-    @Override
-    protected void endInternal(WriteChannel out,
-                               Schema schema,
-                               List<ArrowBlock> dictionaries,
-                               List<ArrowBlock> records) throws IOException {
-       out.writeIntLittleEndian(0);
-    }
+  @Override
+  protected void endInternal(WriteChannel out,
+                             Schema schema,
+                             List<ArrowBlock> dictionaries,
+                             List<ArrowBlock> records) throws IOException {
+    out.writeIntLittleEndian(0);
+  }
 }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java b/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java
index 05ad92d..a70d029 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.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 java.io.IOException;
@@ -48,29 +49,30 @@ import io.netty.buffer.ArrowBuf;
  * Utility class for serializing Messages. Messages are all serialized a similar way.
  * 1. 4 byte little endian message header prefix
  * 2. FB serialized Message: This includes it the body length, which is the serialized
- *    body and the type of the message.
+ * body and the type of the message.
  * 3. Serialized message.
  *
  * For schema messages, the serialization is simply the FB serialized Schema.
  *
  * For RecordBatch messages the serialization is:
- *   1. 4 byte little endian batch metadata header
- *   2. FB serialized RowBatch
- *   3. Padding to align to 8 byte boundary.
- *   4. serialized RowBatch buffers.
+ * 1. 4 byte little endian batch metadata header
+ * 2. FB serialized RowBatch
+ * 3. Padding to align to 8 byte boundary.
+ * 4. serialized RowBatch buffers.
  */
 public class MessageSerializer {
 
   public static int bytesToInt(byte[] bytes) {
     return ((bytes[3] & 255) << 24) +
-           ((bytes[2] & 255) << 16) +
-           ((bytes[1] & 255) <<  8) +
-           ((bytes[0] & 255) <<  0);
+        ((bytes[2] & 255) << 16) +
+        ((bytes[1] & 255) << 8) +
+        ((bytes[0] & 255) << 0);
   }
 
   /**
    * Serialize a schema object.
-   * @param out where to write the schema
+   *
+   * @param out    where to write the schema
    * @param schema the object to serialize to out
    * @return the resulting size of the serialized schema
    * @throws IOException if something went wrong
@@ -86,6 +88,7 @@ public class MessageSerializer {
 
   /**
    * Deserializes a schema object. Format is from serialize().
+   *
    * @param in the channel to deserialize from
    * @return the deserialized object
    * @throws IOException if something went wrong
@@ -106,13 +109,14 @@ public class MessageSerializer {
 
   /**
    * Serializes an ArrowRecordBatch. Returns the offset and length of the written batch.
-   * @param out where to write the batch
+   *
+   * @param out   where to write the batch
    * @param batch the object to serialize to out
    * @return the serialized block metadata
    * @throws IOException if something went wrong
    */
   public static ArrowBlock serialize(WriteChannel out, ArrowRecordBatch batch)
-          throws IOException {
+      throws IOException {
 
     long start = out.getCurrentPosition();
     int bodyLength = batch.computeBodyLength();
@@ -125,9 +129,9 @@ public class MessageSerializer {
     int metadataLength = serializedMessage.remaining();
 
     // calculate alignment bytes so that metadata length points to the correct location after alignment
-    int padding = (int)((start + metadataLength + 4) % 8);
+    int padding = (int) ((start + metadataLength + 4) % 8);
     if (padding != 0) {
-        metadataLength += (8 - padding);
+      metadataLength += (8 - padding);
     }
 
     out.writeIntLittleEndian(metadataLength);
@@ -152,7 +156,7 @@ public class MessageSerializer {
       ArrowBuffer layout = buffersLayout.get(i);
       long startPosition = bufferStart + layout.getOffset();
       if (startPosition != out.getCurrentPosition()) {
-        out.writeZeros((int)(startPosition - out.getCurrentPosition()));
+        out.writeZeros((int) (startPosition - out.getCurrentPosition()));
       }
       out.write(buffer);
       if (out.getCurrentPosition() != startPosition + layout.getSize()) {
@@ -165,9 +169,10 @@ public class MessageSerializer {
 
   /**
    * Deserializes a RecordBatch
-   * @param in the channel to deserialize from
+   *
+   * @param in      the channel to deserialize from
    * @param message the object to derialize to
-   * @param alloc to allocate buffers
+   * @param alloc   to allocate buffers
    * @return the deserialized object
    * @throws IOException if something went wrong
    */
@@ -188,14 +193,15 @@ public class MessageSerializer {
   /**
    * Deserializes a RecordBatch knowing the size of the entire message up front. This
    * minimizes the number of reads to the underlying stream.
-   * @param in the channel to deserialize from
+   *
+   * @param in    the channel to deserialize from
    * @param block the object to derialize to
    * @param alloc to allocate buffers
    * @return the deserialized object
    * @throws IOException if something went wrong
    */
   public static ArrowRecordBatch deserializeRecordBatch(ReadChannel in, ArrowBlock block,
-      BufferAllocator alloc) throws IOException {
+                                                        BufferAllocator alloc) throws IOException {
     // Metadata length contains integer prefix plus byte padding
     long totalLen = block.getMetadataLength() + block.getBodyLength();
 
@@ -223,37 +229,38 @@ public class MessageSerializer {
 
   // Deserializes a record batch given the Flatbuffer metadata and in-memory body
   public static ArrowRecordBatch deserializeRecordBatch(RecordBatch recordBatchFB,
-      ArrowBuf body) throws IOException {
+                                                        ArrowBuf body) throws IOException {
     // Now read the body
     int nodesLength = recordBatchFB.nodesLength();
     List<ArrowFieldNode> nodes = new ArrayList<>();
     for (int i = 0; i < nodesLength; ++i) {
       FieldNode node = recordBatchFB.nodes(i);
-      if ((int)node.length() != node.length() ||
-          (int)node.nullCount() != node.nullCount()) {
+      if ((int) node.length() != node.length() ||
+          (int) node.nullCount() != node.nullCount()) {
         throw new IOException("Cannot currently deserialize record batches with " +
-                              "node length larger than Int.MAX_VALUE");
+            "node length larger than Int.MAX_VALUE");
       }
-      nodes.add(new ArrowFieldNode((int)node.length(), (int)node.nullCount()));
+      nodes.add(new ArrowFieldNode((int) node.length(), (int) node.nullCount()));
     }
     List<ArrowBuf> buffers = new ArrayList<>();
     for (int i = 0; i < recordBatchFB.buffersLength(); ++i) {
       Buffer bufferFB = recordBatchFB.buffers(i);
-      ArrowBuf vectorBuffer = body.slice((int)bufferFB.offset(), (int)bufferFB.length());
+      ArrowBuf vectorBuffer = body.slice((int) bufferFB.offset(), (int) bufferFB.length());
       buffers.add(vectorBuffer);
     }
-    if ((int)recordBatchFB.length() != recordBatchFB.length()) {
+    if ((int) recordBatchFB.length() != recordBatchFB.length()) {
       throw new IOException("Cannot currently deserialize record batches over 2GB");
     }
     ArrowRecordBatch arrowRecordBatch =
-        new ArrowRecordBatch((int)recordBatchFB.length(), nodes, buffers);
+        new ArrowRecordBatch((int) recordBatchFB.length(), nodes, buffers);
     body.release();
     return arrowRecordBatch;
   }
 
   /**
    * Serializes a dictionary ArrowRecordBatch. Returns the offset and length of the written batch.
-   * @param out where to serialize
+   *
+   * @param out   where to serialize
    * @param batch the batch to serialize
    * @return the metadata of the serialized block
    * @throws IOException if something went wrong
@@ -290,15 +297,16 @@ public class MessageSerializer {
 
   /**
    * Deserializes a DictionaryBatch
-   * @param in where to read from
+   *
+   * @param in      where to read from
    * @param message the message message metadata to deserialize
-   * @param alloc the allocator for new buffers
+   * @param alloc   the allocator for new buffers
    * @return the corresponding dictionary batch
    * @throws IOException if something went wrong
    */
   public static ArrowDictionaryBatch deserializeDictionaryBatch(ReadChannel in,
-                                                                 Message message,
-                                                                 BufferAllocator alloc) throws IOException {
+                                                                Message message,
+                                                                BufferAllocator alloc) throws IOException {
     DictionaryBatch dictionaryBatchFB = (DictionaryBatch) message.header(new DictionaryBatch());
 
     int bodyLength = (int) message.bodyLength();
@@ -315,7 +323,8 @@ public class MessageSerializer {
   /**
    * Deserializes a DictionaryBatch knowing the size of the entire message up front. This
    * minimizes the number of reads to the underlying stream.
-   * @param in where to read from
+   *
+   * @param in    where to read from
    * @param block block metadata for deserializing
    * @param alloc to allocate new buffers
    * @return the corresponding dictionary
@@ -345,7 +354,7 @@ public class MessageSerializer {
 
     // Now read the body
     final ArrowBuf body = buffer.slice(block.getMetadataLength(),
-                                       (int) totalLen - block.getMetadataLength());
+        (int) totalLen - block.getMetadataLength());
     ArrowRecordBatch recordBatch = deserializeRecordBatch(dictionaryBatchFB.data(), body);
     return new ArrowDictionaryBatch(dictionaryBatchFB.id(), recordBatch);
   }
@@ -359,22 +368,26 @@ public class MessageSerializer {
     }
 
     switch (message.headerType()) {
-      case MessageHeader.RecordBatch: return deserializeRecordBatch(in, message, alloc);
-      case MessageHeader.DictionaryBatch: return deserializeDictionaryBatch(in, message, alloc);
-      default: throw new IOException("Unexpected message header type " + message.headerType());
+      case MessageHeader.RecordBatch:
+        return deserializeRecordBatch(in, message, alloc);
+      case MessageHeader.DictionaryBatch:
+        return deserializeDictionaryBatch(in, message, alloc);
+      default:
+        throw new IOException("Unexpected message header type " + message.headerType());
     }
   }
 
   /**
    * Serializes a message header.
-   * @param builder to write the flatbuf to
-   * @param headerType headerType field
+   *
+   * @param builder      to write the flatbuf to
+   * @param headerType   headerType field
    * @param headerOffset header offset field
-   * @param bodyLength body length field
+   * @param bodyLength   body length field
    * @return the corresponding ByteBuffer
    */
   public static ByteBuffer serializeMessage(FlatBufferBuilder builder, byte headerType,
-      int headerOffset, int bodyLength) {
+                                            int headerOffset, int bodyLength) {
     Message.startMessage(builder);
     Message.addHeaderType(builder, headerType);
     Message.addHeader(builder, headerOffset);
@@ -387,9 +400,13 @@ public class MessageSerializer {
   private static Message deserializeMessage(ReadChannel in) throws IOException {
     // Read the message size. There is an i32 little endian prefix.
     ByteBuffer buffer = ByteBuffer.allocate(4);
-    if (in.readFully(buffer) != 4) return null;
+    if (in.readFully(buffer) != 4) {
+      return null;
+    }
     int messageLength = bytesToInt(buffer.array());
-    if (messageLength == 0) return null;
+    if (messageLength == 0) {
+      return null;
+    }
 
     buffer = ByteBuffer.allocate(messageLength);
     if (in.readFully(buffer) != messageLength) {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/DateUnit.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/DateUnit.java b/java/vector/src/main/java/org/apache/arrow/vector/types/DateUnit.java
index e5beebf..003d3cd 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/DateUnit.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/DateUnit.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;
 
 public enum DateUnit {
@@ -22,6 +23,7 @@ public enum DateUnit {
   MILLISECOND(org.apache.arrow.flatbuf.DateUnit.MILLISECOND);
 
   private static final DateUnit[] valuesByFlatbufId = new DateUnit[DateUnit.values().length];
+
   static {
     for (DateUnit v : DateUnit.values()) {
       valuesByFlatbufId[v.flatbufID] = v;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/FloatingPointPrecision.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/FloatingPointPrecision.java b/java/vector/src/main/java/org/apache/arrow/vector/types/FloatingPointPrecision.java
index 3206969..ec25328 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/FloatingPointPrecision.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/FloatingPointPrecision.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;
 
 import org.apache.arrow.flatbuf.Precision;
@@ -25,6 +26,7 @@ public enum FloatingPointPrecision {
   DOUBLE(Precision.DOUBLE);
 
   private static final FloatingPointPrecision[] valuesByFlatbufId = new FloatingPointPrecision[FloatingPointPrecision.values().length];
+
   static {
     for (FloatingPointPrecision v : FloatingPointPrecision.values()) {
       valuesByFlatbufId[v.flatbufID] = v;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/IntervalUnit.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/IntervalUnit.java b/java/vector/src/main/java/org/apache/arrow/vector/types/IntervalUnit.java
index b3ddf1f..a8157f1 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/IntervalUnit.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/IntervalUnit.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;
 
 public enum IntervalUnit {
@@ -22,6 +23,7 @@ public enum IntervalUnit {
   DAY_TIME(org.apache.arrow.flatbuf.IntervalUnit.DAY_TIME);
 
   private static final IntervalUnit[] valuesByFlatbufId = new IntervalUnit[IntervalUnit.values().length];
+
   static {
     for (IntervalUnit v : IntervalUnit.values()) {
       valuesByFlatbufId[v.flatbufID] = v;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/TimeUnit.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/TimeUnit.java b/java/vector/src/main/java/org/apache/arrow/vector/types/TimeUnit.java
index cea9866..1da9321 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/TimeUnit.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/TimeUnit.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;
 
 public enum TimeUnit {
@@ -24,6 +25,7 @@ public enum TimeUnit {
   NANOSECOND(org.apache.arrow.flatbuf.TimeUnit.NANOSECOND);
 
   private static final TimeUnit[] valuesByFlatbufId = new TimeUnit[TimeUnit.values().length];
+
   static {
     for (TimeUnit v : TimeUnit.values()) {
       valuesByFlatbufId[v.flatbufID] = v;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/Types.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/Types.java b/java/vector/src/main/java/org/apache/arrow/vector/types/Types.java
index 6591a4b..c57dd6d 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/Types.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/Types.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;
 
 import static org.apache.arrow.vector.types.FloatingPointPrecision.DOUBLE;
@@ -531,73 +532,83 @@ public class Types {
 
   public static MinorType getMinorTypeForArrowType(ArrowType arrowType) {
     return arrowType.accept(new ArrowTypeVisitor<MinorType>() {
-      @Override public MinorType visit(Null type) {
+      @Override
+      public MinorType visit(Null type) {
         return MinorType.NULL;
       }
 
-      @Override public MinorType visit(Struct type) {
+      @Override
+      public MinorType visit(Struct type) {
         return MinorType.MAP;
       }
 
-      @Override public MinorType visit(List type) {
+      @Override
+      public MinorType visit(List type) {
         return MinorType.LIST;
       }
 
-      @Override public MinorType visit(FixedSizeList type) {
+      @Override
+      public MinorType visit(FixedSizeList type) {
         return MinorType.FIXED_SIZE_LIST;
       }
 
-      @Override public MinorType visit(Union type) {
+      @Override
+      public MinorType visit(Union type) {
         return MinorType.UNION;
       }
 
       @Override
       public MinorType visit(Int type) {
         switch (type.getBitWidth()) {
-        case 8:
-          return type.getIsSigned() ? MinorType.TINYINT : MinorType.UINT1;
-        case 16:
-          return type.getIsSigned() ? MinorType.SMALLINT : MinorType.UINT2;
-        case 32:
-          return type.getIsSigned() ? MinorType.INT : MinorType.UINT4;
-        case 64:
-          return type.getIsSigned() ? MinorType.BIGINT : MinorType.UINT8;
-        default:
-          throw new IllegalArgumentException("only 8, 16, 32, 64 supported: " + type);
+          case 8:
+            return type.getIsSigned() ? MinorType.TINYINT : MinorType.UINT1;
+          case 16:
+            return type.getIsSigned() ? MinorType.SMALLINT : MinorType.UINT2;
+          case 32:
+            return type.getIsSigned() ? MinorType.INT : MinorType.UINT4;
+          case 64:
+            return type.getIsSigned() ? MinorType.BIGINT : MinorType.UINT8;
+          default:
+            throw new IllegalArgumentException("only 8, 16, 32, 64 supported: " + type);
         }
       }
 
       @Override
       public MinorType visit(FloatingPoint type) {
         switch (type.getPrecision()) {
-        case HALF:
-          throw new UnsupportedOperationException("NYI: " + type);
-        case SINGLE:
-          return MinorType.FLOAT4;
-        case DOUBLE:
-          return MinorType.FLOAT8;
-        default:
-          throw new IllegalArgumentException("unknown precision: " + type);
+          case HALF:
+            throw new UnsupportedOperationException("NYI: " + type);
+          case SINGLE:
+            return MinorType.FLOAT4;
+          case DOUBLE:
+            return MinorType.FLOAT8;
+          default:
+            throw new IllegalArgumentException("unknown precision: " + type);
         }
       }
 
-      @Override public MinorType visit(Utf8 type) {
+      @Override
+      public MinorType visit(Utf8 type) {
         return MinorType.VARCHAR;
       }
 
-      @Override public MinorType visit(Binary type) {
+      @Override
+      public MinorType visit(Binary type) {
         return MinorType.VARBINARY;
       }
 
-      @Override public MinorType visit(Bool type) {
+      @Override
+      public MinorType visit(Bool type) {
         return MinorType.BIT;
       }
 
-      @Override public MinorType visit(Decimal type) {
+      @Override
+      public MinorType visit(Decimal type) {
         return MinorType.DECIMAL;
       }
 
-      @Override public MinorType visit(Date type) {
+      @Override
+      public MinorType visit(Date type) {
         switch (type.getUnit()) {
           case DAY:
             return MinorType.DATEDAY;
@@ -608,7 +619,8 @@ public class Types {
         }
       }
 
-      @Override public MinorType visit(Time type) {
+      @Override
+      public MinorType visit(Time type) {
         switch (type.getUnit()) {
           case SECOND:
             return MinorType.TIMESEC;
@@ -623,7 +635,8 @@ public class Types {
         }
       }
 
-      @Override public MinorType visit(Timestamp type) {
+      @Override
+      public MinorType visit(Timestamp type) {
         String tz = type.getTimezone();
         switch (type.getUnit()) {
           case SECOND:
@@ -642,12 +655,12 @@ public class Types {
       @Override
       public MinorType visit(Interval type) {
         switch (type.getUnit()) {
-        case DAY_TIME:
-          return MinorType.INTERVALDAY;
-        case YEAR_MONTH:
-          return MinorType.INTERVALYEAR;
-        default:
-          throw new IllegalArgumentException("unknown unit: " + type);
+          case DAY_TIME:
+            return MinorType.INTERVALDAY;
+          case YEAR_MONTH:
+            return MinorType.INTERVALYEAR;
+          default:
+            throw new IllegalArgumentException("unknown unit: " + type);
         }
       }
     });

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/UnionMode.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/UnionMode.java b/java/vector/src/main/java/org/apache/arrow/vector/types/UnionMode.java
index 8e957bc..231e85f 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/UnionMode.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/UnionMode.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;
 
 public enum UnionMode {
@@ -22,6 +23,7 @@ public enum UnionMode {
   Dense(org.apache.arrow.flatbuf.UnionMode.Dense);
 
   private static final UnionMode[] valuesByFlatbufId = new UnionMode[UnionMode.values().length];
+
   static {
     for (UnionMode v : UnionMode.values()) {
       valuesByFlatbufId[v.flatbufID] = v;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/DictionaryEncoding.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/DictionaryEncoding.java b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/DictionaryEncoding.java
index 8a0224d..2657532 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/DictionaryEncoding.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/DictionaryEncoding.java
@@ -16,6 +16,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  ******************************************************************************/
+
 package org.apache.arrow.vector.types.pojo;
 
 import java.util.Objects;

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java
index a8f2ae5..48e71a9 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.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;
 
 
@@ -166,7 +167,7 @@ public class Field {
     int layoutOffset = org.apache.arrow.flatbuf.Field.createLayoutVector(builder, buffersData);
     int[] metadataOffsets = new int[getMetadata().size()];
     Iterator<Entry<String, String>> metadataIterator = getMetadata().entrySet().iterator();
-    for (int i = 0; i < metadataOffsets.length; i ++) {
+    for (int i = 0; i < metadataOffsets.length; i++) {
       Entry<String, String> kv = metadataIterator.next();
       int keyOffset = builder.createString(kv.getKey());
       int valueOffset = builder.createString(kv.getValue());
@@ -239,11 +240,11 @@ public class Field {
     }
     Field that = (Field) obj;
     return Objects.equals(this.name, that.name) &&
-             Objects.equals(this.isNullable(), that.isNullable()) &&
-             Objects.equals(this.getType(), that.getType()) &&
-             Objects.equals(this.getDictionary(), that.getDictionary()) &&
-             Objects.equals(this.getMetadata(), that.getMetadata()) &&
-             Objects.equals(this.children, that.children);
+        Objects.equals(this.isNullable(), that.isNullable()) &&
+        Objects.equals(this.getType(), that.getType()) &&
+        Objects.equals(this.getDictionary(), that.getDictionary()) &&
+        Objects.equals(this.getMetadata(), that.getMetadata()) &&
+        Objects.equals(this.children, that.children);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/FieldType.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/FieldType.java b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/FieldType.java
index c8fc689..f085619 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/FieldType.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/FieldType.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 com.google.common.base.Preconditions.checkNotNull;
@@ -55,12 +56,15 @@ public class FieldType {
   public boolean isNullable() {
     return nullable;
   }
+
   public ArrowType getType() {
     return type;
   }
+
   public DictionaryEncoding getDictionary() {
     return dictionary;
   }
+
   public Map<String, String> getMetadata() {
     return metadata;
   }

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java
index 82e2ef5..a87d449 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.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;
 
 
@@ -53,7 +54,7 @@ public class Schema {
 
   /**
    * @param fields the list of the fields
-   * @param name the name of the field to return
+   * @param name   the name of the field to return
    * @return the corresponding field
    * @throws IllegalArgumentException if the field was not found
    */
@@ -146,7 +147,7 @@ public class Schema {
     int fieldsOffset = org.apache.arrow.flatbuf.Schema.createFieldsVector(builder, fieldOffsets);
     int[] metadataOffsets = new int[metadata.size()];
     Iterator<Entry<String, String>> metadataIterator = metadata.entrySet().iterator();
-    for (int i = 0; i < metadataOffsets.length; i ++) {
+    for (int i = 0; i < metadataOffsets.length; i++) {
       Entry<String, String> kv = metadataIterator.next();
       int keyOffset = builder.createString(kv.getKey());
       int valueOffset = builder.createString(kv.getValue());
@@ -174,7 +175,7 @@ public class Schema {
       return false;
     }
     return Objects.equals(this.fields, ((Schema) obj).fields) &&
-           Objects.equals(this.metadata, ((Schema) obj).metadata);
+        Objects.equals(this.metadata, ((Schema) obj).metadata);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/util/ByteArrayReadableSeekableByteChannel.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/ByteArrayReadableSeekableByteChannel.java b/java/vector/src/main/java/org/apache/arrow/vector/util/ByteArrayReadableSeekableByteChannel.java
index 69840fe..80d4a46 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/util/ByteArrayReadableSeekableByteChannel.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/util/ByteArrayReadableSeekableByteChannel.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.util;
 
 import java.io.IOException;
@@ -58,7 +59,7 @@ public class ByteArrayReadableSeekableByteChannel implements SeekableByteChannel
 
   @Override
   public SeekableByteChannel position(final long newPosition) throws IOException {
-    this.position = (int)newPosition;
+    this.position = (int) newPosition;
     return this;
   }
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java b/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java
index 68b9fb2..5fe556a 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java
@@ -16,6 +16,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  ******************************************************************************/
+
 package org.apache.arrow.vector.util;
 
 import io.netty.buffer.ArrowBuf;
@@ -31,15 +32,15 @@ public class ByteFunctionHelpers {
   /**
    * Helper function to check for equality of bytes in two ArrowBufs
    *
-   * @param left Left ArrowBuf for comparison
+   * @param left   Left ArrowBuf for comparison
    * @param lStart start offset in the buffer
-   * @param lEnd end offset in the buffer
-   * @param right Right ArrowBuf for comparison
+   * @param lEnd   end offset in the buffer
+   * @param right  Right ArrowBuf for comparison
    * @param rStart start offset in the buffer
-   * @param rEnd end offset in the buffer
+   * @param rEnd   end offset in the buffer
    * @return 1 if left input is greater, -1 if left input is smaller, 0 otherwise
    */
-  public static final int equal(final ArrowBuf left, int lStart, int lEnd, final ArrowBuf right, int rStart, int rEnd){
+  public static final int equal(final ArrowBuf left, int lStart, int lEnd, final ArrowBuf right, int rStart, int rEnd) {
     if (BoundsChecking.BOUNDS_CHECKING_ENABLED) {
       left.checkBytes(lStart, lEnd);
       right.checkBytes(rStart, rEnd);
@@ -48,7 +49,7 @@ public class ByteFunctionHelpers {
   }
 
   private static final int memEqual(final long laddr, int lStart, int lEnd, final long raddr, int rStart,
-      final int rEnd) {
+                                    final int rEnd) {
 
     int n = lEnd - lStart;
     if (n == rEnd - rStart) {
@@ -85,15 +86,15 @@ public class ByteFunctionHelpers {
    *
    * Function will check data before completing in the case that
    *
-   * @param left Left ArrowBuf to compare
+   * @param left   Left ArrowBuf to compare
    * @param lStart start offset in the buffer
-   * @param lEnd end offset in the buffer
-   * @param right Right ArrowBuf to compare
+   * @param lEnd   end offset in the buffer
+   * @param right  Right ArrowBuf to compare
    * @param rStart start offset in the buffer
-   * @param rEnd end offset in the buffer
+   * @param rEnd   end offset in the buffer
    * @return 1 if left input is greater, -1 if left input is smaller, 0 otherwise
    */
-  public static final int compare(final ArrowBuf left, int lStart, int lEnd, final ArrowBuf right, int rStart, int rEnd){
+  public static final int compare(final ArrowBuf left, int lStart, int lEnd, final ArrowBuf right, int rStart, int rEnd) {
     if (BoundsChecking.BOUNDS_CHECKING_ENABLED) {
       left.checkBytes(lStart, lEnd);
       right.checkBytes(rStart, rEnd);
@@ -140,12 +141,12 @@ public class ByteFunctionHelpers {
   /**
    * Helper function to compare a set of bytes in ArrowBuf to a ByteArray.
    *
-   * @param left Left ArrowBuf for comparison purposes
+   * @param left   Left ArrowBuf for comparison purposes
    * @param lStart start offset in the buffer
-   * @param lEnd end offset in the buffer
-   * @param right second input to be compared
+   * @param lEnd   end offset in the buffer
+   * @param right  second input to be compared
    * @param rStart start offset in the byte array
-   * @param rEnd end offset in the byte array
+   * @param rEnd   end offset in the byte array
    * @return 1 if left input is greater, -1 if left input is smaller, 0 otherwise
    */
   public static final int compare(final ArrowBuf left, int lStart, int lEnd, final byte[] right, int rStart, final int rEnd) {

http://git-wip-us.apache.org/repos/asf/arrow/blob/7a4026a2/java/vector/src/main/java/org/apache/arrow/vector/util/CallBack.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/CallBack.java b/java/vector/src/main/java/org/apache/arrow/vector/util/CallBack.java
index 2498342..38e3b78 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/util/CallBack.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/util/CallBack.java
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.arrow.vector.util;
 
 


Mime
View raw message