From fda1b553f65a635247aef1d31d5f614ba82cdb42 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 11 Nov 2022 12:01:04 +0100 Subject: [PATCH] Fixed condition --- .../resourceregistry/api/contexts/ContextCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 10a6987..3e79aa8 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 @@ -83,7 +83,7 @@ public class ContextCache { public void refreshContextsIfNeeded() throws ResourceRegistryException { Calendar now = Calendar.getInstance(); - if(now.after(expiringTime) || (contexts==null && contextCacheRenewal!=null)) { + if((now.after(expiringTime) || (contexts==null)) && contextCacheRenewal!=null) { try { List contexts = contextCacheRenewal.renew(); singleton.cleanCache(now);