activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1801) Remove dereferences before null check
Date Wed, 11 Apr 2018 18:43:00 GMT

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

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

Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2010#discussion_r180858361
  
    --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
---
    @@ -380,7 +380,7 @@ public Packet sendBlocking(final Packet packet,
     
                 connection.getTransportConnection().write(buffer, false, false);
     
    -            long toWait = connection.getBlockingCallTimeout();
    --- End diff --
    
    Looking at the code, I can't see how connection will ever be null here..  I think you
should remove this one...
    
    For instance... the very same connection was used before within a lock.. what would issue
a NPE a lot earlier than here.
    
    I don't see how connection could ever be null.


> Remove dereferences before null check
> -------------------------------------
>
>                 Key: ARTEMIS-1801
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1801
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Stanislav Knot
>            Assignee: Stanislav Knot
>            Priority: Minor
>
> There are some dereferences before object is checked for null.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message