From 20914f3f0663f0260dabb4e0560264a02c4a8afa Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 15 May 2023 17:33:26 +0200 Subject: [PATCH] Fixed cache --- .../contexts/ServerContextCache.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ServerContextCache.java b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ServerContextCache.java index 4a76258..5d91115 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ServerContextCache.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ServerContextCache.java @@ -169,7 +169,7 @@ public class ServerContextCache extends ContextCache { Context contextNoMeta = new ContextImpl(c.getName()); contextNoMeta.setMetadata(null); - contextWithMeta.setID(uuid); + contextNoMeta.setID(uuid); this.contextsNoMeta.add(contextNoMeta); this.uuidToContextNoMeta.put(uuid, contextNoMeta); @@ -188,11 +188,11 @@ public class ServerContextCache extends ContextCache { UUID parentUUID = ipo.getSource().getID(); Context parentWithMeta = this.uuidToContext.get(parentUUID); - IsParentOf isParentOf = new IsParentOfImpl(parentWithMeta, contextMeta); - isParentOf.setID(parentUUID); - isParentOf.setMetadata(ipo.getMetadata()); - parentWithMeta.addChild(isParentOf); - contextMeta.setParent(isParentOf); + IsParentOf isParentOfWithMeta = new IsParentOfImpl(parentWithMeta, contextMeta); + isParentOfWithMeta.setID(parentUUID); + isParentOfWithMeta.setMetadata(ipo.getMetadata()); + parentWithMeta.addChild(isParentOfWithMeta); + contextMeta.setParent(isParentOfWithMeta); Context parentWithMetaPrivacy = this.uuidToContextMetaPrivacy.get(parentUUID); IsParentOf isParentOfMetaPrivacy = new IsParentOfImpl(parentWithMetaPrivacy, contextMetaPrivacy);