ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Error setting property in case of a null value - How to map correctly ?
Date Fri, 02 Nov 2007 12:34:58 GMT
You are not thinking this through. :-)

Boxing means that you can push an int value into an Integer.

Unboxing means you can pull an int value out of an Integer.

If the Integer is null, what do you pull out of it?

Try this code:

Integer i = 5; // this is boxing.
int j = i;            // this is unboxing.
i = null;
j = i;                 // what happens here?

Larry

Mime
View raw message