Richard Hill-7 wrote: > > You don't say what line your getting your npe but I'm guessing it's > this: > > if(user.getUserType().equalsIgnoreCase("Admin") > > if .getUserType() is null as you imply it can be then > calling .equalsIgnorecase() is going to result in an npe. >
Ye thats the line im getting it on. Yes everybodys userType will be null after the first user who was set to Admin. How do I get around this or is it possible? I thought you could just: public boolean adminUser() { if(user.getUserType().equalsIgnoreCase("Admin")) { adminUser = true; setAdminUser(true); } else if(user.getUserType().equalsIgnoreCase(null)) { adminUser = false; } return adminUser; } However it never goes by the first if when the user is not an admin user.. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Object-creator-set-to-null-tp4290653p4290718.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org