United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6804925 JNLPCachedJarURLConnection.getContentLength() may cause unneeded network requests for cached jars
6804925 : JNLPCachedJarURLConnection.getContentLength() may cause unneeded network requests for cached jars

Details
Type:
Bug
Submit Date:
2009-02-12
Status:
Closed
Updated Date:
2010-09-26
Project Name:
JDK
Resolved Date:
2009-05-13
Component:
deploy
OS:
generic
Sub-Component:
deployment_toolkit
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
6u14

Related Reports
Backport:
Relates:

Sub Tasks

Description
If getContentLength() is the first call after construction of JNLPCachedJarURLConnection object then it will result delegate work to parent and this means network request will be performed even for cached jar file!

Obviously this have huge impact on performance as network requests are expensive.

It appears that FX applications may do this and this make this even more important.
Using SimpleVideoPlayer demo it happens 11 (!) times.

                                    

Comments
EVALUATION

Follow logic implemented in the plugin's jar connection handler.
                                     
2009-02-18
WORK AROUND

Call connect() of getContentType() before calling getContentLength().
                                     
2009-02-12
EVALUATION

Make sure connect() was called before delegating work to parent object.
                                     
2009-02-12



Hardware and Software, Engineered to Work Together