changeset 2519:8ffabc1db29a

DependencyServices.hasService waits for service availability before timing out Reviewed-by: ebaron Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2016-November/021558.html
author Andrew Azores <aazores@redhat.com>
date Thu, 10 Nov 2016 15:23:19 -0500
parents b3aaa70143e2
children 2bc6a978f664
files common/core/src/main/java/com/redhat/thermostat/common/cli/DependencyServices.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/core/src/main/java/com/redhat/thermostat/common/cli/DependencyServices.java	Thu Nov 10 13:45:21 2016 +0100
+++ b/common/core/src/main/java/com/redhat/thermostat/common/cli/DependencyServices.java	Thu Nov 10 15:23:19 2016 -0500
@@ -79,7 +79,7 @@
     }
 
     public <T> boolean hasService(Class<T> serviceClass) {
-        return !getHolder(serviceClass).isEmpty();
+        return getService(serviceClass) != null;
     }
 
     /** @return the service, or {@code null} */