I ran into this one a while ago .. but we switched to a 403 error instead of a
redirect resolution so I didn't bother to report it.
I do have a small problem with:
log.debug("Running Spring dependency injection for instance of ",
context.getActionBean().getClass().getSimpleName());
Since there's a good chance the log4j.properties isn't even turned up to debug.
I know the java doc for the log class says
* <p>A <em>wafer thin</em> wrapper around Commons logging that uses var-args to
make it
* much more efficient to call the logging methods in commons logging without
having to
* surround every call site with calls to Log.isXXXEnabled(). All the methods
on this
* class take a variable length list of arguments and, only if logging is
enabled for
* the level and channel being logged to, will those arguments be toString()'d
and
* appended together.</p>
That is great on the surface, the string building is avoided and the varargs is
very nice.
But you see log.trace("string1", reallyExpensiveOperation(), "or",
runtimeException(), "or", infiniteLoop()); can be just as bad as the
unnecessary string building the log class tried to take care of.
IDK if it were my code I'd use isXXXenabled everywhere, but I can see why one
would want to avoid that. Just something to consider, it may be worth looking
at any references to Log and see if it's worth making the change.
-----Original Message-----
From: Leonard Gestrin [mailto:[email protected]]
Sent: Tuesday, October 13, 2009 5:40 PM
To: Stripes Users List
Subject: [Stripes-users] SpringInterceptor defect?
Hello,
It appears there is a small defect in SpringInterceptor in stripes-1.5.1
I have two interceptors declared.
SpringInterceptor ,
SecurityInterceptor
Security interceptor checks permissions and might redirect request to outside
application if permissions don't pass by doing
RedirectResolution ret = new RedirectResolution("http://landingapp.com", false);
However, when it gets back springInterceptor.
This line
log.debug("Running Spring dependency injection for instance of ",
context.getActionBean().getClass().getSimpleName());
produces NPE because there is actionBean
my work around for now is to make sure SpringInterceptor goes after
SecurityIntercepor.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users