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 11:57:43 GMT

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

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

    Affects Version/s: 2.6
               Status: Patch Available  (was: Open)

Patch that sends replace notifications from the NodeState if a child node entry is renamed
to it's current name.  The only effect of that operation should be to reorder the child node
entries, but listeners are currently informed of the node's removal.

> 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: 2.6, 1.5, 1.4
>            Reporter: Thomas Mueller
>            Priority: Minor
>         Attachments: JCR-1880.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