Showing posts with label auto boxing. Show all posts
Showing posts with label auto boxing. Show all posts

2007-03-22

autoboxing的bug么?

碰到这么个问题:

Double d = null;
double e = d;
System.out.println(e);

这会出问题, d不能自动autounboxing为double.会报nullPointer异常.
所以在做ibatis映射的时候, bean的属性需要是Double类型的.否则会有不必要的问题.
失望....