You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by si...@apache.org on 2018/11/27 17:44:18 UTC

[arrow] branch master updated: ARROW-3859: [Arrow][Java] Fixed backward incompatible change. (#3018)

This is an automated email from the ASF dual-hosted git repository.

siddteotia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a001e0  ARROW-3859: [Arrow][Java] Fixed backward incompatible change. (#3018)
5a001e0 is described below

commit 5a001e0270bc888484e967a9462c76cbe217d42f
Author: praveenbingo <pr...@dremio.com>
AuthorDate: Tue Nov 27 23:14:12 2018 +0530

    ARROW-3859: [Arrow][Java] Fixed backward incompatible change. (#3018)
    
    * ARROW-3859: [Arrow][Java] Fixed backward incompatible change.
    
    Throwing exceptions on default breaks a lot of existing client code.
    Reverting the change for now, we can check for a deprecation and moving to new
    method in the future.
    Had to fix the checkstyle comment suppression filter too.
    
    * ARROW-3859: [Arrow][Java] Addressed review comments.
---
 java/dev/checkstyle/checkstyle.xml                                  | 6 ++++--
 .../org/apache/arrow/vector/complex/impl/ComplexWriterImpl.java     | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/java/dev/checkstyle/checkstyle.xml b/java/dev/checkstyle/checkstyle.xml
index 9fdf8e2..508257c 100644
--- a/java/dev/checkstyle/checkstyle.xml
+++ b/java/dev/checkstyle/checkstyle.xml
@@ -58,8 +58,8 @@
     // checkstyle:on
     -->
     <module name="SuppressionCommentFilter">
-      <property name="offCommentFormat" value="checkstyle.off\: ([\w\|]+)"/>
-      <property name="onCommentFormat" value="checkstyle.on\: ([\w\|]+)"/>
+      <property name="offCommentFormat" value="checkstyle:off: ([\w\|]+)"/>
+      <property name="onCommentFormat" value="checkstyle:on: ([\w\|]+)"/>
       <property name="checkFormat" value="$1"/>
     </module>
 
@@ -250,5 +250,7 @@
             <property name="exceptionVariableName" value="expected|ignore"/>
         </module>
         <module name="CommentsIndentation"/>
+        <!-- needed so that filters can access file contents -->
+        <module name="FileContentsHolder"/>
     </module>
 </module>
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/ComplexWriterImpl.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/ComplexWriterImpl.java
index 96e0be8..75a2d5a 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/ComplexWriterImpl.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/ComplexWriterImpl.java
@@ -97,7 +97,7 @@ public class ComplexWriterImpl extends AbstractFieldWriter implements ComplexWri
         listRoot.clear();
         break;
       default:
-        throw new RuntimeException("Unexpected mode:" + mode);
+        break;
     }
   }
 
@@ -111,7 +111,7 @@ public class ComplexWriterImpl extends AbstractFieldWriter implements ComplexWri
         listRoot.setValueCount(count);
         break;
       default:
-        throw new RuntimeException("Unexpected mode:" + mode);
+        break;
     }
   }
 
@@ -126,7 +126,7 @@ public class ComplexWriterImpl extends AbstractFieldWriter implements ComplexWri
         listRoot.setPosition(index);
         break;
       default:
-        throw new RuntimeException("Unexpected mode:" + mode);
+        break;
     }
   }