diff --git a/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/EurekaNotificationServerListUpdater.java b/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/EurekaNotificationServerListUpdater.java index 2b388db7..e92affcf 100644 --- a/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/EurekaNotificationServerListUpdater.java +++ b/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/EurekaNotificationServerListUpdater.java @@ -83,10 +83,7 @@ public void run() { private int getCorePoolSize() { int propSize = poolSizeProp.get(); - if (propSize > 0) { - return propSize; - } - return 2; // default + return (propSize > 0)?propSize:2; // 2 = default } } diff --git a/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/LegacyEurekaClientProvider.java b/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/LegacyEurekaClientProvider.java index 5ccadc19..269e2357 100644 --- a/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/LegacyEurekaClientProvider.java +++ b/ribbon-eureka/src/main/java/com/netflix/niws/loadbalancer/LegacyEurekaClientProvider.java @@ -14,10 +14,6 @@ class LegacyEurekaClientProvider implements Provider { @Override public synchronized EurekaClient get() { - if (eurekaClient == null) { - eurekaClient = DiscoveryManager.getInstance().getDiscoveryClient(); - } - - return eurekaClient; + return (eurekaClient == null)?DiscoveryManager.getInstance().getDiscoveryClient():eurekaClient; } -} \ No newline at end of file +}