You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2009/10/18 16:53:01 UTC

svn commit: r826455 - /wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java

Author: jdonnerstag
Date: Sun Oct 18 14:53:01 2009
New Revision: 826455

URL: http://svn.apache.org/viewvc?rev=826455&view=rev
Log:
WICKET-2530 fixed Class not found when using OSGI class loader

Modified:
    wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java

Modified: wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java?rev=826455&r1=826454&r2=826455&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java (original)
+++ wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java Sun Oct 18 14:53:01 2009
@@ -24,6 +24,7 @@
 import org.apache.wicket.Application;
 import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.proxy.IProxyTargetLocator;
+import org.apache.wicket.util.lang.Classes;
 
 import com.google.inject.Injector;
 import com.google.inject.Key;
@@ -76,7 +77,7 @@
 		try
 		{
 
-			Class< ? > clazz = Class.forName(data[0]);
+			Class< ? > clazz = Classes.resolveClass(data[0]);
 			if (argIndex < 0)
 			{
 				final Field field = clazz.getDeclaredField(data[1]);
@@ -87,7 +88,7 @@
 				Class< ? >[] paramTypes = new Class[data.length - 2];
 				for (int i = 2; i < data.length; i++)
 				{
-					paramTypes[i - 2] = Class.forName(data[i]);
+					paramTypes[i - 2] = Classes.resolveClass(data[i]);
 				}
 				final Method method = clazz.getDeclaredMethod(data[1], paramTypes);
 				type = method.getGenericParameterTypes()[argIndex];