#199 RuleTest fails when compiling with OpenJDK7

open
nobody
None
5
2012-10-08
2012-05-21
Anonymous
No

The compareTo function in the dom4j Rules class is broken in that its not symmetric.

This breaks the RuleTest greaterThan test when executing with openjdk-7 (I suspect the sort algorithm has probably changed).

r1 > r2 = 1
r2 < r1 = 0 (should be -1)

Attached patch fixes this issue and adds some extra tests to cover all > < and ==

Discussion