geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1826554 - /geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/ClassConverter.java
Date Mon, 12 Mar 2018 14:55:35 GMT
Author: rmannibucau
Date: Mon Mar 12 14:55:35 2018
New Revision: 1826554

URL: http://svn.apache.org/viewvc?rev=1826554&view=rev
Log:
GERONIMO-6600 ensure to use TCCL in ClassConverter

Modified:
    geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/ClassConverter.java

Modified: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/ClassConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/ClassConverter.java?rev=1826554&r1=1826553&r2=1826554&view=diff
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/ClassConverter.java
(original)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/ClassConverter.java
Mon Mar 12 14:55:35 2018
@@ -33,7 +33,11 @@ public class ClassConverter implements C
             return null;
         }
         try {
-            return Class.forName(value);
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            if (loader == null) {
+                return Class.forName(value);
+            }
+            return Class.forName(value, true, loader);
         } catch (ClassNotFoundException e) {
             throw new IllegalArgumentException(e);
         }



Mime
View raw message