You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2008/02/02 05:49:08 UTC
[jira] Created: (RIVER-282) Suspect exception cast
Suspect exception cast
----------------------
Key: RIVER-282
URL: https://issues.apache.org/jira/browse/RIVER-282
Project: River
Issue Type: Bug
Components: com_sun_jini_fiddler
Environment: n/a
Reporter: Dave Brosius
Priority: Minor
FiddlerImpl does this
-------------------
private void handleActivatableInitThrowable(Throwable t)
throws IOException,
ActivationException,
ConfigurationException,
LoginException,
ClassNotFoundException
{
handleInitThrowable(t);
if (t instanceof ActivationException) {
throw (ActivationException)t;
} else if (t instanceof LoginException) {
throw (ClassNotFoundException)t;
} else {
throw new AssertionError(t);
}//endif
-----------------
the concerning part is
} else if (t instanceof LoginException) {
throw (ClassNotFoundException)t;
if t is an instanceof LoginException, i don't think it can be cast to ClassNotFoundException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (RIVER-282) Suspect exception cast
Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Firmstone reassigned RIVER-282:
-------------------------------------
Assignee: Peter Firmstone
> Suspect exception cast
> ----------------------
>
> Key: RIVER-282
> URL: https://issues.apache.org/jira/browse/RIVER-282
> Project: River
> Issue Type: Bug
> Components: com_sun_jini_fiddler
> Environment: n/a
> Reporter: Dave Brosius
> Assignee: Peter Firmstone
> Priority: Minor
>
> FiddlerImpl does this
> -------------------
> {code}
> private void handleActivatableInitThrowable(Throwable t)
> throws IOException,
> ActivationException,
> ConfigurationException,
> LoginException,
> ClassNotFoundException
> {
> handleInitThrowable(t);
> if (t instanceof ActivationException) {
> throw (ActivationException)t;
> } else if (t instanceof LoginException) {
> throw (ClassNotFoundException)t;
> } else {
> throw new AssertionError(t);
> }//endif
> {code}
> -----------------
> the concerning part is
> {code}
> } else if (t instanceof LoginException) {
> throw (ClassNotFoundException)t;
> {code}
> if t is an instanceof LoginException, i don't think it can be cast to ClassNotFoundException.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (RIVER-282) Suspect exception cast
Posted by "Mark Brouwer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Brouwer updated RIVER-282:
-------------------------------
Description:
FiddlerImpl does this
-------------------
{code}
private void handleActivatableInitThrowable(Throwable t)
throws IOException,
ActivationException,
ConfigurationException,
LoginException,
ClassNotFoundException
{
handleInitThrowable(t);
if (t instanceof ActivationException) {
throw (ActivationException)t;
} else if (t instanceof LoginException) {
throw (ClassNotFoundException)t;
} else {
throw new AssertionError(t);
}//endif
{code}
-----------------
the concerning part is
{code}
} else if (t instanceof LoginException) {
throw (ClassNotFoundException)t;
{code}
if t is an instanceof LoginException, i don't think it can be cast to ClassNotFoundException.
was:
FiddlerImpl does this
-------------------
private void handleActivatableInitThrowable(Throwable t)
throws IOException,
ActivationException,
ConfigurationException,
LoginException,
ClassNotFoundException
{
handleInitThrowable(t);
if (t instanceof ActivationException) {
throw (ActivationException)t;
} else if (t instanceof LoginException) {
throw (ClassNotFoundException)t;
} else {
throw new AssertionError(t);
}//endif
-----------------
the concerning part is
} else if (t instanceof LoginException) {
throw (ClassNotFoundException)t;
if t is an instanceof LoginException, i don't think it can be cast to ClassNotFoundException.
Thanks Dave that looks like a bug, a quick look gives me the impression that it should be {{ClassNotFoundException}} that should be caught there as {{handleInitThrowable(Throwable t)}} takes care of the {{LoginException}}. I also beautified your description to make it more readable.
> Suspect exception cast
> ----------------------
>
> Key: RIVER-282
> URL: https://issues.apache.org/jira/browse/RIVER-282
> Project: River
> Issue Type: Bug
> Components: com_sun_jini_fiddler
> Environment: n/a
> Reporter: Dave Brosius
> Priority: Minor
>
> FiddlerImpl does this
> -------------------
> {code}
> private void handleActivatableInitThrowable(Throwable t)
> throws IOException,
> ActivationException,
> ConfigurationException,
> LoginException,
> ClassNotFoundException
> {
> handleInitThrowable(t);
> if (t instanceof ActivationException) {
> throw (ActivationException)t;
> } else if (t instanceof LoginException) {
> throw (ClassNotFoundException)t;
> } else {
> throw new AssertionError(t);
> }//endif
> {code}
> -----------------
> the concerning part is
> {code}
> } else if (t instanceof LoginException) {
> throw (ClassNotFoundException)t;
> {code}
> if t is an instanceof LoginException, i don't think it can be cast to ClassNotFoundException.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.