FULL PRODUCT VERSION :
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
When Java WebStart begins, it attempts to discover the web proxy information from the default browser settings. In our case it downloads the auto proxy javascript file from http://xxxxxxxx/wpad.dat . In order to correctly use the code encapsulated in the auto proxy file it needs to parse it through Internet Explorer’s javascript engine.
Prior to doing this, WebStart will attempt to strip out all the comments in the auto proxy file along with replacing newline characters (\n) with spaces using com.sun.deploy.net.proxy.RemoveCommentReader.
When RemoveCommentReader.read is executed and the buffer is not completely filled with data but the last character in the read data is the opening / of a comment block the code fails to recognise that fact and will not properly strip the comments out.
This leaves the javascript on a single line but with an inline comment. Since code exists after the left in comments, the javascript engine fails to correctly parse the code and we an the error.
The issue is seen intermittently due to the variability in the network when downloading the auto proxy file. The bug is only exposed if the file is read in chunks that happen to end mid-way through the opening // or /* of a comment block.
REPRODUCIBILITY :
This bug can be reproduced occasionally.
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
When Java WebStart begins, it attempts to discover the web proxy information from the default browser settings. In our case it downloads the auto proxy javascript file from http://xxxxxxxx/wpad.dat . In order to correctly use the code encapsulated in the auto proxy file it needs to parse it through Internet Explorer’s javascript engine.
Prior to doing this, WebStart will attempt to strip out all the comments in the auto proxy file along with replacing newline characters (\n) with spaces using com.sun.deploy.net.proxy.RemoveCommentReader.
When RemoveCommentReader.read is executed and the buffer is not completely filled with data but the last character in the read data is the opening / of a comment block the code fails to recognise that fact and will not properly strip the comments out.
This leaves the javascript on a single line but with an inline comment. Since code exists after the left in comments, the javascript engine fails to correctly parse the code and we an the error.
The issue is seen intermittently due to the variability in the network when downloading the auto proxy file. The bug is only exposed if the file is read in chunks that happen to end mid-way through the opening // or /* of a comment block.
REPRODUCIBILITY :
This bug can be reproduced occasionally.
- duplicates
-
JDK-7063183 AIOB exception in the RemoveCommentReader
- Resolved
- relates to
-
JDK-7063790 SunAutoProxyHandlerTest hangs
- Closed
-
JDK-6756510 ArrayOutOfBounds exception while parsing PAC file
- Closed