helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject [25/53] [abbrv] git commit: [HELIX-100] Use .equals instead of == for scope
Date Thu, 07 Nov 2013 01:19:33 GMT
[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/314ed450
Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/314ed450
Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/314ed450

Branch: refs/heads/master
Commit: 314ed450f666195f0ff4108def20b9241d885794
Parents: 8699060
Author: Kanak Biscuitwala <kanak@apache.org>
Authored: Wed Oct 2 09:19:10 2013 -0700
Committer: Kanak Biscuitwala <kanak@apache.org>
Committed: Wed Nov 6 13:17:35 2013 -0800

----------------------------------------------------------------------
 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/314ed450/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;


Mime
View raw message