JDK-6559077 : Download Service API throws exception on second use of default DownloadServiceListener
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2007-05-17
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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 6 JDK 7
6u4Fixed 7 b16Fixed
Related Reports
Duplicate :  
Description
When using the JNLP DownloadService API with the default DownloadServiceListener, the DownloadServiceListener will throw an exception on the second call to loadResource(), because when closing the window the first time, the window is put in canceled state, causing the second usage to immeadiatly think the user has canceled the download.
This was caused by the GUI redesign in 1.6.0 in DownloadWindow.java, but can be most easily fixed in DownloadServiceImpl.java by reseting the canceled state whenever creating a new ProgressHelper object.
also related problem using DownloadService to download jars not in jnlp file - AppPolicy.java assumes jarDesc has parent and throws NPE, jars not from jnlp file should just get sandbox permissions.

Comments
EVALUATION fix to second problem is also simple - just give jarDesc w/o parent Sandbox permissions (in AppPolicy.java).
18-05-2007

EVALUATION yes - regression from 1.5.0 family - fix in DownloadServiceImpl.ProgressHelper constructor by clearing the canceled state of the DownloadWindow.
17-05-2007