This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
SourceLevelQuery.getSourceLevel says to see tool docs for acceptable return values; technotes/tools/solaris/javac.html#options gives "6" as a synonym for "1.6", etc. Yet the SOURCE_LEVEL pattern will reject this if supplied by SourceLevelQueryImplementation or SourceLevelQueryImplementation2.Result (whose Javadoc lists the 1.x formats as examples but is otherwise silent on acceptable values). Since API clients should not have to deal with synonyms, and SPI implementations such as Maven's might be coming across e.g. <source>6</source>, I would propose that SourceLevelQuery accept \d+ versions but quietly prefix them with "1." before returning. Alternately, document that SLQI must return versions in canonical form, and make impls such as MavenSourceLevelImpl do this conversion.
>I would propose that SourceLevelQuery accept \d+ versions but quietly prefix >them with "1." before returning. Yes. It's how it should work.
Fixed jet-main 3e8c0b35fa3f
Integrated into 'main-golden', will be available in build *201206080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/3e8c0b35fa3f User: Tomas Zezula <tzezula@netbeans.org> Log: #202329:Clarification of "1.6" vs. "6" in SourceLevelQuery