You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Tobias Strasser (JIRA)" <ji...@apache.org> on 2005/10/03 11:07:49 UTC
[jira] Assigned: (JCR-232) jcr:baseVersion is not updated when the base version is removed from the version history
[ http://issues.apache.org/jira/browse/JCR-232?page=all ]
Tobias Strasser reassigned JCR-232:
-----------------------------------
Assign To: Tobias Strasser
> jcr:baseVersion is not updated when the base version is removed from the version history
> ----------------------------------------------------------------------------------------
>
> Key: JCR-232
> URL: http://issues.apache.org/jira/browse/JCR-232
> Project: Jackrabbit
> Type: Bug
> Components: versioning
> Reporter: Edgar Poce
> Assignee: Tobias Strasser
> Fix For: 1.0
>
> Session s1 = repo.login(new SimpleCredentials("user1", "pwd1".toCharArray()));
> Node root1 = s1.getRootNode() ;
> Node test1 = root1.addNode("test") ;
> test1.addMixin("mix:versionable");
> s1.save() ;
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> test1.checkin() ;
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> test1.getVersionHistory().removeVersion("1.0") ;
> // the base version wasn't updated :(
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> // the next line throws ItemNotFoundException :(
> test1.getBaseVersion() ;
> javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0
> at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:498)
> at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:349)
> at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:642)
> at org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.java:2960)
> at org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersionTest.java:56)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira