From 62ce92b371fcf52dff46ba9f3370d1d46050feb6 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Tue, 7 Feb 2023 11:47:39 +0100 Subject: [PATCH] Casting to String, in order to avoid GWT serialization issue, see #24537#note-9 and #24432 --- .../ConvertToDataValueObjectModel.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java index 9610900..7594b3f 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java +++ b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java @@ -527,8 +527,8 @@ public class ConvertToDataValueObjectModel { project.getProfileVersion() != null ? project.getProfileVersion().getValue() : ""); theProject.setVersion(project.getVersion() != null ? project.getVersion().getValue() : ""); - theProject.setTheDocument(toGenericDocumentDV(project.getId(), project.getTheDocument(), DocumentDV.class, - projectReader.getListDocumentKeys(), projectReader.isIncludeFullDocumentMap())); + + theProject.setTheDocument(toGenericDocumentDV(project.getId(), project.getTheDocument(), DocumentDV.class, projectReader.getListDocumentKeys(), projectReader.isIncludeFullDocumentMap())); List relations = project.getRelationships(); @@ -1003,8 +1003,11 @@ public class ConvertToDataValueObjectModel { } } } - - documentAsMap.put(key, value); + + //Casting to String, in order to avoid GWT serialization issue, see #24537#note-9 and #24432 + String valueString = value!=null?value+"":null; + + documentAsMap.put(key, valueString); return documentAsMap; }