From 5aad485d06f8845c36ce84405adb8545f21b11e0 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 10 May 2023 17:50:40 +0200 Subject: [PATCH] Improved code --- .../resourceregistry/api/contexts/ContextCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/api/contexts/ContextCache.java b/src/main/java/org/gcube/informationsystem/resourceregistry/api/contexts/ContextCache.java index 495fd19..dec0a70 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/contexts/ContextCache.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/contexts/ContextCache.java @@ -187,12 +187,12 @@ public class ContextCache { public synchronized Context getContextByUUID(String uuid) throws ResourceRegistryException { refreshContextsIfNeeded(); - return uuidToContext.get(UUID.fromString(uuid)); + return getContextByUUID(UUID.fromString(uuid)); } public synchronized Context getContextByFullName(String contextFullName) throws ResourceRegistryException { UUID uuid = getUUIDByFullName(contextFullName); - return uuidToContext.get(uuid); + return getContextByUUID(uuid); } /**