You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2009/01/05 19:39:44 UTC

[jira] Created: (SCXML-103) ThreadDeath should not be ignored

ThreadDeath should not be ignored
---------------------------------

                 Key: SCXML-103
                 URL: https://issues.apache.org/jira/browse/SCXML-103
             Project: Commons SCXML
          Issue Type: Bug
            Reporter: Sebb
            Priority: Minor


There are a few instances where the code catches Throwable, but fails to rethrow anything.
For example:

{code}
org.apache.commons.scxml.io.SCXMLSerializer.getTransformer()
...
        } catch (Throwable t) {
            return null;
        }
{code}

It would be safer if the code only caught the relevant Exception(s) (and perhaps some Errors).
For example does it really make sense to catch OutOfMemory ?

In particular, the Javadoc for ThreadDeath says:

{quote} If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SCXML-103) Remove any catch (Throwable t) occurences

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SCXML-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661305#action_12661305 ] 

Rahul Akolkar commented on SCXML-103:
-------------------------------------

Great, thanks, please resolve / close as you see fit (generally, I resolve issues, then close all issues in one sweep when the fix version is released -- first fix version to be released if there are more than one).


> Remove any catch (Throwable t) occurences
> -----------------------------------------
>
>                 Key: SCXML-103
>                 URL: https://issues.apache.org/jira/browse/SCXML-103
>             Project: Commons SCXML
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 0.10, 1.0
>
>
> There are a few instances where the code catches Throwable, but fails to rethrow anything.
> For example:
> {code}
> org.apache.commons.scxml.io.SCXMLSerializer.getTransformer()
> ...
>         } catch (Throwable t) {
>             return null;
>         }
> {code}
> It would be safer if the code only caught the relevant Exception(s) (and perhaps some Errors).
> For example does it really make sense to catch OutOfMemory ?
> In particular, the Javadoc for ThreadDeath says:
> {quote} If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SCXML-103) Remove any catch (Throwable t) occurences

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SCXML-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rahul Akolkar updated SCXML-103:
--------------------------------

    Summary: Remove any catch (Throwable t) occurences  (was: ThreadDeath should not be ignored)

I think this subject for the issue is clearer, but feel free to change if you don't like it.


> Remove any catch (Throwable t) occurences
> -----------------------------------------
>
>                 Key: SCXML-103
>                 URL: https://issues.apache.org/jira/browse/SCXML-103
>             Project: Commons SCXML
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 0.10, 1.0
>
>
> There are a few instances where the code catches Throwable, but fails to rethrow anything.
> For example:
> {code}
> org.apache.commons.scxml.io.SCXMLSerializer.getTransformer()
> ...
>         } catch (Throwable t) {
>             return null;
>         }
> {code}
> It would be safer if the code only caught the relevant Exception(s) (and perhaps some Errors).
> For example does it really make sense to catch OutOfMemory ?
> In particular, the Javadoc for ThreadDeath says:
> {quote} If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SCXML-103) ThreadDeath should not be ignored

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SCXML-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rahul Akolkar updated SCXML-103:
--------------------------------

    Fix Version/s: 1.0
                   0.10

Any such instances clearly need improvement. The example above does indeed throw an Error (it was a strange API choice IMO, but it is what it is) so that will need to be caught as well.

Setting fix version to next releases out of trunk and J6 branch.



> ThreadDeath should not be ignored
> ---------------------------------
>
>                 Key: SCXML-103
>                 URL: https://issues.apache.org/jira/browse/SCXML-103
>             Project: Commons SCXML
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 0.10, 1.0
>
>
> There are a few instances where the code catches Throwable, but fails to rethrow anything.
> For example:
> {code}
> org.apache.commons.scxml.io.SCXMLSerializer.getTransformer()
> ...
>         } catch (Throwable t) {
>             return null;
>         }
> {code}
> It would be safer if the code only caught the relevant Exception(s) (and perhaps some Errors).
> For example does it really make sense to catch OutOfMemory ?
> In particular, the Javadoc for ThreadDeath says:
> {quote} If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SCXML-103) Remove any catch (Throwable t) occurences

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SCXML-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661002#action_12661002 ] 

Sebb commented on SCXML-103:
----------------------------

(Re subject change - sorry meant to do it myself!).

Applied to J6
URL: http://svn.apache.org/viewvc?rev=731781&view=rev
Log:
SCXML-103 Remove any catch (Throwable t) occurences:
Catch specific Exceptions/Errors rather than generic ones

and trunk:
URL: http://svn.apache.org/viewvc?rev=731791&view=rev
Log:
SCXML-103 Remove any catch (Throwable t) occurences:
Catch specific Exceptions/Errors rather than generic ones


> Remove any catch (Throwable t) occurences
> -----------------------------------------
>
>                 Key: SCXML-103
>                 URL: https://issues.apache.org/jira/browse/SCXML-103
>             Project: Commons SCXML
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 0.10, 1.0
>
>
> There are a few instances where the code catches Throwable, but fails to rethrow anything.
> For example:
> {code}
> org.apache.commons.scxml.io.SCXMLSerializer.getTransformer()
> ...
>         } catch (Throwable t) {
>             return null;
>         }
> {code}
> It would be safer if the code only caught the relevant Exception(s) (and perhaps some Errors).
> For example does it really make sense to catch OutOfMemory ?
> In particular, the Javadoc for ThreadDeath says:
> {quote} If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SCXML-103) Remove any catch (Throwable t) occurences

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SCXML-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved SCXML-103.
------------------------

    Resolution: Fixed

OK

> Remove any catch (Throwable t) occurences
> -----------------------------------------
>
>                 Key: SCXML-103
>                 URL: https://issues.apache.org/jira/browse/SCXML-103
>             Project: Commons SCXML
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 0.10, 1.0
>
>
> There are a few instances where the code catches Throwable, but fails to rethrow anything.
> For example:
> {code}
> org.apache.commons.scxml.io.SCXMLSerializer.getTransformer()
> ...
>         } catch (Throwable t) {
>             return null;
>         }
> {code}
> It would be safer if the code only caught the relevant Exception(s) (and perhaps some Errors).
> For example does it really make sense to catch OutOfMemory ?
> In particular, the Javadoc for ThreadDeath says:
> {quote} If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.