arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-101: Fix java compiler warnings
Date Mon, 01 Aug 2016 23:32:00 GMT
Repository: arrow
Updated Branches:
  refs/heads/master 356d015bb -> 3a2dfba59


ARROW-101: Fix java compiler warnings

Fixes several warnings emitted by java compiler regarding the use of raw types and unclosed
resources.

Author: Laurent Goujon <laurent.goujon@online.fr>

Closes #60 from laurentgo/laurent/fix-generic-warnings and squashes the following commits:

96ccc67 [Laurent Goujon] [ARROW-101] Fix java compiler resources warnings
61bde83 [Laurent Goujon] [ARROW-101] Fix java compiler rawtypes warnings


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

Branch: refs/heads/master
Commit: 3a2dfba59a2482226cc3c49a11a779dd9ce3dfd7
Parents: 356d015
Author: Laurent Goujon <laurent.goujon@online.fr>
Authored: Mon Aug 1 16:31:54 2016 -0700
Committer: Wes McKinney <wesm@apache.org>
Committed: Mon Aug 1 16:31:54 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/arrow/vector/ZeroVector.java    | 5 +++--
 .../apache/arrow/vector/complex/impl/PromotableWriter.java   | 8 ++++----
 .../org/apache/arrow/vector/util/JsonStringArrayList.java    | 2 +-
 .../java/org/apache/arrow/vector/util/JsonStringHashMap.java | 2 +-
 4 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/3a2dfba5/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 78de870..c94e8d1 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
@@ -19,6 +19,7 @@ package org.apache.arrow.vector;
 
 import io.netty.buffer.ArrowBuf;
 
+import java.util.Collections;
 import java.util.Iterator;
 
 import org.apache.arrow.memory.BufferAllocator;
@@ -109,8 +110,8 @@ public class ZeroVector implements ValueVector {
 //  }
 
   @Override
-  public Iterator iterator() {
-    return Iterators.emptyIterator();
+  public Iterator<ValueVector> iterator() {
+    return Collections.emptyIterator();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/arrow/blob/3a2dfba5/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/PromotableWriter.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/PromotableWriter.java
b/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/PromotableWriter.java
index ea62e02..45509f6 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/PromotableWriter.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/PromotableWriter.java
@@ -85,16 +85,16 @@ public class PromotableWriter extends AbstractPromotableFieldWriter {
     state = State.SINGLE;
     vector = v;
     type = v.getField().getType().getMinorType();
-    Class writerClass = BasicTypeHelper
+    Class<?> writerClass = BasicTypeHelper
         .getWriterImpl(v.getField().getType().getMinorType(), v.getField().getDataMode());
     if (writerClass.equals(SingleListWriter.class)) {
       writerClass = UnionListWriter.class;
     }
-    Class vectorClass = BasicTypeHelper.getValueVectorClass(v.getField().getType().getMinorType(),
v.getField()
+    Class<?> vectorClass = BasicTypeHelper.getValueVectorClass(v.getField().getType().getMinorType(),
v.getField()
         .getDataMode());
     try {
-      Constructor constructor = null;
-      for (Constructor c : writerClass.getConstructors()) {
+      Constructor<?> constructor = null;
+      for (Constructor<?> c : writerClass.getConstructors()) {
         if (c.getParameterTypes().length == 3) {
           constructor = c;
         }

http://git-wip-us.apache.org/repos/asf/arrow/blob/3a2dfba5/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java
b/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java
index 7aeaa12..6291bfe 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java
@@ -42,7 +42,7 @@ public class JsonStringArrayList<E> extends ArrayList<E> {
     if (!(obj instanceof List)) {
       return false;
     }
-    List other = (List) obj;
+    List<?> other = (List<?>) obj;
     return this.size() == other.size() && this.containsAll(other);
   }
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/3a2dfba5/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringHashMap.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringHashMap.java
b/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringHashMap.java
index 750dd59..e8ce522 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringHashMap.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringHashMap.java
@@ -46,7 +46,7 @@ public class JsonStringHashMap<K, V> extends LinkedHashMap<K, V>
{
     if (!(obj instanceof Map)) {
       return false;
     }
-    Map other = (Map) obj;
+    Map<?, ?> other = (Map<?, ?>) obj;
     if (this.size() != other.size()) {
       return false;
     }


Mime
View raw message