Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Spotbug complains about Path.equals being called with String arguments. I think we need to fix two line in the tests:
Index: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java =================================================================== --- oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java (revision 1869653) +++ oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java (working copy) @@ -952,7 +952,7 @@ for (String id : Sets.newHashSet(readSet)) { doc = store.find(NODES, id); assertNotNull(doc); - if (doc.isSplitDocument() && !doc.getMainPath().equals("/")) { + if (doc.isSplitDocument() && !doc.getMainPath().equals(Path.ROOT)) { fail("must not access previous document: " + id); } } Index: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentSplitTest.java =================================================================== --- oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentSplitTest.java (revision 1869653) +++ oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentSplitTest.java (working copy) @@ -725,7 +725,7 @@ for (String id : Sets.newHashSet(readSet)) { doc = store.find(NODES, id); assertNotNull(doc); - if (doc.isSplitDocument() && !doc.getMainPath().equals("/")) { + if (doc.isSplitDocument() && !doc.getMainPath().equals(Path.ROOT)) { fail("must not access previous document: " + id); } }
Attachments
Issue Links
- is caused by
-
OAK-8141 Replace String path with custom data type
- Closed