开发者

Java auto boxing

I switched a project I'm working on over to maven and suddenly auto boxing seems to have broken. My IDE (NetBeans) complains on lines such as the one below with the error "Incompatible types"

Integer order = 开发者_开发问答4;


Check to ensure you are still compiling with a post-1.5 JDK, and that your compatibility settings are not tuned down below 1.5 either.


The internal compiler (used for editor hints) will follow the source settings in the POM, to match the behavior of a full Maven build. Maven currently defaults to 1.3 as a source level: http://jira.codehaus.org/browse/MCOMPILER-80 You can change the source level by editing the POM, or (more easily) using the NetBeans project properties dialog.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜