garydgregory commented on code in PR #866:
URL: https://github.com/apache/commons-io/pull/866#discussion_r3791886908
##########
src/main/java/org/apache/commons/io/input/ByteBufferCleaner.java:
##########
@@ -110,6 +121,17 @@ private static Cleaner getCleaner() {
}
}
+ private static boolean unsafeMemoryAccessDeprecated() {
+ final int version;
+ try {
+ version =
Integer.parseInt(System.getProperty("java.specification.version"));
Review Comment:
The catch needs an inline comment. `unsafeMemoryAccessDeprecated()` parses
the spec version as an integer. For the Java 8 value of `"1.8"` the parse would
fail and the method correctly returns false. Adding a comment would make it
obvious the behavior is still correct on Java 8 and not just luck.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]