On Tue, Jan 25, 2011 at 9:17 PM, Emmanuel Lecharny <[email protected]> wrote:
> On 1/25/11 8:03 PM, Stefan Seelmann wrote:
>>
>> On Tue, Jan 25, 2011 at 3:41 PM, Emmanuel Lecharny<[email protected]>
>>  wrote:
>>>
>>> I hope I have fixed the build with
>>> http://svn.apache.org/viewvc?rev=1063304&view=rev
>>
>> Seems to work: Hudson build is back to stable :-)
>>
>> However, I'd like to understand the cause. Is the ByteBuffer working
>> differently in Java 5 and 6?
>
> no, the difference is the way the controls are stored in a Set in Java 5 and
> Java 6. It's really like for the Attributes class, which stores Attribute in
> a different order.
>
> In order to have the test working, I just created two byte arrays with the 2
> controls A and B stored AB and BA, then I compare the result with either AB
> or BA, and one of them is equals.

Ok, I see now. The controls are stored in a HashMap, which doesn't
guarantee any order. What about using a LinkedHashMap instead?

Kind Regards,
Stefan

Reply via email to