dongjoon-hyun commented on a change in pull request #24825: [SPARK-27981][CORE] 
Remove `Illegal reflective access` warning for `java.nio.Bits.unaligned()`
URL: https://github.com/apache/spark/pull/24825#discussion_r291796332
 
 

 ##########
 File path: common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java
 ##########
 @@ -85,11 +63,15 @@
     }
   }
 
+  private static final int majorVersion;
+  static {
+    // Split java.version on non-digit chars:
+    majorVersion = 
Integer.parseInt(System.getProperty("java.version").split("\\D+")[0]);
+  }
 
 Review comment:
   For reusing, this is moved out from the below.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to