knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject knox git commit: KNOX-1465 - Remove explicit guava dependency from gateway-provider-ha
Date Thu, 27 Sep 2018 17:28:48 GMT
Repository: knox
Updated Branches:
  refs/heads/master b95b2510f -> 51659e413


KNOX-1465 - Remove explicit guava dependency from gateway-provider-ha

Signed-off-by: Kevin Risden <krisden@apache.org>


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

Branch: refs/heads/master
Commit: 51659e41397ebed5115e4afd7bfb16766be3b4d9
Parents: b95b251
Author: Kevin Risden <krisden@apache.org>
Authored: Thu Sep 27 12:28:50 2018 -0400
Committer: Kevin Risden <krisden@apache.org>
Committed: Thu Sep 27 13:28:31 2018 -0400

----------------------------------------------------------------------
 .../knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java  | 4 +---
 .../knox/gateway/ha/provider/impl/DefaultHaDescriptor.java      | 5 ++---
 .../apache/knox/gateway/ha/provider/impl/DefaultURLManager.java | 4 ++--
 3 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/51659e41/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
index 5d1f904..a51b515 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
@@ -42,8 +42,6 @@ import org.apache.http.impl.client.BasicCredentialsProvider;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
 
-import com.google.common.collect.Lists;
-
 /**
  * Base implementation of URLManager intended for query of Zookeeper active hosts. In
  * the event of a failure via markFailed, Zookeeper is queried again for active
@@ -101,7 +99,7 @@ public abstract class BaseZookeeperURLManager implements URLManager {
 
   @Override
   public synchronized List<String> getURLs() {
-    return Lists.newArrayList(this.urls.iterator());
+    return new ArrayList<>(this.urls);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/knox/blob/51659e41/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultHaDescriptor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultHaDescriptor.java
b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultHaDescriptor.java
index 6565392..ae74a2f 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultHaDescriptor.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultHaDescriptor.java
@@ -17,7 +17,6 @@
  */
 package org.apache.knox.gateway.ha.provider.impl;
 
-import com.google.common.collect.Lists;
 import org.apache.knox.gateway.ha.provider.HaDescriptor;
 import org.apache.knox.gateway.ha.provider.HaServiceConfig;
 
@@ -49,12 +48,12 @@ public class DefaultHaDescriptor implements HaDescriptor {
 
    @Override
    public List<HaServiceConfig> getServiceConfigs() {
-      return Lists.newArrayList(serviceConfigs.values());
+      return new ArrayList<>(serviceConfigs.values());
    }
 
    @Override
    public List<String> getServiceNames() {
-      return Lists.newArrayList(serviceConfigs.keySet());
+      return new ArrayList<>(serviceConfigs.keySet());
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/knox/blob/51659e41/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultURLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultURLManager.java
b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultURLManager.java
index 4d0b908..6f909c2 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultURLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/DefaultURLManager.java
@@ -17,13 +17,13 @@
  */
 package org.apache.knox.gateway.ha.provider.impl;
 
-import com.google.common.collect.Lists;
 import org.apache.knox.gateway.ha.provider.HaServiceConfig;
 import org.apache.knox.gateway.ha.provider.URLManager;
 import org.apache.knox.gateway.ha.provider.impl.i18n.HaMessages;
 import org.apache.knox.gateway.i18n.messages.MessagesFactory;
 
 import java.net.URI;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ConcurrentLinkedQueue;
 
@@ -66,7 +66,7 @@ public class DefaultURLManager implements URLManager {
 
   @Override
   public synchronized List<String> getURLs() {
-    return Lists.newArrayList(urls.iterator());
+    return new ArrayList<>(urls);
   }
 
   @Override


Mime
View raw message