commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r508152 - in /jakarta/commons/proper/configuration/trunk: RELEASE-NOTES.txt src/java/org/apache/commons/configuration/beanutils/BeanHelper.java xdocs/changes.xml
Date Thu, 15 Feb 2007 21:16:38 GMT
Author: oheger
Date: Thu Feb 15 13:16:37 2007
New Revision: 508152

URL: http://svn.apache.org/viewvc?view=rev&rev=508152
Log:
Class loading in BeanHelper is now done using ClassUtils from Commons Lang

Modified:
    jakarta/commons/proper/configuration/trunk/RELEASE-NOTES.txt
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/BeanHelper.java
    jakarta/commons/proper/configuration/trunk/xdocs/changes.xml

Modified: jakarta/commons/proper/configuration/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/RELEASE-NOTES.txt?view=diff&rev=508152&r1=508151&r2=508152
==============================================================================
--- jakarta/commons/proper/configuration/trunk/RELEASE-NOTES.txt (original)
+++ jakarta/commons/proper/configuration/trunk/RELEASE-NOTES.txt Thu Feb 15 13:16:37 2007
@@ -165,3 +165,6 @@
   use the recent available version. However older versions will still work.
 
 * A pom for maven 2 was added.
+
+* Class loading in BeanHelper is now done using ClassUtils of Commons Lang.
+

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/BeanHelper.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/BeanHelper.java?view=diff&rev=508152&r1=508151&r2=508152
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/BeanHelper.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/BeanHelper.java
Thu Feb 15 13:16:37 2007
@@ -25,6 +25,7 @@
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.commons.configuration.ConfigurationRuntimeException;
+import org.apache.commons.lang.ClassUtils;
 
 /**
  * <p>
@@ -293,29 +294,7 @@
     static Class loadClass(String name, Class callingClass)
             throws ClassNotFoundException
     {
-        ClassLoader loader = findClassLoader(callingClass);
-        return Class.forName(name, true, loader);
-    }
-
-    /**
-     * Determines which class loader should be used in the context of the given
-     * class.
-     *
-     * @param callingClass the calling class
-     * @return the class loader to be used
-     */
-    private static ClassLoader findClassLoader(Class callingClass)
-    {
-        ClassLoader loader = Thread.currentThread().getContextClassLoader();
-        if (loader == null)
-        {
-            loader = callingClass.getClassLoader();
-            if (loader == null)
-            {
-                loader = ClassLoader.getSystemClassLoader();
-            }
-        }
-        return loader;
+        return ClassUtils.getClass(name);
     }
 
     /**

Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/xdocs/changes.xml?view=diff&rev=508152&r1=508151&r2=508152
==============================================================================
--- jakarta/commons/proper/configuration/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Thu Feb 15 13:16:37 2007
@@ -23,6 +23,10 @@
 
   <body>
     <release version="1.4-SNAPSHOT" date="in SVN">
+      <action dev="oheger" type="update">
+        Class loading in BeanHelper is now done using ClassUtils of Commons
+        Lang.
+      </action>
       <action dev="oheger" type="add" issue="CONFIGURATION-237" due-to="Nicolas de Loof">
         With ManagedReloadingStrategy a new reloading strategy for file-based
         configurations was added that can be triggered through JMX.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message