简体   繁体   中英

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;

检查以确保您仍在使用1.5版之后的JDK进行编译,并且兼容性设置也不会调低到1.5以下。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM