[rfc][icedtea-web] allow access to jars' attributes from jnlpfile class

Andrew Azores aazores at redhat.com
Thu Nov 7 08:02:35 PST 2013


On 11/07/2013 10:19 AM, Jiri Vanek wrote:
> As jnlp file is argument passed to various security dialogues, it 
> should have access to attributes.
> This is continuation of 
> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-October/025070.html
>
> I do not have good feelings from patch,  but jnlpfile x jnlp 
> classloader encapsulation ... or "encapsulation" is what it is :(
>
> As the result this patch is implementing 
> http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html#app_name
>
> Also I have found 
> http://icedtea.classpath.org/hg/icedtea-web/file/dcd51951d507/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java#l831 
> So I would like to ask if this condition is correct. IMO not. There 
> should be :
>  if (launchDesc != null) {
>     mainClass = launchDesc.getMainClass();
>  }
>
> Or am I missing something?

I don't know, your suggestion seems to make sense but the 
JNLPClassLoader is just such a mess to deal with that I'm not sure I 
really can okay this change :S. If you can produce some test cases to 
show that this still works and doesn't cause problems...

> Also there is a lot of "if (mainClass == null){work}if (mainClass == 
> null){work} " as speed up there should be some "if (mainClass == null 
> ) return"  hmm?

I haven't looked deeply into it but I think this might break applets 
where they have a library JAR and a plain .class for the main-class in 
the codebase, depending on where you're thinking of putting it. Where do 
you mean to put this? And would it really make things much faster?

>
>
> J.

Little nits:
PluginBridge#getTitle :
- Spacing around '!=' in the first null check perhaps?
- Spelling in comment. "specification recommends main class instead of 
HTML parameter"

ResourceDesc#getMainJar :
- 'else' on same line as closing brace of the 'if', just to be 
consistent with other code

Other than that, I think it looks good - so long as the other two new 
attributes get implemented as well :)

Thanks,

-- 
Andrew A



More information about the distro-pkg-dev mailing list