jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: 3.1.3.1 Removing Items
Date Mon, 23 Jul 2007 20:00:06 GMT
IvanLatysh wrote:
> And a call:
> setAge((Integer)null) - where I pass null reference as Integer.

this is not correct. just because you can cast null to any reference type does 
not mean that the type of your so called 'null value' is an Integer. The cast is 
only there to indicate the compiler which method to chose if it is overloaded. 
e.g. you might have setAge(Double age) and setAge(Integer age). if there's just 
the latter signature the cast is redundant and unnecessary.

regards
  marcel

Mime
View raw message