United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6559077 Download Service API throws exception on second use of default DownloadServiceListener
JDK-6559077 : Download Service API throws exception on second use of default DownloadServiceListener

Details
Type:
Bug
Submit Date:
2007-05-17
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
deploy
OS:
generic,windows_xp
Sub-Component:
webstart
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Duplicate:

Sub Tasks

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

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

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



Hardware and Software, Engineered to Work Together