Bug 89131 - javac.source=1.7 is useless
javac.source=1.7 is useless
Status: RESOLVED FIXED
Product: javaee
Classification: Unclassified
Component: Web Project
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Radko Najman
issues@javaee
:
Depends on:
Blocks: 85672
  Show dependency treegraph
 
Reported: 2006-11-10 17:00 UTC by mslama
Modified: 2007-01-16 17:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Patch to workaround problem (1.32 KB, text/plain)
2006-11-13 16:08 UTC, mslama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mslama 2006-11-10 17:00:34 UTC
I need to test IDE with nightly Swing builds which are available for JDK 7.0
only and due to this bug it is not possible to use IDE at all as exception
dialog comes again and again..... It is for fresh dev build. Please fix it soon
as it is important for us to run IDE on JDK 1.7.

SEVERE [org.openide.util.RequestProcessor]
java.lang.IllegalArgumentException: invalid source release: 1.7
        at
com.sun.tools.javac.main.RecognizedOptions$GrumpyHelper.error(RecognizedOptions.java:75)
        at
com.sun.tools.javac.main.RecognizedOptions$15.process(RecognizedOptions.java:388)
        at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:247)
        at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:207)
        at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:54)
        at
org.netbeans.api.java.source.JavaSource.createJavacTask(JavaSource.java:738)
        at
org.netbeans.api.java.source.JavaSource.createJavacTask(JavaSource.java:704)
        at
org.netbeans.api.java.source.CompilationInfo.getJavacTask(CompilationInfo.java:226)
        at
org.netbeans.api.java.source.SourceUtils$JavaDocEnv.registerSource(SourceUtils.java:413)
        at
org.netbeans.api.java.source.CompilationInfo.<init>(CompilationInfo.java:76)
        at
org.netbeans.api.java.source.JavaSource.createCurrentInfo(JavaSource.java:1267)
        at
org.netbeans.api.java.source.JavaSource.addPhaseCompletionTask(JavaSource.java:620)
        at
org.netbeans.api.java.source.JavaSourceTaskFactory$3.addPhaseCompletionTask(JavaSourceTaskFactory.java:195)
        at
org.netbeans.api.java.source.JavaSourceTaskFactory.stateChangedImpl(JavaSourceTaskFactory.java:148)
        at
org.netbeans.api.java.source.JavaSourceTaskFactory.access$000(JavaSourceTaskFactory.java:54)
        at
org.netbeans.api.java.source.JavaSourceTaskFactory$1.run(JavaSourceTaskFactory.java:109)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:541)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:963)
Comment 1 mslama 2006-11-10 17:07:06 UTC
At least some workaround would be good for us. It happens when I open some java
source files from JDK using Favorites ie. it is not part of any project where I
could set source level.
Comment 2 mslama 2006-11-13 16:08:29 UTC
Created attachment 36015 [details]
Patch to workaround problem
Comment 3 mslama 2006-11-13 16:11:26 UTC
Reason for this problem is that javac from JDK 7.0 currently does not accept
source level 1.7. I attached patch to workaround this problem in IDE till javac
is fixed. (I assume javac from JDK 7.0 will accept source level 1.7.) It means
probably WONTFIX for this issue.
Comment 4 Jesse Glick 2006-11-13 17:04:11 UTC
IMHO even 1.6 should not be used as a source level by the IDE; AFAIK it is
identical to 1.5. For example, if you run the IDE using JDK 6 and create a
j2seproject, then run the IDE using JDK 5, it will mark the project as having a
broken reference simply because javac.source=1.6. This is silly. We should not
take source level blindly from JDK version. We should probably only be using

1.0 - early Java
1.1 - inner classes
1.4 - assertions
1.5 - generics etc.
1.7 - superpackages etc., when available
Comment 5 Jesse Glick 2006-12-05 20:51:51 UTC
BTW javac has already been fixed to accept -source 1.7:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6460494
Comment 6 Jesse Glick 2006-12-05 21:11:13 UTC
I can fix this one, I think.
Comment 7 Jesse Glick 2006-12-05 21:50:40 UTC
Since JDK 7 b03 supports -source 1.7 this is not a P2 any more IMHO.

web/project and perhaps j2ee/ejb[ej]arproject also need to be fixed to use 1.5
as a maximum default source level. BTW I noticed that ejbearproject is still
setting javac.source=${default.javac.source} which it should not as this is
dangerous (this was fixed long ago in j2seproject).

Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java;
/shared/data/ccvs/repository/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java,v
 <--  J2SEProjectGenerator.java
new revision: 1.52; previous revision: 1.51
done
Checking in
j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/DefaultSourceLevelQueryImpl.java;
/shared/data/ccvs/repository/java/j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/DefaultSourceLevelQueryImpl.java,v
 <--  DefaultSourceLevelQueryImpl.java
new revision: 1.3; previous revision: 1.2
done
Comment 8 Tomas Zezula 2006-12-06 08:24:19 UTC
I've also added a check into JavaSource which checks a validity of the source
level. The "java.lang.IllegalArgumentException: invalid source release: 1.7"
should not happen anymore.
Comment 9 Radko Najman 2007-01-16 17:58:35 UTC
Fixed web, ejb, ear and appclient projects.

Checking in
j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java,v
 <--  EarProjectGenerator.java
new revision: 1.24; previous revision: 1.23
done
Checking in
j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java,v
 <--  AppClientProjectGenerator.java
new revision: 1.6; previous revision: 1.5
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.7; previous revision: 1.6
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.3; previous revision: 1.2
done
Checking in
j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/wizards/J2eeVersionWarningPanel.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/wizards/J2eeVersionWarningPanel.java,v
 <--  J2eeVersionWarningPanel.java
new revision: 1.4; previous revision: 1.3
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.15; previous revision: 1.14
done
Checking in
j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/wizards/J2eeVersionWarningPanel.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/wizards/J2eeVersionWarningPanel.java,v
 <--  J2eeVersionWarningPanel.java
new revision: 1.3; previous revision: 1.2
done
Checking in
web/project/src/org/netbeans/modules/web/project/ui/wizards/J2eeVersionWarningPanel.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/wizards/J2eeVersionWarningPanel.java,v
 <--  J2eeVersionWarningPanel.java
new revision: 1.8; previous revision: 1.7
done
Checking in
j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/J2eeVersionWarningPanel.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/J2eeVersionWarningPanel.java,v
 <--  J2eeVersionWarningPanel.java
new revision: 1.6; previous revision: 1.5
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.14; previous revision: 1.13
done
Checking in
web/project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java;
/cvs/web/project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java,v
 <--  WebProjectUtilities.java
new revision: 1.11; previous revision: 1.10
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo