This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/1.22 by this push:
new a6ebf82838 OAK-10405: document-store: potential NPE in
AbstractTwoNodeTest teardown (#1076)
a6ebf82838 is described below
commit a6ebf82838e5cf89efe8c7d15c71879139067d63
Author: Julian Reschke <[email protected]>
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 2aa232f509..b102b6ca7a 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();
}