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.

Bug 68477 - [50cat] Java source level is not set by the active platform
Summary: [50cat] Java source level is not set by the active platform
Status: CLOSED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kubec
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2005-11-10 16:43 UTC by cezariusz
Modified: 2015-03-31 15:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2005-11-10 16:43:10 UTC
[ 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;
Comment 1 cezariusz 2005-11-10 17:20:53 UTC
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?
Comment 2 Pavel Buzek 2005-11-10 19:24:03 UTC
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.
Comment 3 cezariusz 2005-11-10 21:39:00 UTC
Thanks Petre for the detailed explanation!
Comment 4 Jaroslav Pospisil 2006-03-13 13:43:52 UTC
TM 5.0->TBD
Comment 5 Milan Kubec 2006-06-19 15:01:58 UTC
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}.
Comment 6 Milan Kubec 2006-06-20 11:42:47 UTC
Is there any restriction of setting the Java platform for Web project?
Comment 7 Milan Kubec 2006-06-20 13:29:09 UTC
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.
Comment 8 cezariusz 2007-01-22 07:08:28 UTC
Verified