phew, my world is still turning the right way.. That means the code *is* redundant, IMO.

Baltz, Kenneth wrote:
OK, I had to know, so I looked it up:

From the Java Language Specification 15.20.2:
At run time, the result of the instanceof operator is true if the value of
the RelationalExpression is not null and the reference could be cast
(�15.16) to the ReferenceType without raising a ClassCastException.
Otherwise the result is false.

K.C.


-----Original Message-----
From: Paul Libbrecht [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 2:38 PM
To: Jakarta Commons Users List
Subject: Re: [jelly] code question



Le jeudi, 16 jan 2003, � 23:21 Europe/Berlin, Christian Sell a �crit :

my question is: doesnt "value instanceof Class" always
return false if
value is null? Isnt the null check therefore redundant?
I do not think it does return false. On the contrary, null can be of any class as far as my experience goes...

Paul


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




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

Reply via email to