Stefan, Your work-around - if(principal == null) principal = "" - is exactly what I have added to avoid the null pointer.
With both authentication and authorization from slide disabled, and nothing being asserted at the tomcat level by way of authentication, I would have assumed that req.getUserPrincipal() should return a null object, not simply a Principal object with a null name. In the meantime, I've added the null check on the principal string. Thanks for your response. Jonathan -----Original Message----- From: Stefan L�tzkendorf [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:41 PM To: Slide Developers Mailing List Subject: Re: Null Pointer in webdav LogFilter 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
