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

Unico Hommes reassigned JCR-1880:
---------------------------------

    Assignee: Unico Hommes

> Same name sibling: Jackrabbit behaves differently when calling Node.getPath()
> -----------------------------------------------------------------------------
>
>                 Key: JCR-1880
>                 URL: https://issues.apache.org/jira/browse/JCR-1880
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.4, 1.5, 2.6
>            Reporter: Thomas Mueller
>            Assignee: Unico Hommes
>            Priority: Minor
>         Attachments: JCR-1880.patch, JCR-1880-test.patch
>
>
> The following test case behaves differently when calling Node.getPath() 
> versus not calling it:
> void test(boolean index) throws Exception {
>       FileUtils.deleteDirectory(new File("repository"));
>       Repository rep = new TransientRepository();
>       Session session = rep.login(new SimpleCredentials("", new char[0]));
>       Node test = session.getRootNode().addNode("test");
>       Node a = test.addNode("a");
>       Node b = a.addNode("b");
>       session.save();
>       session.move("/test/a/b", "/test/a");
>       if (index) {
>               b.getPath();
>       }
>       session.move("/test/a", "/test/a");
>       System.out.println("a: " + a.getPath());
>       System.out.println("b: " + b.getPath());
>       session.logout();
> }     
> test(true) prints:
> a: /test/a[2]
> b: /test/a
> test(false) prints:
> a: /test/a
> b: /test/a



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to