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:
committed by
Ilkka Seppälä
parent
310ae50248
commit
cd2a2e7711
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user