You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/10/07 09:03:22 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #3567: Fix some miscellaneous bugs

kezhenxu94 commented on a change in pull request #3567: Fix some miscellaneous bugs
URL: https://github.com/apache/skywalking/pull/3567#discussion_r331911595
 
 

 ##########
 File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/expression/EqualMatch.java
 ##########
 @@ -39,19 +41,19 @@ public boolean match(double left, double right) {
     }
 
     public boolean match(Integer left, Integer right) {
-        return left == right;
+        return Objects.equals(left, right);
     }
 
     public boolean match(Long left, Long right) {
-        return left == right;
+        return Objects.equals(left, right);
     }
 
 Review comment:
   `Integer`/`Long` is not the same `Object` when `>128` or so, and should be compared via `equals`, tricky, huh

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services