You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ml...@apache.org on 2014/02/13 01:02:04 UTC

git commit: updated refs/heads/4.2 to 433a2e4

Updated Branches:
  refs/heads/4.2 864d14857 -> 433a2e44b


CLOUDSTACK-6089: Use resource tag's key to determine match in
equals() method for ResourceTagResponse


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/433a2e44
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/433a2e44
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/433a2e44

Branch: refs/heads/4.2
Commit: 433a2e44b1e98f4e0129d7bc940947813f579ffe
Parents: 864d148
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Feb 12 17:00:10 2014 -0700
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Wed Feb 12 17:01:54 2014 -0700

----------------------------------------------------------------------
 .../api/response/ResourceTagResponse.java        | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/433a2e44/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
index 8044376..00db1b5 100644
--- a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
@@ -102,16 +102,16 @@ public class ResourceTagResponse extends BaseResponse implements ControlledViewE
         this.customer = customer;
     }
 
-    public String getResourceId() {
-        return this.resourceId;
+    public String getKey() {
+        return this.key;
     }
 
     @Override
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        String rId = this.getResourceId();
-        result = prime * result + ((rId== null) ? 0 : rId.hashCode());
+        String key = this.getKey();
+        result = prime * result + ((key == null) ? 0 : key.hashCode());
         return result;
     }
 
@@ -121,13 +121,14 @@ public class ResourceTagResponse extends BaseResponse implements ControlledViewE
             return true;
         if (obj == null)
             return false;
-        if (this.getClass() != obj.getClass())
+        if (getClass() != obj.getClass())
             return false;
         ResourceTagResponse other = (ResourceTagResponse) obj;
-        String rId = this.getResourceId();
-        if (rId == null && other.getResourceId() != null) {
-            return false;
-        } else if (!rId.equals(other.getResourceId()))
+        String key = this.getKey();
+        if (key == null) {
+            if (other.getKey() != null)
+                return false;
+        } else if (!key.equals(other.getKey()))
             return false;
         return true;
     }