You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Stepan Mishura (JIRA)" <ji...@apache.org> on 2006/03/28 08:07:18 UTC

[jira] Created: (HARMONY-261) Static initialization of an exception must not be used

Static initialization of an exception must not be used
------------------------------------------------------

         Key: HARMONY-261
         URL: http://issues.apache.org/jira/browse/HARMONY-261
     Project: Harmony
        Type: Bug
  Components: Classlib  
    Reporter: Stepan Mishura


In general, it is not good to create an exception to be thrown in static. A stack trace may be filled later (before throwing an exception) but there are also thread-safety and security issues.

The following files in security module should be fixed:
javax/crypto/CipherSpi.java
javax/crypto/SealedObject.java
javax/crypto/spec/DESedeKeySpec.java
javax/crypto/spec/DESKeySpec.java
javax/crypto/spec/PBEKeySpec.java
javax/crypto/spec/RC2ParameterSpec.java
javax/crypto/spec/RC5ParameterSpec.java
javax/crypto/spec/SecretKeySpec.java

-- 
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-261) Static initialization of an exception must not be used

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

Stepan Mishura reassigned HARMONY-261:
--------------------------------------

    Assign To: Stepan Mishura

> Static initialization of an exception must not be used
> ------------------------------------------------------
>
>          Key: HARMONY-261
>          URL: http://issues.apache.org/jira/browse/HARMONY-261
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Stepan Mishura
>     Assignee: Stepan Mishura
>  Attachments: fixHarmony261.txt
>
> In general, it is not good to create an exception to be thrown in static. A stack trace may be filled later (before throwing an exception) but there are also thread-safety and security issues.
> The following files in security module should be fixed:
> javax/crypto/CipherSpi.java
> javax/crypto/SealedObject.java
> javax/crypto/spec/DESedeKeySpec.java
> javax/crypto/spec/DESKeySpec.java
> javax/crypto/spec/PBEKeySpec.java
> javax/crypto/spec/RC2ParameterSpec.java
> javax/crypto/spec/RC5ParameterSpec.java
> javax/crypto/spec/SecretKeySpec.java

-- 
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-261) Static initialization of an exception must not be used

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

    Resolution: Fixed

Updated patch was applied at at repo revision 391558.

> Static initialization of an exception must not be used
> ------------------------------------------------------
>
>          Key: HARMONY-261
>          URL: http://issues.apache.org/jira/browse/HARMONY-261
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Stepan Mishura
>     Assignee: Stepan Mishura
>  Attachments: fixHarmony261.txt
>
> In general, it is not good to create an exception to be thrown in static. A stack trace may be filled later (before throwing an exception) but there are also thread-safety and security issues.
> The following files in security module should be fixed:
> javax/crypto/CipherSpi.java
> javax/crypto/SealedObject.java
> javax/crypto/spec/DESedeKeySpec.java
> javax/crypto/spec/DESKeySpec.java
> javax/crypto/spec/PBEKeySpec.java
> javax/crypto/spec/RC2ParameterSpec.java
> javax/crypto/spec/RC5ParameterSpec.java
> javax/crypto/spec/SecretKeySpec.java

-- 
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] Updated: (HARMONY-261) Static initialization of an exception must not be used

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

Stepan Mishura updated HARMONY-261:
-----------------------------------

    Attachment: fixHarmony261.txt

The attached patch fixes all files except SecretKeySpec.java (because it was fixed in HARMONY-250)

> Static initialization of an exception must not be used
> ------------------------------------------------------
>
>          Key: HARMONY-261
>          URL: http://issues.apache.org/jira/browse/HARMONY-261
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Stepan Mishura
>  Attachments: fixHarmony261.txt
>
> In general, it is not good to create an exception to be thrown in static. A stack trace may be filled later (before throwing an exception) but there are also thread-safety and security issues.
> The following files in security module should be fixed:
> javax/crypto/CipherSpi.java
> javax/crypto/SealedObject.java
> javax/crypto/spec/DESedeKeySpec.java
> javax/crypto/spec/DESKeySpec.java
> javax/crypto/spec/PBEKeySpec.java
> javax/crypto/spec/RC2ParameterSpec.java
> javax/crypto/spec/RC5ParameterSpec.java
> javax/crypto/spec/SecretKeySpec.java

-- 
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