JDK-8075179 : Test jnlp_file/applicationDesc/index.html#args fails with incorrect arg value
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 8u60,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-03-14
  • Updated: 2015-09-29
  • Resolved: 2015-03-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u60Fixed 9 b59Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Testsuite name:TCK-JNLP 
Test name(s) : jnlp_file/applicationDesc/index.html#args
Product(s) tested: JDK 9 b52
OS/architecture: Issue on all.
Reproducible: Always 
Is it a Regression: Yes (Regression introduced in JDK 9 b48) 
Is it a platform specific issue: No 

Exception/Error from Log: 

result: Passed. OKAY

#section:execute
----------messages:(1/179)----------
command: com.sun.tck.jnlp.lib.JNLPCommand com.sun.tck.jnlp.lib.CommandJNLPLauncher C:/Progra~1/Java/jdk1.9.0/bin/javaws http://SPB23189:59147/jnlp_file/applicationDesc/test.jnlp
----------out1:(1/48)----------
SPB2318959146SPB2318959146STATUS:Passed.Finished
----------out2:(0/0)----------
result: Passed. Ok. Exit code 0

#section:test
----------messages:(0/0)----------
----------ref:(6/293)----------
====== applicationDesc2001 ====== argument tag and main-class attribute
arg #4 is test with whitespaces but should be   test with whitespaces 

====== applicationDesc2001 ====== argument tag and main-class attribute
arg #4 is test with whitespaces but should be   test with whitespaces 

----------log:(5/175)----------
applicationDesc2001: Failed. Incorrect arg value

test cases: 1; all failed; first test case failure: applicationDesc2001
applicationDesc2001: Failed. Incorrect arg value

result: Failed. test cases: 1; all failed; first test case failure: applicationDesc2001


test result: Failed. test cases: 1; all failed; first test case failure: applicationDesc2001


Steps to reproduce: 

1. Install JDK 
2. Create ruleset.xml 
<ruleset version="1.0+"> 
  <rule> 
    <id location="http://machinename" /> 
    <action permission="run" /> 
  </rule> 
  <rule> 
    <id location="http://machinename.ru.oracle.com" /> 
    <action permission="run" /> 
  </rule> 
</ruleset> 
3. The rule set file has to be packaged to jar file named DeploymentRuleSet.jar. 
 ${JDK}/bin/jar cf DeploymentRuleSet.jar ruleset.xml 
${JDK}/bin/jarsigner -keystore keystore.jks -storepass welcome DeploymentRuleSet.jar jnlptck 
${JDK}/bin/keytool -importkeystore -noprompt -srckeystore keystore.jks -srcstorepass welcome -srcstoretype jks -destkeystore ${JRE}/lib/security/cacerts -deststoretype jks -deststorepass changeit -srcalias jnlptck 
4. Installation signed DeploymentRuleSet.jar @ /etc/.java/deployment 
5. command: com.sun.tck.jnlp.lib.JNLPCommand com.sun.tck.jnlp.lib.CommandJNLPLauncher C:/Progra~1/Java/jdk1.9.0/bin/javaws http://SPB23189:59147/jnlp_file/applicationDesc/test.jnlp
Comments
confirmed this test also fails in 8u60
18-03-2015

Crucible review: https://java.se.oracle.com/code/cru/CR-JDK9CLIENT-845 This problem should affect 8u60 as well, since in 8u60 the old parser is only used if the new parser throws SAXException. In this case , the new parser succeeds, but has the wrong content for argument value (it is trimmed when it shouldn't be)
18-03-2015

The problem appears to be in the new XMLParser. There is comment in code that in old parser, name and value of attributes were trimmed, but implementation also trimmed the _characters of an element's CDATA content, removing that trim should help. that is not enough - _characters needs to be cleared at startElement or the string will contain all the whitespace since the last end element..
17-03-2015

RULE jnlp_file/applicationDesc/index_args TestCase [applicationDesc2001] Incorrect arg value
15-03-2015

Regression of JDK 9 b48. I will analyse further which fix is causing regression and add the information.
14-03-2015