Skip to content

Commit 6999207

Browse files
authored
SDT FromJson method was not working after Spring Boot hot reload. (#1016)
Issue: 206097
1 parent 21a0fa0 commit 6999207

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

common/src/main/java/com/genexus/xml/GXXMLSerializable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ private void collectionFromJSONArray(JSONArray jsonArray, GXSimpleCollection gxC
497497
}
498498

499499
// cache of methods for classes, inpruve perfomance, becuase each intance get all methods each time called.
500-
private static transient ConcurrentHashMap<String, ConcurrentHashMap<String, Method>> classesCacheMethods = new ConcurrentHashMap<>();
500+
public static transient ConcurrentHashMap<String, ConcurrentHashMap<String, Method>> classesCacheMethods = new ConcurrentHashMap<>();
501501
// cache of methods names, inpruve perfomance.
502502
private static transient ConcurrentHashMap<String, String> toLowerCacheMethods = new ConcurrentHashMap<>();
503503

gxspringboot/src/main/java/com/genexus/springboot/GXConfig.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import com.genexus.diagnostics.core.ILogger;
66
import com.genexus.diagnostics.core.LogManager;
77
import com.genexus.servlet.CorsFilter;
8+
import com.genexus.xml.GXXMLSerializable;
9+
import jakarta.annotation.PreDestroy;
810
import org.springframework.boot.web.servlet.FilterRegistrationBean;
911
import org.springframework.beans.factory.annotation.Value;
1012
import org.springframework.context.annotation.Bean;
@@ -75,4 +77,9 @@ public FilterRegistrationBean<UrlRewriteFilter> urlRewriteFilter() {
7577
}
7678
return registrationBean;
7779
}
80+
81+
@PreDestroy
82+
public void onDestroy() {
83+
GXXMLSerializable.classesCacheMethods.clear();
84+
}
7885
}

0 commit comments

Comments
 (0)