[RFC][icedtea-web] Fix regression in broken AppletTest (Was Re: Broken applet test)
Danesh Dadachanji
ddadacha at redhat.com
Mon Feb 6 15:00:17 PST 2012
Hi,
The attached patch should prevent the regression occurring when running
AppletTest.
It regressed because I did not set the applet var for AppletEnvironment
after creating an AppletInstance with a null applet param. I've added
this now and gone through wherever AppletEnvironment has been called in
icedtea-web. I didn't find anywhere else it was being called so I hope
that's the last of this fault. Please comment if you think of anywhere I
may have missed! I've also added comments to the reasoning behind the
original changeset since it was in no way obvious why that code was
refactored.
The intent of the original changeset that brought in the regression was
to let applets run ServiceManager code in the constructor. I did not
realize I could test it at the time using javaws, I thought it could
only be done through the plugin. I've made a test for that changeset
now. I realized though that it was not the right kind of test (needs
access to netx.jar) so I'll rewrite it tomorrow and post it for review
separately.
ChangeLog
+2012-02-06 Danesh Dadachanji <ddadacha at redhat.com>
+
+ Fixed regression in running webstart applets from JNLP files.
+ * netx/net/sourceforge/jnlp/Launcher.java (createApplet): Added call to
+ set applet variable in the AppletInstance's AppletEnvironment.
+ * netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java
+ (setApplet): New method, set AppletEnvironment's applet variable only
once.
+
Cheers,
Danesh
On 06/02/12 11:47 AM, Danesh Dadachanji wrote:
> Hi Jiri,
>
> My apologies for this regression! =( Commenting below.
>
> On 05/02/12 08:01 AM, Jiri Vanek wrote:
>> This commit -
>> http://icedtea.classpath.org/hg/icedtea-web/rev/221174bcd4ec ,
>> especially this hunk:
>
> [snip]
>
>> have broken applet test. I have verified manually. With this patch
>> applet lunched via jnlp (but I have not tested embedded applets - they
>> can be affected to!) is causing null pointer exception (only in verbose
>> mode, without it just died)
>> When the "bad hunk" is reverted, applet works as expected.
>
> I noticed this problem before when testing some other jnlp_href stuff.
> The exception I found was in AppletEnvironment, I assume this is the
> same one that you noticed? I missed setting up AppletEnvironment
> properly after AppletInstance is setup. I thought any reference to the
> applet var would be from AppletInstance, I didn't realize
> AppletEnvironment had its own reference too.
>
> I'm testing some code right now that assigns AppletEnvironment.applet
> after AppletInstance is initialized, I'll post a RFC by the end of the
> day. I want to make sure I didn't miss anything this time around!
>
> Regards,
> Danesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: applet-test-regression-fix-01.patch
Type: text/x-patch
Size: 2250 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120206/233f6cf2/applet-test-regression-fix-01.patch
More information about the distro-pkg-dev
mailing list