Author: almaw Date: Mon Jun 18 03:27:40 2007 New Revision: 548282 URL: http://svn.apache.org/viewvc?view=rev&rev=548282 Log: WICKET-625 - Wicket doesn't clean up properly when hot-deploying; hangs onto Class references. (partial fix, work in progress)
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java?view=diff&rev=548282&r1=548281&r2=548282 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java Mon Jun 18 03:27:40 2007 @@ -40,6 +40,7 @@ import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.protocol.http.WebRequestCycle; import org.apache.wicket.protocol.http.servlet.AbortWithWebErrorCodeException; +import org.apache.wicket.util.lang.Classes; import org.apache.wicket.util.lang.PackageName; import org.apache.wicket.util.lang.Packages; import org.apache.wicket.util.resource.IResourceStream; @@ -456,7 +457,7 @@ private final String path; /** The scoping class, used for class loading and to determine the package. */ - private final Class scope; + private final String scopeName; /** The resource's style */ private final String style; @@ -488,7 +489,7 @@ + " may not be accessed"); } - this.scope = scope; + this.scopeName = scope.getName(); this.path = path; this.locale = locale; this.style = style; @@ -541,7 +542,7 @@ { // Locate resource IResourceStream resourceStream = Application.get().getResourceSettings() - .getResourceStreamLocator().locate(scope, absolutePath, style, locale, null); + .getResourceStreamLocator().locate(getScope(), absolutePath, style, locale, null); // Check that resource was found if (resourceStream == null) @@ -570,7 +571,7 @@ */ public final Class getScope() { - return scope; + return Classes.resolveClass(scopeName); } /**