You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by so...@apache.org on 2019/04/29 15:36:09 UTC

[incubator-dubbo] branch master updated: Remove unnecessary null check in conjunction with instanceof

This is an automated email from the ASF dual-hosted git repository.

songkun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new d54633e  Remove unnecessary null check in conjunction with instanceof
d54633e is described below

commit d54633edf0c396f8a18b17d6ba6970de436c6964
Author: liugddx <48...@users.noreply.github.com>
AuthorDate: Mon Apr 29 23:35:46 2019 +0800

    Remove unnecessary null check in conjunction with instanceof
---
 .../main/java/org/apache/dubbo/remoting/transport/DecodeHandler.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/DecodeHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/DecodeHandler.java
index 050dc78..a342c4b 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/DecodeHandler.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/DecodeHandler.java
@@ -52,7 +52,7 @@ public class DecodeHandler extends AbstractChannelHandlerDelegate {
     }
 
     private void decode(Object message) {
-        if (message != null && message instanceof Decodeable) {
+        if (message instanceof Decodeable) {
             try {
                 ((Decodeable) message).decode();
                 if (log.isDebugEnabled()) {