tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brill Pappin" <>
Subject Re: Q: problem with authentication
Date Thu, 03 Feb 2000 11:02:40 GMT
> First the line if(...user=="") seems like a bug, you should code
> instead.

It is the wrong way to do it... the == will test for equality of instance
(not content). In this case it might actually work, because two strings with
the same content are the same memory object... but this is only because the
Sun VM does it this way... in another VM, you *might* get a different

it should be: if(user == null || user.length() == 0){

- Brill Pappin

View raw message