// Show internal error page
final IPageFactory pageFactory;
IRequestTarget requestTarget = requestCycle.getRequestTarget();
if (requestTarget instanceof IPageRequestTarget)
{
pageFactory = session.getPageFactory(((IPageRequestTarget)requestTarget)
.getPage());
}
else
{
pageFactory = session.getPageFactory();
}
is the if/else here really necessary?
public final Session.IPageFactory getPageFactory(final Page page)
{
if (page != null)
{
return page.getPageFactory();
}
return getPageFactory();
}
and
public final Page.IPageFactory getPageFactory()
{
return getSession().getPageFactory();
}
now since the above methods are final we go back to the session.getPageFactory() anyways - so it seems to me this is a waste of code. did i miss something?
session.getpagefactory(page) -> page.getpagefactory() -> session.getpagefactory() so just call session.getpagefactory () in the first place
-Igor
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop