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 Thu, 12 Apr 2018 05:57:00 GMT

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

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

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

    https://github.com/apache/activemq-artemis/pull/2010#discussion_r180971622
  
    --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
---
    @@ -511,22 +511,24 @@ public void close() {
        public void transferConnection(final CoreRemotingConnection newConnection) {
           // Needs to synchronize on the connection to make sure no packets from
           // the old connection get processed after transfer has occurred
    -      synchronized (connection.getTransferLock()) {
    -         connection.removeChannel(id);
    +      if (connection != null) {
    --- End diff --
    
    Well, it is null-checked few lines bellow so it confued me.


> 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