[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-4342) RemotingTest.testMapWrapper() relies on undefined behavior

Marek Novotny (JIRA) jira-events at lists.jboss.org
Wed Aug 12 08:21:26 EDT 2009

    [ https://jira.jboss.org/jira/browse/JBSEAM-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12480227#action_12480227 ] 

Marek Novotny commented on JBSEAM-4342:

I guess, that if you want to get exactly the same content from MapWrapper.marshall(OutputStrem out), the method should use some kind of content sorting  before inclusion it into OutputStream. Can be this added into the method algorithmus? WDYT Shane?

> RemotingTest.testMapWrapper() relies on undefined behavior
> ----------------------------------------------------------
>                 Key: JBSEAM-4342
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4342
>             Project: Seam
>          Issue Type: Bug
>          Components: Remoting, Test Harness
>    Affects Versions: 2.2.0.GA
>         Environment: Java(TM) SE Runtime Environment (build pxi3260sr4-20090219_01(SR4))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260-20090215_29883 (JIT enabled, AOT enabled)
> J9VM - 20090215_029883_lHdSMr
> JIT  - r9_20090213_2028
> GC   - 20090213_AA)
> JCL  - 20090218_01
>            Reporter: Jozef Hartinger
>            Assignee: Shane Bryzak
>             Fix For: 2.2.1.CR1
> org.jboss.seam.test.unit.RemotingTest.testMapWrapper()
> The test expects the elements to be returned in the same order in which they were created:
> <map><element><k><str>bar</str></k><v><str>zzzzz</str></v></element><element><k><str>foo</str></k><v><str>aaaaa</str></v></element></map>
> However, on IBM JVM, the order of elements is not preserved in the returned tree, so the tree looks like this:
> <map><element><k><str>foo</str></k><v><str>aaaaa</str></v></element><element><k><str>bar</str></k><v><str>zzzzz</str></v></element></map>
> The assumption of the test is incorrect, because the marshal() method of MapWrapper class iterates over a Set of keys and thus the order cannot be guaranteed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list