You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (Jira)" <ji...@apache.org> on 2019/11/25 06:29:06 UTC

[jira] [Closed] (OAK-8758) tests make "equals" comparison of Path and String

     [ https://issues.apache.org/jira/browse/OAK-8758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke closed OAK-8758.
-------------------------------

> tests make "equals" comparison of Path and String
> -------------------------------------------------
>
>                 Key: OAK-8758
>                 URL: https://issues.apache.org/jira/browse/OAK-8758
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: documentmk
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 1.20.0
>
>
> Spotbug complains about Path.equals being called with String arguments. I think we need to fix two line in the tests:
> {noformat}
> 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);
>              }
>          }
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)