You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/02 18:09:00 UTC

[jira] [Commented] (ARTEMIS-1406) FindBugs: impossible instanceof in exception handler in MappedSequentialFile.java

    [ https://issues.apache.org/jira/browse/ARTEMIS-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308443#comment-16308443 ] 

ASF GitHub Bot commented on ARTEMIS-1406:
-----------------------------------------

GitHub user jbertram opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1745

    ARTEMIS-1406 removing impossible instanceof

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jbertram/activemq-artemis ARTEMIS-1406

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1745.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1745
    
----
commit 3bedd42ea3844d3a018731a009adea32170d7471
Author: Justin Bertram <jb...@...>
Date:   2017-09-29T20:21:37Z

    ARTEMIS-1406 removing impossible instanceof

----


> FindBugs: impossible instanceof in exception handler in MappedSequentialFile.java
> ---------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1406
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1406
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.4.0
>            Reporter: Jiri Daněk
>
> {noformat}
> 360   @Override
> 361   public void renameTo(String newFileName) throws Exception {
> 362      try {
> 363         close();
> 364      } catch (Exception e) {
>    	
> CID 1418586 (#1 of 1): BC: Bad casts of object references (FB.BC_IMPOSSIBLE_INSTANCEOF)
> 1. defect: instanceof will always return false, since a RuntimeException can't be a java.io.IOException.
> 365         if (e instanceof IOException) {
> 366            factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this);
> 367         }
> 368         throw e;
> 369      }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)