You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2023/08/16 15:55:48 UTC

[jackrabbit-oak] branch trunk updated: OAK-10405: document-store: potential NPE in AbstractTwoNodeTest teardown (#1076)

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

reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 7171b3eab0 OAK-10405: document-store: potential NPE in AbstractTwoNodeTest teardown (#1076)
7171b3eab0 is described below

commit 7171b3eab0d87031098de9d8c516cf8d15f9c82b
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Aug 16 17:55:43 2023 +0200

    OAK-10405: document-store: potential NPE in AbstractTwoNodeTest teardown (#1076)
---
 .../oak/plugins/document/AbstractTwoNodeTest.java    | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
index 032a84ba61..29d7d9cf03 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
@@ -119,11 +119,21 @@ public class AbstractTwoNodeTest {
 
     @After
     public void tearDown() throws Exception {
-        ds1.dispose();
-        ds2.dispose();
-        store1.dispose();
-        store2.dispose();
-        fixture.dispose();
+        if (ds1 != null) {
+            ds1.dispose();
+        }
+        if (ds2 != null) {
+            ds2.dispose();
+        }
+        if (store1 != null) {
+            store1.dispose();
+        }
+        if (store2 != null) {
+            store2.dispose();
+        }
+        if (fixture != null) {
+            fixture.dispose();
+        }
         ClusterNodeInfo.resetClockToDefault();
         Revision.resetClockToDefault();
     }