Much thanks for your research! I can't remember that it has ever change
dup to now in previous JDK version, but it might happen - the API says so:
"This class makes no guarantees as to the order of the map; in
particular, it does not guarantee that the order will remain constant
over time."
The problem is just that we get used to it that this never happend
before IIRC.
Thanks
Felix
On 04/21/2014 10:58 AM, Emmanuel Lécharny wrote:
The order in which elements are stored in a HashMap has changed in JDK 8...
Le 4/20/14 6:39 PM, Emmanuel Lécharny a écrit :
Le 4/20/14 5:20 PM, Felix Knecht a écrit :
Just because I was curious:
When building with (I think we're still on JDK1.6 or 1.7) JDK1.8
(linux 64-bit) I get following integration test failure
Tests run: 37, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.226
sec <<< FAILURE! - in
org.apache.directory.api.ldap.entry.SchemaAwareEntryTest
testToString(org.apache.directory.api.ldap.entry.SchemaAwareEntryTest)
Time elapsed: 0.003 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<... ObjectClass: ''
[ UserPassword: 0x61 0x62
UserPassword: 0x62
UserPassword: ''
]> but was:<... ObjectClass: ''
[
UserPassword: 0x61 0x62
UserPassword: 0x62
UserPassword: '']>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at
org.apache.directory.api.ldap.entry.SchemaAwareEntryTest.testToString(SchemaAwareEntryTest.java:1168)
Extremelly weird...
We have to debug that. I do think that JDK 8 has been pulled out of the
oven a bit too early...