Wow, what an absolutely ancient bug!! Its in the very first CVS revision.
Easy to see how it could slip through, though. I doubt many people have
properties of type java.lang.Character....
You get some kind of prize for that.
----- Original Message -----
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 7:17 PM
Subject: [Hibernate] Bug in CharacterType...
> Hi!
>
> The following code is found in CharacterType:
> public Object get(ResultSet rs, String name) throws SQLException {
>
> return new Character(rs.getString(name).charAt(0));
>
> }
>
>
>
> Shouldn't this be something like the following to avoid a possible null
> value ?!:
>
> public Object get(ResultSet rs, String name) throws SQLException {
>
> String s = rs.getString(name);
>
> if(s!=null) {
>
> return new Character(s.charAt(0));
>
> } else {
>
> return null;
>
> }
>
> }
>
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: Influence the future
> of Java(TM) technology. Join the Java Community
> Process(SM) (JCP(SM)) program now.
> http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel