You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ka...@apache.org on 2013/10/02 18:19:57 UTC

git commit: [HELIX-100] Use .equals instead of == for scope

Updated Branches:
  refs/heads/helix-logical-model 45af07c85 -> 743308634


[HELIX-100] Use .equals instead of == for scope


Project: http://git-wip-us.apache.org/repos/asf/incubator-helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-helix/commit/74330863
Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/74330863
Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/74330863

Branch: refs/heads/helix-logical-model
Commit: 7433086349a2c7f4578ebde808b4a0666ed31c12
Parents: 45af07c
Author: Kanak Biscuitwala <ka...@apache.org>
Authored: Wed Oct 2 09:19:10 2013 -0700
Committer: Kanak Biscuitwala <ka...@apache.org>
Committed: Wed Oct 2 09:19:10 2013 -0700

----------------------------------------------------------------------
 helix-core/src/main/java/org/apache/helix/api/Scope.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/74330863/helix-core/src/main/java/org/apache/helix/api/Scope.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/api/Scope.java b/helix-core/src/main/java/org/apache/helix/api/Scope.java
index 4d4eead..7dc217c 100644
--- a/helix-core/src/main/java/org/apache/helix/api/Scope.java
+++ b/helix-core/src/main/java/org/apache/helix/api/Scope.java
@@ -66,13 +66,13 @@ public class Scope<T extends Id> {
    */
   public ScopeType getType() {
     Class<?> idClass = _id.getClass();
-    if (idClass == ClusterId.class) {
+    if (ClusterId.class.equals(idClass)) {
       return ScopeType.CLUSTER;
-    } else if (idClass == ParticipantId.class) {
+    } else if (ParticipantId.class.equals(idClass)) {
       return ScopeType.PARTICIPANT;
-    } else if (idClass == PartitionId.class) {
+    } else if (PartitionId.class.equals(idClass)) {
       return ScopeType.PARTITION;
-    } else if (idClass == ResourceId.class) {
+    } else if (ResourceId.class.equals(idClass)) {
       return ScopeType.RESOURCE;
     } else {
       return null;