You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Peter Firmstone (JIRA)" <ji...@apache.org> on 2015/12/05 05:46:11 UTC
[jira] [Commented] (RIVER-282) Suspect exception cast
[ https://issues.apache.org/jira/browse/RIVER-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15042646#comment-15042646 ]
Peter Firmstone commented on RIVER-282:
---------------------------------------
/* instanceof LoginException would have already been rethown so wasn't
* reachable I suspect ClassNotFoundException is what the implementer wanted.
*/
I have added the above comment and modified the code appropriately.
> 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
> Fix For: River_3.0.0
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)