# HG changeset patch # User yan # Date<PHONE_NUMBER> 25200 # Node ID 986ec552383f2fddd8f154ead91b59eac41c4724 # Parent 317ac0bf2285152b94bc519baa2a467f8c629c67# Parent f09a2bfba691b89be11c3d26a7dd391735fbf7d7 Merge --- a/.hgignore Tue Sep 15 16:15:36 2009 +0400 +++ b/.hgignore Tue Sep 22 01:20:51 2009 -0700 @@ -1,3 +1,6 @@ ^build/ ^dist/ ^nbproject/private/ +^make/netbeans/.*/nbproject/private/ +^make/netbeans/.*/build/ +^make/netbeans/.*/dist/ --- a/.hgtags Tue Sep 15 16:15:36 2009 +0400 +++ b/.hgtags Tue Sep 22 01:20:51 2009 -0700 @@ -45,3 +45,5 @@ b23d905cb5d3b382295240d28ab0bfb266b4503c b23d905cb5d3b382295240d28ab0bfb266b4503c jdk7-b68 226b20019b1f020c09ea97d137d98e011ce65d76 jdk7-b69 893bcca951b747ddcf6986362b877f0e1dbb835b jdk7-b70 +b3f3240135f0c10b9f2481c174b81b7fcf0daa60 jdk7-b71 +460639b036f327282832a4fe52b7aa45688afd50 jdk7-b72 --- a/README Tue Sep 15 16:15:36 2009 +0400 +++ b/README Tue Sep 22 01:20:51 2009 -0700 @@ -9,35 +9,25 @@ Simple Build Instructions: http://java.sun.com/javase/downloads/index.jsp Set the environment variable ALT_BOOTDIR to the location of this JDK 6. - 2. Download and install the JIBX libraries, version 1.1.5 from - http://sourceforge.net/project/showfiles.php?group_id=69358&package_id=68290 - You'll need the following four JAR files: - bcel.jar - jibx-bind.jar - jibx-run.jar - xpp3.jar - Set the environment variable ALT_JIBX_LIBS_PATH to the location of - these JAR files. - - 3. Download and install the Binary Plugs for the most recent JDK7 from + 2. Download and install the Binary Plugs for the most recent JDK7 from http://download.java.net/openjdk/jdk7/ Set the environment variable ALT_BINARY_PLUGS_PATH to the location of these binary plugs. - 4. Either download and install the latest JDK7 from + 3. Either download and install the latest JDK7 from http://download.java.net/openjdk/jdk7/, or build your own complete OpenJDK7 by using the top level Makefile in the OpenJDK Mercurial forest. Set the environment variable ALT_JDK_IMPORT_PATH to the location of this latest JDK7 or OpenJDK7 build. - 5. Check the sanity of doing a build with the current machine: + 4. Check the sanity of doing a build with the current machine: cd make && gnumake sanity See README-builds.html if you run into problems. - 6. Do a partial build of the jdk: + 5. Do a partial build of the jdk: cd make && gnumake all - 7. Construct the images: + 6. Construct the images: cd make && gnumake images The resulting JDK image should be found in build/*/j2sdk-image --- a/make/com/sun/java/pack/Makefile Tue Sep 15 16:15:36 2009 +0400 +++ b/make/com/sun/java/pack/Makefile Tue Sep 22 01:20:51 2009 -0700 @@ -67,15 +67,14 @@ ifeq ($(STANDALONE),true) $(ZIPOBJDIR)/deflate.$(OBJECT_SUFFIX) \ $(ZIPOBJDIR)/trees.$(OBJECT_SUFFIX) \ $(ZIPOBJDIR)/zadler32.$(OBJECT_SUFFIX) \ + $(ZIPOBJDIR)/compress.$(OBJECT_SUFFIX) \ $(ZIPOBJDIR)/zutil.$(OBJECT_SUFFIX) \ $(ZIPOBJDIR)/inflate.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/infblock.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/infcodes.$(OBJECT_SUFFIX) \ + $(ZIPOBJDIR)/infback.$(OBJECT_SUFFIX) \ $(ZIPOBJDIR)/inftrees.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/infutil.$(OBJECT_SUFFIX) \ $(ZIPOBJDIR)/inffast.$(OBJECT_SUFFIX) - ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 + ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) OTHER_CXXFLAGS += $(ZINCLUDE) LDDFLAGS += $(ZIPOBJS) else --- a/make/common/Defs.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/common/Defs.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -241,6 +241,12 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \ endif endif endif + +# +# zlib version +# +ZLIB_VERSION = 1.2.3 + # # Localizations for the different parts of the product beyond English --- a/make/common/Sanity.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/common/Sanity.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -93,8 +93,7 @@ sanity-all:: sanity-base \ sane-alt_bootdir \ sane-bootdir \ sane-local-bootdir \ - sane-alsa-headers \ - sane-jibx + sane-alsa-headers ifdef OPENJDK sanity-all:: sane-freetype --- a/make/common/shared/Defs-java.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/common/shared/Defs-java.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -201,7 +201,10 @@ ifeq ($(JAVAC_WARNINGS_FATAL), true) ifeq ($(JAVAC_WARNINGS_FATAL), true) BOOT_JAVACFLAGS += -Werror endif -BOOT_JAVACFLAGS += -encoding ascii + +BOOT_SOURCE_LANGUAGE_VERSION = 6 +BOOT_TARGET_CLASS_VERSION = 6 +BOOT_JAVACFLAGS += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION) BOOT_JAR_JFLAGS += $(JAR_JFLAGS) BOOT_JAVACFLAGS += $(NO_PROPRIETARY_API_WARNINGS) --- a/make/common/shared/Defs.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/common/shared/Defs.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -536,15 +536,6 @@ endif # NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64 BINDIR = $(OUTPUTDIR)/bin$(ISA_DIR) -# JIBX_LIBS_PATH: path to JIBX libraries, needed for NimbusLookAndFeel -ifdef ALT_JIBX_LIBS_PATH - JIBX_LIBS_PATH:=$(call FullPath,$(ALT_JIBX_LIBS_PATH)) - JIBX_LIBS_PATH:=$(call AltCheckSpaces,JIBX_LIBS_PATH) - JIBX_LIBS_PATH:=$(call AltCheckValue,JIBX_LIBS_PATH) -else - JIBX_LIBS_PATH=$(JDK_DEVTOOLS_DIR)/share/jibx/lib -endif - # MOZILLA_HEADERS_PATH: path to mozilla header files for plugin ifdef ALT_MOZILLA_HEADERS_PATH MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH)) --- a/make/common/shared/Sanity-Settings.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/common/shared/Sanity-Settings.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -233,7 +233,6 @@ ifeq ($(PLATFORM),windows) endif endif ALL_SETTINGS+=$(call addAltSetting,CACERTS_FILE) -ALL_SETTINGS+=$(call addAltSetting,JIBX_LIBS_PATH) ifndef OPENJDK ALL_SETTINGS+=$(call addAltSetting,MOZILLA_HEADERS_PATH) endif --- a/make/common/shared/Sanity.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/common/shared/Sanity.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -214,7 +214,6 @@ include $(JDK_MAKE_SHARED_DIR)/Sanity-Se sane-link \ sane-cacerts \ sane-alsa-headers \ - sane-jibx \ sane-ant_version \ sane-zip_version \ sane-unzip_version \ @@ -1517,22 +1516,6 @@ endif ###################################################### -# JIBX_LIBS_PATH must be valid -###################################################### -sane-jibx: -ifdef DISABLE_NIMBUS - $(call SanityWarning,Disabling Nimbus will remove public API in javax.swing.plaf.nimbus.) -else - @if [ ! -r $(subst \,/,$(JIBX_LIBS_PATH))/jibx-run.jar ]; then \ - $(ECHO) "ERROR: You do not have access to valid JIBX library files. \n" \ - " Please check your access to \n" \ - " $(subst \,/,$(JIBX_LIBS_PATH))/jibx-run.jar \n" \ - " and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_JIBX_LIBS_PATH \n" \ - "" >> $(ERROR_FILE) ; \ - fi -endif - -###################################################### # MOZILLA_HEADERS_PATH must be valid ###################################################### sane-mozilla: --- a/make/java/jli/Makefile Tue Sep 15 16:15:36 2009 +0400 +++ b/make/java/jli/Makefile Tue Sep 22 01:20:51 2009 -0700 @@ -44,7 +44,6 @@ MS_RUNTIME_STATIC = true include $(BUILDDIR)/common/Defs.gmk -ZLIB_VERSION = 1.1.3 ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin @@ -68,12 +67,10 @@ FILES_c = \ wildcard.c \ jli_util.c \ inflate.c \ - infblock.c \ inftrees.c \ - infcodes.c \ inffast.c \ - infutil.c \ zadler32.c \ + zcrc32.c \ zutil.c ifneq ($(PLATFORM), windows) --- a/make/java/nio/FILES_java.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/java/nio/FILES_java.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -160,7 +160,6 @@ FILES_src = \ \ sun/nio/ByteBuffered.java \ \ - sun/nio/ch/AbstractFuture.java \ sun/nio/ch/AbstractPollArrayWrapper.java \ sun/nio/ch/AllocatedNativeObject.java \ sun/nio/ch/AsynchronousChannelGroupImpl.java \ --- a/make/java/zip/FILES_c.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/java/zip/FILES_c.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -29,15 +29,16 @@ FILES_c = \ Deflater.c \ Inflater.c \ ZipFile.c \ + zip_util.c \ + compress.c \ + deflate.c \ + gzio.c \ + infback.c \ + inffast.c \ + inflate.c \ + inftrees.c \ + trees.c \ + uncompr.c \ zadler32.c \ zcrc32.c \ - deflate.c \ - trees.c \ - zutil.c \ - inflate.c \ - infblock.c \ - inftrees.c \ - infcodes.c \ - infutil.c \ - inffast.c \ - zip_util.c + zutil.c --- a/make/java/zip/Makefile Tue Sep 15 16:15:36 2009 +0400 +++ b/make/java/zip/Makefile Tue Sep 22 01:20:51 2009 -0700 @@ -30,7 +30,9 @@ PRODUCT = sun PRODUCT = sun include $(BUILDDIR)/common/Defs.gmk -ZLIB_VERSION = 1.1.3 +# +# ZLIB_VERSION is defined in make/common/Defs.gmk +# # # Files to compile. --- a/make/java/zip/reorder-i586 Tue Sep 15 16:15:36 2009 +0400 +++ b/make/java/zip/reorder-i586 Tue Sep 22 01:20:51 2009 -0700 @@ -32,38 +32,17 @@ text: .text%Java_java_util_zip_Inflater_ text: .text%Java_java_util_zip_Inflater_init; text: .text%inflateInit2_; text: .text%zcalloc; -text: .text%inflate_blocks_new; -text: .text%inflate_blocks_reset; text: .text%inflateReset; text: .text%Java_java_util_zip_Inflater_inflateBytes; text: .text%inflate; -text: .text%inflate_blocks; -text: .text%inflate_flush; text: .text%Java_java_util_zip_ZipFile_read; text: .text%ZIP_Read; -text: .text%inflate_trees_bits; text: .text%huft_build: OUTPUTDIR/tmp/sun/java.util.zip/zip/obj/inftrees.o; text: .text%zcfree; -text: .text%inflate_trees_dynamic; -text: .text%inflate_codes_new; -text: .text%inflate_codes; -text: .text%inflate_fast; -text: .text%inflate_codes_free; -text: .text%inflate_trees_fixed; -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames; text: .text%ZIP_ReadEntry; text: .text%InflateFully; text: .text%inflateEnd; -text: .text%inflate_blocks_free; -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet text: .text%Java_java_util_zip_Inflater_reset; text: .text%Java_java_util_zip_ZipFile_close; text: .text%ZIP_Close; --- a/make/java/zip/reorder-sparc Tue Sep 15 16:15:36 2009 +0400 +++ b/make/java/zip/reorder-sparc Tue Sep 22 01:20:51 2009 -0700 @@ -31,37 +31,13 @@ text: .text%Java_java_util_zip_Inflater_ text: .text%Java_java_util_zip_Inflater_init; text: .text%inflateInit2_; text: .text%zcalloc; -text: .text%inflate_blocks_new; -text: .text%inflate_blocks_reset; -text: .text%inflateReset; text: .text%Java_java_util_zip_Inflater_inflateBytes; -text: .text%inflate; -text: .text%inflate_blocks; -text: .text%inflate_flush; text: .text%Java_java_util_zip_ZipFile_read; text: .text%ZIP_Read; -text: .text%inflate_trees_bits; -text: .text%huft_build: OUTPUTDIR/tmp/sun/java.util.zip/zip/obj/inftrees.o; text: .text%zcfree; -text: .text%inflate_trees_dynamic; -text: .text%inflate_codes_new; -text: .text%inflate_codes; -text: .text%inflate_fast; -text: .text%inflate_codes_free; -text: .text%inflate_trees_fixed; -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames; -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet text: .text%Java_java_util_zip_Inflater_reset; text: .text%Java_java_util_zip_Inflater_end; text: .text%inflateEnd; -text: .text%inflate_blocks_free; text: .text%Java_java_util_zip_ZipFile_close; text: .text%ZIP_Close; --- a/make/java/zip/reorder-sparcv9 Tue Sep 15 16:15:36 2009 +0400 +++ b/make/java/zip/reorder-sparcv9 Tue Sep 22 01:20:51 2009 -0700 @@ -1,6 +1,5 @@ data = R0x2000; data = R0x2000; text = LOAD ?RXO; -# Test Null text: .text%ZIP_Open; text: .text%ZIP_Open_Generic; text: .text%InitializeZip; @@ -32,38 +31,17 @@ text: .text%Java_java_util_zip_Inflater_ text: .text%Java_java_util_zip_Inflater_init; text: .text%inflateInit2_; text: .text%zcalloc; -text: .text%inflate_blocks_new; -text: .text%inflate_blocks_reset; text: .text%inflateReset; text: .text%Java_java_util_zip_Inflater_inflateBytes; text: .text%inflate; -text: .text%inflate_blocks; -text: .text%inflate_flush; text: .text%Java_java_util_zip_ZipFile_read; text: .text%ZIP_Read; -text: .text%inflate_trees_bits; text: .text%huft_build: OUTPUTDIR/tmp/sun/java.util.zip/zip/obj64/inftrees.o; text: .text%zcfree; -text: .text%inflate_trees_dynamic; -text: .text%inflate_codes_new; -text: .text%inflate_codes; -text: .text%inflate_fast; -text: .text%inflate_codes_free; -text: .text%inflate_trees_fixed; -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames; text: .text%ZIP_ReadEntry; text: .text%InflateFully; text: .text%inflateEnd; -text: .text%inflate_blocks_free; -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet text: .text%Java_java_util_zip_Inflater_reset; text: .text%Java_java_util_zip_ZipFile_close; text: .text%ZIP_Close; --- a/make/javax/swing/plaf/Makefile Tue Sep 15 16:15:36 2009 +0400 +++ b/make/javax/swing/plaf/Makefile Tue Sep 22 01:20:51 2009 -0700 @@ -34,16 +34,14 @@ include $(BUILDDIR)/common/Defs.gmk # include FILES.gmk AUTO_FILES_JAVA_DIRS = javax/swing/plaf sun/swing com/sun/java/swing/plaf -ifndef DISABLE_NIMBUS - SUBDIRS = nimbus -endif - -# Nimbus is handled in its own directory -AUTO_JAVA_PRUNE = nimbus ifeq ($(PLATFORM), windows) # Don't build GTK L&F on Windows - AUTO_JAVA_PRUNE += gtk + AUTO_JAVA_PRUNE = gtk +endif + +ifdef DISABLE_NIMBUS + AUTO_JAVA_PRUNE += nimbus endif MISC_FILES = $(MISC_SWING_FILES) @@ -51,6 +49,10 @@ ifneq ($(PLATFORM), windows) # Only include GTK icons on Solaris/Linux MISC_FILES += $(MISC_SWING_FILES_UNIX) endif + +NIMBUS_GENSRC_DIR = $(GENSRCDIR)/javax/swing/plaf/nimbus +NIMBUS_SKIN_FILE = $(SWING_SRC)/plaf/nimbus/skin.laf +NIMBUS_GENERATOR_JAR = $(BUILDTOOLJARDIR)/generatenimbus.jar FILES_java = $(FILES_SWING_java) @@ -75,14 +77,25 @@ endif # Process LOGO_ICONS and Motif Icons first. # build: $(LOGO_ICONS) $(MISC_SWING_FILES_MOTIF_GIF) $(MISC_SWING_FILES_MOTIF_PNG) other_files - $(SUBDIRS-loop) -clean clobber:: - $(SUBDIRS-loop) +$(NIMBUS_GENSRC_DIR): $(NIMBUS_SKIN_FILE) $(NIMBUS_GENERATOR_JAR) + @$(ECHO) "Generating Nimbus source files:" + $(RM) -r $(NIMBUS_GENSRC_DIR) + $(BOOT_JAVA_CMD) -jar $(NIMBUS_GENERATOR_JAR) \ + -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(GENSRCDIR) \ + -packagePrefix $(PACKAGE).nimbus -lafName Nimbus + @$(ECHO) "Finished generating Nimbus source files" + +clean:: classes.clean + $(RM) -r $(NIMBUS_GENSRC_DIR) # # Include # +ifndef DISABLE_NIMBUS + CLASSES_INIT = $(NIMBUS_GENSRC_DIR) +endif + include $(BUILDDIR)/common/Classes.gmk ifndef OPENJDK --- a/make/sun/javazic/tzdata/VERSION Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/VERSION Tue Sep 22 01:20:51 2009 -0700 @@ -21,4 +21,4 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # -tzdata2009g +tzdata2009l --- a/make/sun/javazic/tzdata/africa Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/africa Tue Sep 22 01:20:51 2009 -0700 @@ -22,6 +22,8 @@ # have any questions. # #
+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -263,18 +265,18 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # The following appeared in Red Hat bugzilla[1] (edited): # # > $ zdump -v /usr/share/zoneinfo/Africa/Cairo | grep 2009 -# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 21:59:59 2009 UTC =3D Thu = +# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 21:59:59 2009 UTC = Thu = # Apr 23 -# > 23:59:59 2009 EET isdst=3D0 gmtoff=3D7200 -# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 22:00:00 2009 UTC =3D Fri = +# > 23:59:59 2009 EET isdst=0 gmtoff=7200 +# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 22:00:00 2009 UTC = Fri = # Apr 24 -# > 01:00:00 2009 EEST isdst=3D1 gmtoff=3D10800 -# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 20:59:59 2009 UTC =3D Thu = +# > 01:00:00 2009 EEST isdst=1 gmtoff=10800 +# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 20:59:59 2009 UTC = Thu = # Aug 27 -# > 23:59:59 2009 EEST isdst=3D1 gmtoff=3D10800 -# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 21:00:00 2009 UTC =3D Thu = +# > 23:59:59 2009 EEST isdst=1 gmtoff=10800 +# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 21:00:00 2009 UTC = Thu = # Aug 27 -# > 23:00:00 2009 EET isdst=3D0 gmtoff=3D7200 +# > 23:00:00 2009 EET isdst=0 gmtoff=7200 # # > end date should be Thu Sep 24 2009 (Last Thursday in September at 23:59= # :59) @@ -282,11 +284,11 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # # timeanddate[2] and another site I've found[3] also support that. # -# [1] -# https://bugzilla.redhat.com/show_bug.cgi?id=3D492263 -# -# [2] -# http://www.timeanddate.com/worldclock/clockchange.html?n=3D53 +# [1] +# https://bugzilla.redhat.com/show_bug.cgi?id=492263 +# +# [2] +# http://www.timeanddate.com/worldclock/clockchange.html?n=53 # # [3] # http://wwp.greenwichmeantime.com/time-zone/africa/egypt/ @@ -296,8 +298,27 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s # In 2009 (and for the next several years), Ramadan ends before the fourth # Thursday in September; Egypt is expected to revert to the last Thursday # in September. + +# From Steffen Thorsen (2009-08-11): +# We have been able to confirm the August change with the Egyptian Cabinet +# Information and Decision Support Center: +# +# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html +# +# +# The Middle East News Agency +# +# http://www.mena.org.eg/index.aspx +# +# also reports "Egypt starts winter time on August 21" +# today in article numbered "71, 11/08/2009 12:25 GMT." +# Only the title above is available without a subscription to their service, +# and can be found by searching for "winter" in their search engine +# (at least today). + Rule Egypt 2008 only - Aug lastThu 23:00s 0 - -Rule Egypt 2009 max - Sep lastThu 23:00s 0 - +Rule Egypt 2009 only - Aug 20 23:00s 0 - +Rule Egypt 2010 max - Sep lastThu 23:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:00 - LMT 1900 Oct @@ -499,8 +520,8 @@ Zone Africa/Nouakchott -1:03:48 - LMT 19 # From Riad M. Hossen Ally (2008-08-03): # The Government of Mauritius weblink -# -# http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=3D4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD +# +# http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD # # Cabinet Decision of July 18th, 2008 states as follows: # @@ -522,11 +543,33 @@ Zone Africa/Nouakchott -1:03:48 - LMT 19 # http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf # +# From Steffen Thorsen (2009-06-05): +# According to several sources, Mauritius will not continue to observe +# DST the coming summer... +# +# Some sources, in French: +# +# http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB +# +# +# http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints- +# +# +# Our wrap-up: +# +# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html +# + +# From Arthur David Olson (2009-07-11): +# The "mauritius-dst-will-not-repeat" wrapup includes this: +# "The trial ended on March 29, 2009, when the clocks moved back by one hour +# at 2am (or 02:00) local time..." + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mauritius 1982 only - Oct 10 0:00 1:00 S Rule Mauritius 1983 only - Mar 21 0:00 0 - -Rule Mauritius 2008 max - Oct lastSun 2:00s 1:00 S -Rule Mauritius 2009 max - Mar lastSun 2:00s 0 - +Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 S +Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis 4:00 Mauritius MU%sT # Mauritius Time --- a/make/sun/javazic/tzdata/antarctica Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/antarctica Tue Sep 22 01:20:51 2009 -0700 @@ -22,6 +22,8 @@ # have any questions. # #+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # From Paul Eggert (1999-11-15): # To keep things manageable, we list only locations occupied year-round; see --- a/make/sun/javazic/tzdata/asia Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/asia Tue Sep 22 01:20:51 2009 -0700 @@ -22,6 +22,8 @@ # have any questions. # #+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -147,6 +149,57 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # 3:00 - AST # Bangladesh +# From Alexander Krivenyshev (2009-05-13): +# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce +# Daylight Saving Time from June 16 to Sept 30 +# +# Bangladesh to introduce daylight saving time likely from June 16 +# +# http://www.asiantribune.com/?q=node/17288 +# +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html +# +# +# "... Bangladesh government has decided to switch daylight saving time from +# June +# 16 till September 30 in a bid to ensure maximum use of daylight to cope with +# crippling power crisis. " +# +# The switch will remain in effect from June 16 to Sept 30 (2009) but if +# implemented the next year, it will come in force from April 1, 2010 + +# From Steffen Thorsen (2009-06-02): +# They have finally decided now, but changed the start date to midnight between +# the 19th and 20th, and they have not set the end date yet. +# +# Some sources: +# +# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601 +# +# +# http://bdnews24.com/details.php?id=85889&cid=2 +# +# +# Our wrap-up: +# +# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html +# + +# From A. N. M. Kamrus Saadat (2009-06-15): +# Finally we've got the official mail regarding DST start time where DST start +# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh +# Telecommunication Regulatory Commission). +# +# No DST end date has been announced yet. + +# From Arthur David Olson (2009-07-11): +# Arbitrarily end DST at the end of 2009 so that a POSIX-sytle time zone string +# can appear in the Dhaka binary file and for the benefit of old glibc +# reimplementations of the time zone software that mishandle permanent DST. +# A change will be required once the end date is known. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? @@ -154,7 +207,9 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890 5:30 - IST 1942 Sep 6:30 - BURT 1951 Sep 30 6:00 - DACT 1971 Mar 26 # Dacca Time - 6:00 - BDT # Bangladesh Time + 6:00 - BDT 2009 Jun 19 23:00 # Bangladesh Time + 6:00 1:00 BDST 2010 + 6:00 - BDT # Bhutan # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1129,7 +1184,7 @@ Rule Jordan 1999 only - Jul 1 0:00s 1:0 Rule Jordan 1999 only - Jul 1 0:00s 1:00 S Rule Jordan 1999 2002 - Sep lastFri 0:00s 0 - Rule Jordan 2000 2001 - Mar lastThu 0:00s 1:00 S -Rule Jordan 2002 max - Mar lastFri 0:00s 1:00 S +Rule Jordan 2002 max - Mar lastThu 24:00 1:00 S Rule Jordan 2003 only - Oct 24 0:00s 0 - Rule Jordan 2004 only - Oct 15 0:00s 0 - Rule Jordan 2005 only - Sep lastFri 0:00s 0 - --- a/make/sun/javazic/tzdata/australasia Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/australasia Tue Sep 22 01:20:51 2009 -0700 @@ -22,6 +22,8 @@ # have any questions. # #+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # This file also includes Pacific islands. @@ -447,6 +449,22 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - SST # S=Samoa # Samoa + +# From Alexander Krivenyshev (2008-12-06): +# The Samoa government (Western Samoa) may implement DST on the first Sunday of +# October 2009 (October 4, 2009) until the last Sunday of March 2010 (March 28, +# 2010). +# +# "Selected Committee reports to Cabinet on Daylight Saving Time", +# Government of Samoa: +# +# http://www.govt.ws/pr_article.cfm?pr_id=560 +# +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_samoa01.html +# + Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -1141,6 +1159,27 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # From Paul Eggert (2007-07-23): # See "southeast Australia" above for 2008 and later. +# From Steffen Thorsen (2009-04-28): +# According to the official press release, South Australia's extended daylight +# saving period will continue with the same rules as used during the 2008-2009 +# summer (southern hemisphere). +# +# From +# +# http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf +# +# The extended daylight saving period that South Australia has been trialling +# for over the last year is now set to be ongoing. +# Daylight saving will continue to start on the first Sunday in October each +# year and finish on the first Sunday in April the following year. +# Industrial Relations Minister, Paul Caica, says this provides South Australia +# with a consistent half hour time difference with NSW, Victoria, Tasmania and +# the ACT for all 52 weeks of the year... +# +# We have a wrap-up here: +# +# http://www.timeanddate.com/news/time/south-australia-extends-dst.html +# ############################################################################### # New Zealand --- a/make/sun/javazic/tzdata/backward Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/backward Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # This file provides links between current names for time zones # and their old names. Many names changed in late 1993. --- a/make/sun/javazic/tzdata/etcetera Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/etcetera Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # These entries are mostly present for historical reasons, so that # people in areas not otherwise covered by the tz files could "zic -l" --- a/make/sun/javazic/tzdata/europe Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/europe Tue Sep 22 01:20:51 2009 -0700 @@ -22,6 +22,8 @@ # have any questions. # #+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -479,7 +481,7 @@ Rule EU 1981 max - Mar lastSun 1:00u 1: Rule EU 1981 max - Mar lastSun 1:00u 1:00 S Rule EU 1996 max - Oct lastSun 1:00u 0 - # The most recent directive covers the years starting in 2002. See: -# +# # Directive 2000/84/EC of the European Parliament and of the Council # of 19 January 2001 on summer-time arrangements. # --- a/make/sun/javazic/tzdata/factory Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/factory Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # For companies who don't want to put time zone specification in # their installation procedures. When users run date, they'll get the message. --- a/make/sun/javazic/tzdata/iso3166.tab Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/iso3166.tab Tue Sep 22 01:20:51 2009 -0700 @@ -21,8 +21,10 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # ISO 3166 alpha-2 country codes -# # # From Paul Eggert (2006-09-27): # --- a/make/sun/javazic/tzdata/leapseconds Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/leapseconds Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # Allowance for leapseconds added to each timezone file. @@ -75,13 +78,13 @@ Leap 2008 Dec 31 23:59:60 + S # SERVICE DE LA ROTATION TERRESTRE # OBSERVATOIRE DE PARIS # 61, Av. de l'Observatoire 75014 PARIS (France) -# Tel. : 33 (0) 1 40 51 22 29 +# Tel. : 33 (0) 1 40 51 22 26 # FAX : 33 (0) 1 40 51 22 91 # Internet<EMAIL_ADDRESS># -# Paris, 15 January 2009 +# Paris, 4 July 2009 # -# Bulletin C 37 +# Bulletin C 38 # # To authorities responsible # for the measurement and @@ -89,7 +92,7 @@ Leap 2008 Dec 31 23:59:60 + S # # INFORMATION ON UTC - TAI # -# NO positive leap second will be introduced at the end of June 2009. +# NO positive leap second will be introduced at the end of December 2009. # The difference between Coordinated Universal Time UTC and the # International Atomic Time TAI is : # @@ -101,6 +104,6 @@ Leap 2008 Dec 31 23:59:60 + S # will be no time step at the next possible date. # # Daniel GAMBIS -# Head -# Earth Orientation Center of the IERS +# Director +# Earth Orientation Center of IERS # Observatoire de Paris, France --- a/make/sun/javazic/tzdata/northamerica Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/northamerica Tue Sep 22 01:20:51 2009 -0700 @@ -22,6 +22,8 @@ # have any questions. # #+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # also includes Central America and the Caribbean --- a/make/sun/javazic/tzdata/pacificnew Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/pacificnew Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # From Arthur David Olson (1989-04-05): # On 1989-04-05, the U. S. House of Representatives passed (238-154) a bill --- a/make/sun/javazic/tzdata/solar87 Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/solar87 Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # So much for footnotes about Saudi Arabia. # Apparent noon times below are for Riyadh; your mileage will vary. --- a/make/sun/javazic/tzdata/solar88 Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/solar88 Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # Apparent noon times below are for Riyadh; they're a bit off for other places. # Times were computed using formulas in the U.S. Naval Observatory's --- a/make/sun/javazic/tzdata/solar89 Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/solar89 Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # Apparent noon times below are for Riyadh; they're a bit off for other places. # Times were computed using a formula provided by the U. S. Naval Observatory: --- a/make/sun/javazic/tzdata/southamerica Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/southamerica Tue Sep 22 01:20:51 2009 -0700 @@ -22,6 +22,8 @@ # have any questions. # #+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -696,8 +698,8 @@ Zone America/La_Paz -4:32:36 - LMT 1890 # From Rodrigo Severo (2008-06-24): # Just correcting the URL: -# -# https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=3Ddo&secao=3D1&pagina=3D1&data=3D25/04/2008 +# +# https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=do&secao=1&pagina=1&data=25/04/2008 # # # As a result of the above Decree I believe the America/Rio_Branco --- a/make/sun/javazic/tzdata/systemv Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/systemv Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # Old rules, should the need arise. # No attempt is made to handle Newfoundland, since it cannot be expressed --- a/make/sun/javazic/tzdata/zone.tab Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/javazic/tzdata/zone.tab Tue Sep 22 01:20:51 2009 -0700 @@ -21,6 +21,9 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # +#* + *+# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. # # TZ zone descriptions # @@ -123,7 +126,7 @@ BR -0958-06748 America/Rio_Branco Acre BR -0958-06748 America/Rio_Branco Acre BS +2505-07721 America/Nassau BT +2728+08939 Asia/Thimphu -BW -2545+02555 Africa/Gaborone +BW -2439+02555 Africa/Gaborone BY +5354+02734 Europe/Minsk BZ +1730-08812 America/Belize CA +4734-05243 America/St_Johns Newfoundland Time, including SE Labrador @@ -307,7 +310,7 @@ MY +0133+11020 Asia/Kuching Sabah & Sara MY +0133+11020 Asia/Kuching Sabah & Sarawak MZ -2558+03235 Africa/Maputo NA -2234+01706 Africa/Windhoek -NC -2216+16530 Pacific/Noumea +NC -2216+16627 Pacific/Noumea NE +1331+00207 Africa/Niamey NF -2903+16758 Pacific/Norfolk NG +0627+00324 Africa/Lagos @@ -387,7 +390,7 @@ TL -0833+12535 Asia/Dili TL -0833+12535 Asia/Dili TM +3757+05823 Asia/Ashgabat TN +3648+01011 Africa/Tunis -TO -2110+17510 Pacific/Tongatapu +TO -2110-17510 Pacific/Tongatapu TR +4101+02858 Europe/Istanbul TT +1039-06131 America/Port_of_Spain TV -0831+17913 Pacific/Funafuti @@ -431,7 +434,7 @@ UY -3453-05611 America/Montevideo UY -3453-05611 America/Montevideo UZ +3940+06648 Asia/Samarkand west Uzbekistan UZ +4120+06918 Asia/Tashkent east Uzbekistan -VA +4154+01227 Europe/Vatican +VA +415408+0122711 Europe/Vatican VC +1309-06114 America/St_Vincent VE +1030-06656 America/Caracas VG +1827-06437 America/Tortola --- a/make/sun/splashscreen/FILES_c.gmk Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/splashscreen/FILES_c.gmk Tue Sep 22 01:20:51 2009 -0700 @@ -52,12 +52,10 @@ FILES_c = \ compress.c \ deflate.c \ gzio.c \ - infblock.c \ - infcodes.c \ + infback.c \ inffast.c \ inflate.c \ inftrees.c \ - infutil.c \ trees.c \ uncompr.c \ zadler32.c \ --- a/make/sun/splashscreen/Makefile Tue Sep 15 16:15:36 2009 +0400 +++ b/make/sun/splashscreen/Makefile Tue Sep 22 01:20:51 2009 -0700 @@ -77,13 +77,13 @@ vpath %.c $(SHARE_SRC)/native/$(PKGDIR vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/splashscreen vpath %.c $(SHARE_SRC)/native/$(PKGDIR) vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/giflib -vpath %.c $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 +vpath %.c $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/libpng vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen -CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 +CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) # Shun the less than portable MMX assembly code in pnggccrd.c, # and use alternative implementations in C. --- a/make/tools/Makefile Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/Makefile Tue Sep 22 01:20:51 2009 -0700 @@ -54,7 +54,7 @@ SUBDIRS = \ CharsetMapping ifndef DISABLE_NIMBUS - SUBDIRS += swing-nimbus + SUBDIRS += generate_nimbus endif all build clean clobber:: --- a/make/tools/freetypecheck/Makefile Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/freetypecheck/Makefile Tue Sep 22 01:20:51 2009 -0700 @@ -28,16 +28,21 @@ include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk # Default name -FT_TEST = $(BUILDTOOLBINDIR)/freetype_versioncheck$(EXE_SUFFIX) +PROGRAM = freetype_versioncheck +FT_OBJ = $(BUILDTOOLBINDIR)/$(PROGRAM).$(OBJECT_SUFFIX) +FT_TEST = $(BUILDTOOLBINDIR)/$(PROGRAM)$(EXE_SUFFIX) # Used on openjdk only ifeq ($(OPENJDK),true) # Start with CFLAGS (which gets us the required -xarch setting on solaris) ifeq ($(PLATFORM), windows) - FT_OPTIONS = /nologo $(CC_OBJECT_OUTPUT_FLAG)$(TEMPDIR) + FT_OPTIONS = /nologo /c FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll FT_LD_OPTIONS = $(FREETYPE_LIB_PATH)/freetype.lib +ifdef MT + FT_LD_OPTIONS += /manifest +endif else FT_OPTIONS = $(CFLAGS) FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH) @@ -55,15 +60,22 @@ FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VER # Create test program all: $(FT_TEST) - @$(FT_TEST) + $(FT_TEST) # On windows we need to copy dll to test dir to ensure it will be found # at runtime $(FT_TEST): freetypecheck.c - @$(prep-target) + $(prep-target) +ifeq ($(PLATFORM), windows) + $(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $< + $(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ) + $(CP) $(FREETYPE_DLL) $(@D)/ +ifdef MT + $(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/ + $(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1 +endif +else @$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS) -ifeq ($(PLATFORM), windows) - @$(CP) $(FREETYPE_DLL) `dirname $@` endif else --- a/make/tools/freetypecheck/freetypecheck.c Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/freetypecheck/freetypecheck.c Tue Sep 22 01:20:51 2009 -0700 @@ -32,6 +32,45 @@ #include "ft2build.h" #include FT_FREETYPE_H +#ifdef _MSC_VER +#if _MSC_VER > 1400 + +/* + * When building for Microsoft Windows, your program has a dependency + * on msvcr??.dll. + * + * When using Visual Studio 2005 or later, that must be recorded in + * the* @@ -240,11 +237,11 @@ public abstract class AsynchronousServer /** * Accepts a connection. * - *.exe.manifest file. + * + * Reference: + * C:/Program Files/Microsoft SDKs/Windows/v6.1/include/crtdefs.h + */ +#include +#ifdef _M_IX86 + +#pragma comment(linker,"/manifestdependency:\"type='win32' " \ + "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \ + "version='" _CRT_ASSEMBLY_VERSION "' " \ + "processorArchitecture='x86' " \ + "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"") + +#endif /* _M_IX86 */ + +//This may not be necessary yet for the Windows 64-bit build, but it +//will be when that build environment is updated. Need to test to see +//if it is harmless: +#ifdef _M_AMD64 + +#pragma comment(linker,"/manifestdependency:\"type='win32' " \ + "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \ + "version='" _CRT_ASSEMBLY_VERSION "' " \ + "processorArchitecture='amd64' " \ + "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"") + +#endif /* _M_AMD64 */ +#endif /* _MSC_VER > 1400 */ +#endif /* _MSC_VER */ + #define QUOTEMACRO(x) QUOTEME(x) #define QUOTEME(x) #x --- a/make/tools/src/build/tools/jdwpgen/AbstractNamedNode.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/AbstractNamedNode.java Tue Sep 22 01:20:51 2009 -0700 @@ -30,7 +30,7 @@ import java.io.*; abstract class AbstractNamedNode extends Node { - NameNode nameNode; + NameNode nameNode = null; String name; public String name() { --- a/make/tools/src/build/tools/jdwpgen/AltNode.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/AltNode.java Tue Sep 22 01:20:51 2009 -0700 @@ -30,7 +30,7 @@ import java.io.*; class AltNode extends AbstractGroupNode implements TypeNode { - SelectNode select; + SelectNode select = null; void constrain(Context ctx) { super.constrain(ctx); --- a/make/tools/src/build/tools/jdwpgen/ConstantSetNode.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/ConstantSetNode.java Tue Sep 22 01:20:51 2009 -0700 @@ -33,13 +33,7 @@ class ConstantSetNode extends AbstractNa /** * The mapping between a constant and its value. */ - protected static Map constantMap; - - ConstantSetNode(){ - if (constantMap == null) { - constantMap = new HashMap (); - } - } + protected static final Map constantMap = new HashMap (); void prune() { List addons = new ArrayList (); @@ -95,9 +89,6 @@ class ConstantSetNode extends AbstractNa } public static String getConstant(String key){ - if (constantMap == null) { - return ""; - } String com = constantMap.get(key); if(com == null){ return ""; --- a/make/tools/src/build/tools/jdwpgen/Main.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/Main.java Tue Sep 22 01:20:51 2009 -0700 @@ -25,13 +25,11 @@ package build.tools.jdwpgen; -import java.util.*; import java.io.*; class Main { static String specSource; - static Map nameMap = new HashMap(); static boolean genDebug = true; static void usage() { @@ -43,7 +41,6 @@ class Main { System.err.println("-doc "); System.err.println("-jdi "); System.err.println("-include "); - System.exit(1); } public static void main(String args[]) throws IOException { @@ -66,6 +63,7 @@ class Main { } else { System.err.println("Invalid option: " + arg); usage(); + return; } } else { specSource = arg; @@ -75,6 +73,7 @@ class Main { if (reader == null) { System.err.println(" must be specified"); usage(); + return; } Parse parse = new Parse(reader); --- a/make/tools/src/build/tools/jdwpgen/Node.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/Node.java Tue Sep 22 01:20:51 2009 -0700 @@ -36,7 +36,7 @@ abstract class Node { int lineno; List commentList = new ArrayList (); Node parent = null; - Context context; + Context context = null; static final int maxStructIndent = 5; static int structIndent = 0; // horrible hack @@ -82,7 +82,7 @@ abstract class Node { } void indent(PrintWriter writer, int depth) { - for (int i = depth; i > 0; --i) { + for (int i = 0; i < depth; i++) { writer.print(" "); } } @@ -195,6 +195,6 @@ abstract class Node { System.err.println(Main.specSource + ":" + lineno + ": " + kind + " - " + errmsg); System.err.println(); - System.exit(1); + throw new RuntimeException("Error: " + errmsg); } } --- a/make/tools/src/build/tools/jdwpgen/Parse.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/Parse.java Tue Sep 22 01:20:51 2009 -0700 @@ -146,8 +146,12 @@ class Parse { Node node = (Node)proto.getClass().newInstance(); node.set(kind, list, izer.lineno()); return node; - } catch (Exception exc) { + } catch (InstantiationException exc) { error(exc.toString()); + return null; + } catch (IllegalAccessException exc) { + error(exc.toString()); + return null; } } } else { @@ -166,6 +170,6 @@ class Parse { void error(String errmsg) { System.err.println(Main.specSource + ":" + izer.lineno() + ": " + errmsg); - System.exit(1); + throw new RuntimeException("Error: " + errmsg); } } --- a/make/tools/src/build/tools/jdwpgen/RepeatNode.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/RepeatNode.java Tue Sep 22 01:20:51 2009 -0700 @@ -30,7 +30,7 @@ import java.io.*; class RepeatNode extends AbstractTypeNode { - Node member; + Node member = null; void constrain(Context ctx) { super.constrain(ctx); --- a/make/tools/src/build/tools/jdwpgen/SelectNode.java Tue Sep 15 16:15:36 2009 +0400 +++ b/make/tools/src/build/tools/jdwpgen/SelectNode.java Tue Sep 22 01:20:51 2009 -0700 @@ -30,7 +30,7 @@ import java.io.*; class SelectNode extends AbstractGroupNode implements TypeNode { - AbstractSimpleTypeNode typeNode; + AbstractSimpleTypeNode typeNode = null; void prune() { super.prune(); --- a/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java Tue Sep 22 01:20:51 2009 -0700 @@ -52,8 +52,14 @@ public final class BeanInfoFinder } @Override - protected BeanInfo instantiate(Class> type, String name) { - BeanInfo info = super.instantiate(type, name); + protected BeanInfo instantiate(Class> type, String prefix, String name) { + // this optimization will only use the BeanInfo search path + // if is has changed from the original + // or trying to get the ComponentBeanInfo + BeanInfo info = !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name) + ? super.instantiate(type, prefix, name) + : null; + if (info != null) { // make sure that the returned BeanInfo matches the class BeanDescriptor bd = info.getBeanDescriptor(); @@ -89,14 +95,4 @@ public final class BeanInfoFinder } return null; } - - @Override - protected BeanInfo instantiate(Class> type, String prefix, String name) { - // this optimization will only use the BeanInfo search path - // if is has changed from the original - // or trying to get the ComponentBeanInfo - return !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name) - ? super.instantiate(type, prefix, name) - : null; - } } --- a/src/share/classes/com/sun/java/swing/plaf/windows/DesktopProperty.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/com/sun/java/swing/plaf/windows/DesktopProperty.java Tue Sep 22 01:20:51 2009 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,7 +49,7 @@ public class DesktopProperty implements /** * ReferenceQueue of unreferenced WeakPCLs. */ - private static ReferenceQueue queue; + private static final ReferenceQueue queue = new ReferenceQueue (); /** * PropertyChangeListener attached to the Toolkit. @@ -58,7 +58,7 @@ public class DesktopProperty implements /** * Key used to lookup value from desktop. */ - private String key; + private final String key; /** * Value to return. */ @@ -66,17 +66,8 @@ public class DesktopProperty implements /** * Fallback value in case we get null from desktop. */ - private Object fallback; - - /** - * Toolkit. - */ - private Toolkit toolkit; - - - static { - queue = new ReferenceQueue (); - } + private final Object fallback; + /** * Cleans up any lingering state held by unrefeernced @@ -138,13 +129,10 @@ public class DesktopProperty implements * * @param key Key used in looking up desktop value. * @param fallback Value used if desktop property is null. - * @param toolkit Toolkit used to fetch property from, can be null - * in which default will be used. - */ - public DesktopProperty(String key, Object fallback, Toolkit toolkit) { + */ + public DesktopProperty(String key, Object fallback) { this.key = key; this.fallback = fallback; - this.toolkit = toolkit; // The only sure fire way to clear our references is to create a // Thread and wait for a reference to be added to the queue. // Because it is so rare that you will actually change the look @@ -175,13 +163,14 @@ public class DesktopProperty implements * Returns the value from the desktop. */ protected Object getValueFromDesktop() { - if (this.toolkit == null) { - this.toolkit = Toolkit.getDefaultToolkit(); - } - Object value = toolkit.getDesktopProperty(getKey()); - pcl = new WeakPCL(this, toolkit, getKey(), UIManager.getLookAndFeel()); - toolkit.addPropertyChangeListener(getKey(), pcl); - return value; + Toolkit toolkit = Toolkit.getDefaultToolkit(); + + if (pcl == null) { + pcl = new WeakPCL(this, getKey(), UIManager.getLookAndFeel()); + toolkit.addPropertyChangeListener(getKey(), pcl); + } + + return toolkit.getDesktopProperty(getKey()); } /** @@ -205,12 +194,7 @@ public class DesktopProperty implements * createValue
will ask for the property again. */ public void invalidate() { - if (pcl != null) { - toolkit.removePropertyChangeListener(getKey(), pcl); - toolkit = null; - pcl = null; - value = null; - } + value = null; } /** @@ -271,13 +255,11 @@ public class DesktopProperty implements */ private static class WeakPCL extends WeakReferenceimplements PropertyChangeListener { - private Toolkit kit; private String key; private LookAndFeel laf; - WeakPCL(DesktopProperty target, Toolkit kit, String key, LookAndFeel laf) { + WeakPCL(DesktopProperty target, String key, LookAndFeel laf) { super(target, queue); - this.kit = kit; this.key = key; this.laf = laf; } @@ -297,7 +279,7 @@ public class DesktopProperty implements } void dispose() { - kit.removePropertyChangeListener(key, this); + Toolkit.getDefaultToolkit().removePropertyChangeListener(key, this); } } } --- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java Tue Sep 22 01:20:51 2009 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,6 @@ import java.security.PrivilegedAction; import java.security.PrivilegedAction; import sun.awt.shell.ShellFolder; -import sun.awt.OSInfo; import sun.swing.*; import javax.accessibility.*; @@ -58,8 +57,6 @@ public class WindowsFileChooserUI extend // The following are private because the implementation of the // Windows FileChooser L&F is not complete yet. - private static final OSInfo.WindowsVersion OS_VERSION = OSInfo.getWindowsVersion(); - private JPanel centerPanel; private JLabel lookInLabel; @@ -118,17 +115,8 @@ public class WindowsFileChooserUI extend private String upFolderToolTipText = null; private String upFolderAccessibleName = null; - private String homeFolderToolTipText = null; - private String homeFolderAccessibleName = null; - private String newFolderToolTipText = null; private String newFolderAccessibleName = null; - - private String listViewButtonToolTipText = null; - private String listViewButtonAccessibleName = null; - - private String detailsViewButtonToolTipText = null; - private String detailsViewButtonAccessibleName = null; private String viewMenuButtonToolTipText = null; private String viewMenuButtonAccessibleName = null; @@ -231,9 +219,7 @@ public class WindowsFileChooserUI extend // Directory manipulation buttons JToolBar topPanel = new JToolBar(); topPanel.setFloatable(false); - if (OS_VERSION.compareTo(OSInfo.WINDOWS_ME) >= 0) { - topPanel.putClientProperty("JToolBar.isRollover", Boolean.TRUE); - } + topPanel.putClientProperty("JToolBar.isRollover", Boolean.TRUE); // Add the top panel to the fileChooser fc.add(topPanel, BorderLayout.NORTH); @@ -287,218 +273,103 @@ public class WindowsFileChooserUI extend topPanel.add(Box.createRigidArea(hstrut10)); // Up Button - JButton upFolderButton = new JButton(getChangeToParentDirectoryAction()); - upFolderButton.setText(null); - upFolderButton.setIcon(upFolderIcon); - upFolderButton.setToolTipText(upFolderToolTipText); - upFolderButton.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, - upFolderAccessibleName); - upFolderButton.putClientProperty(WindowsLookAndFeel.HI_RES_DISABLED_ICON_CLIENT_KEY, - Boolean.TRUE); - upFolderButton.setAlignmentX(JComponent.LEFT_ALIGNMENT); - upFolderButton.setAlignmentY(JComponent.CENTER_ALIGNMENT); - upFolderButton.setMargin(shrinkwrap); - upFolderButton.setFocusPainted(false); + JButton upFolderButton = createToolButton(getChangeToParentDirectoryAction(), upFolderIcon, + upFolderToolTipText, upFolderAccessibleName); topPanel.add(upFolderButton); - if (OS_VERSION.compareTo(OSInfo.WINDOWS_ME) < 0) { - topPanel.add(Box.createRigidArea(hstrut10)); - } - - JButton b; - - if (OS_VERSION == OSInfo.WINDOWS_98) { - // Desktop Button - File homeDir = fsv.getHomeDirectory(); - String toolTipText = homeFolderToolTipText; - if (fsv.isRoot(homeDir)) { - toolTipText = getFileView(fc).getName(homeDir); // Probably "Desktop". - } - b = new JButton(getFileView(fc).getIcon(homeDir)); - b.setToolTipText(toolTipText); - b.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, - toolTipText); - b.setAlignmentX(JComponent.LEFT_ALIGNMENT); - b.setAlignmentY(JComponent.CENTER_ALIGNMENT); - b.setMargin(shrinkwrap); - b.setFocusPainted(false); - b.addActionListener(getGoHomeAction()); - topPanel.add(b); - topPanel.add(Box.createRigidArea(hstrut10)); - } // New Directory Button if (!UIManager.getBoolean("FileChooser.readOnly")) { - b = new JButton(filePane.getNewFolderAction()); - b.setText(null); - b.setIcon(newFolderIcon); - b.setToolTipText(newFolderToolTipText); - b.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, - newFolderAccessibleName); - b.putClientProperty(WindowsLookAndFeel.HI_RES_DISABLED_ICON_CLIENT_KEY, - Boolean.TRUE); - b.setAlignmentX(JComponent.LEFT_ALIGNMENT); - b.setAlignmentY(JComponent.CENTER_ALIGNMENT); - b.setMargin(shrinkwrap); - b.setFocusPainted(false); - topPanel.add(b); - } - if (OS_VERSION.compareTo(OSInfo.WINDOWS_ME) < 0) { - topPanel.add(Box.createRigidArea(hstrut10)); - - // View button group - ButtonGroup viewButtonGroup = new ButtonGroup(); - - // List Button - final JToggleButton listViewButton = new JToggleButton(listViewIcon); - listViewButton.setToolTipText(listViewButtonToolTipText); - listViewButton.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, - listViewButtonAccessibleName); - listViewButton.putClientProperty(WindowsLookAndFeel.HI_RES_DISABLED_ICON_CLIENT_KEY, - Boolean.TRUE); - listViewButton.setFocusPainted(false); - listViewButton.setSelected(true); - listViewButton.setAlignmentX(JComponent.LEFT_ALIGNMENT); - listViewButton.setAlignmentY(JComponent.CENTER_ALIGNMENT); - listViewButton.setMargin(shrinkwrap); - listViewButton.addActionListener(filePane.getViewTypeAction(FilePane.VIEWTYPE_LIST)); - topPanel.add(listViewButton); - viewButtonGroup.add(listViewButton); - - // Details Button - final JToggleButton detailsViewButton = new JToggleButton(detailsViewIcon); - detailsViewButton.setToolTipText(detailsViewButtonToolTipText); - detailsViewButton.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, - detailsViewButtonAccessibleName); - detailsViewButton.putClientProperty(WindowsLookAndFeel.HI_RES_DISABLED_ICON_CLIENT_KEY, - Boolean.TRUE); - detailsViewButton.setFocusPainted(false); - detailsViewButton.setAlignmentX(JComponent.LEFT_ALIGNMENT); - detailsViewButton.setAlignmentY(JComponent.CENTER_ALIGNMENT); - detailsViewButton.setMargin(shrinkwrap); - detailsViewButton.addActionListener(filePane.getViewTypeAction(FilePane.VIEWTYPE_DETAILS)); - topPanel.add(detailsViewButton); - viewButtonGroup.add(detailsViewButton); - - topPanel.add(Box.createRigidArea(new Dimension(60, 0))); - - filePane.addPropertyChangeListener(new PropertyChangeListener() { - public void propertyChange(PropertyChangeEvent e) { - if ("viewType".equals(e.getPropertyName())) { - int viewType = filePane.getViewType(); - - switch (viewType) { - case FilePane.VIEWTYPE_LIST: - listViewButton.setSelected(true); - break; - - case FilePane.VIEWTYPE_DETAILS: - detailsViewButton.setSelected(true); - break; - } + JButton newFolderButton = createToolButton(filePane.getNewFolderAction(), newFolderIcon, + newFolderToolTipText, newFolderAccessibleName); + topPanel.add(newFolderButton); + } + + // View button group + ButtonGroup viewButtonGroup = new ButtonGroup(); + + // Popup Menu + final JPopupMenu viewTypePopupMenu = new JPopupMenu(); + + final JRadioButtonMenuItem listViewMenuItem = new JRadioButtonMenuItem( + filePane.getViewTypeAction(FilePane.VIEWTYPE_LIST)); + listViewMenuItem.setSelected(filePane.getViewType() == FilePane.VIEWTYPE_LIST); + viewTypePopupMenu.add(listViewMenuItem); + viewButtonGroup.add(listViewMenuItem); + + final JRadioButtonMenuItem detailsViewMenuItem = new JRadioButtonMenuItem( + filePane.getViewTypeAction(FilePane.VIEWTYPE_DETAILS)); + detailsViewMenuItem.setSelected(filePane.getViewType() == FilePane.VIEWTYPE_DETAILS); + viewTypePopupMenu.add(detailsViewMenuItem); + viewButtonGroup.add(detailsViewMenuItem); + + // Create icon for viewMenuButton + BufferedImage image = new BufferedImage(viewMenuIcon.getIconWidth() + 7, viewMenuIcon.getIconHeight(), + BufferedImage.TYPE_INT_ARGB); + Graphics graphics = image.getGraphics(); + viewMenuIcon.paintIcon(filePane, graphics, 0, 0); + int x = image.getWidth() - 5; + int y = image.getHeight() / 2 - 1; + graphics.setColor(Color.BLACK); + graphics.fillPolygon(new int[]{x, x + 5, x + 2}, new int[]{y, y, y + 3}, 3); + + // Details Button + final JButton viewMenuButton = createToolButton(null, new ImageIcon(image), viewMenuButtonToolTipText, + viewMenuButtonAccessibleName); + + viewMenuButton.addMouseListener(new MouseAdapter() { + public void mousePressed(MouseEvent e) { + if (SwingUtilities.isLeftMouseButton(e) && !viewMenuButton.isSelected()) { + viewMenuButton.setSelected(true); + + viewTypePopupMenu.show(viewMenuButton, 0, viewMenuButton.getHeight()); + } + } + }); + viewMenuButton.addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent e) { + // Forbid keyboard actions if the button is not in rollover state + if (e.getKeyCode() == KeyEvent.VK_SPACE && viewMenuButton.getModel().isRollover()) { + viewMenuButton.setSelected(true); + + viewTypePopupMenu.show(viewMenuButton, 0, viewMenuButton.getHeight()); + } + } + }); + viewTypePopupMenu.addPopupMenuListener(new PopupMenuListener() { + public void popupMenuWillBecomeVisible(PopupMenuEvent e) { + } + + public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + viewMenuButton.setSelected(false); } - } - }); - } else { // After Windows Me - // View button group - ButtonGroup viewButtonGroup = new ButtonGroup(); - - // Popup Menu - final JPopupMenu viewTypePopupMenu = new JPopupMenu(); - - final JRadioButtonMenuItem listViewMenuItem = new JRadioButtonMenuItem( - filePane.getViewTypeAction(FilePane.VIEWTYPE_LIST)); - listViewMenuItem.setSelected(filePane.getViewType() == FilePane.VIEWTYPE_LIST); - viewTypePopupMenu.add(listViewMenuItem); - viewButtonGroup.add(listViewMenuItem); - - final JRadioButtonMenuItem detailsViewMenuItem = new JRadioButtonMenuItem( - filePane.getViewTypeAction(FilePane.VIEWTYPE_DETAILS)); - detailsViewMenuItem.setSelected(filePane.getViewType() == FilePane.VIEWTYPE_DETAILS); - viewTypePopupMenu.add(detailsViewMenuItem); - viewButtonGroup.add(detailsViewMenuItem); - - // Create icon for viewMenuButton - BufferedImage image = new BufferedImage(viewMenuIcon.getIconWidth() + 7, viewMenuIcon.getIconHeight(), - BufferedImage.TYPE_INT_ARGB); - Graphics graphics = image.getGraphics(); - viewMenuIcon.paintIcon(filePane, graphics, 0, 0); - int x = image.getWidth() - 5; - int y = image.getHeight() / 2 - 1; - graphics.setColor(Color.BLACK); - graphics.fillPolygon(new int[]{x, x + 5, x + 2}, new int[]{y, y, y + 3}, 3); - - // Details Button - final JButton viewMenuButton = new JButton(new ImageIcon(image)); - viewMenuButton.setToolTipText(viewMenuButtonToolTipText); - viewMenuButton.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, viewMenuButtonAccessibleName); - viewMenuButton.putClientProperty(WindowsLookAndFeel.HI_RES_DISABLED_ICON_CLIENT_KEY, Boolean.TRUE); - viewMenuButton.setFocusable(false); - viewMenuButton.setAlignmentX(JComponent.LEFT_ALIGNMENT); - viewMenuButton.setAlignmentY(JComponent.CENTER_ALIGNMENT); - viewMenuButton.setMargin(shrinkwrap); - viewMenuButton.setModel(new DefaultButtonModel() { - public void setPressed(boolean b) { - } - - public void setArmed(boolean b) { - } - - public void setSelected(boolean b) { - super.setSelected(b); - - if (b) { - stateMask |= PRESSED | ARMED; - } else { - stateMask &= ~(PRESSED | ARMED); + }); + } + + public void popupMenuCanceled(PopupMenuEvent e) { + } + }); + + topPanel.add(viewMenuButton); + + topPanel.add(Box.createRigidArea(new Dimension(80, 0))); + + filePane.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent e) { + if ("viewType".equals(e.getPropertyName())) { + switch (filePane.getViewType()) { + case FilePane.VIEWTYPE_LIST: + listViewMenuItem.setSelected(true); + break; + + case FilePane.VIEWTYPE_DETAILS: + detailsViewMenuItem.setSelected(true); + break; } } - }); - viewMenuButton.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent e) { - if (SwingUtilities.isLeftMouseButton(e)) { - viewMenuButton.setSelected(!viewMenuButton.isSelected()); - - if (viewMenuButton.isSelected()) { - viewTypePopupMenu.show(viewMenuButton, 0, viewMenuButton.getHeight()); - } - } - } - }); - viewTypePopupMenu.addPopupMenuListener(new PopupMenuListener() { - public void popupMenuWillBecomeVisible(PopupMenuEvent e) { - } - - public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - viewMenuButton.setSelected(false); - } - }); - } - - public void popupMenuCanceled(PopupMenuEvent e) { - } - }); - topPanel.add(viewMenuButton); - - topPanel.add(Box.createRigidArea(new Dimension(80, 0))); - - filePane.addPropertyChangeListener(new PropertyChangeListener() { - public void propertyChange(PropertyChangeEvent e) { - if ("viewType".equals(e.getPropertyName())) { - switch (filePane.getViewType()) { - case FilePane.VIEWTYPE_LIST: - listViewMenuItem.setSelected(true); - break; - - case FilePane.VIEWTYPE_DETAILS: - detailsViewMenuItem.setSelected(true); - break; - } - } - } - }); - } + } + }); // ************************************** // // ******* Add the directory pane ******* // @@ -622,19 +493,18 @@ public class WindowsFileChooserUI extend // Decide whether to use the ShellFolder class to populate shortcut // panel and combobox. JFileChooser fc = getFileChooser(); - if (OS_VERSION.compareTo(OSInfo.WINDOWS_ME) >= 0) { - if (FilePane.usesShellFolder(fc)) { - if (placesBar == null && !UIManager.getBoolean("FileChooser.noPlacesBar")) { - placesBar = new WindowsPlacesBar(fc, XPStyle.getXP() != null); - fc.add(placesBar, BorderLayout.BEFORE_LINE_BEGINS); - fc.addPropertyChangeListener(placesBar); - } - } else { - if (placesBar != null) { - fc.remove(placesBar); - fc.removePropertyChangeListener(placesBar); - placesBar = null; - } + + if (FilePane.usesShellFolder(fc)) { + if (placesBar == null && !UIManager.getBoolean("FileChooser.noPlacesBar")) { + placesBar = new WindowsPlacesBar(fc, XPStyle.getXP() != null); + fc.add(placesBar, BorderLayout.BEFORE_LINE_BEGINS); + fc.addPropertyChangeListener(placesBar); + } + } else { + if (placesBar != null) { + fc.remove(placesBar); + fc.removePropertyChangeListener(placesBar); + placesBar = null; } } } @@ -673,17 +543,8 @@ public class WindowsFileChooserUI extend upFolderToolTipText = UIManager.getString("FileChooser.upFolderToolTipText",l); upFolderAccessibleName = UIManager.getString("FileChooser.upFolderAccessibleName",l); - homeFolderToolTipText = UIManager.getString("FileChooser.homeFolderToolTipText",l); - homeFolderAccessibleName = UIManager.getString("FileChooser.homeFolderAccessibleName",l); - newFolderToolTipText = UIManager.getString("FileChooser.newFolderToolTipText",l); newFolderAccessibleName = UIManager.getString("FileChooser.newFolderAccessibleName",l); - - listViewButtonToolTipText = UIManager.getString("FileChooser.listViewButtonToolTipText",l); - listViewButtonAccessibleName = UIManager.getString("FileChooser.listViewButtonAccessibleName",l); - - detailsViewButtonToolTipText = UIManager.getString("FileChooser.detailsViewButtonToolTipText",l); - detailsViewButtonAccessibleName = UIManager.getString("FileChooser.detailsViewButtonAccessibleName",l); viewMenuButtonToolTipText = UIManager.getString("FileChooser.viewMenuButtonToolTipText",l); viewMenuButtonAccessibleName = UIManager.getString("FileChooser.viewMenuButtonAccessibleName",l); @@ -1052,6 +913,65 @@ public class WindowsFileChooserUI extend return new DirectoryComboBoxRenderer(); } + private static JButton createToolButton(Action a, Icon defaultIcon, String toolTipText, String accessibleName) { + final JButton result = new JButton(a); + + result.setText(null); + result.setIcon(defaultIcon); + result.setToolTipText(toolTipText); + result.setRequestFocusEnabled(false); + result.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, accessibleName); + result.putClientProperty(WindowsLookAndFeel.HI_RES_DISABLED_ICON_CLIENT_KEY, Boolean.TRUE); + result.setAlignmentX(JComponent.LEFT_ALIGNMENT); + result.setAlignmentY(JComponent.CENTER_ALIGNMENT); + result.setMargin(shrinkwrap); + result.setFocusPainted(false); + + result.setModel(new DefaultButtonModel() { + public void setPressed(boolean b) { + // Forbid keyboard actions if the button is not in rollover state + if (!b || isRollover()) { + super.setPressed(b); + } + } + + public void setRollover(boolean b) { + if (b && !isRollover()) { + // Reset other buttons + for (Component component : result.getParent().getComponents()) { + if (component instanceof JButton && component != result) { + ((JButton) component).getModel().setRollover(false); + } + } + } + + super.setRollover(b); + } + + public void setSelected(boolean b) { + super.setSelected(b); + + if (b) { + stateMask |= PRESSED | ARMED; + } else { + stateMask &= ~(PRESSED | ARMED); + } + } + }); + + result.addFocusListener(new FocusAdapter() { + public void focusGained(FocusEvent e) { + result.getModel().setRollover(true); + } + + public void focusLost(FocusEvent e) { + result.getModel().setRollover(false); + } + }); + + return result; + } + // // Renderer for DirectoryComboBox // --- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java Tue Sep 22 01:20:51 2009 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,7 +104,6 @@ public class WindowsLookAndFeel extends new StringUIClientPropertyKey( "WindowsLookAndFeel.generateHiResDisabledIcon"); - private Toolkit toolkit; private boolean updatePending = false; private boolean useSystemFontSettings = true; @@ -149,7 +148,6 @@ public class WindowsLookAndFeel extends public void initialize() { super.initialize(); - toolkit = Toolkit.getDefaultToolkit(); // Set the flag which determines which version of Windows should // be rendered. This flag only need to be set once. @@ -470,80 +468,61 @@ public class WindowsLookAndFeel extends Object ControlBackgroundColor = new DesktopProperty( "win.3d.backgroundColor", - table.get("control"), - toolkit); + table.get("control")); Object ControlLightColor = new DesktopProperty( "win.3d.lightColor", - table.get("controlHighlight"), - toolkit); + table.get("controlHighlight")); Object ControlHighlightColor = new DesktopProperty( "win.3d.highlightColor", - table.get("controlLtHighlight"), - toolkit); + table.get("controlLtHighlight")); Object ControlShadowColor = new DesktopProperty( "win.3d.shadowColor", - table.get("controlShadow"), - toolkit); + table.get("controlShadow")); Object ControlDarkShadowColor = new DesktopProperty( "win.3d.darkShadowColor", - table.get("controlDkShadow"), - toolkit); + table.get("controlDkShadow")); Object ControlTextColor = new DesktopProperty( "win.button.textColor", - table.get("controlText"), - toolkit); + table.get("controlText")); Object MenuBackgroundColor = new DesktopProperty( "win.menu.backgroundColor", - table.get("menu"), - toolkit); + table.get("menu")); Object MenuBarBackgroundColor = new DesktopProperty( "win.menubar.backgroundColor", - table.get("menu"), - toolkit); + table.get("menu")); Object MenuTextColor = new DesktopProperty( "win.menu.textColor", - table.get("menuText"), - toolkit); + table.get("menuText")); Object SelectionBackgroundColor = new DesktopProperty( "win.item.highlightColor", - table.get("textHighlight"), - toolkit); + table.get("textHighlight")); Object SelectionTextColor = new DesktopProperty( "win.item.highlightTextColor", - table.get("textHighlightText"), - toolkit); + table.get("textHighlightText")); Object WindowBackgroundColor = new DesktopProperty( "win.frame.backgroundColor", - table.get("window"), - toolkit); + table.get("window")); Object WindowTextColor = new DesktopProperty( "win.frame.textColor", - table.get("windowText"), - toolkit); + table.get("windowText")); Object WindowBorderWidth = new DesktopProperty( "win.frame.sizingBorderWidth", - Integer.valueOf(1), - toolkit); + Integer.valueOf(1)); Object TitlePaneHeight = new DesktopProperty( "win.frame.captionHeight", - Integer.valueOf(18), - toolkit); + Integer.valueOf(18)); Object TitleButtonWidth = new DesktopProperty( "win.frame.captionButtonWidth", - Integer.valueOf(16), - toolkit); + Integer.valueOf(16)); Object TitleButtonHeight = new DesktopProperty( "win.frame.captionButtonHeight", - Integer.valueOf(16), - toolkit); + Integer.valueOf(16)); Object InactiveTextColor = new DesktopProperty( "win.text.grayedTextColor", - table.get("textInactiveText"), - toolkit); + table.get("textInactiveText")); Object ScrollbarBackgroundColor = new DesktopProperty( "win.scrollbar.backgroundColor", - table.get("scrollbar"), - toolkit); + table.get("scrollbar")); Object TextBackground = new XPColorValue(Part.EP_EDIT, null, Prop.FILLCOLOR, WindowBackgroundColor); @@ -566,32 +545,22 @@ public class WindowsLookAndFeel extends Object ToolTipFont = sansSerifPlain12; Object IconFont = ControlFont; - Object scrollBarWidth = new DesktopProperty("win.scrollbar.width", - Integer.valueOf(16), toolkit); - - Object menuBarHeight = new DesktopProperty("win.menu.height", - null, toolkit); - - Object hotTrackingOn = new DesktopProperty("win.item.hotTrackingOn", - true, toolkit); - - Object showMnemonics = new DesktopProperty("win.menu.keyboardCuesOn", - Boolean.TRUE, toolkit); + Object scrollBarWidth = new DesktopProperty("win.scrollbar.width", Integer.valueOf(16)); + + Object menuBarHeight = new DesktopProperty("win.menu.height", null); + + Object hotTrackingOn = new DesktopProperty("win.item.hotTrackingOn", true); + + Object showMnemonics = new DesktopProperty("win.menu.keyboardCuesOn", Boolean.TRUE); if (useSystemFontSettings) { - MenuFont = getDesktopFontValue("win.menu.font", MenuFont, toolkit); - FixedControlFont = getDesktopFontValue("win.ansiFixed.font", - FixedControlFont, toolkit); - ControlFont = getDesktopFontValue("win.defaultGUI.font", - ControlFont, toolkit); - MessageFont = getDesktopFontValue("win.messagebox.font", - MessageFont, toolkit); - WindowFont = getDesktopFontValue("win.frame.captionFont", - WindowFont, toolkit); - IconFont = getDesktopFontValue("win.icon.font", - IconFont, toolkit); - ToolTipFont = getDesktopFontValue("win.tooltip.font", ToolTipFont, - toolkit); + MenuFont = getDesktopFontValue("win.menu.font", MenuFont); + FixedControlFont = getDesktopFontValue("win.ansiFixed.font", FixedControlFont); + ControlFont = getDesktopFontValue("win.defaultGUI.font", ControlFont); + MessageFont = getDesktopFontValue("win.messagebox.font", MessageFont); + WindowFont = getDesktopFontValue("win.frame.captionFont", WindowFont); + IconFont = getDesktopFontValue("win.icon.font", IconFont); + ToolTipFont = getDesktopFontValue("win.tooltip.font", ToolTipFont); /* Put the desktop AA settings in the defaults. * JComponent.setUI() retrieves this and makes it available @@ -605,26 +574,14 @@ public class WindowsLookAndFeel extends new FontDesktopProperty(SunToolkit.DESKTOPFONTHINTS); } if (useSystemFontSizeSettings) { - MenuFont = new WindowsFontSizeProperty("win.menu.font.height", - toolkit, Font.DIALOG, Font.PLAIN, 12); - FixedControlFont = new WindowsFontSizeProperty( - "win.ansiFixed.font.height", toolkit, Font.MONOSPACED, + MenuFont = new WindowsFontSizeProperty("win.menu.font.height", Font.DIALOG, Font.PLAIN, 12); + FixedControlFont = new WindowsFontSizeProperty("win.ansiFixed.font.height", Font.MONOSPACED, Font.PLAIN, 12); - ControlFont = new WindowsFontSizeProperty( - "win.defaultGUI.font.height", toolkit, Font.DIALOG, - Font.PLAIN, 12); - MessageFont = new WindowsFontSizeProperty( - "win.messagebox.font.height", - toolkit, Font.DIALOG, Font.PLAIN, 12); - WindowFont = new WindowsFontSizeProperty( - "win.frame.captionFont.height", toolkit, - Font.DIALOG, Font.BOLD, 12); - ToolTipFont = new WindowsFontSizeProperty( - "win.tooltip.font.height", toolkit, Font.SANS_SERIF, - Font.PLAIN, 12); - IconFont = new WindowsFontSizeProperty( - "win.icon.font.height", toolkit, Font.DIALOG, - Font.PLAIN, 12); + ControlFont = new WindowsFontSizeProperty("win.defaultGUI.font.height", Font.DIALOG, Font.PLAIN, 12); + MessageFont = new WindowsFontSizeProperty("win.messagebox.font.height", Font.DIALOG, Font.PLAIN, 12); + WindowFont = new WindowsFontSizeProperty("win.frame.captionFont.height", Font.DIALOG, Font.BOLD, 12); + ToolTipFont = new WindowsFontSizeProperty("win.tooltip.font.height", Font.SANS_SERIF, Font.PLAIN, 12); + IconFont = new WindowsFontSizeProperty("win.icon.font.height", Font.DIALOG, Font.PLAIN, 12); } @@ -752,8 +709,7 @@ public class WindowsLookAndFeel extends // DeskTop. "Desktop.background", new DesktopProperty( "win.desktop.backgroundColor", - table.get("desktop"), - toolkit), + table.get("desktop")), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl F5", "restore", @@ -819,7 +775,7 @@ public class WindowsLookAndFeel extends "FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf(KeyEvent.VK_T), "FileChooser.usesSingleFilePane", Boolean.TRUE, "FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar", - Boolean.FALSE, toolkit), + Boolean.FALSE), "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection", @@ -861,36 +817,28 @@ public class WindowsLookAndFeel extends "InternalFrame.resizeIconShadow", ControlShadowColor, "InternalFrame.activeBorderColor", new DesktopProperty( "win.frame.activeBorderColor", - table.get("windowBorder"), - toolkit), + table.get("windowBorder")), "InternalFrame.inactiveBorderColor", new DesktopProperty( "win.frame.inactiveBorderColor", - table.get("windowBorder"), - toolkit), + table.get("windowBorder")), "InternalFrame.activeTitleBackground", new DesktopProperty( "win.frame.activeCaptionColor", - table.get("activeCaption"), - toolkit), + table.get("activeCaption")), "InternalFrame.activeTitleGradient", new DesktopProperty( "win.frame.activeCaptionGradientColor", - table.get("activeCaption"), - toolkit), + table.get("activeCaption")), "InternalFrame.activeTitleForeground", new DesktopProperty( "win.frame.captionTextColor", - table.get("activeCaptionText"), - toolkit), + table.get("activeCaptionText")), "InternalFrame.inactiveTitleBackground", new DesktopProperty( "win.frame.inactiveCaptionColor", - table.get("inactiveCaption"), - toolkit), + table.get("inactiveCaption")), "InternalFrame.inactiveTitleGradient", new DesktopProperty( "win.frame.inactiveCaptionGradientColor", - table.get("inactiveCaption"), - toolkit), + table.get("inactiveCaption")), "InternalFrame.inactiveTitleForeground", new DesktopProperty( "win.frame.inactiveCaptionTextColor", - table.get("inactiveCaptionText"), - toolkit), + table.get("inactiveCaptionText")), "InternalFrame.maximizeIcon", WindowsIconFactory.createFrameMaximizeIcon(), @@ -1529,12 +1477,8 @@ public class WindowsLookAndFeel extends // *** ToolTip "ToolTip.font", ToolTipFont, - "ToolTip.background", new DesktopProperty( - "win.tooltip.backgroundColor", - table.get("info"), toolkit), - "ToolTip.foreground", new DesktopProperty( - "win.tooltip.textColor", - table.get("infoText"), toolkit), + "ToolTip.background", new DesktopProperty("win.tooltip.backgroundColor", table.get("info")), + "ToolTip.foreground", new DesktopProperty("win.tooltip.textColor", table.get("infoText")), // *** ToolTipManager "ToolTipManager.enableToolTipMode", "activeApplication", @@ -1798,10 +1742,9 @@ public class WindowsLookAndFeel extends * represented in the current encoding this will return null and * turn off the use of system fonts. */ - private Object getDesktopFontValue(String fontName, Object backup, - Toolkit kit) { + private Object getDesktopFontValue(String fontName, Object backup) { if (useSystemFontSettings) { - return new WindowsFontProperty(fontName, backup, kit); + return new WindowsFontProperty(fontName, backup); } return null; } @@ -1989,7 +1932,6 @@ public class WindowsLookAndFeel extends public void uninitialize() { super.uninitialize(); - toolkit = null; if (WindowsPopupMenuUI.mnemonicListener != null) { MenuSelectionManager.defaultManager(). @@ -2309,8 +2251,8 @@ public class WindowsLookAndFeel extends * is returned, it is mapped to 'Microsoft Sans Serif'. */ private static class WindowsFontProperty extends DesktopProperty { - WindowsFontProperty(String key, Object backup, Toolkit kit) { - super(key, backup, kit); + WindowsFontProperty(String key, Object backup) { + super(key, backup); } public void invalidate(LookAndFeel laf) { @@ -2372,9 +2314,9 @@ public class WindowsLookAndFeel extends private int fontSize; private int fontStyle; - WindowsFontSizeProperty(String key, Toolkit toolkit, String fontName, + WindowsFontSizeProperty(String key, String fontName, int fontStyle, int fontSize) { - super(key, null, toolkit); + super(key, null); this.fontName = fontName; this.fontSize = fontSize; this.fontStyle = fontStyle; @@ -2508,7 +2450,7 @@ public class WindowsLookAndFeel extends private class TriggerDesktopProperty extends DesktopProperty { TriggerDesktopProperty(String key) { - super(key, null, toolkit); + super(key, null); // This call adds a property change listener for the property, // which triggers a call to updateUI(). The value returned // is not interesting here. --- a/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java Tue Sep 22 01:20:51 2009 -0700 @@ -129,7 +129,7 @@ public class TextCallbackHandler impleme System.err.print(pc.getPrompt()); System.err.flush(); - pc.setPassword(Password.readPassword(System.in)); + pc.setPassword(Password.readPassword(System.in, pc.isEchoOn())); } else if (callbacks[i] instanceof ConfirmationCallback) { confirmation = (ConfirmationCallback) callbacks[i]; --- a/src/share/classes/com/sun/security/sasl/Provider.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/com/sun/security/sasl/Provider.java Tue Sep 22 01:20:51 2009 -0700 @@ -51,7 +51,7 @@ public final class Provider extends java " server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)"; public Provider() { - super("SunSASL", 1.5, info); + super("SunSASL", 1.7d, info); AccessController.doPrivileged(new PrivilegedAction () { public Void run() { --- a/src/share/classes/java/awt/Cursor.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/awt/Cursor.java Tue Sep 22 01:20:51 2009 -0700 @@ -119,7 +119,7 @@ public class Cursor implements java.io.S public static final int MOVE_CURSOR = 13; /** - * @deprecated As of JDK version 1.7, the {@link #getPredefinedCursor()} + * @deprecated As of JDK version 1.7, the {@link #getPredefinedCursor(int)} * method should be used instead. */ @Deprecated --- a/src/share/classes/java/awt/Window.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/awt/Window.java Tue Sep 22 01:20:51 2009 -0700 @@ -3347,7 +3347,7 @@ public class Window extends Container im * * @return the opacity of the window * - * @see Window#setOpacity + * @see Window#setOpacity(float) * @see GraphicsDevice.WindowTranslucency * * @since 1.7 @@ -3366,7 +3366,7 @@ public class Window extends Container im * window. This is a platform-dependent behavior. * * In order for this method to enable the translucency effect, the {@link - * GraphicsDevice#isWindowTranslucencySupported()} method must indicate that + * GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)} method must indicate that * the {@link GraphicsDevice.WindowTranslucency#TRANSLUCENT TRANSLUCENT} * translucency is supported. *
@@ -3375,8 +3375,8 @@ public class Window extends Container im * IllegalComponentStateException} is thrown. *
* The translucency levels of individual pixels may also be effected by the - * alpha component of their color (see {@link setBackground()}) and the - * current shape of this window (see {@link setShape()}). + * alpha component of their color (see {@link Window#setBackground(Color)}) and the + * current shape of this window (see {@link #setShape(Shape)}). * * @param opacity the opacity level to set to the window * @@ -3389,10 +3389,10 @@ public class Window extends Container im * translucency kind is not supported and the opacity is less than 1.0f * * @see Window#getOpacity - * @see Window#setBackground() - * @see Window#setShape() + * @see Window#setBackground(Color) + * @see Window#setShape(Shape) * @see GraphicsDevice.WindowTranslucency - * @see GraphicsDevice#isWindowTranslucencySupported() + * @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency) * * @since 1.7 */ @@ -3434,7 +3434,7 @@ public class Window extends Container im * @return the shape of the window or {@code null} if no * shape is specified for the window * - * @see Window#setShape + * @see Window#setShape(Shape) * @see GraphicsDevice.WindowTranslucency * * @since 1.7 @@ -3458,19 +3458,19 @@ public class Window extends Container im *
*
* If a certain condition is not met, either the {@code * UnsupportedOperationException} or {@code IllegalComponentStateException} * is thrown. *- The {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSPARENT * PERPIXEL_TRANSPARENT} translucency kind must be supported by the - * underlying system (see {@link }) + * underlying system * and *
- The window must not be in the full-screen mode (see - * {@link GraphicsDevice#setFullScreenWindow()}) + * {@link GraphicsDevice#setFullScreenWindow(Window)}) *
* The tranlucency levels of individual pixels may also be effected by the - * alpha component of their color (see {@link setBackground()}) and the - * opacity value (see {@link setOpacity()}). See {@link - * GraphicsDevice#WindowTranslucency} for more details. + * alpha component of their color (see {@link Window#setBackground(Color)}) and the + * opacity value (see {@link #setOpacity(float)}). See {@link + * GraphicsDevice.WindowTranslucency} for more details. * * @param shape the shape to set to the window * @@ -3481,10 +3481,10 @@ public class Window extends Container im * PERPIXEL_TRANSPARENT} translucency is not supported * * @see Window#getShape() - * @see Window#setBackgound() - * @see Window#setOpacity() + * @see Window#setBackground(Color) + * @see Window#setOpacity(float) * @see GraphicsDevice.WindowTranslucency - * @see GraphicsDevice#isWindowTranslucencySupported() + * @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency) * * @since 1.7 */ @@ -3520,7 +3520,7 @@ public class Window extends Container im * * @return this component's background color * - * @see Window#setBackground + * @see Window#setBackground(Color) * @see Window#isOpaque * @see GraphicsDevice.WindowTranslucency */ @@ -3544,7 +3544,7 @@ public class Window extends Container im * PERPIXEL_TRANSLUCENT} translucency must be supported * by the graphics device where this window is located and *
The window must not be in the full-screen mode (see {@link - * GraphicsDevice#setFullScreenWindow()}) + * GraphicsDevice#setFullScreenWindow(Window)}) * * If a certain condition is not met at the time of calling this method, * the alpha component of the given background color will not effect the @@ -3561,8 +3561,8 @@ public class Window extends Container im * method is equal to zero.) * * - ** The actual level of translucency of a given pixel also depends on window - * opacity (see {@link setOpacity()}), as well as the current shape of - * this window (see {@link setShape()}). + * opacity (see {@link #setOpacity(float)}), as well as the current shape of + * this window (see {@link #setShape(Shape)}). *
* Note that painting a pixel with the alpha value of 0 may or may not * disable the mouse event handling on this pixel. This is a @@ -3585,10 +3585,10 @@ public class Window extends Container im * * @see Window#getBackground * @see Window#isOpaque - * @see Window#setOpacity() - * @see Window#setShape() + * @see Window#setOpacity(float) + * @see Window#setShape(Shape) * @see GraphicsDevice.WindowTranslucency - * @see GraphicsDevice#isWindowTranslucencySupported() + * @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency) * @see GraphicsConfiguration#isTranslucencyCapable() */ @Override @@ -3635,7 +3635,7 @@ public class Window extends Container im * @return {@code true} if the window is opaque, {@code false} otherwise * * @see Window#getBackground - * @see Window#setBackground + * @see Window#setBackground(Color) * @since 1.7 */ @Override --- a/src/share/classes/java/awt/dnd/DragSourceContext.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/awt/dnd/DragSourceContext.java Tue Sep 22 01:20:51 2009 -0700 @@ -275,7 +275,7 @@ public class DragSourceContext * * @param c the initial {@code Cursor} for this drag operation, * or {@code null} for the default cursor handling; - * see {@linkplain #defaultCursor class + * see {@linkplain Cursor class * level documentation} for more details * on the cursor handling during drag and drop * --- a/src/share/classes/java/lang/Character.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/Character.java Tue Sep 22 01:20:51 2009 -0700 @@ -162,7 +162,7 @@ class Character extends Object implement * * @since 1.0.2 */ - public static final char MAX_VALUE = '\uffff'; + public static final char MAX_VALUE = '\uFFFF'; /** * The
Class
instance representing the primitive type @@ -518,75 +518,91 @@ class Character extends Object implement public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18; /** - * The minimum value of a Unicode high-surrogate code unit in the - * UTF-16 encoding. A high-surrogate is also known as a - * leading-surrogate. + * The minimum value of a + * + * Unicode high-surrogate code unit + * in the UTF-16 encoding, constant'\uD800'
. + * A high-surrogate is also known as a leading-surrogate. * * @since 1.5 */ public static final char MIN_HIGH_SURROGATE = '\uD800'; /** - * The maximum value of a Unicode high-surrogate code unit in the - * UTF-16 encoding. A high-surrogate is also known as a - * leading-surrogate. + * The maximum value of a + * + * Unicode high-surrogate code unit + * in the UTF-16 encoding, constant'\uDBFF'
. + * A high-surrogate is also known as a leading-surrogate. * * @since 1.5 */ public static final char MAX_HIGH_SURROGATE = '\uDBFF'; /** - * The minimum value of a Unicode low-surrogate code unit in the - * UTF-16 encoding. A low-surrogate is also known as a - * trailing-surrogate. + * The minimum value of a + * + * Unicode low-surrogate code unit + * in the UTF-16 encoding, constant'\uDC00'
. + * A low-surrogate is also known as a trailing-surrogate. * * @since 1.5 */ public static final char MIN_LOW_SURROGATE = '\uDC00'; /** - * The maximum value of a Unicode low-surrogate code unit in the - * UTF-16 encoding. A low-surrogate is also known as a - * trailing-surrogate. + * The maximum value of a + * + * Unicode low-surrogate code unit + * in the UTF-16 encoding, constant'\uDFFF'
. + * A low-surrogate is also known as a trailing-surrogate. * * @since 1.5 */ public static final char MAX_LOW_SURROGATE = '\uDFFF'; /** - * The minimum value of a Unicode surrogate code unit in the UTF-16 encoding. + * The minimum value of a Unicode surrogate code unit in the + * UTF-16 encoding, constant'\uD800'
. * * @since 1.5 */ public static final char MIN_SURROGATE = MIN_HIGH_SURROGATE; /** - * The maximum value of a Unicode surrogate code unit in the UTF-16 encoding. + * The maximum value of a Unicode surrogate code unit in the + * UTF-16 encoding, constant'\uDFFF'
. * * @since 1.5 */ public static final char MAX_SURROGATE = MAX_LOW_SURROGATE; /** - * The minimum value of a supplementary code point. + * The minimum value of a + * + * Unicode supplementary code point, constant {@code U+10000}. * * @since 1.5 */ public static final int MIN_SUPPLEMENTARY_CODE_POINT = 0x010000; /** - * The minimum value of a Unicode code point. + * The minimum value of a + * + * Unicode code point, constant {@code U+0000}. * * @since 1.5 */ public static final int MIN_CODE_POINT = 0x000000; /** - * The maximum value of a Unicode code point. + * The maximum value of a + * + * Unicode code point, constant {@code U+10FFFF}. * * @since 1.5 */ - public static final int MAX_CODE_POINT = 0x10ffff; + public static final int MAX_CODE_POINT = 0X10FFFF; /** @@ -2571,9 +2587,9 @@ class Character extends Object implement * significantly better space and time performance by caching * frequently requested values. * - * This method will always cache values in the range '\u0000' - * to '\u007f'", inclusive, and may cache other values outside - * of this range. + * This method will always cache values in the range {@code + * '\u005Cu0000'} to {@code '\u005Cu007f'}, inclusive, and may + * cache other values outside of this range. * * @param c a char value. * @return a Character instance representing c. @@ -2648,19 +2664,15 @@ class Character extends Object implement } /** - * Determines whether the specified code point is a valid Unicode - * code point value in the range of0x0000
to - *0x10FFFF
inclusive. This method is equivalent to - * the expression: - * - *+ * Determines whether the specified code point is a valid + * + * Unicode code point value. * * @param codePoint the Unicode code point to be tested - * @return- * codePoint >= 0x0000 && codePoint <= 0x10FFFF - *true
if the specified code point value - * is a valid code point value; - *false
otherwise. + * @return {@code true} if the specified code point value is between + * {@link #MIN_CODE_POINT} and + * {@link #MAX_CODE_POINT} inclusive; + * {@code false} otherwise. * @since 1.5 */ public static boolean isValidCodePoint(int codePoint) { @@ -2669,15 +2681,13 @@ class Character extends Object implement /** * Determines whether the specified character (Unicode code point) - * is in the supplementary character range. The method call is - * equivalent to the expression: - *+ * is in the supplementary character range. * * @param codePoint the character (Unicode code point) to be tested - * @return- * codePoint >= 0x10000 && codePoint <= 0x10FFFF - *true
if the specified character is in the Unicode - * supplementary character range;false
otherwise. + * @return {@code true} if the specified code point is between + * {@link #MIN_SUPPLEMENTARY_CODE_POINT} and + * {@link #MAX_CODE_POINT} inclusive; + * {@code false} otherwise. * @since 1.5 */ public static boolean isSupplementaryCodePoint(int codePoint) { @@ -2686,56 +2696,83 @@ class Character extends Object implement } /** - * Determines if the givenchar
value is a - * high-surrogate code unit (also known as leading-surrogate - * code unit). Such values do not represent characters by - * themselves, but are used in the representation of supplementary characters in the - * UTF-16 encoding. - * - *This method returns
true
if and only if - *- * isch >= '\uD800' && ch <= '\uDBFF' - *true
. - * - * @param ch thechar
value to be tested. - * @returntrue
if thechar
value - * is between '\uD800' and '\uDBFF' inclusive; - *false
otherwise. - * @see java.lang.Character#isLowSurrogate(char) - * @see Character.UnicodeBlock#of(int) - * @since 1.5 + * Determines if the given {@code char} value is a + * + * Unicode high-surrogate code unit + * (also known as leading-surrogate code unit). + * + *Such values do not represent characters by themselves, + * but are used in the representation of + * supplementary characters + * in the UTF-16 encoding. + * + * @param ch the {@code char} value to be tested. + * @return {@code true} if the {@code char} value is between + * {@link #MIN_HIGH_SURROGATE} and + * {@link #MAX_HIGH_SURROGATE} inclusive; + * {@code false} otherwise. + * @see #isLowSurrogate(char) + * @see Character.UnicodeBlock#of(int) + * @since 1.5 */ public static boolean isHighSurrogate(char ch) { return ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE; } /** - * Determines if the given
char
value is a - * low-surrogate code unit (also known as trailing-surrogate code - * unit). Such values do not represent characters by themselves, - * but are used in the representation of supplementary characters in the UTF-16 encoding. - * - *This method returns
true
if and only if - *isch >= '\uDC00' && ch <= '\uDFFF' - *true
. - * - * @param ch thechar
value to be tested. - * @returntrue
if thechar
value - * is between '\uDC00' and '\uDFFF' inclusive; - *false
otherwise. - * @see java.lang.Character#isHighSurrogate(char) - * @since 1.5 + * Determines if the given {@code char} value is a + * + * Unicode low-surrogate code unit + * (also known as trailing-surrogate code unit). + * + *Such values do not represent characters by themselves, + * but are used in the representation of + * supplementary characters + * in the UTF-16 encoding. + * + * @param ch the {@code char} value to be tested. + * @return {@code true} if the {@code char} value is between + * {@link #MIN_LOW_SURROGATE} and + * {@link #MAX_LOW_SURROGATE} inclusive; + * {@code false} otherwise. + * @see #isHighSurrogate(char) + * @since 1.5 */ public static boolean isLowSurrogate(char ch) { return ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE; } /** + * Determines if the given {@code char} value is a Unicode + * surrogate code unit. + * + *
Such values do not represent characters by themselves, + * but are used in the representation of + * supplementary characters + * in the UTF-16 encoding. + * + *
A char value is a surrogate code unit if and only if it is either + * a {@linkplain #isLowSurrogate(char) low-surrogate code unit} or + * a {@linkplain #isHighSurrogate(char) high-surrogate code unit}. + * + * @param ch the {@code char} value to be tested. + * @return {@code true} if the {@code char} value is between + * {@link #MIN_SURROGATE} and + * {@link #MAX_SURROGATE} inclusive; + * {@code false} otherwise. + * @since 1.7 + */ + public static boolean isSurrogate(char ch) { + return ch >= MIN_SURROGATE && ch <= MAX_SURROGATE; + } + + /** * Determines whether the specified pair of
char
- * values is a valid surrogate pair. This method is equivalent to - * the expression: + * values is a valid + * + * Unicode surrogate pair. + + *This method is equivalent to the expression: *
@@ -4968,7 +5005,7 @@ class Character extends Object implement /** * The number of bits used to represent a char value in unsigned - * binary form. + * binary form, constant {@code 16}. * * @since 1.5 */ --- a/src/share/classes/java/lang/EnumConstantNotPresentException.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/EnumConstantNotPresentException.java Tue Sep 22 01:20:51 2009 -0700 @@ -28,8 +28,12 @@ package java.lang; /** * Thrown when an application tries to access an enum constant by name * and the enum type contains no constant with the specified name. + * This exception can be thrown by the {@linkplain + * java.lang.reflect.AnnotatedElement API used to read annotations + * reflectively}. * * @author Josh Bloch + * @see java.lang.reflect.AnnotatedElement * @since 1.5 */ public class EnumConstantNotPresentException extends RuntimeException { --- a/src/share/classes/java/lang/String.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/String.java Tue Sep 22 01:20:51 2009 -0700 @@ -2301,6 +2301,54 @@ public final class String * @spec JSR-51 */ public String[] split(String regex, int limit) { + /* fastpath if the regex is a + (1)one-char String and this character is not one of the + RegEx's meta characters ".$|()[{^?*+\\", or + (2)two-char String and the first char is the backslash and + the second is not the ascii digit or ascii letter. + */ + char ch = 0; + if (((regex.count == 1 && + ".$|()[{^?*+\\".indexOf(ch = regex.charAt(0)) == -1) || + (regex.length() == 2 && + regex.charAt(0) == '\\' && + (((ch = regex.charAt(1))-'0')|('9'-ch)) < 0 && + ((ch-'a')|('z'-ch)) < 0 && + ((ch-'A')|('Z'-ch)) < 0)) && + (ch < Character.MIN_HIGH_SURROGATE || + ch > Character.MAX_LOW_SURROGATE)) + { + int off = 0; + int next = 0; + boolean limited = limit > 0; + ArrayList* isHighSurrogate(high) && isLowSurrogate(low) *list = new ArrayList (); + while ((next = indexOf(ch, off)) != -1) { + if (!limited || list.size() < limit - 1) { + list.add(substring(off, next)); + off = next + 1; + } else { // last one + //assert (list.size() == limit - 1); + list.add(substring(off, count)); + off = count; + break; + } + } + // If no match was found, return this + if (off == 0) + return new String[] { this }; + + // Add remaining segment + if (!limited || list.size() < limit) + list.add(substring(off, count)); + + // Construct result + int resultSize = list.size(); + if (limit == 0) + while (resultSize > 0 && list.get(resultSize-1).length() == 0) + resultSize--; + String[] result = new String[resultSize]; + return list.subList(0, resultSize).toArray(result); + } return Pattern.compile(regex).split(this, limit); } --- a/src/share/classes/java/lang/TypeNotPresentException.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/TypeNotPresentException.java Tue Sep 22 01:20:51 2009 -0700 @@ -35,8 +35,12 @@ package java.lang; * Note that this exception may be used when undefined type variables * are accessed as well as when types (e.g., classes, interfaces or * annotation types) are loaded. + * In particular, this exception can be thrown by the {@linkplain + * java.lang.reflect.AnnotatedElement API used to read annotations + * reflectively}. * * @author Josh Bloch + * @see java.lang.reflect.AnnotatedElement * @since 1.5 */ public class TypeNotPresentException extends RuntimeException { --- a/src/share/classes/java/lang/annotation/AnnotationFormatError.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/annotation/AnnotationFormatError.java Tue Sep 22 01:20:51 2009 -0700 @@ -28,8 +28,12 @@ package java.lang.annotation; /** * Thrown when the annotation parser attempts to read an annotation * from a class file and determines that the annotation is malformed. + * This error can be thrown by the {@linkplain + * java.lang.reflect.AnnotatedElement API used to read annotations + * reflectively}. * * @author Josh Bloch + * @see java.lang.reflect.AnnotatedElement * @since 1.5 */ public class AnnotationFormatError extends Error { --- a/src/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java Tue Sep 22 01:20:51 2009 -0700 @@ -30,8 +30,12 @@ import java.lang.reflect.Method; * Thrown to indicate that a program has attempted to access an element of * an annotation whose type has changed after the annotation was compiled * (or serialized). + * This exception can be thrown by the {@linkplain + * java.lang.reflect.AnnotatedElement API used to read annotations + * reflectively}. * * @author Josh Bloch + * @see java.lang.reflect.AnnotatedElement * @since 1.5 */ public class AnnotationTypeMismatchException extends RuntimeException { --- a/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java Tue Sep 22 01:20:51 2009 -0700 @@ -30,8 +30,12 @@ package java.lang.annotation; * an annotation type that was added to the annotation type definition after * the annotation was compiled (or serialized). This exception will not be * thrown if the new element has a default value. + * This exception can be thrown by the {@linkplain + * java.lang.reflect.AnnotatedElement API used to read annotations + * reflectively}. * * @author Josh Bloch + * @see java.lang.reflect.AnnotatedElement * @since 1.5 */ public class IncompleteAnnotationException extends RuntimeException { --- a/src/share/classes/java/lang/reflect/AnnotatedElement.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/reflect/AnnotatedElement.java Tue Sep 22 01:20:51 2009 -0700 @@ -50,6 +50,11 @@ import java.lang.annotation.Annotation; * java.lang.annotation.AnnotationTypeMismatchException} or an * {@link java.lang.annotation.IncompleteAnnotationException}. * + * @see java.lang.EnumConstantNotPresentException + * @see java.lang.TypeNotPresentException + * @see java.lang.annotation.AnnotationFormatError + * @see java.lang.annotation.AnnotationTypeMismatchException + * @see java.lang.annotation.IncompleteAnnotationException * @since 1.5 * @author Josh Bloch */ --- a/src/share/classes/java/lang/reflect/Constructor.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/reflect/Constructor.java Tue Sep 22 01:20:51 2009 -0700 @@ -81,10 +81,6 @@ public final // of permissions); we speed up the check in the common case by // remembering the last Class for which the check succeeded. private volatile Class securityCheckCache; - - // Modifiers that can be applied to a constructor in source code - private static final int LANGUAGE_MODIFIERS = - Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; // Generics infrastructure // Accessor for factory @@ -359,7 +355,7 @@ public final public String toString() { try { StringBuffer sb = new StringBuffer(); - int mod = getModifiers() & LANGUAGE_MODIFIERS; + int mod = getModifiers() & Modifier.constructorModifiers(); if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } @@ -423,7 +419,7 @@ public final public String toGenericString() { try { StringBuilder sb = new StringBuilder(); - int mod = getModifiers() & LANGUAGE_MODIFIERS; + int mod = getModifiers() & Modifier.constructorModifiers(); if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } --- a/src/share/classes/java/lang/reflect/Method.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/reflect/Method.java Tue Sep 22 01:20:51 2009 -0700 @@ -88,12 +88,6 @@ public final private Class securityCheckCache; private Class securityCheckTargetClassCache; - // Modifiers that can be applied to a method in source code - private static final int LANGUAGE_MODIFIERS = - Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | - Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | - Modifier.SYNCHRONIZED | Modifier.NATIVE; - // Generics infrastructure private String getGenericSignature() {return signature;} @@ -408,12 +402,12 @@ public final * {@code public}, {@code protected} or {@code private} first, * and then other modifiers in the following order: * {@code abstract}, {@code static}, {@code final}, - * {@code synchronized}, {@code native}. + * {@code synchronized}, {@code native}, {@code strictfp}. */ public String toString() { try { StringBuffer sb = new StringBuffer(); - int mod = getModifiers() & LANGUAGE_MODIFIERS; + int mod = getModifiers() & Modifier.methodModifiers(); if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } @@ -473,7 +467,7 @@ public final * {@code public}, {@code protected} or {@code private} first, * and then other modifiers in the following order: * {@code abstract}, {@code static}, {@code final}, - * {@code synchronized} {@code native}. + * {@code synchronized}, {@code native}, {@code strictfp}. * * @return a string describing this {@code Method}, * include type parameters @@ -483,7 +477,7 @@ public final public String toGenericString() { try { StringBuilder sb = new StringBuilder(); - int mod = getModifiers() & LANGUAGE_MODIFIERS; + int mod = getModifiers() & Modifier.methodModifiers(); if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } --- a/src/share/classes/java/lang/reflect/Modifier.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/lang/reflect/Modifier.java Tue Sep 22 01:20:51 2009 -0700 @@ -235,6 +235,11 @@ class Modifier { * possible validity of the combination of modifiers represented * by the input. * + * Note that to perform such checking for a known kind of entity, + * such as a constructor or method, first AND the argument of + * {@code toString} with the appropriate mask from a method like + * {@link #constructorModifiers} or {@link #methodModifiers}. + * * @param mod a set of modifiers * @return a string representation of the set of modifiers * represented by {@code mod} @@ -353,4 +358,108 @@ class Modifier { static boolean isSynthetic(int mod) { return (mod & SYNTHETIC) != 0; } + + /** + * See JLSv3 section 8.1.1. + */ + private static final int CLASS_MODIFIERS = + Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | + Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | + Modifier.STRICT; + + /** + * See JLSv3 section 9.1.1. + */ + private static final int INTERFACE_MODIFIERS = + Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | + Modifier.ABSTRACT | Modifier.STATIC | Modifier.STRICT; + + + /** + * See JLSv3 section 8.8.3. + */ + private static final int CONSTRUCTOR_MODIFIERS = + Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; + + /** + * See JLSv3 section 8.4.3. + */ + private static final int METHOD_MODIFIERS = + Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | + Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | + Modifier.SYNCHRONIZED | Modifier.NATIVE | Modifier.STRICT; + + /** + * See JLSv3 section 8.3.1. + */ + private static final int FIELD_MODIFIERS = + Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | + Modifier.STATIC | Modifier.FINAL | Modifier.TRANSIENT | + Modifier.VOLATILE; + + /** + * Return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a class. + * @return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a class. + * + * @jls3 8.1.1 Class Modifiers + * @since 1.7 + */ + public static int classModifiers() { + return CLASS_MODIFIERS; + } + + /** + * Return an {@code int} value OR-ing together the source language + * modifiers that can be applied to an interface. + * @return an {@code int} value OR-ing together the source language + * modifiers that can be applied to an inteface. + * + * @jls3 9.1.1 Interface Modifiers + * @since 1.7 + */ + public static int interfaceModifiers() { + return INTERFACE_MODIFIERS; + } + + /** + * Return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a constructor. + * @return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a constructor. + * + * @jls3 8.8.3 Constructor Modifiers + * @since 1.7 + */ + public static int constructorModifiers() { + return CONSTRUCTOR_MODIFIERS; + } + + /** + * Return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a method. + * @return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a method. + * + * @jls3 8.4.3 Method Modifiers + * @since 1.7 + */ + public static int methodModifiers() { + return METHOD_MODIFIERS; + } + + + /** + * Return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a field. + * @return an {@code int} value OR-ing together the source language + * modifiers that can be applied to a field. + * + * @jls3 8.3.1 Field Modifiers + * @since 1.7 + */ + public static int fieldModifiers() { + return FIELD_MODIFIERS; + } } --- a/src/share/classes/java/math/BigDecimal.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/math/BigDecimal.java Tue Sep 22 01:20:51 2009 -0700 @@ -315,6 +315,10 @@ public class BigDecimal extends Number i new BigDecimal(BigInteger.ZERO, 0, 15, 1), }; + // Half of Long.MIN_VALUE & Long.MAX_VALUE. + private static final long HALF_LONG_MAX_VALUE = Long.MAX_VALUE / 2; + private static final long HALF_LONG_MIN_VALUE = Long.MIN_VALUE / 2; + // Constants /** * The value 0, with a scale of 0. @@ -1455,10 +1459,15 @@ public class BigDecimal extends Number i } else if (roundingMode == ROUND_FLOOR) { // Towards -infinity increment = (qsign < 0); } else { - if (isLongDivision || ldivisor != INFLATED) - cmpFracHalf = longCompareMagnitude(2 * r, ldivisor); - else + if (isLongDivision || ldivisor != INFLATED) { + if (r <= HALF_LONG_MIN_VALUE || r > HALF_LONG_MAX_VALUE) { + cmpFracHalf = 1; // 2 * r can't fit into long + } else { + cmpFracHalf = longCompareMagnitude(2 * r, ldivisor); + } + } else { cmpFracHalf = mr.compareHalf(mdivisor); + } if (cmpFracHalf < 0) increment = false; // We're closer to higher digit else if (cmpFracHalf > 0) // We're closer to lower digit --- a/src/share/classes/java/nio/channels/AsynchronousByteChannel.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/nio/channels/AsynchronousByteChannel.java Tue Sep 22 01:20:51 2009 -0700 @@ -56,18 +56,18 @@ public interface AsynchronousByteChannel /** * Reads a sequence of bytes from this channel into the given buffer. * - *
This method initiates an operation to read a sequence of bytes from - * this channel into the given buffer. The method returns a {@link Future} - * representing the pending result of the operation. The result of the - * operation, obtained by invoking the {@code Future} 's {@link - * Future#get() get} method, is the number of bytes read or {@code -1} if - * all bytes have been read and the channel has reached end-of-stream. - * - *
This method initiates a read operation to read up to r bytes - * from the channel, where r is the number of bytes remaining in the - * buffer, that is, {@code dst.remaining()} at the time that the read is - * attempted. Where r is 0, the read operation completes immediately - * with a result of {@code 0} without initiating an I/O operation. + *
This method initiates an asynchronous read operation to read a + * sequence of bytes from this channel into the given buffer. The {@code + * handler} parameter is a completion handler that is invoked when the read + * operation completes (or fails). The result passed to the completion + * handler is the number of bytes read or {@code -1} if no bytes could be + * read because the channel has reached end-of-stream. + * + *
The read operation may read up to r bytes from the channel, + * where r is the number of bytes remaining in the buffer, that is, + * {@code dst.remaining()} at the time that the read is attempted. Where + * r is 0, the read operation completes immediately with a result of + * {@code 0} without initiating an I/O operation. * *
Suppose that a byte sequence of length n is read, where * 0 < n <= r. @@ -79,44 +79,46 @@ public interface AsynchronousByteChannel * p + n; its limit will not have changed. * *
Buffers are not safe for use by multiple concurrent threads so care - * should be taken to not to access the buffer until the operaton has completed. + * should be taken to not access the buffer until the operation has + * completed. * *
This method may be invoked at any time. Some channel types may not * allow more than one read to be outstanding at any given time. If a thread * initiates a read operation before a previous read operation has * completed then a {@link ReadPendingException} will be thrown. - * - *
The handler parameter is used to specify a {@link - * CompletionHandler}. When the read operation completes the handler's - * {@link CompletionHandler#completed completed} method is executed. - * * * @param dst * The buffer into which bytes are to be transferred * @param attachment * The object to attach to the I/O operation; can be {@code null} * @param handler - * The completion handler object; can be {@code null} - * - * @return A Future representing the result of the operation + * The completion handler * * @throws IllegalArgumentException * If the buffer is read-only * @throws ReadPendingException * If the channel does not allow more than one read to be outstanding * and a previous read has not completed - */ - Future
read(ByteBuffer dst, - A attachment, - CompletionHandler handler); + * @throws ShutdownChannelGroupException + * If the channel is associated with a {@link AsynchronousChannelGroup + * group} that has terminated + */ + void read(ByteBuffer dst, + A attachment, + CompletionHandler handler); /** * Reads a sequence of bytes from this channel into the given buffer. * - * An invocation of this method of the form c.read(dst) - * behaves in exactly the same manner as the invocation - *
+ *- * c.read(dst, null, null);This method initiates an asynchronous read operation to read a + * sequence of bytes from this channel into the given buffer. The method + * behaves in exactly the same manner as the {@link + * #read(ByteBuffer,Object,CompletionHandler) + * read(ByteBuffer,Object,CompletionHandler)} method except that instead + * of specifying a completion handler, this method returns a {@code Future} + * representing the pending result. The {@code Future}'s {@link Future#get() + * get} method returns the number of bytes read or {@code -1} if no bytes + * could be read because the channel has reached end-of-stream. * * @param dst * The buffer into which bytes are to be transferred @@ -134,17 +136,17 @@ public interface AsynchronousByteChannel /** * Writes a sequence of bytes to this channel from the given buffer. * - *
This method initiates an operation to write a sequence of bytes to - * this channel from the given buffer. This method returns a {@link - * Future} representing the pending result of the operation. The result - * of the operation, obtained by invoking the Future's {@link - * Future#get() get} method, is the number of bytes written, possibly zero. - * - *
This method initiates a write operation to write up to r bytes - * to the channel, where r is the number of bytes remaining in the - * buffer, that is, {@code src.remaining()} at the moment the write is - * attempted. Where r is 0, the write operation completes immediately - * with a result of {@code 0} without initiating an I/O operation. + *
This method initiates an asynchronous write operation to write a + * sequence of bytes to this channel from the given buffer. The {@code + * handler} parameter is a completion handler that is invoked when the write + * operation completes (or fails). The result passed to the completion + * handler is the number of bytes written. + * + *
The write operation may write up to r bytes to the channel, + * where r is the number of bytes remaining in the buffer, that is, + * {@code src.remaining()} at the time that the write is attempted. Where + * r is 0, the write operation completes immediately with a result of + * {@code 0} without initiating an I/O operation. * *
Suppose that a byte sequence of length n is written, where * 0 < n <= r. @@ -156,41 +158,43 @@ public interface AsynchronousByteChannel * p + n; its limit will not have changed. * *
Buffers are not safe for use by multiple concurrent threads so care - * should be taken to not to access the buffer until the operaton has completed. + * should be taken to not access the buffer until the operation has + * completed. * *
This method may be invoked at any time. Some channel types may not * allow more than one write to be outstanding at any given time. If a thread * initiates a write operation before a previous write operation has * completed then a {@link WritePendingException} will be thrown. - * - *
The handler parameter is used to specify a {@link - * CompletionHandler}. When the write operation completes the handler's - * {@link CompletionHandler#completed completed} method is executed. * * @param src * The buffer from which bytes are to be retrieved * @param attachment * The object to attach to the I/O operation; can be {@code null} * @param handler - * The completion handler object; can be {@code null} - * - * @return A Future representing the result of the operation + * The completion handler object * * @throws WritePendingException * If the channel does not allow more than one write to be outstanding * and a previous write has not completed - */ - Future
write(ByteBuffer src, - A attachment, - CompletionHandler handler); + * @throws ShutdownChannelGroupException + * If the channel is associated with a {@link AsynchronousChannelGroup + * group} that has terminated + */ + void write(ByteBuffer src, + A attachment, + CompletionHandler handler); /** * Writes a sequence of bytes to this channel from the given buffer. * - * An invocation of this method of the form c.write(src) - * behaves in exactly the same manner as the invocation - *
+ *- * c.write(src, null, null);This method initiates an asynchronous write operation to write a + * sequence of bytes to this channel from the given buffer. The method + * behaves in exactly the same manner as the {@link + * #write(ByteBuffer,Object,CompletionHandler) + * write(ByteBuffer,Object,CompletionHandler)} method except that instead + * of specifying a completion handler, this method returns a {@code Future} + * representing the pending result. The {@code Future}'s {@link Future#get() + * get} method returns the number of bytes written. * * @param src * The buffer from which bytes are to be retrieved --- a/src/share/classes/java/nio/channels/AsynchronousChannel.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/nio/channels/AsynchronousChannel.java Tue Sep 22 01:20:51 2009 -0700 @@ -34,7 +34,8 @@ import java.util.concurrent.Future; // * *
*
* * where operation is the name of the I/O operation (read or write for @@ -48,7 +49,7 @@ import java.util.concurrent.Future; // * interface may be used to check if the operation has completed, wait for its * completion, and to retrieve the result. In the second form, a {@link * CompletionHandler} is invoked to consume the result of the I/O operation when - * it completes, fails, or is cancelled. + * it completes or fails. * *- - *
{@link Future}<V> operation(...)- + *
Future<V> operation(... A attachment, {@link CompletionHandler}<V,? super A> handler)- *
void operation(... A attachment, {@link + * CompletionHandler}<V,? super A> handler)A channel that implements this interface is asynchronously * closeable: If an I/O operation is outstanding on the channel and the @@ -63,33 +64,33 @@ import java.util.concurrent.Future; // *
Cancellation
* *The {@code Future} interface defines the {@link Future#cancel cancel} - * method to cancel execution of a task. + * method to cancel execution. This causes all threads waiting on the result of + * the I/O operation to throw {@link java.util.concurrent.CancellationException}. + * Whether the underlying I/O operation can be cancelled is highly implementation + * specific and therefore not specified. Where cancellation leaves the channel, + * or the entity to which it is connected, in an inconsistent state, then the + * channel is put into an implementation specific error state that + * prevents further attempts to initiate I/O operations that are similar + * to the operation that was cancelled. For example, if a read operation is + * cancelled but the implementation cannot guarantee that bytes have not been + * read from the channel then it puts the channel into an error state; further + * attempts to initiate a {@code read} operation cause an unspecified runtime + * exception to be thrown. Similarly, if a write operation is cancelled but the + * implementation cannot guarantee that bytes have not been written to the + * channel then subsequent attempts to initiate a {@code write} will fail with + * an unspecified runtime exception. * - *
Where the {@code cancel} method is invoked with the {@code + *
Where the {@link Future#cancel cancel} method is invoked with the {@code * mayInterruptIfRunning} parameter set to {@code true} then the I/O operation - * may be interrupted by closing the channel. This will cause any other I/O - * operations outstanding on the channel to complete with the exception {@link - * AsynchronousCloseException}. - * - *
If a {@code CompletionHandler} is specified when initiating an I/O - * operation, and the {@code cancel} method is invoked to cancel the I/O - * operation before it completes, then the {@code CompletionHandler}'s {@link - * CompletionHandler#cancelled cancelled} method is invoked. - * - *
If an implementation of this interface supports a means to cancel I/O - * operations, and where cancellation may leave the channel, or the entity to - * which it is connected, in an inconsistent state, then the channel is put into - * an implementation specific error state that prevents further - * attempts to initiate I/O operations on the channel. For example, if a read - * operation is cancelled but the implementation cannot guarantee that bytes - * have not been read from the channel then it puts the channel into error state - * state; further attempts to initiate a {@code read} operation causes an - * unspecified runtime exception to be thrown. + * may be interrupted by closing the channel. In that case all threads waiting + * on the result of the I/O operation throw {@code CancellationException} and + * any other I/O operations outstanding on the channel complete with the + * exception {@link AsynchronousCloseException}. * *
Where the {@code cancel} method is invoked to cancel read or write - * operations then it recommended that all buffers used in the I/O operations be - * discarded or care taken to ensure that the buffers are not accessed while the - * channel remains open. + * operations then it is recommended that all buffers used in the I/O operations + * be discarded or care taken to ensure that the buffers are not accessed while + * the channel remains open. * * @since 1.7 */ @@ -102,7 +103,7 @@ public interface AsynchronousChannel * *
Any outstanding asynchronous operations upon this channel will * complete with the exception {@link AsynchronousCloseException}. After a - * channel is closed then further attempts to initiate asynchronous I/O + * channel is closed, further attempts to initiate asynchronous I/O * operations complete immediately with cause {@link ClosedChannelException}. * *
This method otherwise behaves exactly as specified by the {@link --- a/src/share/classes/java/nio/channels/AsynchronousDatagramChannel.java Tue Sep 15 16:15:36 2009 +0400 +++ b/src/share/classes/java/nio/channels/AsynchronousDatagramChannel.java Tue Sep 22 01:20:51 2009 -0700 @@ -109,17 +109,11 @@ import java.nio.ByteBuffer; * // print the source address of all packets that we receive * dc.receive(buffer, buffer, new CompletionHandler<SocketAddress,ByteBuffer>() { * public void completed(SocketAddress sa, ByteBuffer buffer) { - * try { - * System.out.println(sa); - * - * buffer.clear(); - * dc.receive(buffer, buffer, this); - * } catch (...) { ... } + * System.out.println(sa); + * buffer.clear(); + * dc.receive(buffer, buffer, this); * } * public void failed(Throwable exc, ByteBuffer buffer) { - * ... - * } - * public void cancelled(ByteBuffer buffer) { * ... * } * }); @@ -314,10 +308,10 @@ public abstract class AsynchronousDatagr /** * Receives a datagram via this channel. * - *
This method initiates the receiving of a datagram, returning a - * {@code Future} representing the pending result of the operation. - * The {@code Future}'s {@link Future#get() get} method returns - * the source address of the datagram upon successful completion. + *
This method initiates the receiving of a datagram into the given + * buffer. The {@code handler} parameter is a completion handler that is + * invoked when the receive operation completes (or fails). The result + * passed to the completion handler is the datagram's source address. * *
The datagram is transferred into the given byte buffer starting at * its current position, as if by a regular {@link AsynchronousByteChannel#read @@ -350,28 +344,26 @@ public abstract class AsynchronousDatagr * @param attachment * The object to attach to the I/O operation; can be {@code null} * @param handler - * The handler for consuming the result; can be {@code null} - * - * @return a {@code Future} object representing the pending result + * The handler for consuming the result * * @throws IllegalArgumentException * If the timeout is negative or the buffer is read-only * @throws ShutdownChannelGroupException - * If a handler is specified, and the channel group is shutdown - */ - public abstract Future
receive(ByteBuffer dst, - long timeout, - TimeUnit unit, - A attachment, - CompletionHandler handler); + * If the channel group has terminated + */ + public abstract void receive(ByteBuffer dst, + long timeout, + TimeUnit unit, + A attachment, + CompletionHandler handler); /** * Receives a datagram via this channel. * - * This method initiates the receiving of a datagram, returning a - * {@code Future} representing the pending result of the operation. - * The {@code Future}'s {@link Future#get() get} method returns - * the source address of the datagram upon successful completion. + *
This method initiates the receiving of a datagram into the given + * buffer. The {@code handler} parameter is a completion handler that is + * invoked when the receive operation completes (or fails). The result + * passed to the completion handler is the datagram's source address. * *
This method is equivalent to invoking {@link * #receive(ByteBuffer,long,TimeUnit,Object,CompletionHandler)} with a @@ -382,34 +374,30 @@ public abstract class AsynchronousDatagr * @param attachment * The object to attach to the I/O operation; can be {@code null} * @param handler - * The handler for consuming the result; can be {@code null} - * - * @return a {@code Future} object representing the pending result + * The handler for consuming the result * * @throws IllegalArgumentException * If the buffer is read-only * @throws ShutdownChannelGroupException - * If a handler is specified, and the channel group is shutdown - */ - public final Future
receive(ByteBuffer dst, - A attachment, - CompletionHandler handler) + * If the channel group has terminated + */ + public final void receive(ByteBuffer dst, + A attachment, + CompletionHandler handler) { - return receive(dst, 0L, TimeUnit.MILLISECONDS, attachment, handler); + receive(dst, 0L, TimeUnit.MILLISECONDS, attachment, handler); } /** * Receives a datagram via this channel. * - * This method initiates the receiving of a datagram, returning a - * {@code Future} representing the pending result of the operation. - * The {@code Future}'s {@link Future#get() get} method returns - * the source address of the datagram upon successful completion. - * - *
This method is equivalent to invoking {@link - * #receive(ByteBuffer,long,TimeUnit,Object,CompletionHandler)} with a - * timeout of {@code 0L}, and an attachment and completion handler - * of {@code null}. + *