Fallin, Jonathan A. wrote:

In trying to test this issue, I added a line
System.out.println(p.toString()) after the getUserPrinciple method in an
attempt to better understand the composition of the principle object.  The
result in the log is simply "null".  But if that's the case, why does the p
!= null check in the doFilter() method pass?

It seems that req.getUserPrincipal() returns a Principal with an name == null.

p.toString() has to throw an NPE of p is null

so p.tpString() returns the same as p.getName()  i.e. null

we should introduce a check
if (principal == null) principal = "";

Regards, Stefan


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to