You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2006/03/24 21:49:26 UTC

[jira] Created: (HARMONY-250) disambiguate some error messages

disambiguate some error messages
--------------------------------

         Key: HARMONY-250
         URL: http://issues.apache.org/jira/browse/HARMONY-250
     Project: Harmony
        Type: Improvement
  Components: Classlib  
    Reporter: Mark Hindess
    Priority: Trivial


As discussed on the -dev list, some exceptions are too ambiguous.  I will attach a patch to fix some of them.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-250) disambiguate some error messages

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-250?page=all ]
     
Tim Ellison resolved HARMONY-250:
---------------------------------

    Resolution: Fixed

Thanks Mark,

I applied a modified version of your patch, with the SecretKeySpec changed to create new instances of the exception as discussed on the dev list
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/%3c44284F20.6070902@gmail.com%3e

Fixed in SECURITY module at repo revision 389435.

Please check that this fully resolves your issue.


> disambiguate some error messages
> --------------------------------
>
>          Key: HARMONY-250
>          URL: http://issues.apache.org/jira/browse/HARMONY-250
>      Project: Harmony
>         Type: Improvement
>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Tim Ellison
>     Priority: Trivial
>  Attachments: disambiguate.error.messages.diff
>
> As discussed on the -dev list, some exceptions are too ambiguous.  I will attach a patch to fix some of them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-250) disambiguate some error messages

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-250?page=all ]

Tim Ellison reassigned HARMONY-250:
-----------------------------------

    Assign To: Tim Ellison

> disambiguate some error messages
> --------------------------------
>
>          Key: HARMONY-250
>          URL: http://issues.apache.org/jira/browse/HARMONY-250
>      Project: Harmony
>         Type: Improvement
>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Tim Ellison
>     Priority: Trivial
>  Attachments: disambiguate.error.messages.diff
>
> As discussed on the -dev list, some exceptions are too ambiguous.  I will attach a patch to fix some of them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (HARMONY-250) disambiguate some error messages

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-250?page=all ]
     
Tim Ellison closed HARMONY-250:
-------------------------------


Verified by Mark

> disambiguate some error messages
> --------------------------------
>
>          Key: HARMONY-250
>          URL: http://issues.apache.org/jira/browse/HARMONY-250
>      Project: Harmony
>         Type: Improvement
>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Tim Ellison
>     Priority: Trivial
>  Attachments: disambiguate.error.messages.diff
>
> As discussed on the -dev list, some exceptions are too ambiguous.  I will attach a patch to fix some of them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Updated: (HARMONY-250) disambiguate some error messages

Posted by Mikhail Loenko <ml...@gmail.com>.
2006/3/28, Tim Ellison <t....@gmail.com>:
> If the exception is thrown it is not going to have a useful stack to
> help debug the cause of the bad parameters.

Moreover it is a security hole - different applets can talk to each other
via Exception.setStackTrace/getStackTrace methods.

Thanks,
Mikhail

Re: [jira] Updated: (HARMONY-250) disambiguate some error messages

Posted by Stepan Mishura <st...@gmail.com>.
Hi Tim,

I agree with you that this should be fixed. I found the similar case in
javax.crypto.CipherSpi class
I'm going to fill new JIRA tracker, scan all code in security module and fix
all such cases.

May be in makes sense to avoid patches conflict apply this patch first and
next patch will fix the issue with exception.

Thanks,
Stepan.

On 3/28/06, Tim Ellison wrote:
>
> Why does the javax.crypto.spec.SecretKeySpec create an exception eagerly
> in a static?
>
> >  private static final IllegalArgumentException BADPARAMS_EXC =
> >   new IllegalArgumentException(
> >    "algorithm is null or key is null, empty, or too short.");
>
> If the exception is thrown it is not going to have a useful stack to
> help debug the cause of the bad parameters.
>
> Regards,
> Tim
>
> Mark Hindess (JIRA) wrote:
> >      [ http://issues.apache.org/jira/browse/HARMONY-250?page=all ]
> >
> > Mark Hindess updated HARMONY-250:
> > ---------------------------------
> >
> >     Attachment: disambiguate.error.messages.diff
> >
> > Patch to split some error messages in to more less ambiguous messages.
> >
> >
> >> disambiguate some error messages
> >> --------------------------------
> >>
> >>          Key: HARMONY-250
> >>          URL: http://issues.apache.org/jira/browse/HARMONY-250
> >>      Project: Harmony
> >>         Type: Improvement
> >>   Components: Classlib
> >>     Reporter: Mark Hindess
> >>     Priority: Trivial
> >>  Attachments: disambiguate.error.messages.diff
> >>
> >> As discussed on the -dev list, some exceptions are too ambiguous.  I
> will attach a patch to fix some of them.
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>



--
Thanks,
Stepan Mishura
Intel Middleware Products Division

Re: [jira] Updated: (HARMONY-250) disambiguate some error messages

Posted by Tim Ellison <t....@gmail.com>.
Why does the javax.crypto.spec.SecretKeySpec create an exception eagerly
in a static?

 >  private static final IllegalArgumentException BADPARAMS_EXC =
 >   new IllegalArgumentException(
 >    "algorithm is null or key is null, empty, or too short.");

If the exception is thrown it is not going to have a useful stack to
help debug the cause of the bad parameters.

Regards,
Tim

Mark Hindess (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/HARMONY-250?page=all ]
> 
> Mark Hindess updated HARMONY-250:
> ---------------------------------
> 
>     Attachment: disambiguate.error.messages.diff
> 
> Patch to split some error messages in to more less ambiguous messages.
> 
> 
>> disambiguate some error messages
>> --------------------------------
>>
>>          Key: HARMONY-250
>>          URL: http://issues.apache.org/jira/browse/HARMONY-250
>>      Project: Harmony
>>         Type: Improvement
>>   Components: Classlib
>>     Reporter: Mark Hindess
>>     Priority: Trivial
>>  Attachments: disambiguate.error.messages.diff
>>
>> As discussed on the -dev list, some exceptions are too ambiguous.  I will attach a patch to fix some of them.
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

[jira] Updated: (HARMONY-250) disambiguate some error messages

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-250?page=all ]

Mark Hindess updated HARMONY-250:
---------------------------------

    Attachment: disambiguate.error.messages.diff

Patch to split some error messages in to more less ambiguous messages.


> disambiguate some error messages
> --------------------------------
>
>          Key: HARMONY-250
>          URL: http://issues.apache.org/jira/browse/HARMONY-250
>      Project: Harmony
>         Type: Improvement
>   Components: Classlib
>     Reporter: Mark Hindess
>     Priority: Trivial
>  Attachments: disambiguate.error.messages.diff
>
> As discussed on the -dev list, some exceptions are too ambiguous.  I will attach a patch to fix some of them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-250) disambiguate some error messages

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-250?page=comments#action_12372079 ] 

Mark Hindess commented on HARMONY-250:
--------------------------------------

Looks good.  I notice you also spilt the "key too short" exception which also seems reasonable.


> disambiguate some error messages
> --------------------------------
>
>          Key: HARMONY-250
>          URL: http://issues.apache.org/jira/browse/HARMONY-250
>      Project: Harmony
>         Type: Improvement
>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Tim Ellison
>     Priority: Trivial
>  Attachments: disambiguate.error.messages.diff
>
> As discussed on the -dev list, some exceptions are too ambiguous.  I will attach a patch to fix some of them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira