Repository: incubator-ranger
Updated Branches:
  refs/heads/tag-policy ea3bcb38e -> 96e450a43


RANGER-549: fix updateService() using Public API fails


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

Branch: refs/heads/tag-policy
Commit: 12ab54a0eb2a35c5bb9428c83dd003ce82732bab
Parents: c5f61c8
Author: Madhan Neethiraj <[email protected]>
Authored: Fri Jun 12 01:12:28 2015 -0700
Committer: Madhan Neethiraj <[email protected]>
Committed: Fri Jun 12 01:12:28 2015 -0700

----------------------------------------------------------------------
 .../ranger/plugin/model/validation/RangerServiceValidator.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/12ab54a0/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
----------------------------------------------------------------------
diff --git 
a/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
 
b/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
index 659249e..615e385 100644
--- 
a/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
+++ 
b/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
@@ -150,7 +150,7 @@ public class RangerServiceValidator extends RangerValidator 
{
                                                .becauseOf("service with the 
name[" + name + "] already exists")
                                                .build());
                                        valid = false;
-                               } else if (otherService != null && 
otherService.getId() !=null && otherService.getId() != id) {
+                               } else if (otherService != null && 
otherService.getId() !=null && !otherService.getId().equals(id)) {
                                        failures.add(new 
ValidationFailureDetailsBuilder()
                                                .field("id/name")
                                                .isSemanticallyIncorrect()

Reply via email to