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 116490 - [60cat] Source Level cannot be changed to 1.6 in web project
Summary: [60cat] Source Level cannot be changed to 1.6 in web project
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 116460 117908 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-24 10:56 UTC by jlaskowski
Modified: 2007-10-08 13:12 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch (5.97 KB, patch)
2007-09-28 11:13 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jlaskowski 2007-09-24 10:56:46 UTC
[ BUILD # : 200709200000 ]
[ JDK VERSION : 1.6.2 ]

Following the article at http://www.netbeans.org/kb/60/websvc/jax-ws.html, I came across an issue with changing Source Level parameter in the web application - CalculatorWSServletClient.

Open Properties window, select Sources and change Source Level to 1.6. No error/warning message is displayed and I assumed it went fine. Open Properties window again and 1.5 is selected not 1.6.
Comment 1 Milos Kleint 2007-09-24 11:15:06 UTC
reassigning, related to web projects
Comment 2 Tomas Mysik 2007-09-24 11:29:30 UTC
I will look at it.
Comment 3 Tomas Mysik 2007-09-24 12:36:50 UTC
The reason for this behaviour is explained in issue 89131. I will investigate more.
Comment 4 Tomas Mysik 2007-09-24 12:39:06 UTC
*** Issue 116460 has been marked as a duplicate of this issue. ***
Comment 5 Tomas Mysik 2007-09-24 12:52:27 UTC
So, I think in general there's no reason to set source level to 1.6 because there are no extra language features for 
Java 6 so source level 1.5 ensures "wider" compatibility (JDK 6 is not available for all platforms, not all users have 
JDK 6 etc.)

Another question is that in the IDE there's a possibility to change source level to 1.6 so I think that:
- it should work or
- it shouldn't be there

I will discuss it with my colleagues and let you know. Feel free to add comments as well. Thank you.
Comment 6 Tomas Mysik 2007-09-26 09:54:28 UTC
Jesse (email):
----------------------- >% -----------------------
If it only applied to actual source compatibility, I think probably it 
should not be there. However there is one subtlety. For the first time 
in JDK 6 (that I know of) there was a new bytecode format (for the split 
verifier) without a new source format. javac, AFAIK, will use -target 
1.6 as the default if you specify -source 1.6 but not if -source 1.5. 
Currently we do not offer a special GUI control for bytecode format 
(-target), though we do have javac.target in project.properties (i.e. we 
always give the target level explicitly, not relying on javac or Ant to 
default it). For people actually deploying to JDK 6+ (probably still a 
small fraction of our users), it is preferable to use -target 1.6 
because of the faster class loading. Possibly we should have these options:

LABEL              -source  -target
-----------------------------------
JDK 1.3            1.3      1.3
JDK 1.4            1.4      1.4
JDK 5              1.5      1.5
JDK 6              1.5      1.6

with the dropdown labelled e.g. "Source/Binary Format".

Confusing or clear? I'm not sure. It's more of a UI question. Whatever 
we do, it should be done consistently across the applicable project types.
----------------------- >% -----------------------

Tomas Zezula and me agree with Jesse, so reassigning to Tomas, to J2SEProject. Then I will implement this change in 
all the J2EE project types. Please feel free to add any comments/ideas. Thank you.
Comment 7 Tomas Zezula 2007-09-26 09:59:06 UTC
Seems fine, thanks.
Comment 8 Jesse Glick 2007-09-26 18:01:19 UTC
Don't forget that this would be a

http://wiki.netbeans.org/wiki/view/NB6LateUIChanges
Comment 9 Tomas Zezula 2007-09-28 09:49:29 UTC
Jano, I am going to change it as Jesse described. Do you agree with described UI change?
Comment 10 Tomas Zezula 2007-09-28 11:13:22 UTC
Created attachment 49729 [details]
Patch
Comment 11 Tomas Zezula 2007-09-28 11:14:14 UTC
I will integrate the patch if Jano agrees.
Comment 12 Jesse Glick 2007-09-28 16:49:16 UTC
Use "Source/&Binary Format:", not MNE_SourceLevel.

I'm not sure what the code in getDisplayName is doing but maybe just .replaceFirst("^1\\.([5-9]|\\d\\d+)$", "$1") would
be simpler?
Comment 13 Tomas Zezula 2007-10-01 14:56:50 UTC
If there are no UI complains I will integrate it tomorrow.
Comment 14 Tomas Zezula 2007-10-02 13:31:45 UTC
Fixed in j2seproject.

Checking in org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties,v  <--  Bundle.properties
new revision: 1.93; previous revision: 1.92
done
Checking in org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.form;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.form,v  <-- 
CustomizerSources.form
new revision: 1.13; previous revision: 1.12
done
Checking in org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.java,v  <-- 
CustomizerSources.java
new revision: 1.23; previous revision: 1.22
done
Checking in org/netbeans/modules/java/j2seproject/ui/customizer/PlatformUiSupport.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/PlatformUiSupport.java,v  <-- 
PlatformUiSupport.java
new revision: 1.24; previous revision: 1.23
done
Comment 15 Tomas Zezula 2007-10-05 12:10:00 UTC
Checking in org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java,v  <-- 
J2SEProjectProperties.java
new revision: 1.69; previous revision: 1.68
done
Checking in org/netbeans/modules/java/j2seproject/ui/customizer/PlatformUiSupport.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/PlatformUiSupport.java,v  <-- 
PlatformUiSupport.java
new revision: 1.25; previous revision: 1.24
done
Comment 16 Tomas Mysik 2007-10-05 16:13:28 UTC
Fixed in Java EE project types. PlatformUiSupport are now again much more similar to J2SEProject's one.

Checking in web/project/src/org/netbeans/modules/web/project/ui/customizer/Bundle.properties;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/Bundle.properties,v  <--  Bundle.properties
new revision: 1.86; previous revision: 1.85
done
Checking in web/project/src/org/netbeans/modules/web/project/ui/customizer/CustomizerSources.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/CustomizerSources.java,v  <--  
CustomizerSources.java
new revision: 1.18; previous revision: 1.17
done
Checking in web/project/src/org/netbeans/modules/web/project/ui/customizer/PlatformUiSupport.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/PlatformUiSupport.java,v  <--  
PlatformUiSupport.java
new revision: 1.18; previous revision: 1.17
done
Checking in web/project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java,v  <--  
WebProjectProperties.java
new revision: 1.114; previous revision: 1.113
done
Checking in 
j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java,v  
<--  AppClientProjectProperties.java
new revision: 1.15; previous revision: 1.14
done
Checking in j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/Bundle.properties;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/Bundle.properties,v  <--  
Bundle.properties
new revision: 1.8; previous revision: 1.7
done
Checking in j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/CustomizerSources.form;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/CustomizerSources.form,v  <--  
CustomizerSources.form
new revision: 1.6; previous revision: 1.5
done
Checking in j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/CustomizerSources.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/CustomizerSources.java,v  <--  
CustomizerSources.java
new revision: 1.9; previous revision: 1.8
done
Checking in j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/PlatformUiSupport.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/PlatformUiSupport.java,v  <--  
PlatformUiSupport.java
new revision: 1.7; previous revision: 1.6
done
Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/api/EjbJarProjectGenerator.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/api/EjbJarProjectGenerator.java,v  <--  
EjbJarProjectGenerator.java
new revision: 1.19; previous revision: 1.18
done
Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/Bundle.properties;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/Bundle.properties,v  <--  
Bundle.properties
new revision: 1.29; previous revision: 1.28
done
Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/CustomizerSources.form;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/CustomizerSources.form,v  <--  
CustomizerSources.form
new revision: 1.7; previous revision: 1.6
done
Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/CustomizerSources.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/CustomizerSources.java,v  <--  
CustomizerSources.java
new revision: 1.11; previous revision: 1.10
done
Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java,v  <--  
EjbJarProjectProperties.java
new revision: 1.38; previous revision: 1.37
done
Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/PlatformUiSupport.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/PlatformUiSupport.java,v  <--  
PlatformUiSupport.java
new revision: 1.17; previous revision: 1.16
done
Comment 17 Milos Kleint 2007-10-08 13:12:37 UTC
*** Issue 117908 has been marked as a duplicate of this issue. ***