You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/26 10:37:13 UTC

[GitHub] carryxyh edited a comment on issue #2127: NullPointExexception in RpcContextFilter

carryxyh edited a comment on issue #2127: NullPointExexception  in RpcContextFilter
URL: https://github.com/apache/incubator-dubbo/issues/2127#issuecomment-408054470
 
 
   First case : 
   
   ```
   String value = getStringFromXXX();
   RpcContext.getContext().getAttachments().put("demokey", value)
   ```
   
   Why don't u check the value is null ? 
   In this way it is obviously more rigorous: 
   
   ```
   String value = getStringFromXXX();
   if (value != null ){
         RpcContext.getContext().getAttachments().put("demokey", value)
   }
   ```
   
   Second case : 
   I haven't said that "u can not put null into attachment".
   Can u just tell us, in which case u want to put a null into attachment?
   If just the case that u don't check the value u put in, I don't think this is a bug which should be fixed.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org