jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank van Lankvelt (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCR-1880) Same name sibling: Jackrabbit behaves differently when calling Node.getPath()
Date Wed, 16 Oct 2013 12:49:46 GMT

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

Frank van Lankvelt updated JCR-1880:
------------------------------------

    Attachment: JCR-1880-test.patch

Test that verifies that paths are correct after session#move of sns nodes.

> 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
>            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)

Mime
View raw message