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

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

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

    https://github.com/apache/activemq-artemis/pull/2334#discussion_r220700987
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
 ---
    @@ -196,6 +196,10 @@ protected void decode(ChannelHandlerContext ctx, 
ByteBuf in, List<Object> out) t
              }
     
              ProtocolManager protocolManagerToUse = 
protocolMap.get(protocolToUse);
    +         if (protocolManagerToUse == null) {
    +            
ActiveMQServerLogger.LOGGER.failedToFindProtocolManager(ctx.channel().remoteAddress().toString(),
 ctx.channel().localAddress().toString(), protocolToUse, 
protocolMap.keySet().toString());
    --- End diff --
    
    I performed manual testing to confirm the logging works as expected, but 
I'm not 100% sure these won't *ever* be null so checks are worth doing.


> Potential NPE when decoding protocol
> ------------------------------------
>
>                 Key: ARTEMIS-2098
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2098
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.6.3
>            Reporter: Justin Bertram
>            Priority: Major
>




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

Reply via email to