You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/21 00:58:21 UTC

[GitHub] [arrow] lidavidm commented on a diff in pull request #12941: ARROW-15755: [Java] Support Java 17

lidavidm commented on code in PR #12941:
URL: https://github.com/apache/arrow/pull/12941#discussion_r854681807


##########
java/pom.xml:
##########
@@ -763,6 +766,60 @@
       </build>
     </profile>
 
+    <profile>
+      <id>error-prone-jdk11+</id>
+      <activation>
+        <jdk>[11,)</jdk>
+        <property>
+          <name>!m2e.version</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+              <source>8</source>
+              <target>8</target>
+              <encoding>UTF-8</encoding>
+              <compilerArgs combine.children="append">
+                <arg>-XDcompilePolicy=simple</arg>
+                <arg>
+                  -Xplugin:ErrorProne \
+                  -XepExcludedPaths:.*/(target/generated-sources)/.*

Review Comment:
   nit, but can these be two separate `<arg>` blocks or does it not work that way?



##########
java/memory/memory-core/src/test/java/org/apache/arrow/memory/util/TestArrowBufPointer.java:
##########
@@ -111,6 +111,7 @@ public void testNullPointersHashCode() {
   }
 
   @Test
+  @SuppressWarnings("ReturnValueIgnored")

Review Comment:
   Maybe instead of suppresing we can check that the hash code changes/doesn't change?



##########
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java:
##########
@@ -77,6 +77,7 @@
 /**
  * Flight client with Flight SQL semantics.
  */
+@SuppressWarnings({"ProtoBuilderReturnValueIgnored", "ReturnValueIgnored"})

Review Comment:
   Hmm, this is a very wide scope to suppress. Is it possible to refactor things?



##########
java/flight/flight-core/src/test/java/org/apache/arrow/flight/TestCallOptions.java:
##########
@@ -97,6 +97,7 @@ public void mixedProperties() {
     testHeaders(headers);
   }
 
+  @SuppressWarnings("ReturnValueIgnored")

Review Comment:
   Same here, maybe an `assertTrue(....hasNext())`?



##########
java/pom.xml:
##########
@@ -736,6 +738,7 @@
            See https://github.com/jbosstools/m2e-apt/issues/62 for details
       -->
       <activation>
+        <jdk>1.8</jdk>

Review Comment:
   Hmm, we already have a 1.8-specific profile below. What's the difference?



##########
java/adapter/orc/pom.xml:
##########
@@ -52,10 +52,27 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-client-runtime</artifactId>
+            <version>3.3.2</version>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>

Review Comment:
   Can we add a brief comment about why we need to exclude these? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org