[ 
https://issues.apache.org/jira/browse/ARTEMIS-2488?focusedWorklogId=312166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-312166
 ]

ASF GitHub Bot logged work on ARTEMIS-2488:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Sep/19 16:35
            Start Date: 13/Sep/19 16:35
    Worklog Time Spent: 10m 
      Work Description: michaelandrepearce commented on pull request #2834: 
ARTEMIS-2488: Handle the case where source address is null
URL: https://github.com/apache/activemq-artemis/pull/2834#discussion_r324272574
 
 

 ##########
 File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
 ##########
 @@ -319,7 +319,7 @@ public void initialise() throws Exception {
          if (CompositeAddress.isFullyQualified(source.getAddress())) {
             addressToUse = 
SimpleString.toSimpleString(CompositeAddress.extractAddressName(source.getAddress()));
             queueNameToUse = 
SimpleString.toSimpleString(CompositeAddress.extractQueueName(source.getAddress()));
-         } else {
+         } else if (source.getAddress() != null) {
 
 Review comment:
   An alternate is to use the static method on SimpleString to convert String 
to SimpleString which has the null check. Tbh we should probable remove the 
public constructor on SimpleString to avoid such issues. E.g. every bit of code 
should use the safe static method
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 312166)
    Time Spent: 40m  (was: 0.5h)

> Potential NPE parsing source address in AMQP
> --------------------------------------------
>
>                 Key: ARTEMIS-2488
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2488
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Ulf Lilleengen
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to