문제

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;
도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top