[rfc][icedtea-web] exception flaw in usages of PluginDebug.debug(...)

Jiri Vanek jvanek at redhat.com
Wed Aug 8 05:32:54 PDT 2012

On 08/07/2012 09:37 PM, Deepak Bhole wrote:
> * Jiri Vanek <jvanek at redhat.com> [2012-08-07 11:47]:
>> Hi! Today Jana during testing of js api of IcedTEa-Web have
>> encountered exception which was caused by PluginDebug.Debug. Even
>> when DEBUG was disabled, then it caused NPE or ArrayOutOfBounds
>> exceptions
>> eg PluginDebug.debug(object.something()) when object was null, then
>> icedtea-web have fail even when debug was off.
>> This patch is fixing it.
>> Not all occurrences of PluginDebug.debug() were "fixed",  but just those affected by issue.
>> I have also fortified debug() method itself a bit.
>> Tahanx for comments
>> J.
> Hi Jiri,
> A lot of new lines are missing a space before the "{" ... per coding
> style requirement, there should be a space so please add them -- or
> better yet, use the Eclipse project file in the repo :)
Doh sorry. I hate myself for such a typos. Fixed patch attached.

> Also, why was the DEBUG variable made public? Does it need to be
> mutable?
it is static final==immutable :)
I made it public because of one change in plugin/icedteanp/java/netscape/javascript/JSRunnable.java. 
But there is check to null-exception. So I think We can get rid of this check and keep DEBUG package 
private. If you want it in this way, just say.

Thanx for check, J.
> Cheers,
> Deepak

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixedPluginDebug_2.diff
Type: text/x-patch
Size: 15398 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120808/0fbfbbf1/fixedPluginDebug_2.diff 

More information about the distro-pkg-dev mailing list