Skip to content

Commit fca6c8c

Browse files
committed
Fix requested from review.
1 parent f8c51e1 commit fca6c8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void simpleMap() throws IOException {
4949
arena.close();
5050
} //The Try-With-Resources will throw since it is already closed
5151
catch (IllegalStateException e) { /* OK */ }
52-
assertFalse(mem.isAlive());
52+
if (mem != null) { assertFalse(mem.isAlive()); }
5353
}
5454

5555
@Test
@@ -87,7 +87,7 @@ public void testMapAndMultipleClose() throws IOException {
8787
} //a close inside the TWR block will throw here
8888
}
8989
catch (IllegalStateException e) { /* expected */ }
90-
assertFalse(mem.isAlive());
90+
if (mem != null) { assertFalse(mem.isAlive()); }
9191
if (mem2 != null) { assertFalse(mem2.isAlive()); }
9292
}
9393

src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMemoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void simpleAllocateDirect() {
5151
assertTrue(wMem.isAlive());
5252
}
5353
//The TWR block has exited, so the memory should be not alive
54-
assertFalse(wMem2.isAlive());
54+
if (wMem2 != null) { assertFalse(wMem2.isAlive()); }
5555
}
5656

5757
@Test

0 commit comments

Comments
 (0)