You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Stefan Guggisberg (JIRA)" <ji...@apache.org> on 2013/01/04 10:30:12 UTC
[jira] [Resolved] (OAK-539) Wrong compareTo in micro-kernel Id
class
[ https://issues.apache.org/jira/browse/OAK-539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guggisberg resolved OAK-539.
-----------------------------------
Resolution: Fixed
Fix Version/s: 0.6
fixed in svn r1428764.
thanks for reporting this issue and providing a patch!
> Wrong compareTo in micro-kernel Id class
> ----------------------------------------
>
> Key: OAK-539
> URL: https://issues.apache.org/jira/browse/OAK-539
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: mk
> Affects Versions: 0.6
> Reporter: Alex Rodriguez
> Assignee: Stefan Guggisberg
> Fix For: 0.6
>
> Attachments: 67384d1ea6969347b87a8ec7a4f8dcc972f543a7.patch.txt
>
>
> CompareTo method in Id class fails in some cases.
> {code}
> // this works
> final Id id1 = Id.fromString( "0000000000000007" );
> final Id id2 = Id.fromString( "000000000000000c" );
> assertTrue( id1 + " should be less than " + id2, id1.compareTo( id2 ) < 0 );
> // but this doesn't
> final Id id1 = Id.fromString( "0000000000000070" );
> final Id id2 = Id.fromString( "00000000000000c0" );
> assertTrue( id1 + " should be less than " + id2, id1.compareTo( id2 ) < 0 );
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira