You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by "davecromberge (via GitHub)" <gi...@apache.org> on 2023/03/01 20:32:39 UTC

[GitHub] [datasketches-memory] davecromberge commented on a diff in pull request #174: Add javadoc throws

davecromberge commented on code in PR #174:
URL: https://github.com/apache/datasketches-memory/pull/174#discussion_r1122261111


##########
datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/AllocateDirect.java:
##########
@@ -111,15 +99,15 @@ StepBoolean getValid() {
     }
 
     @Override
-    public void run() throws MemoryCloseException {
+    public void run() throws IllegalStateException {
       deallocate(true);
     }
 
-    boolean deallocate(final boolean calledFromCleaner) throws MemoryCloseException {
+    boolean deallocate(final boolean calledFromCleaner) throws IllegalStateException {
       if (valid.change()) {
         if (calledFromCleaner) {
           // Warn about non-deterministic resource cleanup.
-          LOG.warning("A WritableHandle was not closed manually");
+          //LOG.warning("A direct resource was not closed explicitly");

Review Comment:
   Why would this log no longer be useful to the user?



##########
datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMap.java:
##########
@@ -291,15 +274,15 @@ StepBoolean getValid() {
     }
 
     @Override
-    public void run() throws MemoryCloseException {
+    public void run() throws IllegalStateException {
       deallocate(true);
     }
 
-    boolean deallocate(final boolean calledFromCleaner) throws MemoryCloseException {
+    boolean deallocate(final boolean calledFromCleaner) throws IllegalStateException {
       if (valid.change()) {
         if (calledFromCleaner) {
           // Warn about non-deterministic resource cleanup.
-          LOG.warning("A WritableMapHandleImpl was not closed manually");
+          //LOG.warning("A WritableMapHandleImpl was not closed manually");

Review Comment:
   The same question applies here - do the exceptions now convey the same information that the log message warns of?



-- 
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: commits-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org