JDK-7132484 : system property "java.util.Arrays.useLegacyMergeSort" does not work in jnlp
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_7
  • CPU: x86
  • Submitted: 2012-01-23
  • Updated: 2012-03-20
  • Resolved: 2012-01-25
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]

EXTRA RELEVANT SYSTEM CONFIGURATION :
part of jnlp-file:

<resources>
<property name="java.util.Arrays.useLegacyMergeSort" value="true"/>
</resources>

A DESCRIPTION OF THE PROBLEM :
try to switch to previous sort behavior for a web start application.

the property seems not to work with web start. System.getProperty("java.util.Arrays.useLegacyMergeSort") works, but exception "Comparison method violates its general contract" still appears.

command line call works, no exception: "javaws -J-Djava.util.Arrays.useLegacyMergeSort=true file.jnlp"

REGRESSION.  Last worked in version 6u29

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
start a web start application with a defect compareTo-method from browser. the exception should appear.

put system property in jnlp-file, set true for previous behavior

start web start application again.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the exception should not appear, previous behavior used.
ACTUAL -
the exception still apperars

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION To set custom property application need to be signed (and JNLP file need to be signed too). Unsiged applications run in sandbox and can modify very limited set of safe properties. This specific property is likely to be safe but due to limited demand for it (it is workaround for apps that can not fix comparator implementation) there is no urgency to go through security review and add it to the safe list.
25-01-2012