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 07:04:00 GMT

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

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

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

    https://github.com/apache/activemq-artemis/pull/2010#discussion_r180652792
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
---
    @@ -2769,7 +2769,7 @@ public Queue createQueue(final AddressInfo addrInfo,
              throw ActiveMQMessageBundle.BUNDLE.invalidRoutingTypeForAddress(rt, info.getName().toString(),
info.getRoutingTypes());
           }
     
    -      final QueueConfig queueConfig = queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
    +      final QueueConfig queueConfig = queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(addrInfo
== null ? RoutingType.ANYCAST :addrInfo.getRoutingType()).maxConsumers(maxConsumers).purgeOnNoConsumers(purgeOnNoConsumers).exclusive(exclusive).lastValue(lastValue).build();
    --- End diff --
    
    About 20 lines above this one is
    
        RoutingType rt = (routingType == null ? ActiveMQDefaultConfiguration.getDefaultRoutingType()
: routingType);
    
    [here](https://github.com/apache/activemq-artemis/blob/fa3e37fdb91c285bcfe87cab3d771dfe80019e18/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java#L2754)
and [here](https://github.com/apache/activemq-artemis/blob/fa3e37fdb91c285bcfe87cab3d771dfe80019e18/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java#L2865)
    
    So maybe that one?


> 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