# HG changeset patch # User jjg # Date 1242852950 25200 # Node ID 345857eb0f3bf3c2ac2adb1fe21760f08b6f9f93 # Parent 85e23f3ff2111b132d28650488b81387ddff74c1 6827026: Change javac source and target default to 7 Reviewed-by: darcy, ohair diff -r 85e23f3ff211 -r 345857eb0f3b jdk/make/common/shared/Defs-control.gmk --- a/jdk/make/common/shared/Defs-control.gmk Wed May 20 10:12:37 2009 +0800 +++ b/jdk/make/common/shared/Defs-control.gmk Wed May 20 13:55:50 2009 -0700 @@ -91,6 +91,8 @@ dummy := $(shell $(MKDIR) -p $(TEMP_DIR)) +# The language version we want for this jdk build +SOURCE_LANGUAGE_VERSION=5 # The class version we want for this jdk build TARGET_CLASS_VERSION=5 diff -r 85e23f3ff211 -r 345857eb0f3b jdk/make/common/shared/Defs-java.gmk --- a/jdk/make/common/shared/Defs-java.gmk Wed May 20 10:12:37 2009 +0800 +++ b/jdk/make/common/shared/Defs-java.gmk Wed May 20 13:55:50 2009 -0700 @@ -123,7 +123,8 @@ endif # Add the source level (currently all source is 1.5, should this be 1.6?) -LANGUAGE_VERSION = -source 1.5 +SOURCE_LANGUAGE_VERSION = 5 +LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION) JAVACFLAGS += $(LANGUAGE_VERSION) # Add the class version we want (currently this is 5, should it be 6 or even 7?) diff -r 85e23f3ff211 -r 345857eb0f3b jdk/make/javax/swing/beaninfo/SwingBeans.gmk --- a/jdk/make/javax/swing/beaninfo/SwingBeans.gmk Wed May 20 10:12:37 2009 +0800 +++ b/jdk/make/javax/swing/beaninfo/SwingBeans.gmk Wed May 20 13:55:50 2009 -0700 @@ -50,6 +50,8 @@ JAVADOCFLAGS = $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION) SWINGPKG = javax/swing LOCAL_JAVAC_FLAGS = $(OTHER_JAVACFLAGS) +# since LOCAL_JAVADOC runs on ALT_BOOTDIR, the doclet and all its classes must be compiled to match +DOCLET_JAVAC_FLAGS = -source 6 -target 6 include FILES.gmk include $(BUILDDIR)/common/Release.gmk @@ -86,7 +88,7 @@ @$(MKDIR) -p $@ $(DOCLETDST)/%.class: $(DOCLETSRC)/%.java - $(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $? + $(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $? @$(java-vm-cleanup) # To run, the doclet needs SwingBeanInfoBase class. Also Notice the lie @@ -95,11 +97,11 @@ .SwingBeanInfo: $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(SWINGPKG)/BeanInfoUtils.class $(SWINGPKG)/SwingBeanInfoBase.class $(SWINGPKG)/BeanInfoUtils.class: $(BEANSRCDIR)/BeanInfoUtils.java - $(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -d $(BEANCLASSDIR) $< + $(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -d $(BEANCLASSDIR) $< @$(java-vm-cleanup) $(SWINGPKG)/SwingBeanInfoBase.class: $(BEANSRCDIR)/SwingBeanInfoBase.java $(BEANSRCDIR)/BeanInfoUtils.java - $(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $< + $(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $< @$(java-vm-cleanup) #