You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Mikko Tiihonen (JIRA)" <ji...@apache.org> on 2012/10/01 16:57:07 UTC
[jira] [Created] (WICKET-4795) Wicket unit tests rely on hashmap
iteration order
Mikko Tiihonen created WICKET-4795:
--------------------------------------
Summary: Wicket unit tests rely on hashmap iteration order
Key: WICKET-4795
URL: https://issues.apache.org/jira/browse/WICKET-4795
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.0.0, 1.5.8, 1.4.21
Reporter: Mikko Tiihonen
Starting from version 7u5 java has supported randomizing the hashmap String key order (enabling this will fix CVE-2012-2739). It is also a good way to test the code if it is relying on hashmap order.
More details: http://docs.oracle.com/javase/7/docs/technotes/guides/collections/changes7.html
In the latest Java 8 (b58) the randomized hashmap is enabled by default causing some wicket unit tests to fail randomly.
--
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
[jira] [Updated] (WICKET-4795) Wicket unit tests rely on hashmap
iteration order
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-4795:
------------------------------------
Priority: Minor (was: Major)
> Wicket unit tests rely on hashmap iteration order
> -------------------------------------------------
>
> Key: WICKET-4795
> URL: https://issues.apache.org/jira/browse/WICKET-4795
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.21, 1.5.8, 6.0.0
> Reporter: Mikko Tiihonen
> Priority: Minor
> Attachments: fix-WICKET-4795.patch
>
>
> Starting from version 7u5 java has supported randomizing the hashmap String key order (enabling this will fix CVE-2012-2739). It is also a good way to test the code if it is relying on hashmap order.
> More details: http://docs.oracle.com/javase/7/docs/technotes/guides/collections/changes7.html
> In the latest Java 8 (b58) the randomized hashmap is enabled by default causing some wicket unit tests to fail randomly.
--
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
[jira] [Commented] (WICKET-4795) Wicket unit tests rely on hashmap
iteration order
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468478#comment-13468478 ]
Martin Grigorov commented on WICKET-4795:
-----------------------------------------
Thanks for the patch!
I suggest to postpone its applying for a while because it is experimental for now.
It is not effective in JDK7 unless you set the special system property. JDK8 is still in development.
Additionally JSONObject is not really our source code. It is borrowed from https://github.com/douglascrockford/JSON-java. We'll have to send a pull request to this project when we decide to apply the improvement.
> Wicket unit tests rely on hashmap iteration order
> -------------------------------------------------
>
> Key: WICKET-4795
> URL: https://issues.apache.org/jira/browse/WICKET-4795
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.21, 1.5.8, 6.0.0
> Reporter: Mikko Tiihonen
> Attachments: fix-WICKET-4795.patch
>
>
> Starting from version 7u5 java has supported randomizing the hashmap String key order (enabling this will fix CVE-2012-2739). It is also a good way to test the code if it is relying on hashmap order.
> More details: http://docs.oracle.com/javase/7/docs/technotes/guides/collections/changes7.html
> In the latest Java 8 (b58) the randomized hashmap is enabled by default causing some wicket unit tests to fail randomly.
--
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
[jira] [Commented] (WICKET-4795) Wicket unit tests rely on hashmap
iteration order
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466862#comment-13466862 ]
Martin Grigorov commented on WICKET-4795:
-----------------------------------------
Can you give an example of a failing test ?
And please paste the produced exception.
Thanks!
> Wicket unit tests rely on hashmap iteration order
> -------------------------------------------------
>
> Key: WICKET-4795
> URL: https://issues.apache.org/jira/browse/WICKET-4795
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.21, 1.5.8, 6.0.0
> Reporter: Mikko Tiihonen
> Attachments: fix-WICKET-4795.patch
>
>
> Starting from version 7u5 java has supported randomizing the hashmap String key order (enabling this will fix CVE-2012-2739). It is also a good way to test the code if it is relying on hashmap order.
> More details: http://docs.oracle.com/javase/7/docs/technotes/guides/collections/changes7.html
> In the latest Java 8 (b58) the randomized hashmap is enabled by default causing some wicket unit tests to fail randomly.
--
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
[jira] [Updated] (WICKET-4795) Wicket unit tests rely on hashmap
iteration order
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-4795:
------------------------------------
Issue Type: Improvement (was: Bug)
> Wicket unit tests rely on hashmap iteration order
> -------------------------------------------------
>
> Key: WICKET-4795
> URL: https://issues.apache.org/jira/browse/WICKET-4795
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.21, 1.5.8, 6.0.0
> Reporter: Mikko Tiihonen
> Attachments: fix-WICKET-4795.patch
>
>
> Starting from version 7u5 java has supported randomizing the hashmap String key order (enabling this will fix CVE-2012-2739). It is also a good way to test the code if it is relying on hashmap order.
> More details: http://docs.oracle.com/javase/7/docs/technotes/guides/collections/changes7.html
> In the latest Java 8 (b58) the randomized hashmap is enabled by default causing some wicket unit tests to fail randomly.
--
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
[jira] [Updated] (WICKET-4795) Wicket unit tests rely on hashmap
iteration order
Posted by "Mikko Tiihonen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikko Tiihonen updated WICKET-4795:
-----------------------------------
Attachment: fix-WICKET-4795.patch
The patch does the following:
1) Make JSONObject sort the generated output if "wicket.json.sort" system property is "true".
2) Set the property in WicketTestCase which is used to compare generated content with expected reference data.
3) Generate new expected data
> Wicket unit tests rely on hashmap iteration order
> -------------------------------------------------
>
> Key: WICKET-4795
> URL: https://issues.apache.org/jira/browse/WICKET-4795
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.21, 1.5.8, 6.0.0
> Reporter: Mikko Tiihonen
> Attachments: fix-WICKET-4795.patch
>
>
> Starting from version 7u5 java has supported randomizing the hashmap String key order (enabling this will fix CVE-2012-2739). It is also a good way to test the code if it is relying on hashmap order.
> More details: http://docs.oracle.com/javase/7/docs/technotes/guides/collections/changes7.html
> In the latest Java 8 (b58) the randomized hashmap is enabled by default causing some wicket unit tests to fail randomly.
--
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