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.
[ BUILD # : 200511071900 ] [ JDK VERSION : 1.5.0_02 ] Steps to reproduce: 1. Create a new web application project 2. Select JDK 1.5 as Java platform 3. Use Java 5 syntax (generics, enum, foreach) Result: (try -source 1.5 to enable generics) private Vector<Object> ExtraFilterValues;
Sorry, I've just found the "Source level" property of the project. I was missleaded by the following comment in build-impl.xml: <!-- The two properties below are usually overridden --> <!-- by the active platform. Just a fallback. --> <property name="default.javac.source" value="1.4"/> <property name="default.javac.target" value="1.4"/> "active platform" is the keyword here - what does it mean then?
Cezariusz, these 2 properties are left over from the time when there was not the Source Level switch in web project properties a the "Java Platform" defined the source level and target. Now it is defined by Source Level (project.properties java.source and java.target -- the later is not visible in UI). default.java.source and default.java.target should be deleted from build-impl w/ the missleading comment BTW: active platform refers to "platform.active" in project properties.
Thanks Petre for the detailed explanation!
TM 5.0->TBD
I think that this issue is not only about deleting those lines from build-impl.xml, which is in fact not necessary, but also classes WebProjectUtilities and PlatformUiSupport have to be modified not to use references ${default.javac.target|source}.
Is there any restriction of setting the Java platform for Web project?
Reproducible only when creating Web Application project of type J2EE 1.4, which sets Source Level to 1.4 by default - then it's not possible to use 1.5 features. It means that if you select correct JDK platform 1.5 and Source Level 1.5 you will be able to use Generics.
Verified