You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2020/12/22 15:22:49 UTC
[cxf] branch master updated: CXF-8340: GraalVM native image fails
to run. Fixing synchronization issue (instance vs static)
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 2f93e6f CXF-8340: GraalVM native image fails to run. Fixing synchronization issue (instance vs static)
2f93e6f is described below
commit 2f93e6f2a246869d8c1b6fce496f2f833501053a
Author: reta <dr...@gmail.com>
AuthorDate: Tue Dec 22 10:21:05 2020 -0500
CXF-8340: GraalVM native image fails to run. Fixing synchronization issue (instance vs static)
---
.../java/org/apache/cxf/common/spi/ClassGeneratorClassLoader.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/src/main/java/org/apache/cxf/common/spi/ClassGeneratorClassLoader.java b/core/src/main/java/org/apache/cxf/common/spi/ClassGeneratorClassLoader.java
index 442deb5..8cee8ff 100644
--- a/core/src/main/java/org/apache/cxf/common/spi/ClassGeneratorClassLoader.java
+++ b/core/src/main/java/org/apache/cxf/common/spi/ClassGeneratorClassLoader.java
@@ -80,7 +80,8 @@ public class ClassGeneratorClassLoader {
protected Class<?> findClass(String className, ClassLoader classLoader) {
return getOrCreateLoader(classLoader).lookupDefinedClass(className);
}
- private synchronized TypeHelperClassLoader getOrCreateLoader(Class<?> cls) {
+
+ private static synchronized TypeHelperClassLoader getOrCreateLoader(Class<?> cls) {
WeakReference<TypeHelperClassLoader> ref = CLASS_MAP.get(cls);
TypeHelperClassLoader ret;
if (ref == null || ref.get() == null) {
@@ -91,7 +92,8 @@ public class ClassGeneratorClassLoader {
}
return ret;
}
- private synchronized TypeHelperClassLoader getOrCreateLoader(ClassLoader l) {
+
+ private static synchronized TypeHelperClassLoader getOrCreateLoader(ClassLoader l) {
WeakReference<TypeHelperClassLoader> ref = LOADER_MAP.get(l);
TypeHelperClassLoader ret;
if (ref == null || ref.get() == null) {