pan3793 commented on code in PR #272:
URL:
https://github.com/apache/datasketches-memory/pull/272#discussion_r2776952318
##########
datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java:
##########
@@ -82,6 +82,8 @@ public abstract class ResourceImpl implements Resource {
static final String NOT_MAPPED_FILE_RESOURCE = "This is not a memory-mapped
file resource";
static final String THREAD_EXCEPTION_TEXT = "Attempted access outside owning
thread";
+ private static boolean JAVA_VERSION_WARNING_PRINTED = false;
Review Comment:
`checkJavaVersion` can be called concurrently, it can be addressed by using
`AtomicBoolean`, and the caller side can be
```
if (p0 > 11 && JAVA_VERSION_WARNING_PRINTED.compareAndSet(false, true)) {
// print warning message
}
```
but this is not a big deal, there is no hurt to print a few more times.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]