jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomasz Dabrowski" <Tomasz.Dabrow...@cognifide.com>
Subject RE: adding two time the same label for history...
Date Mon, 14 Nov 2005 15:15:45 GMT
>imo, your code is behaving correclty.

so could you tell me why i don't get an error??


> > yeah :-) but your adding the label to the same version? this one 
> > would
> throw an exception:
> > node.getVersionHistory().addVersionLabel("1.0", "foo", false); 
> > node.getVersionHistory().addVersionLabel("1.1", "foo", false);
>
> as you can see I'm adding label to the current base version.
>
> this is from method body "addLabel"..
> >             String versionName = node.getBaseVersion().getName();
> >             node.getVersionHistory().addVersionLabel(versionName,
> > label, false);
>
> these are steps to call this method (I don't modify node in time 
> (don't increase current version), just follow bellow sequence)
>
> > Node myRoot = session.getRootNode().getNode("myRoot");
> > addLabel(myRoot, "MY_LABEL");
> >
> > // this should throw exception
> > addLabel(myRoot, "MY_LABEL");
>


--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message