Author: knopp Date: Sun Sep 21 11:23:18 2008 New Revision: 697574 URL: http://svn.apache.org/viewvc?rev=697574&view=rev Log: (empty)
Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java?rev=697574&r1=697573&r2=697574&view=diff ============================================================================== --- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java (original) +++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java Sun Sep 21 11:23:18 2008 @@ -28,9 +28,9 @@ import org.apache._wicket.request.encoder.parameters.PageParametersEncoder; import org.apache.wicket.Page; import org.apache.wicket.RequestListenerInterface; -import org.apache.wicket.Session; import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.protocol.http.PageExpiredException; +import org.apache.wicket.util.lang.Classes; import org.apache.wicket.util.string.Strings; /** @@ -247,30 +247,13 @@ * @param name * @return class */ - @SuppressWarnings("unchecked") protected Class<? extends IPage> getPageClass(String name) { if (name == null) { throw new IllegalArgumentException("Argument 'name' may not be null"); } - try - { - if (Session.exists()) - { - Session s = Session.get(); - return (Class<? extends IPage>)s.getClassResolver().resolveClass(name); - - } - else - { - return (Class<? extends IPage>)Class.forName(name); - } - } - catch (ClassNotFoundException e) - { - throw new WicketRuntimeException("Error resolving bookmarkable page class", e); - } + return Classes.resolveClass(name); } /**