6827026: Change javac source and target default to 7

Wed, 20 May 2009 13:36:23 -0700

author
jjg
date
Wed, 20 May 2009 13:36:23 -0700
changeset 286
79eb8795a1de
parent 285
4ce1c1400334
child 287
44eaac2b4501

6827026: Change javac source and target default to 7
Reviewed-by: darcy, ohair

make/Makefile file | annotate | diff | comparison | revisions
make/build.properties file | annotate | diff | comparison | revisions
make/build.xml file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/code/Source.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/jvm/Target.java file | annotate | diff | comparison | revisions
     1.1 --- a/make/Makefile	Tue May 19 15:07:15 2009 -0700
     1.2 +++ b/make/Makefile	Wed May 20 13:36:23 2009 -0700
     1.3 @@ -115,6 +115,14 @@
     1.4    endif
     1.5  endif 
     1.6  
     1.7 +ifdef SOURCE_LANGUAGE_VERSION
     1.8 +  ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
     1.9 +else
    1.10 +  ifdef JAVAC_SOURCE_ARG 
    1.11 +    ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
    1.12 +  endif
    1.13 +endif 
    1.14 +
    1.15  ifdef ALT_BOOTDIR
    1.16    ANT_OPTIONS += -Dboot.java.home=$(ALT_BOOTDIR)
    1.17    ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
     2.1 --- a/make/build.properties	Tue May 19 15:07:15 2009 -0700
     2.2 +++ b/make/build.properties	Wed May 20 13:36:23 2009 -0700
     2.3 @@ -32,7 +32,8 @@
     2.4  # boot.java.home = /opt/jdk/1.5.0 
     2.5  boot.java = ${boot.java.home}/bin/java
     2.6  boot.javac = ${boot.java.home}/bin/javac
     2.7 -boot.javac.target = 5
     2.8 +boot.javac.source = 6
     2.9 +boot.javac.target = 6
    2.10  
    2.11  # This is the JDK used to run the product version of the tools,
    2.12  # for example, for testing. If you're building a complete JDK, specify that.
    2.13 @@ -59,7 +60,8 @@
    2.14  bootstrap.full.version = ${bootstrap.release}-${build.number}
    2.15  
    2.16  # options for the <javac> tasks used to compile the tools
    2.17 -javac.target = 6
    2.18 +javac.source = 5
    2.19 +javac.target = 5
    2.20  javac.debug = true
    2.21  javac.debuglevel = source,lines
    2.22  javac.no.jdk.warnings = -XDignore.symbol.file=true
     3.1 --- a/make/build.xml	Tue May 19 15:07:15 2009 -0700
     3.2 +++ b/make/build.xml	Wed May 20 13:36:23 2009 -0700
     3.3 @@ -393,6 +393,7 @@
     3.4              <attribute name="java" default="java"/>
     3.5              <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
     3.6              <attribute name="javac.java.home" default="${boot.java.home}"/>
     3.7 +            <attribute name="javac.source" default="${javac.source}"/>
     3.8              <attribute name="javac.target" default="${javac.target}"/>
     3.9              <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
    3.10              <attribute name="jarclasspath" default=""/>
    3.11 @@ -411,6 +412,7 @@
    3.12                      release="@{release}"
    3.13                      full.version="@{full.version}"
    3.14                      javac.bootclasspath="@{javac.bootclasspath}"
    3.15 +                    javac.source="@{javac.source}"
    3.16                      javac.target="@{javac.target}"
    3.17                  />
    3.18                  <mkdir dir="@{bin.dir}"/>
    3.19 @@ -435,6 +437,7 @@
    3.20              <attribute name="lib.dir" default="${dist.lib.dir}"/>
    3.21              <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
    3.22              <attribute name="javac.java.home" default="${boot.java.home}"/>
    3.23 +            <attribute name="javac.source" default="${javac.source}"/>
    3.24              <attribute name="javac.target" default="${javac.target}"/>
    3.25              <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
    3.26              <attribute name="jarclasspath" default=""/>
    3.27 @@ -450,6 +453,7 @@
    3.28                      release="@{release}"
    3.29                      full.version="@{full.version}"
    3.30                      javac.bootclasspath="@{javac.bootclasspath}"
    3.31 +                    javac.source="@{javac.source}"
    3.32                      javac.target="@{javac.target}"
    3.33                  />
    3.34                  <mkdir dir="@{lib.dir}"/>
    3.35 @@ -474,6 +478,7 @@
    3.36              <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
    3.37              <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
    3.38              <attribute name="javac.java.home" default="${boot.java.home}"/>
    3.39 +            <attribute name="javac.source" default="${javac.source}"/>
    3.40              <attribute name="javac.target" default="${javac.target}"/>
    3.41              <attribute name="release" default="${release}"/>
    3.42              <attribute name="full.version" default="${full.version}"/>
    3.43 @@ -502,6 +507,7 @@
    3.44                         includes="@{includes}"
    3.45                         sourcepath=""
    3.46                         includeAntRuntime="no"
    3.47 +                       source="@{javac.source}"
    3.48                         target="@{javac.target}">
    3.49                      <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>
    3.50                      <compilerarg line="${javac.version.opt}"/>
    3.51 @@ -515,6 +521,7 @@
    3.52                         excludes="@{excludes}"
    3.53                         sourcepath=""
    3.54                         includeAntRuntime="no"
    3.55 +                       source="@{javac.source}"
    3.56                         target="@{javac.target}"
    3.57                         debug="${javac.debug}" 
    3.58                         debuglevel="${javac.debuglevel}">
    3.59 @@ -540,6 +547,7 @@
    3.60      <target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool">
    3.61          <presetdef name="build-bootstrap-tool">
    3.62              <build-tool
    3.63 +                javac.source="${boot.javac.source}"
    3.64                  javac.target="${boot.javac.target}"
    3.65                  gensrc.dir="${build.bootstrap.dir}/gensrc"
    3.66                  classes.dir="${build.bootstrap.dir}/classes"
    3.67 @@ -555,6 +563,7 @@
    3.68      <target name="-def-build-bootstrap-jar" depends="-def-build-jar">
    3.69          <presetdef name="build-bootstrap-jar">
    3.70              <build-jar
    3.71 +                javac.source="${boot.javac.source}"
    3.72                  javac.target="${boot.javac.target}"
    3.73                  gensrc.dir="${build.bootstrap.dir}/gensrc"
    3.74                  classes.dir="${build.bootstrap.dir}/classes"
     4.1 --- a/src/share/classes/com/sun/tools/javac/code/Source.java	Tue May 19 15:07:15 2009 -0700
     4.2 +++ b/src/share/classes/com/sun/tools/javac/code/Source.java	Wed May 20 13:36:23 2009 -0700
     4.3 @@ -95,7 +95,7 @@
     4.4          this.name = name;
     4.5      }
     4.6  
     4.7 -    public static final Source DEFAULT = JDK1_5;
     4.8 +    public static final Source DEFAULT = JDK1_7;
     4.9  
    4.10      public static Source lookup(String name) {
    4.11          return tab.get(name);
     5.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Target.java	Tue May 19 15:07:15 2009 -0700
     5.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Target.java	Wed May 20 13:36:23 2009 -0700
     5.3 @@ -108,7 +108,7 @@
     5.4          this.minorVersion = minorVersion;
     5.5      }
     5.6  
     5.7 -    public static final Target DEFAULT = JDK1_6;
     5.8 +    public static final Target DEFAULT = JDK1_7;
     5.9  
    5.10      public static Target lookup(String name) {
    5.11          return tab.get(name);

mercurial