-
Bug
-
Resolution: Done
-
Major
-
4.0.0.Final
-
None
According to the JCR spec:
http://www.day.com/maven/jcr/2.0/15_Versioning.html#15.4.1.2 Adding a Version Label
and the associated javadocs:
http://www.day.com/specs/jsr170/javadocs/jcr-2.0/javax/jcr/version/VersionHistory.html#addVersionLabel(java.lang.String, java.lang.String, boolean)
VersionHistory.addVersionLabel(...) should throw a LabelExistsVersionException under the following conditions:
"moveLabel - if false, then attempting to assign an already used label will throw a LabelExistsVersionException."
The ModeShape logic performs the right checks, but throws the wrong exception type:
https://github.com/ModeShape/modeshape/blob/master/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrVersionHistoryNode.java#L320