knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject knox git commit: KNOX-525 - followup to fix bug where null url overwrites a valid urls member variable
Date Thu, 02 Apr 2015 21:13:37 GMT
Repository: knox
Updated Branches:
  refs/heads/master 74ce27e99 -> 571d8d2d6


KNOX-525 - followup to fix bug where null url overwrites a valid urls member variable

Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/571d8d2d
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/571d8d2d
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/571d8d2d

Branch: refs/heads/master
Commit: 571d8d2d67d48a56b85caf04f3c5a12c0299c12c
Parents: 74ce27e
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Thu Apr 2 17:13:05 2015 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Thu Apr 2 17:13:05 2015 -0400

----------------------------------------------------------------------
 .../hadoop/gateway/services/registry/impl/RegEntry.java      | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/571d8d2d/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/RegEntry.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/RegEntry.java
b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/RegEntry.java
index c8bef88..832821c 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/RegEntry.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/RegEntry.java
@@ -46,7 +46,7 @@ public class RegEntry {
   }
 
   public List<String> getUrls() {
-    if (urls == null && url != null) {
+    if (urls == null && url != null && !"null".equals(url)) {
       urls = new ArrayList<String>();
       urls.add(url);
     }
@@ -56,10 +56,4 @@ public class RegEntry {
   public void setUrls( List<String> urls) {
     this.urls = urls;
   }
-
-  public void setUrl( String url) {
-    ArrayList<String> urls = new ArrayList<String>();
-    urls.add(url);
-    this.urls = urls;
-  }
 }
\ No newline at end of file


Mime
View raw message