[rfc][icedtea-web] Don't be silent if JNLPClassLoader gets a ClassFormatError

Adam Domurad adomurad at redhat.com
Wed Mar 20 12:48:57 PDT 2013


On 03/20/2013 05:51 AM, Jiri Vanek wrote:
> On 03/19/2013 08:42 PM, Adam Domurad wrote:
>> On 03/19/2013 03:19 PM, Jiri Vanek wrote:
>>> On 03/19/2013 05:00 PM, Adam Domurad wrote:
>>>> I think this is worthy because it would have saved me a lot of time 
>>>> investigating a recent bug.
>>>> This will continue as normal, but ClassFormatError's really should 
>>>> be logged. It will make
>>>> resulting ClassNotFoundException's less mysterious.
>>>>
>>>> 2013-19-03 Adam Domurad <adomurad at redhat.com>
>>>>
>>>> * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
>>>> (findClass): Print stacktrace for ClassFormatError
>>>>
>>>>
>>> Hmm... why keep other ones silent?
>>
>> You mean PrivilegedActionException? It is worthy perhaps, shall I 
>> include it when I push ?
>> (NullJnlpFileException already stores the exception and rethrows, and 
>> CNFE represents a failure that
>> we fully expect when we fail to load a classs.)
>>
>>> Why do not rethrow?
>>
>> Well my logic was simply to be as lenient as possible, eg in case we 
>> ever pick something up that
>> isn't really a class. However rethrow sounds good to me too. If you 
>> prefer this I can do it (I do
>> not expect it to break anything, especially anything sanely 
>> organized). I looked at the history of
>> this catch and it is present in the initial commit, so no telling why 
>> it was added.
>>
>>>
>
> Yup :)) I like your points... But I'm not so sure that it will break 
> anything....
> I'm for rethrowing where possible, and be laud/log where we can not 
> rethrow.
> But in this particular part of code it will need a lot of empiric 
> tastings, or somebody with insight into classlaoders... Omair? 
> (silently CCed O:)
>
> In case that we will no able to rethrow, isnt worthy to get rid of 
> printstacktrace and to add standard logger? Just thing to think about....

What do you mean by standard logger ?
I'd like to push the printStackTrace for the time being (to this & 
PrivilegedActionException), assuming you're suggesting some new feature.

>
>
> J.
>
-Adam



More information about the distro-pkg-dev mailing list