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

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


The following commit(s) were added to refs/heads/master by this push:
     new c2d357b  maybe we can remove null judge in this case (#6321)
c2d357b is described below

commit c2d357be02198e98a9fa617efc16e90d51897e27
Author: Nine <nine.yang.cod...@gmail.com>
AuthorDate: Tue Jun 16 23:20:23 2020 +0800

    maybe we can remove null judge in this case (#6321)
    
    * update
    
    * update
---
 .../org/apache/dubbo/common/extension/support/ActivateComparator.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/common/extension/support/ActivateComparator.java
 
b/dubbo-common/src/main/java/org/apache/dubbo/common/extension/support/ActivateComparator.java
index 1114804..9ad1aaf 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/common/extension/support/ActivateComparator.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/common/extension/support/ActivateComparator.java
@@ -75,10 +75,8 @@ public class ActivateComparator implements 
Comparator<Object> {
                 }
             }
         }
-        int n1 = a1 == null ? 0 : a1.order;
-        int n2 = a2 == null ? 0 : a2.order;
         // never return 0 even if n1 equals n2, otherwise, o1 and o2 will 
override each other in collection like HashSet
-        return n1 > n2 ? 1 : -1;
+        return a1.order > a2.order ? 1 : -1;
     }
 
     private Class<?> findSpi(Class clazz) {

Reply via email to