This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch fix_spotbugs_issue
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git

commit fe30ef3946fce6b8c4ee4e03d6e7d507af528ecc
Author: Lee Rhodes <[email protected]>
AuthorDate: Tue Jan 7 09:29:58 2025 -0800

    Fixes a spot bugs issue.
---
 .../datasketches/memory/internal/AllocateDirectMapMemoryTest.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java
 
b/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java
index 2df76d2..5eb162d 100644
--- 
a/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java
+++ 
b/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java
@@ -77,10 +77,10 @@ public class AllocateDirectMapMemoryTest {
         assertEquals(memCapacity, mem.getCapacity());
         mem.close(); //a close inside the TWR block will throw
       }
-    } catch (IllegalStateException e) { }
+    } catch (IllegalStateException e) { /* expected */ }
     try {
-      mem2.close(); //closes outside the TWR block will throw
-    } catch (IllegalStateException e) { }
+      if (mem2 != null) { mem2.close(); } //a close outside the TWR block will 
throw
+    } catch (IllegalStateException e) { /* expected */ }
   }
 
   @Test


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

Reply via email to