struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r750965 - in /struts/struts2/trunk/plugins/convention/src: main/java/org/apache/struts2/convention/ConventionsServiceImpl.java test/java/org/apache/struts2/convention/PackageBasedActionConfigBuilderTest.java
Date Fri, 06 Mar 2009 16:36:22 GMT
Author: musachy
Date: Fri Mar  6 16:36:22 2009
New Revision: 750965

URL: http://svn.apache.org/viewvc?rev=750965&view=rev
Log:
WW-3023 Use ClassLoaderUtils to resolve the class in ConcentionServiceImpl

thanks to Travis Rein for the patch


Modified:
    struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
    struts/struts2/trunk/plugins/convention/src/test/java/org/apache/struts2/convention/PackageBasedActionConfigBuilderTest.java

Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java?rev=750965&r1=750964&r2=750965&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
(original)
+++ struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
Fri Mar  6 16:36:22 2009
@@ -26,6 +26,7 @@
 
 import org.apache.struts2.convention.annotation.AnnotationTools;
 import org.apache.struts2.convention.annotation.ResultPath;
+import org.apache.struts2.util.ClassLoaderUtils;
 
 import com.opensymphony.xwork2.config.ConfigurationException;
 import com.opensymphony.xwork2.config.entities.ActionConfig;
@@ -94,7 +95,7 @@
         }
 
         try {
-            return determineResultPath(Class.forName(actionConfig.getClassName()));
+            return  determineResultPath(ClassLoaderUtils.loadClass(actionConfig.getClassName(),
this.getClass()));
         } catch (ClassNotFoundException e) {
             throw new RuntimeException("Invalid action class configuration that references
an unknown " +
                 "class named [" + actionConfig.getClassName() + "]", e);

Modified: struts/struts2/trunk/plugins/convention/src/test/java/org/apache/struts2/convention/PackageBasedActionConfigBuilderTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/test/java/org/apache/struts2/convention/PackageBasedActionConfigBuilderTest.java?rev=750965&r1=750964&r2=750965&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/convention/src/test/java/org/apache/struts2/convention/PackageBasedActionConfigBuilderTest.java
(original)
+++ struts/struts2/trunk/plugins/convention/src/test/java/org/apache/struts2/convention/PackageBasedActionConfigBuilderTest.java
Fri Mar  6 16:36:22 2009
@@ -287,6 +287,7 @@
         mockContainer.setConventionsService(new ConventionsServiceImpl(""));
 
         PackageBasedActionConfigBuilder builder = new PackageBasedActionConfigBuilder(configuration,
mockContainer ,of, "false", "struts-default");
+        builder.setFileProtocols("jar");
         if (actionPackages != null) {
             builder.setActionPackages(actionPackages);
         }



Mime
View raw message