Java 11 migrate all remaining s (#1120)

* Moves saga to Java 11

* Moves semaphore to Java 11

* Moves servant to Java 11

* Moves serverless to Java 11

* Moves service-layer to Java 11

* Moves service-locator to Java 11

* Moves sharding to Java 11

* Moves singleton to Java 11

* Moves spatial-partition to Java 11

* Moves specification to Java 11

* Moves state to Java 11

* Moves step-builder to Java 11

* Moves strategy to Java 11

* Moves subclass-sandbox to Java 11

* Fixes checkstyle issues
This commit is contained in:
Anurag Agarwal
2020-01-04 22:06:08 +05:30
committed by Ilkka Seppälä
parent 310ae50248
commit cd2a2e7711
98 changed files with 718 additions and 855 deletions

View File

@@ -53,15 +53,14 @@ public class ServiceCache {
* @return {@link Service}
*/
public Service getService(String serviceName) {
Service cachedService = null;
for (String serviceJndiName : serviceCache.keySet()) {
if (serviceJndiName.equals(serviceName)) {
cachedService = serviceCache.get(serviceJndiName);
LOGGER.info("(cache call) Fetched service {}({}) from cache... !",
cachedService.getName(), cachedService.getId());
}
if (serviceCache.containsKey(serviceName)) {
var cachedService = serviceCache.get(serviceName);
var name = cachedService.getName();
var id = cachedService.getId();
LOGGER.info("(cache call) Fetched service {}({}) from cache... !", name, id);
return cachedService;
}
return cachedService;
return null;
}
/**