RE: [OT] if don't work?!?!?

2007-05-22 Thread Caldarale, Charles R
From: Massimiliano PASQUALONI [mailto:[EMAIL PROTECTED] Subject: if don't work?!?!? if (Pippo == on) { Guaranteed to be false. Pippo = request.getParameter(abilitato); Pluto = request.getParameter(abilitato); the if (Pippo == Pluto ) don't work! Also guaranteed to be

Re: [OT] if don't work?!?!?

2007-05-22 Thread Jost Richstein
No, that is not guaranteed to be false. For example Pippo.intern() == Pluto.intern() should be true. Caldarale, Charles R schrieb: From: Massimiliano PASQUALONI [mailto:[EMAIL PROTECTED] Subject: if don't work?!?!? if (Pippo == on) { Guaranteed to be false. Pippo =

Re: OT: if don't work?!?!?

2007-05-22 Thread DJohnson
This is not really a Tomcat question, but a matter of Java language understanding. Comparators like ==, , =, etc. should only be used with java language primitive types, such as int, byte, boolean, and NOT with Objects, like String, as you are, UNLESS you actually wish to test whether the two

RE: [OT] if don't work?!?!?

2007-05-22 Thread Caldarale, Charles R
From: Jost Richstein [mailto:[EMAIL PROTECTED] Subject: Re: [OT] if don't work?!?!? No, that is not guaranteed to be false. For example Pippo.intern() == Pluto.intern() should be true. The above certainly is correct, but is not what the OP coded. - Chuck THIS COMMUNICATION MAY

RE: [OT] if don't work?!?!?

2007-05-22 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: [OT] if don't work?!?!? String Pippo = on; if(Pippo == on) System.err.println(Pippo is on, man!); Again, that's not what the OP coded; Pippo was retrieved from the request, not set to a constant. Changing the context