changeset 2347:45bd445f6250

Merge
author lana
date Fri, 19 Mar 2010 18:49:36 -0700
parents d23dcd3e3ce4 2cafbbe9825e
children bf23bec88222
files make/java/text/FILES_java.gmk test/java/nio/file/WatchService/OverflowEventIsLoner.java
diffstat 162 files changed, 4850 insertions(+), 1150 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Mar 12 01:09:13 2010 +0000
+++ b/.hgtags	Fri Mar 19 18:49:36 2010 -0700
@@ -59,3 +59,5 @@
 69ef657320ad5c35cfa12e4d8322d877e778f8b3 jdk7-b82
 9027c6b9d7e2c9ca04a1add691b5b50d0f22b1aa jdk7-b83
 7cb9388bb1a16365fa5118c5efa38b1cd58be40d jdk7-b84
+b396584a3e64988839cca21ea1f7fbdcc9248783 jdk7-b85
+eae6e9ab26064d9ba0e7665dd646a1fd2506fcc1 jdk7-b86
--- a/make/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -240,7 +240,12 @@
 
 all build:: sanity-all post-sanity-all
 
-SUBDIRS    = tools java javax org sun sunw com jpda mkdemo mksample launchers
+SUBDIRS       = tools java javax sun com
+SUBDIRS_tools = launchers
+SUBDIRS_misc  = org sunw jpda mkdemo mksample
+
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build::
 	$(SUBDIRS-loop)
 
--- a/make/com/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = sun
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -38,10 +38,19 @@
   endif
 endif
 
+# jarsigner is part of JRE
+SUBDIRS = java security net/ssl jarsigner
+
+SUBDIRS_management = jmx
+SUBDIRS_desktop    = image inputmethods
+SUBDIRS_enterprise = crypto/provider jndi \
+                     org xml rowset net/httpserver
+SUBDIRS_misc       = $(SCRIPT_SUBDIR) tracing servicetag nio demo
+
 # Omit mirror since it's built with the apt tool.
-SUBDIRS = $(SCRIPT_SUBDIR) image security crypto/provider jndi jmx \
-    java inputmethods org xml rowset net/httpserver net/ssl demo \
-    tools jarsigner tracing servicetag nio
+SUBDIRS_tools      = tools
+
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/com/sun/demo/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/demo/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -38,6 +38,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = jvmti
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/demo/jvmti/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/demo/jvmti/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -38,6 +38,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = hprof
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/inputmethods/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/inputmethods/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = indicim thaiim
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/java/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/java/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,7 +31,10 @@
 PRODUCT = plugin
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = browser pack
+SUBDIRS = pack
+SUBDIRS_misc = browser
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/java/browser/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/java/browser/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = dom net
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/jmx/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/jmx/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -51,6 +51,8 @@
   SUBDIRS = snmp
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/jndi/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/jndi/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = toolkit cosnaming ldap rmi dns
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/jndi/rmi/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/jndi/rmi/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = registry
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/nio/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/nio/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = sctp
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/org/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/org/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS =  apache
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/org/apache/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/org/apache/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,6 +31,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = xml
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/com/sun/security/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/security/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -30,7 +30,10 @@
 BUILDDIR = ../../..
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = jgss sasl auth auth/module
+SUBDIRS = auth
+SUBDIRS_misc = jgss sasl auth/module
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/tools/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/tools/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -35,6 +35,8 @@
 AUTO_FILES_JAVA_DIRS = com/sun/tools/extcheck
 
 SUBDIRS = attach
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 clean clobber::
--- a/make/com/sun/tracing/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/com/sun/tracing/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -33,6 +33,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = dtrace
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 clean clobber::
--- a/make/common/Defs.gmk	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/common/Defs.gmk	Fri Mar 19 18:49:36 2010 -0700
@@ -576,17 +576,17 @@
 define install-file
 $(prep-target)
 $(CP) $< $@
-$(install-module-file)
+@$(install-module-file)
 endef
 
 define chmod-file
 $(CHMOD) $1 $@
-$(call chmod-module-file, $1)
+@$(call chmod-module-file, $1)
 endef
 
 define install-sym-link
 $(LN) -s $1 $@
-$(call install-module-sym-link, $1)
+@$(call install-module-sym-link, $1)
 endef
 
 #
@@ -607,131 +607,9 @@
 if [ -w $(HOTSPOT_LOG_NAME) ] ; then $(RM) $(HOTSPOT_LOG_NAME); fi
 endef
 
-# Default make settings for processing SUBDIRS with clobber or clean names
-SUBDIRS_MAKEFLAGS-clobber = INCREMENTAL_BUILD=false
-SUBDIRS_MAKEFLAGS-clean   = INCREMENTAL_BUILD=false
-
 # Current directory
 CURRENT_DIRECTORY := $(shell $(PWD))
 
-# If no timing wanted, we need to define these as empty
-ifdef NO_TIMING
-
-TIMING_ID:=NA
-
-define TIMING_start
-t=0:0:0:0
-endef
-
-define TIMING_end
-time_used=0
-endef
-
-else # NO_TIMING
-
-# Default timing id
-TIMING_ID:=$(shell $(BASENAME) $(CURRENT_DIRECTORY))
-
-# Timing start (must be used in same shell, e.g. same command line)
-#    Defines the shell variable $1 to have the start time.
-define TIMING_start
-$1=`$(DATE) +%j:%H:%M:%S`
-endef
-
-# Timing end (must be used in same shell, e.g. same command line)
-#    Expects shell variable $1 to have been defined as the start time.
-#    Expects shell variable $2 to have timing id string
-#    Sets total_seconds shell variable as the total seconds used.
-#    Sets time_used shell variable to contain format "%dh%dm%ds"
-define TIMING_end
-begTime="$${$1}"; \
-timing_id="$${$2}"; \
-endTime=`$(DATE) +%j:%H:%M:%S`; \
-d1=`$(ECHO) $${begTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \
-if [ "$${d1}" = "" ] ; then d1=0; fi; \
-h1=`$(ECHO) $${begTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \
-if [ "$${h1}" = "" ] ; then h1=0; fi; \
-m1=`$(ECHO) $${begTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \
-if [ "$${m1}" = "" ] ; then m1=0; fi; \
-s1=`$(ECHO) $${begTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \
-if [ "$${s1}" = "" ] ; then s1=0; fi; \
-d2=`$(ECHO) $${endTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \
-if [ "$${d2}" = "" ] ; then d2=0; fi; \
-h2=`$(ECHO) $${endTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \
-if [ "$${h2}" = "" ] ; then h2=0; fi; \
-m2=`$(ECHO) $${endTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \
-if [ "$${m2}" = "" ] ; then m2=0; fi; \
-s2=`$(ECHO) $${endTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \
-if [ "$${s2}" = "" ] ; then s2=0; fi; \
-t1_secs=`$(EXPR) $${d1} '*' 60 '*' 60 '*' 24 '+' $${h1} '*' 60 '*' 60 \
-		 '+' $${m1} '*' 60 '+' $${s1}`; \
-t2_secs=`$(EXPR) $${d2} '*' 60 '*' 60 '*' 24 '+' $${h2} '*' 60 '*' 60 \
-		 '+' $${m2} '*' 60 '+' $${s2}`; \
-total_seconds=`$(EXPR) $${t2_secs} '-' $${t1_secs}`; \
-if [ "$${total_seconds}" -lt 0 ] ; then total_seconds=0; fi; \
-t_hour=`$(EXPR) $${total_seconds} '/' '(' 60 '*' 60 ')'`h; \
-t_min=`$(EXPR) '(' $${total_seconds} '%' '(' 60 '*' 60 ')' ')' '/' 60`m; \
-t_sec=`$(EXPR) $${total_seconds} '%' 60`s; \
-time_used=$${t_sec}; \
-if [ "$${t_hour}" != "0h" ] ; then \
-time_used=$${t_hour}$${t_min}$${t_sec}; \
-elif [ "$${t_min}" != "0m" ] ; then \
-time_used=$${t_min}$${t_sec}; \
-else \
-time_used=$${t_sec}; \
-fi; \
-$(PRINTF) "  Timing: %05d seconds or %s for %s\n" \
-    $${total_seconds} $${time_used} $${timing_id}
-endef
-
-endif # NO_TIMING
-
-# Given a SUBDIRS list, cd into them and make them
-#   SUBDIRS_MAKEFLAGS      Make settings for a subdir make
-#   SUBDIRS_MAKEFLAGS-$@   Make settings specific to this target
-define SUBDIRS-loop
-@$(ECHO) "Begin Processing SUBDIRS: $(SUBDIRS)"
-@for i in DUMMY $(SUBDIRS) ; do \
-  if [ "$$i" != "DUMMY" ] ; then \
-    $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \
-    timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \
-    $(call TIMING_start,startTime); \
-    curDir=$(CURRENT_DIRECTORY); \
-    $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \
-			  $(SUBDIRS_MAKEFLAGS) \
-			  $(SUBDIRS_MAKEFLAGS-$@) \
-			  FULL_VERSION=$(FULL_VERSION) \
-			  RELEASE=$(RELEASE) || exit 1; \
-	       $(CD) $${curDir}; \
-    $(call TIMING_end,startTime,timing_id); \
-    $(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \
-  fi ; \
-done
-@$(ECHO) "Done Processing SUBDIRS: $(SUBDIRS)"
-endef
-
-# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
-#   OTHERSUBDIRS_MAKEFLAGS      Make settings for a subdir make
-define OTHERSUBDIRS-loop
-@$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
-@for i in DUMMY $(OTHERSUBDIRS) ; do \
-  if [ "$$i" != "DUMMY" ] ; then \
-    $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \
-    timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \
-    $(call TIMING_start,startTime); \
-    curDir=$(CURRENT_DIRECTORY); \
-    $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \
-		          $(OTHERSUBDIRS_MAKEFLAGS) \
-			  FULL_VERSION=$(FULL_VERSION) \
-			  RELEASE=$(RELEASE) || exit 1; \
-	       $(CD) $${curDir}; \
-    $(call TIMING_end,startTime,timing_id); \
-    $(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \
-  fi ; \
-done
-@$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
-endef
-
 #
 # Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is
 #    used for this file, otherwise the default settings are used.
@@ -819,7 +697,7 @@
 
 define install-import-file
 $(install-importonly-file)
-$(install-module-file)
+@$(install-module-file)
 endef
 
 .PHONY: all build clean clobber
--- a/make/common/Sanity.gmk	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/common/Sanity.gmk	Fri Mar 19 18:49:36 2010 -0700
@@ -71,7 +71,8 @@
     sane-cacerts \
     sane-ant_version \
     sane-zip_version \
-    sane-msvcrt_path
+    sane-msvcrt_path \
+    sane-build_modules
 
 # The rules sanity-* have a one-to-one correspondence with the major targets
 # Each sanity-* rule should have no body to ensure that the post-sanity-* is the
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/Subdirs.gmk	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,204 @@
+# Copyright 2010 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions
+#
+
+#
+# Generic makefile for building subdirectories.
+#
+# SUBDIRS variables to specify the subdirectories to build recursively.
+# Makefile has to include Subdirs.gmk AFTER all SUBDIRS variables are
+# defined.
+#
+# This file does not contain any rule.
+#
+# WARNING: This file is shared with other workspaces.
+#          So when it includes other files, it must use JDK_TOPDIR.
+
+#
+# SUBDIRS          subdirs for the base module always get built
+# SUBDIRS_<group>  subdirs for the named group
+#
+# By default, subdirs specified in the SUBDIRS and all SUBDIRS_* 
+# variables will be built.
+# 
+# BUILD_MODULES variable can be used to specify one or more groups
+# to be built (BUILD_MODULES=all will build all groups).
+#
+# Variables of the currently supported groups are:
+#  SUBDIRS_desktop    
+#  SUBDIRS_management
+#  SUBDIRS_enterprise
+#  SUBDIRS_misc
+#  SUBDIRS_tools
+# 
+# Change to the above list also need to update 
+# make/common/shared/Sanity.gmk.  NOTE: this list is subject
+# to change till the JDK 7 SE profiles/modules are finalized.
+# 
+# Eventually we want to restructure the make directory
+# according to these grouping (e.g. make/desktop/...) and
+# the SUBDIRS_<group> variables would not be needed.
+# 
+# To build the desktop and tools groups only, you can do:
+# gnumake BUILD_MODULES="desktop tools" ...
+# 
+
+# Iterate the subdirectories specified in $1.
+# - cd into each subdir and make them
+
+# Given a SUBDIRS* list (first argument), cd into them and make them
+#   SUBDIRS_MAKEFLAGS      Make settings for a subdir make
+#   SUBDIRS_MAKEFLAGS-$@   Make settings specific to this target
+#
+define subdirs-group-loop
+@$(ECHO) "Begin Processing SUBDIRS: $($1)"
+@for i in DUMMY $($1) ; do \
+  if [ "$$i" != "DUMMY" ] ; then \
+    $(MAKE) -C $$i $@ $(SUBDIRS_MAKEFLAGS) $(SUBDIRS_MAKEFLAGS-$@) \
+            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
+  fi ; \
+done
+@$(ECHO) "Done Processing SUBDIRS: $($1)"
+endef
+
+# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
+#   OTHERSUBDIRS_MAKEFLAGS      Make settings for a subdir make
+define OTHERSUBDIRS-loop
+@$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
+@for i in DUMMY $(OTHERSUBDIRS) ; do \
+  if [ "$$i" != "DUMMY" ] ; then \
+    $(MAKE) -C $$i $@ $(OTHERSUBDIRS_MAKEFLAGS) \
+            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
+  fi ; \
+done
+@$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
+endef
+
+#
+# Iterate the list specified in SUBDIRS_<group> only if
+# SUBDIRS_<group> is set and <group> or "all" is specified
+# in the BUILD_MODULES variable
+#
+ifdef SUBDIRS_desktop 
+  ifneq (,$(findstring desktop, $(BUILD_MODULES)))
+      define subdirs-desktop-loop
+         @$(call subdirs-group-loop,SUBDIRS_desktop)
+      endef
+  else
+    define subdirs-desktop-loop
+    endef
+  endif
+else   
+  define subdirs-desktop-loop
+  endef
+endif   # SUBDIRS_desktop 
+
+ifdef SUBDIRS_enterprise 
+  ifneq (,$(findstring enterprise, $(BUILD_MODULES)))
+      define subdirs-enterprise-loop
+         @$(call subdirs-group-loop,SUBDIRS_enterprise)
+      endef
+  else
+    define subdirs-enterprise-loop
+    endef
+  endif
+else   
+define subdirs-enterprise-loop
+endef
+endif   # SUBDIRS_enterprise 
+
+ifdef SUBDIRS_management 
+  ifneq (,$(findstring management, $(BUILD_MODULES)))
+      define subdirs-management-loop
+         @$(call subdirs-group-loop,SUBDIRS_management)
+      endef
+  else
+    define subdirs-management-loop
+    endef
+  endif
+else   
+define subdirs-management-loop
+endef
+endif   # SUBDIRS_management 
+
+ifdef SUBDIRS_misc 
+  ifneq (,$(findstring misc, $(BUILD_MODULES)))
+      define subdirs-misc-loop
+         @$(call subdirs-group-loop,SUBDIRS_misc)
+      endef
+  else
+    define subdirs-misc-loop
+    endef
+  endif
+else   
+define subdirs-misc-loop
+endef
+endif   # SUBDIRS_misc 
+
+ifdef SUBDIRS_tools 
+  ifneq (,$(findstring tools, $(BUILD_MODULES)))
+      define subdirs-tools-loop
+         @$(call subdirs-group-loop,SUBDIRS_tools)
+      endef
+  else
+    define subdirs-tools-loop
+    endef
+  endif
+else   
+define subdirs-tools-loop
+endef
+endif   # SUBDIRS_tools 
+
+#
+# If BUILD_MODULES is not set or it's set to "all",
+# iterate all groups.
+SUBDIRS_all = $(SUBDIRS) $(SUBDIRS_desktop) $(SUBDIRS_enterprise) \
+	      $(SUBDIRS_management) $(SUBDIRS_misc) $(SUBDIRS_tools)
+
+ifndef BUILD_MODULES
+define SUBDIRS-loop
+  @$(call subdirs-group-loop,SUBDIRS_all)
+endef
+
+else
+
+ifneq (,$(findstring all, $(BUILD_MODULES)))
+define SUBDIRS-loop
+  @$(call subdirs-group-loop,SUBDIRS_all)
+endef
+
+else # BUILD_MODULES set 
+#
+# Iterate SUBDIRS and the groups specified in BUILD_MODULES
+#
+define SUBDIRS-loop
+  @$(call subdirs-group-loop,SUBDIRS)
+  @$(subdirs-desktop-loop)
+  @$(subdirs-enterprise-loop)
+  @$(subdirs-management-loop)
+  @$(subdirs-misc-loop)
+  @$(subdirs-tools-loop)
+endef
+
+endif
+endif # BUILD_MODULES
--- a/make/common/shared/Sanity.gmk	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/common/shared/Sanity.gmk	Fri Mar 19 18:49:36 2010 -0700
@@ -218,7 +218,8 @@
 	sane-zip_version \
 	sane-unzip_version \
  	sane-msvcrt_path \
-        sane-freetype
+        sane-freetype \
+        sane-build_modules
 
 ######################################################
 # check for COPYRIGHT_YEAR variable
@@ -686,13 +687,13 @@
 ######################################################
 sane-alt_outputdir:
 ifdef ALT_OUTPUTDIR
-	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_OUTPUTDIR must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
   ifeq ($(PLATFORM), windows)
-	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -c '^([A-Za-z]:)'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: On windows, ALT_OUTPUTDIR must contain the drive letter. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
@@ -741,7 +742,7 @@
 ######################################################
 sane-alt_bootdir:
 ifdef ALT_BOOTDIR
-	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "      The current value of ALT_BOOTDIR is \n" \
@@ -771,7 +772,7 @@
 ######################################################
 sane-local-bootdir:
 ifeq ($(PLATFORM), windows)
-	@if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -ci '^J:'` -ne 0 ]; then \
+	@if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -c '^[jJ]:'` -ne 0 ]; then \
 	  $(ECHO) "WARNING: Your BOOTDIR is located on the J: drive. Often the J:\n" \
 	    "        drive is mapped over a network. Using a mapped drive for\n" \
 	    "        the BOOTDIR may significantly slow down the build process.\n" \
@@ -788,7 +789,7 @@
 ######################################################
 sane-cacerts:
   ifdef ALT_CACERTS_FILE
-	@if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_CACERTS_FILE must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "      The current value of ALT_CACERTS_FILE is \n" \
@@ -845,6 +846,21 @@
 endif
 
 ######################################################
+# if specified, BUILD_MODULES must contain valid values.
+######################################################
+MODULES_REGEX="all|base|desktop|management|enterprise|misc|tools"
+sane-build_modules:
+ifdef BUILD_MODULES
+	@for m in $(BUILD_MODULES) ; do \
+            valid=`$(ECHO) $$m | $(EGREP) $(MODULES_REGEX)`; \
+            if [ "x$$valid" = "x" ] ; then \
+                $(ECHO) "ERROR: $$m set in the BUILD_MODULES variable is invalid.\n" \
+                "" >> $(ERROR_FILE); \
+            fi \
+	done
+endif
+
+######################################################
 # CUPS_HEADERS_PATH must be valid
 ######################################################
 sane-cups:
@@ -1522,7 +1538,7 @@
 sane-mozilla:
 ifeq ($(ARCH_DATA_MODEL), 32)
   ifdef ALT_MOZILLA_HEADERS_PATH
-	@if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "      The current value of ALT_MOZILLA_HEADERS_PATH is \n" \
--- a/make/java/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -38,9 +38,13 @@
 
 # Others
 #    Note: java_crw_demo java_hprof_demo are demos but must be delivered built in sdk
-SUBDIRS += security npt java_crw_demo java_hprof_demo \
-	    math awt util text applet net nio dyn \
-	    sql rmi jar beans logging management instrument
+
+SUBDIRS += security math util text net nio jar
+
+SUBDIRS_desktop    = awt applet beans
+SUBDIRS_management = management
+SUBDIRS_misc       = npt java_crw_demo java_hprof_demo \
+                     logging instrument dyn sql rmi
 
 
 ifeq ($(PLATFORM), solaris)
@@ -53,6 +57,8 @@
   SUBDIRS += jexec
 endif # PLATFORM
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/java/hpi/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/hpi/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -34,6 +34,8 @@
 # Build specified the HPI implementations
 #
 SUBDIRS = $(HPIS)
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/java/java/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/java/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -218,6 +218,8 @@
 endif
 
 SUBDIRS = reflect
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 clean clobber::
--- a/make/java/java/genlocales.gmk	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/java/genlocales.gmk	Fri Mar 19 18:49:36 2010 -0700
@@ -49,7 +49,7 @@
 # $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for 
 # European language support
 
-include $(BUILDDIR)/java/text/FILES_java.gmk
+include $(BUILDDIR)/java/text/base/FILES_java.gmk
 
 Euro_Resources_java += $(FILES_java)
 
--- a/make/java/main/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/main/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -36,6 +36,8 @@
 else 
 SUBDIRS = java
 endif 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/java/nio/FILES_java.gmk	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/nio/FILES_java.gmk	Fri Mar 19 18:49:36 2010 -0700
@@ -26,7 +26,6 @@
 FILES_src = \
 	java/nio/Bits.java \
 	java/nio/Buffer.java \
-	java/nio/BufferPoolMXBean.java \
 	java/nio/ByteOrder.java \
 	java/nio/MappedByteBuffer.java \
 	java/nio/StringCharBuffer.java \
--- a/make/java/nio/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/nio/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -304,7 +304,11 @@
 # Rules
 #
 
+SUBDIRS_management = mxbean
+include $(BUILDDIR)/common/Subdirs.gmk
+
 build: sources
+	$(SUBDIRS-loop)
 
 clean clobber::
 	$(RM) -r $(NIO_GEN) $(SNIO_GEN)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/nio/mxbean/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,34 @@
+#
+# Copyright 2010 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+BUILDDIR = ../../..
+MODULE   = management
+PACKAGE  = java.nio
+PRODUCT  = java
+include $(BUILDDIR)/common/Defs.gmk
+
+FILES_java = java/nio/BufferPoolMXBean.java
+
+include $(BUILDDIR)/common/Classes.gmk
--- a/make/java/redist/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/redist/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -62,7 +62,10 @@
 # Needed to do file copy
 ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
 
-SUBDIRS = fonts sajdi
+SUBDIRS_desktop = fonts
+SUBDIRS_tools   = sajdi
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/java/text/FILES_java.gmk	Fri Mar 12 01:09:13 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-#
-# Copyright 1996-2007 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-FILES_java = \
-    java/text/Annotation.java \
-    java/text/AttributedCharacterIterator.java \
-    java/text/AttributedString.java \
-    java/text/BreakDictionary.java \
-    java/text/BreakIterator.java \
-    java/text/Bidi.java \
-    java/text/CharacterIterator.java \
-    java/text/CharacterIteratorFieldDelegate.java \
-    java/text/ChoiceFormat.java \
-    java/text/Collator.java \
-    java/text/CollationElementIterator.java \
-    java/text/CollationKey.java \
-    java/text/CollationRules.java \
-    java/text/DateFormat.java \
-    java/text/DateFormatSymbols.java \
-    java/text/DecimalFormat.java \
-    java/text/DictionaryBasedBreakIterator.java \
-    java/text/DigitList.java \
-    java/text/EntryPair.java \
-    java/text/Format.java \
-    java/text/FieldPosition.java \
-    java/text/DontCareFieldPosition.java \
-    java/text/MergeCollation.java \
-    java/text/MessageFormat.java \
-    java/text/Normalizer.java \
-    java/text/NumberFormat.java \
-    java/text/DecimalFormatSymbols.java \
-    java/text/ParseException.java \
-    java/text/ParsePosition.java \
-    java/text/PatternEntry.java \
-    java/text/RBCollationTables.java \
-    java/text/RBTableBuilder.java \
-    java/text/RuleBasedBreakIterator.java \
-    java/text/RuleBasedCollator.java \
-    java/text/RuleBasedCollationKey.java \
-    java/text/SimpleDateFormat.java \
-    java/text/StringCharacterIterator.java \
-    java/text/spi/BreakIteratorProvider.java \
-    java/text/spi/CollatorProvider.java \
-    java/text/spi/DateFormatProvider.java \
-    java/text/spi/DateFormatSymbolsProvider.java \
-    java/text/spi/DecimalFormatSymbolsProvider.java \
-    java/text/spi/NumberFormatProvider.java \
-        sun/text/SupplementaryCharacterData.java \
-        sun/text/CodePointIterator.java \
-        sun/text/CollatorUtilities.java \
-        sun/text/CompactByteArray.java \
-        sun/text/ComposedCharIter.java \
-        sun/text/IntHashtable.java \
-        sun/text/Normalizer.java \
-        sun/text/SupplementaryCharacterData.java \
-        sun/text/UCompactIntArray.java \
-            sun/text/bidi/BidiBase.java \
-            sun/text/bidi/BidiLine.java \
-            sun/text/bidi/BidiRun.java \
-            \
-            sun/text/normalizer/CharTrie.java \
-            sun/text/normalizer/CharacterIteratorWrapper.java \
-            sun/text/normalizer/ICUBinary.java \
-            sun/text/normalizer/ICUData.java \
-            sun/text/normalizer/IntTrie.java \
-            sun/text/normalizer/NormalizerBase.java \
-            sun/text/normalizer/NormalizerDataReader.java \
-            sun/text/normalizer/NormalizerImpl.java \
-            sun/text/normalizer/RangeValueIterator.java \
-            sun/text/normalizer/Replaceable.java \
-            sun/text/normalizer/ReplaceableString.java \
-            sun/text/normalizer/ReplaceableUCharacterIterator.java \
-            sun/text/normalizer/RuleCharacterIterator.java \
-            sun/text/normalizer/SymbolTable.java \
-            sun/text/normalizer/Trie.java \
-            sun/text/normalizer/TrieIterator.java \
-            sun/text/normalizer/UBiDiProps.java \
-            sun/text/normalizer/UCharacter.java \
-            sun/text/normalizer/UCharacterIterator.java \
-            sun/text/normalizer/UCharacterProperty.java \
-            sun/text/normalizer/UCharacterPropertyReader.java \
-            sun/text/normalizer/UTF16.java \
-            sun/text/normalizer/UnicodeMatcher.java \
-            sun/text/normalizer/UnicodeSet.java \
-            sun/text/normalizer/UnicodeSetIterator.java \
-            sun/text/normalizer/Utility.java \
-            sun/text/normalizer/VersionInfo.java \
-	\
-        sun/text/resources/BreakIteratorInfo.java \
-	\
-        sun/text/resources/CollationData.java \
-        sun/text/resources/CollationData_be.java \
-        sun/text/resources/CollationData_bg.java \
-        sun/text/resources/CollationData_ca.java \
-        sun/text/resources/CollationData_cs.java \
-        sun/text/resources/CollationData_da.java \
-        sun/text/resources/CollationData_de.java \
-        sun/text/resources/CollationData_el.java \
-        sun/text/resources/CollationData_en.java \
-        sun/text/resources/CollationData_es.java \
-        sun/text/resources/CollationData_et.java \
-        sun/text/resources/CollationData_fi.java \
-        sun/text/resources/CollationData_fr.java \
-        sun/text/resources/CollationData_hr.java \
-        sun/text/resources/CollationData_hu.java \
-        sun/text/resources/CollationData_is.java \
-        sun/text/resources/CollationData_it.java \
-        sun/text/resources/CollationData_lt.java \
-        sun/text/resources/CollationData_lv.java \
-        sun/text/resources/CollationData_mk.java \
-        sun/text/resources/CollationData_nl.java \
-        sun/text/resources/CollationData_no.java \
-        sun/text/resources/CollationData_pl.java \
-        sun/text/resources/CollationData_pt.java \
-        sun/text/resources/CollationData_ro.java \
-        sun/text/resources/CollationData_ru.java \
-        sun/text/resources/CollationData_sk.java \
-        sun/text/resources/CollationData_sl.java \
-        sun/text/resources/CollationData_sq.java \
-        sun/text/resources/CollationData_sr.java \
-        sun/text/resources/CollationData_sv.java \
-        sun/text/resources/CollationData_tr.java \
-        sun/text/resources/CollationData_uk.java \
-	\
-        sun/text/resources/FormatData.java \
-        sun/text/resources/FormatData_be.java \
-        sun/text/resources/FormatData_be_BY.java \
-        sun/text/resources/FormatData_bg.java \
-        sun/text/resources/FormatData_bg_BG.java \
-        sun/text/resources/FormatData_ca.java \
-        sun/text/resources/FormatData_ca_ES.java \
-        sun/text/resources/FormatData_cs.java \
-        sun/text/resources/FormatData_cs_CZ.java \
-        sun/text/resources/FormatData_da.java \
-        sun/text/resources/FormatData_da_DK.java \
-        sun/text/resources/FormatData_de.java \
-        sun/text/resources/FormatData_de_AT.java \
-        sun/text/resources/FormatData_de_CH.java \
-        sun/text/resources/FormatData_de_DE.java \
-        sun/text/resources/FormatData_de_LU.java \
-        sun/text/resources/FormatData_el.java \
-        sun/text/resources/FormatData_el_CY.java \
-        sun/text/resources/FormatData_el_GR.java \
-        sun/text/resources/FormatData_en.java \
-        sun/text/resources/FormatData_en_US.java \
-        sun/text/resources/FormatData_en_AU.java \
-        sun/text/resources/FormatData_en_CA.java \
-        sun/text/resources/FormatData_en_GB.java \
-        sun/text/resources/FormatData_en_IE.java \
-        sun/text/resources/FormatData_en_IN.java \
-        sun/text/resources/FormatData_en_MT.java \
-        sun/text/resources/FormatData_en_NZ.java \
-        sun/text/resources/FormatData_en_PH.java \
-        sun/text/resources/FormatData_en_SG.java \
-        sun/text/resources/FormatData_en_ZA.java \
-        sun/text/resources/FormatData_es.java \
-        sun/text/resources/FormatData_es_BO.java \
-        sun/text/resources/FormatData_es_AR.java \
-        sun/text/resources/FormatData_es_CL.java \
-        sun/text/resources/FormatData_es_CO.java \
-        sun/text/resources/FormatData_es_CR.java \
-        sun/text/resources/FormatData_es_DO.java \
-        sun/text/resources/FormatData_es_EC.java \
-        sun/text/resources/FormatData_es_ES.java \
-        sun/text/resources/FormatData_es_GT.java \
-        sun/text/resources/FormatData_es_HN.java \
-        sun/text/resources/FormatData_es_MX.java \
-        sun/text/resources/FormatData_es_NI.java \
-        sun/text/resources/FormatData_es_PA.java \
-        sun/text/resources/FormatData_es_PE.java \
-        sun/text/resources/FormatData_es_PR.java \
-        sun/text/resources/FormatData_es_PY.java \
-        sun/text/resources/FormatData_es_SV.java \
-        sun/text/resources/FormatData_es_US.java \
-        sun/text/resources/FormatData_es_UY.java \
-        sun/text/resources/FormatData_es_VE.java \
-        sun/text/resources/FormatData_et.java \
-        sun/text/resources/FormatData_et_EE.java \
-        sun/text/resources/FormatData_fi.java \
-        sun/text/resources/FormatData_fi_FI.java \
-        sun/text/resources/FormatData_fr.java \
-        sun/text/resources/FormatData_fr_BE.java \
-        sun/text/resources/FormatData_fr_CA.java \
-        sun/text/resources/FormatData_fr_CH.java \
-        sun/text/resources/FormatData_fr_FR.java \
-        sun/text/resources/FormatData_fr_LU.java \
-        sun/text/resources/FormatData_ga.java \
-        sun/text/resources/FormatData_ga_IE.java \
-        sun/text/resources/FormatData_hr.java \
-        sun/text/resources/FormatData_hr_HR.java \
-        sun/text/resources/FormatData_hu.java \
-        sun/text/resources/FormatData_hu_HU.java \
-        sun/text/resources/FormatData_in.java \
-        sun/text/resources/FormatData_in_ID.java \
-        sun/text/resources/FormatData_is.java \
-        sun/text/resources/FormatData_is_IS.java \
-        sun/text/resources/FormatData_it.java \
-        sun/text/resources/FormatData_it_CH.java \
-        sun/text/resources/FormatData_it_IT.java \
-        sun/text/resources/FormatData_lt.java \
-        sun/text/resources/FormatData_lt_LT.java \
-        sun/text/resources/FormatData_lv.java \
-        sun/text/resources/FormatData_lv_LV.java \
-        sun/text/resources/FormatData_mk.java \
-        sun/text/resources/FormatData_mk_MK.java \
-        sun/text/resources/FormatData_ms.java \
-        sun/text/resources/FormatData_ms_MY.java \
-        sun/text/resources/FormatData_mt.java \
-        sun/text/resources/FormatData_mt_MT.java \
-        sun/text/resources/FormatData_nl.java \
-        sun/text/resources/FormatData_nl_BE.java \
-        sun/text/resources/FormatData_nl_NL.java \
-        sun/text/resources/FormatData_no.java \
-        sun/text/resources/FormatData_no_NO.java \
-        sun/text/resources/FormatData_no_NO_NY.java \
-        sun/text/resources/FormatData_pl.java \
-        sun/text/resources/FormatData_pl_PL.java \
-        sun/text/resources/FormatData_pt.java \
-        sun/text/resources/FormatData_pt_BR.java \
-        sun/text/resources/FormatData_pt_PT.java \
-        sun/text/resources/FormatData_ro.java \
-        sun/text/resources/FormatData_ro_RO.java \
-        sun/text/resources/FormatData_ru.java \
-        sun/text/resources/FormatData_ru_RU.java \
-        sun/text/resources/FormatData_sk.java \
-        sun/text/resources/FormatData_sk_SK.java \
-        sun/text/resources/FormatData_sl.java \
-        sun/text/resources/FormatData_sl_SI.java \
-        sun/text/resources/FormatData_sq.java \
-        sun/text/resources/FormatData_sq_AL.java \
-        sun/text/resources/FormatData_sr.java \
-        sun/text/resources/FormatData_sr_BA.java \
-        sun/text/resources/FormatData_sr_CS.java \
-        sun/text/resources/FormatData_sr_ME.java \
-        sun/text/resources/FormatData_sr_RS.java \
-        sun/text/resources/FormatData_sv.java \
-        sun/text/resources/FormatData_sv_SE.java \
-        sun/text/resources/FormatData_tr.java \
-        sun/text/resources/FormatData_tr_TR.java \
-        sun/text/resources/FormatData_uk.java \
-        sun/text/resources/FormatData_uk_UA.java
--- a/make/java/text/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/java/text/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2010 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
@@ -23,86 +23,19 @@
 # have any questions.
 #
 
+#
+# Makefile for building all of java.text
+#
+
 BUILDDIR = ../..
-MODULE  = base
-PACKAGE = java.text
 PRODUCT = sun
-
 include $(BUILDDIR)/common/Defs.gmk
 
-#
-# Files
-#
-include FILES_java.gmk
+SUBDIRS         = base
+SUBDIRS_desktop = bidi
 
-#
-# Include
-#
-include $(BUILDDIR)/common/Classes.gmk
+include $(BUILDDIR)/common/Subdirs.gmk
 
-#
-# Rules to add data files BreakIterator
-#
-TEXT_CLASSES = $(BUILDTOOLCLASSDIR)/java.text/classes
+all build clean clobber::
+	$(SUBDIRS-loop)
 
-# input
-#
-#   Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
-#     They are used at JDK build phase in order to create $(BIFILES) which
-#     are used on runtime instead.
-#
-TEXT_SRCDIR  = $(SHARE_SRC)/classes/sun/text/resources
-TEXT_SOURCES = $(TEXT_SRCDIR)/BreakIteratorRules.java \
-               $(TEXT_SRCDIR)/BreakIteratorInfo.java
-UNICODEDATA  = $(BUILDDIR)/tools/UnicodeData
-
-# output
-TEXT_CLASSDIR  = $(CLASSBINDIR)/sun/text/resources
-BIFILES = $(TEXT_CLASSDIR)/CharacterBreakIteratorData \
-          $(TEXT_CLASSDIR)/WordBreakIteratorData \
-          $(TEXT_CLASSDIR)/LineBreakIteratorData \
-          $(TEXT_CLASSDIR)/SentenceBreakIteratorData
-
-ICU_FILES = $(TEXT_CLASSDIR)/unorm.icu \
-            $(TEXT_CLASSDIR)/uprops.icu \
-            $(TEXT_CLASSDIR)/ubidi.icu
-
-# builder
-GENERATEBREAKITERATORDATA_JARFILE = \
-    $(BUILDTOOLJARDIR)/generatebreakiteratordata.jar
-
-$(BIFILES): $(GENERATEBREAKITERATORDATA_JARFILE) \
-    $(UNICODEDATA)/UnicodeData.txt \
-    $(TEXT_SOURCES)
-	$(prep-target)
-	$(RM) -r $(TEXT_CLASSES)
-	$(MKDIR) -p $(TEXT_CLASSES)
-	$(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \
-		-sourcepath $(TEXT_SRCDIR) \
-		$(TEXT_SOURCES)
-	$(MKDIR) -p  $(TEXT_CLASSDIR)
-	$(BOOT_JAVA_CMD) -Xbootclasspath/p:$(TEXT_CLASSES) \
-		-jar $(GENERATEBREAKITERATORDATA_JARFILE) \
-		-o $(TEXT_CLASSDIR) \
-		-spec $(UNICODEDATA)/UnicodeData.txt
-	@$(java-vm-cleanup)
-
-build: $(BIFILES) $(ICU_FILES)
-
-#
-# Extra rules to copy unorm.icu, uprops.icu, and ubidi.icu
-#
-$(TEXT_CLASSDIR)/unorm.icu: $(TEXT_SRCDIR)/unorm.icu
-	$(install-file)
-
-$(TEXT_CLASSDIR)/uprops.icu: $(TEXT_SRCDIR)/uprops.icu
-	$(install-file)
-
-$(TEXT_CLASSDIR)/ubidi.icu: $(TEXT_SRCDIR)/ubidi.icu
-	$(install-file)
-
-clean clobber::
-	$(RM) -r $(TEXT_CLASSES)
-	$(RM) -r $(BIFILES)
-	$(RM) $(ICU_FILES)
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/text/base/FILES_java.gmk	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,258 @@
+#
+# Copyright 1996-2007 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+FILES_java = \
+    java/text/Annotation.java \
+    java/text/AttributedCharacterIterator.java \
+    java/text/AttributedString.java \
+    java/text/BreakDictionary.java \
+    java/text/BreakIterator.java \
+    java/text/CharacterIterator.java \
+    java/text/CharacterIteratorFieldDelegate.java \
+    java/text/ChoiceFormat.java \
+    java/text/Collator.java \
+    java/text/CollationElementIterator.java \
+    java/text/CollationKey.java \
+    java/text/CollationRules.java \
+    java/text/DateFormat.java \
+    java/text/DateFormatSymbols.java \
+    java/text/DecimalFormat.java \
+    java/text/DictionaryBasedBreakIterator.java \
+    java/text/DigitList.java \
+    java/text/EntryPair.java \
+    java/text/Format.java \
+    java/text/FieldPosition.java \
+    java/text/DontCareFieldPosition.java \
+    java/text/MergeCollation.java \
+    java/text/MessageFormat.java \
+    java/text/Normalizer.java \
+    java/text/NumberFormat.java \
+    java/text/DecimalFormatSymbols.java \
+    java/text/ParseException.java \
+    java/text/ParsePosition.java \
+    java/text/PatternEntry.java \
+    java/text/RBCollationTables.java \
+    java/text/RBTableBuilder.java \
+    java/text/RuleBasedBreakIterator.java \
+    java/text/RuleBasedCollator.java \
+    java/text/RuleBasedCollationKey.java \
+    java/text/SimpleDateFormat.java \
+    java/text/StringCharacterIterator.java \
+    java/text/spi/BreakIteratorProvider.java \
+    java/text/spi/CollatorProvider.java \
+    java/text/spi/DateFormatProvider.java \
+    java/text/spi/DateFormatSymbolsProvider.java \
+    java/text/spi/DecimalFormatSymbolsProvider.java \
+    java/text/spi/NumberFormatProvider.java \
+        sun/text/SupplementaryCharacterData.java \
+        sun/text/CodePointIterator.java \
+        sun/text/CollatorUtilities.java \
+        sun/text/CompactByteArray.java \
+        sun/text/ComposedCharIter.java \
+        sun/text/IntHashtable.java \
+        sun/text/Normalizer.java \
+        sun/text/SupplementaryCharacterData.java \
+        sun/text/UCompactIntArray.java \
+            sun/text/normalizer/CharTrie.java \
+            sun/text/normalizer/CharacterIteratorWrapper.java \
+            sun/text/normalizer/ICUBinary.java \
+            sun/text/normalizer/ICUData.java \
+            sun/text/normalizer/IntTrie.java \
+            sun/text/normalizer/NormalizerBase.java \
+            sun/text/normalizer/NormalizerDataReader.java \
+            sun/text/normalizer/NormalizerImpl.java \
+            sun/text/normalizer/RangeValueIterator.java \
+            sun/text/normalizer/Replaceable.java \
+            sun/text/normalizer/ReplaceableString.java \
+            sun/text/normalizer/ReplaceableUCharacterIterator.java \
+            sun/text/normalizer/RuleCharacterIterator.java \
+            sun/text/normalizer/SymbolTable.java \
+            sun/text/normalizer/Trie.java \
+            sun/text/normalizer/TrieIterator.java \
+            sun/text/normalizer/UBiDiProps.java \
+            sun/text/normalizer/UCharacter.java \
+            sun/text/normalizer/UCharacterIterator.java \
+            sun/text/normalizer/UCharacterProperty.java \
+            sun/text/normalizer/UCharacterPropertyReader.java \
+            sun/text/normalizer/UTF16.java \
+            sun/text/normalizer/UnicodeMatcher.java \
+            sun/text/normalizer/UnicodeSet.java \
+            sun/text/normalizer/UnicodeSetIterator.java \
+            sun/text/normalizer/Utility.java \
+            sun/text/normalizer/VersionInfo.java \
+	\
+        sun/text/resources/BreakIteratorInfo.java \
+	\
+        sun/text/resources/CollationData.java \
+        sun/text/resources/CollationData_be.java \
+        sun/text/resources/CollationData_bg.java \
+        sun/text/resources/CollationData_ca.java \
+        sun/text/resources/CollationData_cs.java \
+        sun/text/resources/CollationData_da.java \
+        sun/text/resources/CollationData_de.java \
+        sun/text/resources/CollationData_el.java \
+        sun/text/resources/CollationData_en.java \
+        sun/text/resources/CollationData_es.java \
+        sun/text/resources/CollationData_et.java \
+        sun/text/resources/CollationData_fi.java \
+        sun/text/resources/CollationData_fr.java \
+        sun/text/resources/CollationData_hr.java \
+        sun/text/resources/CollationData_hu.java \
+        sun/text/resources/CollationData_is.java \
+        sun/text/resources/CollationData_it.java \
+        sun/text/resources/CollationData_lt.java \
+        sun/text/resources/CollationData_lv.java \
+        sun/text/resources/CollationData_mk.java \
+        sun/text/resources/CollationData_nl.java \
+        sun/text/resources/CollationData_no.java \
+        sun/text/resources/CollationData_pl.java \
+        sun/text/resources/CollationData_pt.java \
+        sun/text/resources/CollationData_ro.java \
+        sun/text/resources/CollationData_ru.java \
+        sun/text/resources/CollationData_sk.java \
+        sun/text/resources/CollationData_sl.java \
+        sun/text/resources/CollationData_sq.java \
+        sun/text/resources/CollationData_sr.java \
+        sun/text/resources/CollationData_sv.java \
+        sun/text/resources/CollationData_tr.java \
+        sun/text/resources/CollationData_uk.java \
+	\
+        sun/text/resources/FormatData.java \
+        sun/text/resources/FormatData_be.java \
+        sun/text/resources/FormatData_be_BY.java \
+        sun/text/resources/FormatData_bg.java \
+        sun/text/resources/FormatData_bg_BG.java \
+        sun/text/resources/FormatData_ca.java \
+        sun/text/resources/FormatData_ca_ES.java \
+        sun/text/resources/FormatData_cs.java \
+        sun/text/resources/FormatData_cs_CZ.java \
+        sun/text/resources/FormatData_da.java \
+        sun/text/resources/FormatData_da_DK.java \
+        sun/text/resources/FormatData_de.java \
+        sun/text/resources/FormatData_de_AT.java \
+        sun/text/resources/FormatData_de_CH.java \
+        sun/text/resources/FormatData_de_DE.java \
+        sun/text/resources/FormatData_de_LU.java \
+        sun/text/resources/FormatData_el.java \
+        sun/text/resources/FormatData_el_CY.java \
+        sun/text/resources/FormatData_el_GR.java \
+        sun/text/resources/FormatData_en.java \
+        sun/text/resources/FormatData_en_US.java \
+        sun/text/resources/FormatData_en_AU.java \
+        sun/text/resources/FormatData_en_CA.java \
+        sun/text/resources/FormatData_en_GB.java \
+        sun/text/resources/FormatData_en_IE.java \
+        sun/text/resources/FormatData_en_IN.java \
+        sun/text/resources/FormatData_en_MT.java \
+        sun/text/resources/FormatData_en_NZ.java \
+        sun/text/resources/FormatData_en_PH.java \
+        sun/text/resources/FormatData_en_SG.java \
+        sun/text/resources/FormatData_en_ZA.java \
+        sun/text/resources/FormatData_es.java \
+        sun/text/resources/FormatData_es_BO.java \
+        sun/text/resources/FormatData_es_AR.java \
+        sun/text/resources/FormatData_es_CL.java \
+        sun/text/resources/FormatData_es_CO.java \
+        sun/text/resources/FormatData_es_CR.java \
+        sun/text/resources/FormatData_es_DO.java \
+        sun/text/resources/FormatData_es_EC.java \
+        sun/text/resources/FormatData_es_ES.java \
+        sun/text/resources/FormatData_es_GT.java \
+        sun/text/resources/FormatData_es_HN.java \
+        sun/text/resources/FormatData_es_MX.java \
+        sun/text/resources/FormatData_es_NI.java \
+        sun/text/resources/FormatData_es_PA.java \
+        sun/text/resources/FormatData_es_PE.java \
+        sun/text/resources/FormatData_es_PR.java \
+        sun/text/resources/FormatData_es_PY.java \
+        sun/text/resources/FormatData_es_SV.java \
+        sun/text/resources/FormatData_es_US.java \
+        sun/text/resources/FormatData_es_UY.java \
+        sun/text/resources/FormatData_es_VE.java \
+        sun/text/resources/FormatData_et.java \
+        sun/text/resources/FormatData_et_EE.java \
+        sun/text/resources/FormatData_fi.java \
+        sun/text/resources/FormatData_fi_FI.java \
+        sun/text/resources/FormatData_fr.java \
+        sun/text/resources/FormatData_fr_BE.java \
+        sun/text/resources/FormatData_fr_CA.java \
+        sun/text/resources/FormatData_fr_CH.java \
+        sun/text/resources/FormatData_fr_FR.java \
+        sun/text/resources/FormatData_fr_LU.java \
+        sun/text/resources/FormatData_ga.java \
+        sun/text/resources/FormatData_ga_IE.java \
+        sun/text/resources/FormatData_hr.java \
+        sun/text/resources/FormatData_hr_HR.java \
+        sun/text/resources/FormatData_hu.java \
+        sun/text/resources/FormatData_hu_HU.java \
+        sun/text/resources/FormatData_in.java \
+        sun/text/resources/FormatData_in_ID.java \
+        sun/text/resources/FormatData_is.java \
+        sun/text/resources/FormatData_is_IS.java \
+        sun/text/resources/FormatData_it.java \
+        sun/text/resources/FormatData_it_CH.java \
+        sun/text/resources/FormatData_it_IT.java \
+        sun/text/resources/FormatData_lt.java \
+        sun/text/resources/FormatData_lt_LT.java \
+        sun/text/resources/FormatData_lv.java \
+        sun/text/resources/FormatData_lv_LV.java \
+        sun/text/resources/FormatData_mk.java \
+        sun/text/resources/FormatData_mk_MK.java \
+        sun/text/resources/FormatData_ms.java \
+        sun/text/resources/FormatData_ms_MY.java \
+        sun/text/resources/FormatData_mt.java \
+        sun/text/resources/FormatData_mt_MT.java \
+        sun/text/resources/FormatData_nl.java \
+        sun/text/resources/FormatData_nl_BE.java \
+        sun/text/resources/FormatData_nl_NL.java \
+        sun/text/resources/FormatData_no.java \
+        sun/text/resources/FormatData_no_NO.java \
+        sun/text/resources/FormatData_no_NO_NY.java \
+        sun/text/resources/FormatData_pl.java \
+        sun/text/resources/FormatData_pl_PL.java \
+        sun/text/resources/FormatData_pt.java \
+        sun/text/resources/FormatData_pt_BR.java \
+        sun/text/resources/FormatData_pt_PT.java \
+        sun/text/resources/FormatData_ro.java \
+        sun/text/resources/FormatData_ro_RO.java \
+        sun/text/resources/FormatData_ru.java \
+        sun/text/resources/FormatData_ru_RU.java \
+        sun/text/resources/FormatData_sk.java \
+        sun/text/resources/FormatData_sk_SK.java \
+        sun/text/resources/FormatData_sl.java \
+        sun/text/resources/FormatData_sl_SI.java \
+        sun/text/resources/FormatData_sq.java \
+        sun/text/resources/FormatData_sq_AL.java \
+        sun/text/resources/FormatData_sr.java \
+        sun/text/resources/FormatData_sr_BA.java \
+        sun/text/resources/FormatData_sr_CS.java \
+        sun/text/resources/FormatData_sr_ME.java \
+        sun/text/resources/FormatData_sr_RS.java \
+        sun/text/resources/FormatData_sv.java \
+        sun/text/resources/FormatData_sv_SE.java \
+        sun/text/resources/FormatData_tr.java \
+        sun/text/resources/FormatData_tr_TR.java \
+        sun/text/resources/FormatData_uk.java \
+        sun/text/resources/FormatData_uk_UA.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/text/base/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,108 @@
+#
+# Copyright 1996-2006 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+BUILDDIR = ../../..
+MODULE  = base
+PACKAGE = java.text
+PRODUCT = sun
+
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files
+#
+include FILES_java.gmk
+
+#
+# Include
+#
+include $(BUILDDIR)/common/Classes.gmk
+
+#
+# Rules to add data files BreakIterator
+#
+TEXT_CLASSES = $(BUILDTOOLCLASSDIR)/java.text/classes
+
+# input
+#
+#   Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
+#     They are used at JDK build phase in order to create $(BIFILES) which
+#     are used on runtime instead.
+#
+TEXT_SRCDIR  = $(SHARE_SRC)/classes/sun/text/resources
+TEXT_SOURCES = $(TEXT_SRCDIR)/BreakIteratorRules.java \
+               $(TEXT_SRCDIR)/BreakIteratorInfo.java
+UNICODEDATA  = $(BUILDDIR)/tools/UnicodeData
+
+# output
+TEXT_CLASSDIR  = $(CLASSBINDIR)/sun/text/resources
+BIFILES = $(TEXT_CLASSDIR)/CharacterBreakIteratorData \
+          $(TEXT_CLASSDIR)/WordBreakIteratorData \
+          $(TEXT_CLASSDIR)/LineBreakIteratorData \
+          $(TEXT_CLASSDIR)/SentenceBreakIteratorData
+
+ICU_FILES = $(TEXT_CLASSDIR)/unorm.icu \
+            $(TEXT_CLASSDIR)/uprops.icu \
+            $(TEXT_CLASSDIR)/ubidi.icu
+
+# builder
+GENERATEBREAKITERATORDATA_JARFILE = \
+    $(BUILDTOOLJARDIR)/generatebreakiteratordata.jar
+
+$(BIFILES): $(GENERATEBREAKITERATORDATA_JARFILE) \
+    $(UNICODEDATA)/UnicodeData.txt \
+    $(TEXT_SOURCES)
+	$(prep-target)
+	$(RM) -r $(TEXT_CLASSES)
+	$(MKDIR) -p $(TEXT_CLASSES)
+	$(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \
+		-sourcepath $(TEXT_SRCDIR) \
+		$(TEXT_SOURCES)
+	$(MKDIR) -p  $(TEXT_CLASSDIR)
+	$(BOOT_JAVA_CMD) -Xbootclasspath/p:$(TEXT_CLASSES) \
+		-jar $(GENERATEBREAKITERATORDATA_JARFILE) \
+		-o $(TEXT_CLASSDIR) \
+		-spec $(UNICODEDATA)/UnicodeData.txt
+	@$(java-vm-cleanup)
+
+build: $(BIFILES) $(ICU_FILES)
+
+#
+# Extra rules to copy unorm.icu, uprops.icu, and ubidi.icu
+#
+$(TEXT_CLASSDIR)/unorm.icu: $(TEXT_SRCDIR)/unorm.icu
+	$(install-file)
+
+$(TEXT_CLASSDIR)/uprops.icu: $(TEXT_SRCDIR)/uprops.icu
+	$(install-file)
+
+$(TEXT_CLASSDIR)/ubidi.icu: $(TEXT_SRCDIR)/ubidi.icu
+	$(install-file)
+
+clean clobber::
+	$(RM) -r $(TEXT_CLASSES)
+	$(RM) -r $(BIFILES)
+	$(RM) $(ICU_FILES)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/text/bidi/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,44 @@
+#
+# Copyright 2010 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+BUILDDIR = ../../..
+PACKAGE = java.text
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files for Bidi that is not in the base module
+#
+FILES_java = \
+    java/text/Bidi.java \
+    sun/text/bidi/BidiBase.java \
+    sun/text/bidi/BidiLine.java \
+    sun/text/bidi/BidiRun.java \
+    sun/text/CodePointIterator.java
+
+#
+# Include
+#
+include $(BUILDDIR)/common/Classes.gmk
--- a/make/javax/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/javax/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -30,19 +30,24 @@
 BUILDDIR = ..
 include $(BUILDDIR)/common/Defs.gmk
 
+SUBDIRS = others
+
+SUBDIRS_management = management
+
+SUBDIRS_misc = \
+        crypto \
+        sql \
+        rmi
+
 # imageio uses xml, so build it last
+SUBDIRS_desktop = \
+        accessibility \
+        print \
+        swing \
+        sound \
+        imageio
 
-SUBDIRS = \
-	others \
-	accessibility \
-	print \
-	swing \
-	crypto \
-	sound \
-	sql \
-	rmi \
-	management \
-	imageio
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build:
 	$(SUBDIRS-loop)
--- a/make/javax/rmi/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/javax/rmi/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = ssl
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/javax/sound/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/javax/sound/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -159,6 +159,7 @@
 # Include rules
 #
 include $(BUILDDIR)/common/Library.gmk
+include $(BUILDDIR)/common/Subdirs.gmk
 
 #
 # Rules that copy files.
--- a/make/javax/swing/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/javax/swing/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -40,6 +40,7 @@
 SUBDIRS = html32dtd plaf
 
 include $(BUILDDIR)/common/Classes.gmk
+include $(BUILDDIR)/common/Subdirs.gmk
 
 build: other_files
 	$(SUBDIRS-loop)
--- a/make/jpda/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/jpda/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -35,6 +35,7 @@
 # Core.
 #
 SUBDIRS    = jdwp back front transport expr tty bdi gui
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/jpda/transport/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/jpda/transport/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -36,6 +36,8 @@
 ifeq ($(PLATFORM), windows)
 SUBDIRS += shmem
 endif # PLATFORM
+
+include $(BUILDDIR)/common/Subdirs.gmk
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mkdemo/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,7 +31,13 @@
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = applets jfc jvmti management jni scripting jpda
+SUBDIRS            = jni
+SUBDIRS_desktop    = applets jfc
+SUBDIRS_management = management
+SUBDIRS_misc       = scripting
+SUBDIRS_tools      = jpda jvmti
+
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build:: nbproject
 	$(SUBDIRS-loop)
--- a/make/mkdemo/applets/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mkdemo/applets/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -40,6 +40,7 @@
 
 SUBDIRS_MAKEFLAGS += DEMO_IS_APPLET=true
 
+include $(BUILDDIR)/common/Subdirs.gmk
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/jfc/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mkdemo/jfc/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -46,6 +46,7 @@
   SUBDIRS += Java2D SwingSet2 Stylepad
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/jni/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mkdemo/jni/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -37,6 +37,8 @@
   SUBDIRS += Poller
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/jvmti/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mkdemo/jvmti/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -48,6 +48,8 @@
 	  waiters \
 	  hprof
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/management/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mkdemo/management/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -38,6 +38,8 @@
 	  MemoryMonitor  \
 	  JTop
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/scripting/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mkdemo/scripting/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = jconsole-plugin
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/mksample/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mksample/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -37,13 +37,18 @@
   WEBSERVICES_SUBDIR = webservices
 endif
 
-SUBDIRS = nio jmx scripting $(WEBSERVICES_SUBDIR) nbproject
+SUBDIRS =
+SUBDIRS_misc = nio scripting nbproject
+SUBDIRS_enterprise = $(WEBSERVICES_SUBDIR)
+SUBDIRS_management = jmx
 
 # include dtrace samples in Solaris builds
 ifeq ($(PLATFORM), solaris) 
 	SUBDIRS += dtrace
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/jmx/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mksample/jmx/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = jmx-scandir
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/nio/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mksample/nio/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = file multicast server
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/scripting/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mksample/scripting/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = scriptpad
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/webservices/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/mksample/webservices/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = EbayClient EbayServer
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/modules/tools/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/modules/tools/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -135,9 +135,8 @@
 
 $(CLASSANALYZER_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) $(FILES_class)
 	@$(prep-target)
-	$(CD) $(BUILDTOOLCLASSDIR) && \
-	    $(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
-	       $(PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
+	$(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
+	    -C $(BUILDTOOLCLASSDIR) $(PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
 	@$(java-vm-cleanup)
 
 $(BUILDTOOLJARDIR)/classfile.jar: $(FILES_classfile_class)
--- a/make/org/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/org/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = ietf jcp
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/org/ietf/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/org/ietf/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = jgss
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -58,13 +58,18 @@
 else
   RENDER_SUBDIR = dcpr
 endif
+
 # nio need to be compiled before awt to have all charsets ready
-SUBDIRS = jar security javazic misc jkernel net audio $(RENDER_SUBDIR) image \
-	  nio awt splashscreen $(XAWT_SUBDIR) \
-          $(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
-	  font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
-	  jawt text launcher management $(ORG_SUBDIR) \
-          native2ascii serialver tools jconsole tracing
+SUBDIRS            = jar security javazic misc net nio text launcher
+SUBDIRS_desktop    = audio $(RENDER_SUBDIR) image \
+                     awt splashscreen $(XAWT_SUBDIR) \
+                     $(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
+                     jawt font jpeg cmm applet beans
+SUBDIRS_management = management
+SUBDIRS_misc       = jkernel $(ORG_SUBDIR) \
+                     rmi $(JDBC_SUBDIR) tracing
+SUBDIRS_tools      = native2ascii serialver tools jconsole
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/sun/cmm/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/cmm/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -36,6 +36,8 @@
     ICCPROFILE_SRC_DIR = $(CLOSED_SRC)/share/lib/cmm/kcms
 endif # OPENJDK
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 #
 # ICC Profiles used by the CMM.
 #
--- a/make/sun/image/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/image/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -43,6 +43,8 @@
   endif
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/javazic/tzdata/VERSION	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/javazic/tzdata/VERSION	Fri Mar 19 18:49:36 2010 -0700
@@ -21,4 +21,4 @@
 # CA 95054 USA or visit www.sun.com if you need additional information or
 # have any questions.
 #
-tzdata2009r
+tzdata2010b
--- a/make/sun/javazic/tzdata/antarctica	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/javazic/tzdata/antarctica	Fri Mar 19 18:49:36 2010 -0700
@@ -128,7 +128,7 @@
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
-			7:00	-	DAVT	2009 Oct 18 2:0
+			7:00	-	DAVT	2009 Oct 18 2:00
 			5:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
 			6:00	-	MAWT	2009 Oct 18 2:00
--- a/make/sun/javazic/tzdata/asia	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/javazic/tzdata/asia	Fri Mar 19 18:49:36 2010 -0700
@@ -218,6 +218,41 @@
 # http://www.thaindian.com/newsportal/business/bangladesh-to-continue-indefinitely-with-advanced-time_100259987.html
 # </a>
 
+# From Alexander Krivenyshev (2009-12-24):
+# According to Bangladesh newspaper "The Daily Star,"
+# Bangladesh will change its clock back to Standard Time on Dec 31, 2009.
+#
+# Clock goes back 1-hr on Dec 31 night.
+# <a href="http://www.thedailystar.net/newDesign/news-details.php?nid=119228">
+# http://www.thedailystar.net/newDesign/news-details.php?nid=119228
+# </a>
+# and
+# <a href="http://www.worldtimezone.com/dst_news/dst_news_bangladesh05.html">
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh05.html
+# </a>
+#
+# "...The government yesterday decided to put the clock back by one hour
+# on December 31 midnight and the new time will continue until March 31,
+# 2010 midnight. The decision came at a cabinet meeting at the Prime
+# Minister's Office last night..."
+
+# From Danvin Ruangchan (2009-12-24):
+# ...the news mentions DST will be turned off again 7 months after March
+# 31st on Oct 31, 2010.
+
+# From Arthur David Olson (2009-12-26):
+# Indeed, "The government will advance again the Banglasdesh Standard
+# Time by one one hour on March 31 next year by enforcing the Daylight
+# Saving Time (DST) for seven months. It will continue till October 31
+# until further notice." I take that last sentence as the
+# establishment of a rule.
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Dhaka	2009	only	-	Jun	19	23:00	1:00	S
+Rule	Dhaka	2010	only	-	Jan	1	0:00	0	-
+Rule	Dhaka	2010	max	-	Mar	31	23:00	1:00	S
+Rule	Dhaka	2010	max	-	Nov	1	0:00	0	-
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
@@ -225,8 +260,8 @@
 			5:30	-	IST	1942 Sep
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
-			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
-			6:00	1:00	BDST
+			6:00	-	BDT	2009
+			6:00	Dhaka	BD%sT
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -385,6 +420,69 @@
 # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke,
 # Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding,
 # and Yarkand.
+
+# From Luther Ma (2009-10-17):
+# Almost all (>99.9%) ethnic Chinese (properly ethnic Han) living in
+# Xinjiang use Chinese Standard Time. Some are aware of Xinjiang time,
+# but have no need of it. All planes, trains, and schools function on
+# what is called "Beijing time." When Han make an appointment in Chinese
+# they implicitly use Beijing time.
+#
+# On the other hand, ethnic Uyghurs, who make up about half the
+# population of Xinjiang, typically use "Xinjiang time" which is two
+# hours behind Beijing time, or UTC +0600. The government of the Xinjiang
+# Uyghur Autonomous Region, (XAUR, or just Xinjiang for short) as well as
+# local governments such as the Urumqi city government use both times in
+# publications, referring to what is popularly called Xinjiang time as
+# "Urumqi time." When Uyghurs make an appointment in the Uyghur language
+# they almost invariably use Xinjiang time.
+#
+# (Their ethnic Han compatriots would typically have no clue of its
+# widespread use, however, because so extremely few of them are fluent in
+# Uyghur, comparable to the number of Anglo-Americans fluent in Navajo.)
+#
+# (...As with the rest of China there was a brief interval ending in 1990
+# or 1991 when summer time was in use.  The confusion was severe, with
+# the province not having dual times but four times in use at the same
+# time. Some areas remained on standard Xinjiang time or Beijing time and
+# others moving their clocks ahead.)
+#
+# ...an example of an official website using of Urumqi time.
+#
+# The first few lines of the Google translation of
+# <a href="http://www.fjysgl.gov.cn/show.aspx?id=2379&cid=39">
+# http://www.fjysgl.gov.cn/show.aspx?id=2379&cid=39
+# </a>
+# (retrieved 2009-10-13)
+# > Urumqi fire seven people are missing the alleged losses of at least
+# > 500 million yuan
+# >
+# > (Reporter Dong Liu) the day before 20:20 or so (Urumqi Time 18:20),
+# > Urumqi City Department of International Plaza Luther Qiantang River
+# > burst fire. As of yesterday, 18:30, Urumqi City Fire officers and men
+# > have worked continuously for 22 hours...
+
+# From Luther Ma (2009-11-19):
+# With the risk of being redundant to previous answers these are the most common
+# English "transliterations" (w/o using non-English symbols):
+#
+# 1. Wulumuqi...
+# 2. Kashi...
+# 3. Urumqi...
+# 4. Kashgar...
+# ...
+# 5. It seems that Uyghurs in Urumqi has been using Xinjiang since at least the
+# 1960's. I know of one Han, now over 50, who grew up in the surrounding
+# countryside and used Xinjiang time as a child.
+#
+# 6. Likewise for Kashgar and the rest of south Xinjiang I don't know of any
+# start date for Xinjiang time.
+#
+# Without having access to local historical records, nor the ability to legally
+# publish them, I would go with October 1, 1949, when Xinjiang became the Uyghur
+# Autonomous Region under the PRC. (Before that Uyghurs, of course, would also
+# not be using Beijing time, but some local time.)
+
 Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # or Kashi or Kaxgar
 			5:30	-	KAST	1940	 # Kashgar Time
 			5:00	-	KAST	1980 May
@@ -392,8 +490,8 @@
 
 
 # From Lee Yiu Chung (2009-10-24):
-# I found there are some mistakes for the historial DST rule for Hong
-# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
+# I found there are some mistakes for the...DST rule for Hong
+# Kong. [According] to the DST record from Hong Kong Observatory (actually,
 # it is not [an] observatory, but the official meteorological agency of HK,
 # and also serves as the official timing agency), there are some missing
 # and incorrect rules. Although the exact switch over time is missing, I
--- a/make/sun/javazic/tzdata/australasia	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/javazic/tzdata/australasia	Fri Mar 19 18:49:36 2010 -0700
@@ -270,9 +270,30 @@
 			6:30	-	CCT	# Cocos Islands Time
 
 # Fiji
+# From Alexander Krivenyshev (2009-11-10):
+# According to Fiji Broadcasting Corporation,  Fiji plans to re-introduce DST
+# from November 29th 2009  to April 25th 2010.
+#
+# "Daylight savings to commence this month"
+# <a href="http://www.radiofiji.com.fj/fullstory.php?id=23719">
+# http://www.radiofiji.com.fj/fullstory.php?id=23719
+# </a>
+# or
+# <a href="http://www.worldtimezone.com/dst_news/dst_news_fiji01.html">
+# http://www.worldtimezone.com/dst_news/dst_news_fiji01.html
+# </a>
+
+# From Steffen Thorsen (2009-11-10):
+# The Fiji Government has posted some more details about the approved
+# amendments:
+# <a href="http://www.fiji.gov.fj/publish/page_16198.shtml">
+# http://www.fiji.gov.fj/publish/page_16198.shtml
+# </a>
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
+Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
+Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
--- a/make/sun/javazic/tzdata/europe	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/javazic/tzdata/europe	Fri Mar 19 18:49:36 2010 -0700
@@ -2152,12 +2152,20 @@
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast',
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
+
+# From Oscar van Vlijmen (2009-11-29):
+# ...some regions of RUssia were merged with others since 2005...
+# Some names were changed, no big deal, except for one instance: a new name.
+# YAK/YAKST: UTC+9 Zabajkal'skij kraj.
+
+# From Oscar van Vlijmen (2009-11-29):
 # The Sakha districts are: Aldanskij, Amginskij, Anabarskij,
-# Bulunskij, Verkhnekolymskij, Verkhnevilyujskij, Vilyujskij, Gornyj,
+# Verkhnevilyujskij, Vilyujskij, Gornyj,
 # Zhiganskij, Kobyajskij, Lenskij, Megino-Kangalasskij, Mirninskij,
-# Namskij, Nyurbinskij, Olenekskij, Olekminskij, Srednekolymskij,
+# Namskij, Nyurbinskij, Olenyokskij, Olyokminskij,
 # Suntarskij, Tattinskij, Ust'-Aldanskij, Khangalasskij,
-# Churapchinskij, Eveno-Bytantajskij.
+# Churapchinskij, Eveno-Bytantajskij Natsional'nij.
+
 Zone Asia/Yakutsk	 8:38:40 -	LMT	1919 Dec 15
 			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
 			 9:00	Russia	YAK%sT	1991 Mar 31 2:00s
@@ -2167,7 +2175,9 @@
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj,
 # [parts of] Respublika Sakha (Yakutiya).
-# The Sakha districts are: Verkhoyanskij, Tomponskij, Ust'-Majskij,
+
+# From Oscar van Vlijmen (2009-11-29):
+# The Sakha districts are: Bulunskij, Verkhoyanskij, Tomponskij, Ust'-Majskij,
 # Ust'-Yanskij.
 Zone Asia/Vladivostok	 8:47:44 -	LMT	1922 Nov 15
 			 9:00	-	VLAT	1930 Jun 21 # Vladivostok Time
@@ -2188,8 +2198,10 @@
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Magadanskaya oblast', Respublika Sakha (Yakutiya).
 # Probably also: Kuril Islands.
-# The Sakha districts are: Abyjskij, Allaikhovskij, Momskij,
-# Nizhnekolymskij, Ojmyakonskij.
+
+# From Oscar van Vlijmen (2009-11-29):
+# The Sakha districts are: Abyjskij, Allaikhovskij, Verkhhhnekolymskij, Momskij,
+# Nizhnekolymskij, Ojmyakonskij, Srednekolymskij.
 Zone Asia/Magadan	10:03:12 -	LMT	1924 May  2
 			10:00	-	MAGT	1930 Jun 21 # Magadan Time
 			11:00	Russia	MAG%sT	1991 Mar 31 2:00s
--- a/make/sun/javazic/tzdata/northamerica	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/javazic/tzdata/northamerica	Fri Mar 19 18:49:36 2010 -0700
@@ -1977,6 +1977,58 @@
 # http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20)
 # confirms this.  Sonora as usual is the only state where DST is not applied.
 
+# From Steffen Thorsen (2009-12-28):
+#
+# Steffen Thorsen wrote:
+# > Mexico's House of Representatives has approved a proposal for northern
+# > Mexico's border cities to share the same daylight saving schedule as
+# > the United States.
+# Now this has passed both the Congress and the Senate, so starting from
+# 2010, some border regions will be the same:
+# <a href="http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/">
+# http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/
+# </a>
+# <a href="http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939">
+# http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939
+# </a>
+# (Spanish)
+#
+# Could not find the new law text, but the proposed law text changes are here:
+# <a href="http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf">
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf
+# </a>
+# (Gaceta Parlamentaria)
+#
+# There is also a list of the votes here:
+# <a href="http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html">
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
+# </a>
+#
+# Our page:
+# <a href="http://www.timeanddate.com/news/time/north-mexico-dst-change.html">
+# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# </a>
+
+# From Arthur David Olson (2010-01-20):
+# The page
+# <a href="http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010">
+# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010
+# </a>
+# includes this text:
+# En los municipios fronterizos de Tijuana y Mexicali en Baja California;
+# Ju&aacute;rez y Ojinaga en Chihuahua; Acu&ntilde;a y Piedras Negras en Coahuila;
+# An&aacute;huac en Nuevo Le&oacute;n; y Nuevo Laredo, Reynosa y Matamoros en
+# Tamaulipas, la aplicaci&oacute;n de este horario estacional surtir&aacute; efecto
+# desde las dos horas del segundo domingo de marzo y concluir&aacute; a las dos
+# horas del primer domingo de noviembre.
+# En los municipios fronterizos que se encuentren ubicados en la franja
+# fronteriza norte en el territorio comprendido entre la l&iacute;nea
+# internacional y la l&iacute;nea paralela ubicada a una distancia de veinte
+# kil&oacute;metros, as&iacute; como la Ciudad de Ensenada, Baja California, hacia el
+# interior del pa&iacute;s, la aplicaci&oacute;n de este horario estacional surtir&aacute;
+# efecto desde las dos horas del segundo domingo de marzo y concluir&aacute; a
+# las dos horas del primer domingo de noviembre.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mexico	1939	only	-	Feb	5	0:00	1:00	D
 Rule	Mexico	1939	only	-	Jun	25	0:00	0	S
@@ -2003,13 +2055,19 @@
 			-6:00	-	CST	1981 Dec 23
 			-5:00	-	EST	1982 Dec  2
 			-6:00	Mexico	C%sT
-# Coahuila, Durango, Nuevo Leon, Tamaulipas
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (near US border)
+Zone America/Matamoros	-6:40:00 -	LMT	1921 Dec 31 23:20:00
+			-6:00	-	CST	1988
+			-6:00	US	C%sT	1989
+			-6:00	Mexico	C%sT	2010
+			-6:00	US	C%sT
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (away from US border)
 Zone America/Monterrey	-6:41:16 -	LMT	1921 Dec 31 23:18:44
 			-6:00	-	CST	1988
 			-6:00	US	C%sT	1989
 			-6:00	Mexico	C%sT
 # Central Mexico
-Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1  0:23:24
+Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1 0:23:24
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
 			-7:00	-	MST	1931 May  1 23:00
@@ -2018,7 +2076,19 @@
 			-6:00	Mexico	C%sT	2001 Sep 30 02:00
 			-6:00	-	CST	2002 Feb 20
 			-6:00	Mexico	C%sT
-# Chihuahua
+# Chihuahua (near US border)
+Zone America/Ojinaga	-6:57:40 -	LMT	1922 Jan 1 0:02:20
+			-7:00	-	MST	1927 Jun 10 23:00
+			-6:00	-	CST	1930 Nov 15
+			-7:00	-	MST	1931 May  1 23:00
+			-6:00	-	CST	1931 Oct
+			-7:00	-	MST	1932 Apr  1
+			-6:00	-	CST	1996
+			-6:00	Mexico	C%sT	1998
+			-6:00	-	CST	1998 Apr Sun>=1 3:00
+			-7:00	Mexico	M%sT	2010
+			-7:00	US	M%sT
+# Chihuahua (away from US border)
 Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
@@ -2052,7 +2122,7 @@
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
-# Baja California
+# Baja California (near US border)
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-7:00	-	MST	1924
 			-8:00	-	PST	1927 Jun 10 23:00
@@ -2070,6 +2140,26 @@
 			-8:00	US	P%sT	1996
 			-8:00	Mexico	P%sT	2001
 			-8:00	US	P%sT	2002 Feb 20
+			-8:00	Mexico	P%sT	2010
+			-8:00	US	P%sT
+# Baja California (away from US border)
+Zone America/Santa_Isabel	-7:39:28 -	LMT	1922 Jan  1  0:20:32
+			-7:00	-	MST	1924
+			-8:00	-	PST	1927 Jun 10 23:00
+			-7:00	-	MST	1930 Nov 15
+			-8:00	-	PST	1931 Apr  1
+			-8:00	1:00	PDT	1931 Sep 30
+			-8:00	-	PST	1942 Apr 24
+			-8:00	1:00	PWT	1945 Aug 14 23:00u
+			-8:00	1:00	PPT	1945 Nov 12 # Peace
+			-8:00	-	PST	1948 Apr  5
+			-8:00	1:00	PDT	1949 Jan 14
+			-8:00	-	PST	1954
+			-8:00	CA	P%sT	1961
+			-8:00	-	PST	1976
+			-8:00	US	P%sT	1996
+			-8:00	Mexico	P%sT	2001
+			-8:00	US	P%sT	2002 Feb 20
 			-8:00	Mexico	P%sT
 # From Paul Eggert (2006-03-22):
 # Formerly there was an America/Ensenada zone, which differed from
--- a/make/sun/javazic/tzdata/zone.tab	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/javazic/tzdata/zone.tab	Fri Mar 19 18:49:36 2010 -0700
@@ -301,11 +301,14 @@
 MX	+1924-09909	America/Mexico_City	Central Time - most locations
 MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
 MX	+2058-08937	America/Merida	Central Time - Campeche, Yucatan
-MX	+2540-10019	America/Monterrey	Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+MX	+2540-10019	America/Monterrey	Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
+MX	+2550-09730	America/Matamoros	US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
 MX	+2313-10625	America/Mazatlan	Mountain Time - S Baja, Nayarit, Sinaloa
-MX	+2838-10605	America/Chihuahua	Mountain Time - Chihuahua
+MX	+2838-10605	America/Chihuahua	Mexican Mountain Time - Chihuahua away from US border
+MX	+2934-10425	America/Ojinaga	US Mountain Time - Chihuahua near US border
 MX	+2904-11058	America/Hermosillo	Mountain Standard Time - Sonora
-MX	+3232-11701	America/Tijuana	Pacific Time
+MX	+3232-11701	America/Tijuana	US Pacific Time - Baja California near US border
+MX	+3018-11452	America/Santa_Isabel	Mexican Pacific Time - Baja California away from US border
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo
--- a/make/sun/management/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/management/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -47,6 +47,8 @@
 endif
 SUBDIRS += jmxremote
  
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/net/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/net/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -29,6 +29,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = others spi
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/net/spi/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/net/spi/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -26,7 +26,9 @@
 BUILDDIR = ../../..
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = nameservice 
+SUBDIRS_misc = nameservice 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/net/spi/nameservice/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/net/spi/nameservice/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -27,6 +27,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = dns 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/nio/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/nio/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -29,6 +29,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = cs
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/org/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/org/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS =  mozilla
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/org/mozilla/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/org/mozilla/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = javascript
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/sun/rmi/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/rmi/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -43,6 +43,8 @@
     SUBDIRS += cgi
 endif # PLATFORM
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 # Then do the rest
 all build clean clobber ::
 	$(SUBDIRS-loop)
--- a/make/sun/security/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/security/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -67,8 +67,10 @@
   INTREE_EC =
 endif
 
-SUBDIRS = $(INTREE_EC) other action util tools jgss krb5 smartcardio \
-	  $(PKCS11) $(JGSS_WRAPPER) $(MSCAPI)
+SUBDIRS       = $(INTREE_EC) other action util krb5
+SUBDIRS_misc  = jgss $(PKCS11) $(JGSS_WRAPPER) $(MSCAPI) smartcardio
+SUBDIRS_tools = tools
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/sun/tracing/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/sun/tracing/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -33,6 +33,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = dtrace
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 clean clobber::
--- a/make/tools/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/make/tools/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -56,6 +56,8 @@
   SUBDIRS += generate_nimbus
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Mar 19 18:49:36 2010 -0700
@@ -27,7 +27,6 @@
 
 import java.io.*;
 import java.util.*;
-import java.util.logging.Level;
 import com.sun.java.util.jar.pack.Package.Class;
 import com.sun.java.util.jar.pack.Package.File;
 import com.sun.java.util.jar.pack.Package.InnerClass;
@@ -162,7 +161,7 @@
 
             ok = true;
         } catch (Exception ee) {
-            Utils.log.log(Level.WARNING, "Error on input: "+ee, ee);
+            Utils.log.warning("Error on input: "+ee, ee);
             if (verbose > 0)
                 Utils.log.info("Stream offsets:"+
                                  " served="+in.getBytesServed()+
--- a/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Mar 19 18:49:36 2010 -0700
@@ -27,7 +27,6 @@
 
 import java.io.*;
 import java.util.*;
-import java.util.logging.Level;
 import com.sun.java.util.jar.pack.Package.Class;
 import com.sun.java.util.jar.pack.Package.File;
 import com.sun.java.util.jar.pack.Package.InnerClass;
@@ -84,7 +83,7 @@
 
             ok = true;
         } catch (Exception ee) {
-            Utils.log.log(Level.WARNING, "Error on output: "+ee, ee);
+            Utils.log.warning("Error on output: "+ee, ee);
             //if (verbose > 0)  ee.printStackTrace();
             // Write partial output only if we are verbose.
             if (verbose > 0)  finalOut.close();
--- a/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Fri Mar 19 18:49:36 2010 -0700
@@ -28,9 +28,10 @@
 import java.util.*;
 import java.util.jar.*;
 import java.util.zip.*;
-import java.util.logging.*;
 import java.io.*;
 
+import sun.util.logging.PlatformLogger;
+
 class Utils {
     static final String COM_PREFIX = "com.sun.java.util.jar.pack.";
     static final String METAINF    = "META-INF";
@@ -130,31 +131,53 @@
         = Boolean.getBoolean(Utils.COM_PREFIX+"nolog");
 
 
-    static final Logger log
-        = new Logger("java.util.jar.Pack200", null) {
-            public void log(LogRecord record) {
-                int verbose = currentPropMap().getInteger(DEBUG_VERBOSE);
-                if (verbose > 0) {
-                    if (nolog &&
-                        record.getLevel().intValue() < Level.WARNING.intValue()) {
-                        System.out.println(record.getMessage());
-                    } else {
-                        super.log(record);
-                    }
+    static class Pack200Logger {
+        private final String name;
+        private PlatformLogger log;
+        Pack200Logger(String name) {
+            this.name = name;
+        }
+
+        private synchronized PlatformLogger getLogger() {
+            if (log == null) {
+                log = PlatformLogger.getLogger(name);
+            }
+            return log;
+        }
+
+        public void warning(String msg, Object param) {
+            int verbose = currentPropMap().getInteger(DEBUG_VERBOSE);
+            if (verbose > 0) {
+                getLogger().warning(msg, param);
+            }
+        }
+
+        public void warning(String msg) {
+            warning(msg, null);
+        }
+
+        public void info(String msg) {
+            int verbose = currentPropMap().getInteger(DEBUG_VERBOSE);
+            if (verbose > 0) {
+                if (nolog) {
+                    System.out.println(msg);
+                } else {
+                    getLogger().info(msg);
                 }
             }
+        }
 
-            public void fine(String msg) {
-                int verbose = currentPropMap().getInteger(DEBUG_VERBOSE);
-                if (verbose > 0) {
-                        System.out.println(msg);
-                }
+        public void fine(String msg) {
+            int verbose = currentPropMap().getInteger(DEBUG_VERBOSE);
+            if (verbose > 0) {
+                    System.out.println(msg);
             }
-        };
-    static {
-        LogManager.getLogManager().addLogger(log);
+        }
     }
 
+    static final Pack200Logger log
+        = new Pack200Logger("java.util.jar.Pack200");
+
     // Returns the Max Version String of this implementation
     static String getVersionString() {
         return "Pack200, Vendor: Sun Microsystems, Version: " +
--- a/src/share/classes/com/sun/jndi/ldap/Filter.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/com/sun/jndi/ldap/Filter.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2010 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
@@ -33,6 +33,7 @@
 /**
  * LDAP (RFC-1960) and LDAPv3 (RFC-2254) search filters.
  *
+ * @author Xuelei Fan
  * @author Vincent Ryan
  * @author Jagane Sundar
  * @author Rosanna Lee
@@ -258,7 +259,7 @@
         byte[] answer = new byte[j];
         System.arraycopy(tbuf, 0, answer, 0, j);
         if (dbg) {
-            Ber.dumpBER(System.err, null, answer, 0, j);
+            Ber.dumpBER(System.err, "", answer, 0, j);
         }
         return answer;
     }
@@ -330,7 +331,7 @@
         }
 
 
-        valueStart = eq + 1;            // value starts after equal sign
+        valueStart = eq + 1;        // value starts after equal sign
         valueEnd = filtEnd;
         typeStart = filtStart;      // beginning of string
 
@@ -355,20 +356,199 @@
             break;
         default:
             typeEnd = eq;
+            //initializing ftype to make the compiler happy
+            ftype = 0x00;
+            break;
+        }
+
+        if (dbg) {
+            System.err.println("type: " + typeStart + ", " + typeEnd);
+            System.err.println("value: " + valueStart + ", " + valueEnd);
+        }
+
+        // check validity of type
+        //
+        // RFC4512 defines the type as the following ABNF:
+        //     attr = attributedescription
+        //     attributedescription = attributetype options
+        //     attributetype = oid
+        //     oid = descr / numericoid
+        //     descr = keystring
+        //     keystring = leadkeychar *keychar
+        //     leadkeychar = ALPHA
+        //     keychar = ALPHA / DIGIT / HYPHEN
+        //     numericoid = number 1*( DOT number )
+        //     number  = DIGIT / ( LDIGIT 1*DIGIT )
+        //     options = *( SEMI option )
+        //     option = 1*keychar
+        //
+        // And RFC4515 defines the extensible type as the following ABNF:
+        //     attr [dnattrs] [matchingrule] / [dnattrs] matchingrule
+        int optionsStart = -1;
+        int extensibleStart = -1;
+        if ((filter[typeStart] >= '0' && filter[typeStart] <= '9') ||
+            (filter[typeStart] >= 'A' && filter[typeStart] <= 'Z') ||
+            (filter[typeStart] >= 'a' && filter[typeStart] <= 'z')) {
+
+            boolean isNumericOid =
+                filter[typeStart] >= '0' && filter[typeStart] <= '9';
+            for (int i = typeStart + 1; i < typeEnd; i++) {
+                // ';' is an indicator of attribute options
+                if (filter[i] == ';') {
+                    if (isNumericOid && filter[i - 1] == '.') {
+                        throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                    }
+
+                    // attribute options
+                    optionsStart = i;
+                    break;
+                }
+
+                // ':' is an indicator of extensible rules
+                if (filter[i] == ':' && ftype == LDAP_FILTER_EXT) {
+                    if (isNumericOid && filter[i - 1] == '.') {
+                        throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                    }
+
+                    // extensible matching
+                    extensibleStart = i;
+                    break;
+                }
+
+                if (isNumericOid) {
+                    // numeric object identifier
+                    if ((filter[i] == '.' && filter[i - 1] == '.') ||
+                        (filter[i] != '.' &&
+                            !(filter[i] >= '0' && filter[i] <= '9'))) {
+                        throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                    }
+                } else {
+                    // descriptor
+                    if (filter[i] != '-' &&
+                        !(filter[i] >= '0' && filter[i] <= '9') &&
+                        !(filter[i] >= 'A' && filter[i] <= 'Z') &&
+                        !(filter[i] >= 'a' && filter[i] <= 'z')) {
+                        throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                    }
+                }
+            }
+        } else if (ftype == LDAP_FILTER_EXT && filter[typeStart] == ':') {
+            // extensible matching
+            extensibleStart = typeStart;
+        } else {
+            throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+        }
+
+        // check attribute options
+        if (optionsStart > 0) {
+            for (int i = optionsStart + 1; i < typeEnd; i++) {
+                if (filter[i] == ';') {
+                    if (filter[i - 1] == ';') {
+                        throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                    }
+                    continue;
+                }
+
+                // ':' is an indicator of extensible rules
+                if (filter[i] == ':' && ftype == LDAP_FILTER_EXT) {
+                    if (filter[i - 1] == ';') {
+                        throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                    }
+
+                    // extensible matching
+                    extensibleStart = i;
+                    break;
+                }
+
+                if (filter[i] != '-' &&
+                        !(filter[i] >= '0' && filter[i] <= '9') &&
+                        !(filter[i] >= 'A' && filter[i] <= 'Z') &&
+                        !(filter[i] >= 'a' && filter[i] <= 'z')) {
+                    throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                }
+            }
+        }
+
+        // check extensible matching
+        if (extensibleStart > 0) {
+            boolean isMatchingRule = false;
+            for (int i = extensibleStart + 1; i < typeEnd; i++) {
+                if (filter[i] == ':') {
+                    throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                } else if ((filter[i] >= '0' && filter[i] <= '9') ||
+                           (filter[i] >= 'A' && filter[i] <= 'Z') ||
+                           (filter[i] >= 'a' && filter[i] <= 'z')) {
+                    boolean isNumericOid = filter[i] >= '0' && filter[i] <= '9';
+                    i++;
+                    for (int j = i; j < typeEnd; j++, i++) {
+                        // allows no more than two extensible rules
+                        if (filter[j] == ':') {
+                            if (isMatchingRule) {
+                                throw new InvalidSearchFilterException(
+                                            "invalid attribute description");
+                            }
+                            if (isNumericOid && filter[j - 1] == '.') {
+                                throw new InvalidSearchFilterException(
+                                            "invalid attribute description");
+                            }
+
+                            isMatchingRule = true;
+                            break;
+                        }
+
+                        if (isNumericOid) {
+                            // numeric object identifier
+                            if ((filter[j] == '.' && filter[j - 1] == '.') ||
+                                (filter[j] != '.' &&
+                                    !(filter[j] >= '0' && filter[j] <= '9'))) {
+                                throw new InvalidSearchFilterException(
+                                            "invalid attribute description");
+                            }
+                        } else {
+                            // descriptor
+                            if (filter[j] != '-' &&
+                                !(filter[j] >= '0' && filter[j] <= '9') &&
+                                !(filter[j] >= 'A' && filter[j] <= 'Z') &&
+                                !(filter[j] >= 'a' && filter[j] <= 'z')) {
+                                throw new InvalidSearchFilterException(
+                                            "invalid attribute description");
+                            }
+                        }
+                    }
+                } else {
+                    throw new InvalidSearchFilterException(
+                                    "invalid attribute description");
+                }
+            }
+        }
+
+        // ensure the latest byte is not isolated
+        if (filter[typeEnd - 1] == '.' || filter[typeEnd - 1] == ';' ||
+                                          filter[typeEnd - 1] == ':') {
+            throw new InvalidSearchFilterException(
+                "invalid attribute description");
+        }
+
+        if (typeEnd == eq) { // filter type is of "equal"
             if (findUnescaped(filter, '*', valueStart, valueEnd) == -1) {
                 ftype = LDAP_FILTER_EQUALITY;
-            } else if (filter[valueStart] == '*' && valueStart == (valueEnd - 1)) {
+            } else if (filter[valueStart] == '*' &&
+                            valueStart == (valueEnd - 1)) {
                 ftype = LDAP_FILTER_PRESENT;
             } else {
                 encodeSubstringFilter(ber, filter,
                     typeStart, typeEnd, valueStart, valueEnd);
                 return;
             }
-            break;
-        }
-        if (dbg) {
-            System.err.println("type: " + typeStart + ", " + typeEnd);
-            System.err.println("value: " + valueStart + ", " + valueEnd);
         }
 
         if (ftype == LDAP_FILTER_PRESENT) {
@@ -379,7 +559,7 @@
         } else {
             ber.beginSeq(ftype);
                 ber.encodeOctetString(filter, Ber.ASN_OCTET_STR,
-                    typeStart, typeEnd-typeStart);
+                    typeStart, typeEnd - typeStart);
                 ber.encodeOctetString(
                     unescapeFilterValue(filter, valueStart, valueEnd),
                     Ber.ASN_OCTET_STR);
@@ -623,7 +803,8 @@
     //
     ////////////////////////////////////////////////////////////////////////////
 
-    private static final boolean dbg = false;
+    // private static final boolean dbg = false;
+    private static final boolean dbg = true;
     private static int dbgIndent = 0;
 
     private static void dprint(String msg) {
--- a/src/share/classes/java/awt/FileDialog.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/awt/FileDialog.java	Fri Mar 19 18:49:36 2010 -0700
@@ -28,6 +28,8 @@
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.ObjectInputStream;
+import java.io.File;
+import sun.awt.AWTAccessor;
 
 /**
  * The <code>FileDialog</code> class displays a dialog window
@@ -93,6 +95,25 @@
      */
     String file;
 
+    /**
+     * Contains the File instances for all the files that the user selects.
+     *
+     * @serial
+     * @see getFiles
+     * @since 1.7
+     */
+    private File[] files;
+
+    /**
+     * Represents whether the file dialog allows the multiple file selection.
+     *
+     * @serial
+     * @see #setMultipleMode
+     * @see #isMultipleMode
+     * @since 1.7
+     */
+    private boolean multipleMode = false;
+
     /*
      * The filter used as the file dialog's filename filter.
      * The file dialog will only be displaying files whose
@@ -123,6 +144,26 @@
         }
     }
 
+    static {
+        AWTAccessor.setFileDialogAccessor(
+            new AWTAccessor.FileDialogAccessor() {
+                public void setFiles(FileDialog fileDialog, String directory, String files[]) {
+                    fileDialog.setFiles(directory, files);
+                }
+                public void setFile(FileDialog fileDialog, String file) {
+                    fileDialog.file = ("".equals(file)) ? null : file;
+                }
+                public void setDirectory(FileDialog fileDialog, String directory) {
+                    fileDialog.dir = ("".equals(directory)) ? null : directory;
+                }
+                public boolean isMultipleMode(FileDialog fileDialog) {
+                    synchronized (fileDialog.getObjectLock()) {
+                        return fileDialog.multipleMode;
+                    }
+                }
+            });
+    }
+
     /**
      * Initialize JNI field and method IDs for fields that may be
        accessed from C.
@@ -371,6 +412,51 @@
     }
 
     /**
+     * Returns files that the user selects.
+     * <p>
+     * If the user cancels the file dialog,
+     * then the method returns an empty array.
+     *
+     * @return    files that the user selects or an empty array
+     *            if the user cancels the file dialog.
+     * @see       #setFile(String)
+     * @see       #getFile
+     * @since 1.7
+     */
+    public File[] getFiles() {
+        synchronized (getObjectLock()) {
+            if (files != null) {
+                return files.clone();
+            } else {
+                return new File[0];
+            }
+        }
+    }
+
+    /**
+     * Stores the names of all the files that the user selects.
+     *
+     * Note that the method is private and it's intended to be used
+     * by the peers through the AWTAccessor API.
+     *
+     * @param directory the current directory
+     * @param files     the array that contains the short names of
+     *                  all the files that the user selects.
+     *
+     * @see #getFiles
+     * @since 1.7
+     */
+    private void setFiles(String directory, String files[]) {
+        synchronized (getObjectLock()) {
+            int filesNumber = (files != null) ? files.length : 0;
+            this.files = new File[filesNumber];
+            for (int i = 0; i < filesNumber; i++) {
+                this.files[i] = new File(directory, files[i]);
+            }
+        }
+    }
+
+    /**
      * Sets the selected file for this file dialog window to be the
      * specified file. This file becomes the default file if it is set
      * before the file dialog window is first shown.
@@ -380,7 +466,8 @@
      * as the file.
      *
      * @param    file   the file being set
-     * @see      java.awt.FileDialog#getFile
+     * @see      #getFile
+     * @see      #getFiles
      */
     public void setFile(String file) {
         this.file = (file != null && file.equals("")) ? null : file;
@@ -391,6 +478,34 @@
     }
 
     /**
+     * Enables or disables multiple file selection for the file dialog.
+     *
+     * @param enable    if {@code true}, multiple file selection is enabled;
+     *                  {@code false} - disabled.
+     * @see #isMultipleMode
+     * @since 1.7
+     */
+    public void setMultipleMode(boolean enable) {
+        synchronized (getObjectLock()) {
+            this.multipleMode = enable;
+        }
+    }
+
+    /**
+     * Returns whether the file dialog allows the multiple file selection.
+     *
+     * @return          {@code true} if the file dialog allows the multiple
+     *                  file selection; {@code false} otherwise.
+     * @see #setMultipleMode
+     * @since 1.7
+     */
+    public boolean isMultipleMode() {
+        synchronized (getObjectLock()) {
+            return multipleMode;
+        }
+    }
+
+    /**
      * Determines this file dialog's filename filter. A filename filter
      * allows the user to specify which files appear in the file dialog
      * window.  Filename filters do not function in Sun's reference
--- a/src/share/classes/java/beans/BeanDescriptor.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/BeanDescriptor.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2010 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
@@ -101,4 +101,9 @@
         beanClassRef = old.beanClassRef;
         customizerClassRef = old.customizerClassRef;
     }
+
+    void appendTo(StringBuilder sb) {
+        appendTo(sb, "beanClass", this.beanClassRef);
+        appendTo(sb, "customizerClass", this.customizerClassRef);
+    }
 }
--- a/src/share/classes/java/beans/EventSetDescriptor.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/EventSetDescriptor.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2010 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
@@ -26,7 +26,6 @@
 package java.beans;
 
 import java.lang.ref.Reference;
-
 import java.lang.reflect.Method;
 
 /**
@@ -357,8 +356,7 @@
      * @return The method used to register a listener at the event source.
      */
     public synchronized Method getAddListenerMethod() {
-        return (addMethodDescriptor != null ?
-                    addMethodDescriptor.getMethod() : null);
+        return getMethod(this.addMethodDescriptor);
     }
 
     private synchronized void setAddListenerMethod(Method method) {
@@ -378,8 +376,7 @@
      * @return The method used to remove a listener at the event source.
      */
     public synchronized Method getRemoveListenerMethod() {
-        return (removeMethodDescriptor != null ?
-                    removeMethodDescriptor.getMethod() : null);
+        return getMethod(this.removeMethodDescriptor);
     }
 
     private synchronized void setRemoveListenerMethod(Method method) {
@@ -401,8 +398,7 @@
      * @since 1.4
      */
     public synchronized Method getGetListenerMethod() {
-        return (getMethodDescriptor != null ?
-                    getMethodDescriptor.getMethod() : null);
+        return getMethod(this.getMethodDescriptor);
     }
 
     private synchronized void setGetListenerMethod(Method method) {
@@ -522,4 +518,19 @@
         unicast = old.unicast;
         inDefaultEventSet = old.inDefaultEventSet;
     }
+
+    void appendTo(StringBuilder sb) {
+        appendTo(sb, "unicast", this.unicast);
+        appendTo(sb, "inDefaultEventSet", this.inDefaultEventSet);
+        appendTo(sb, "listenerType", this.listenerTypeRef);
+        appendTo(sb, "getListenerMethod", getMethod(this.getMethodDescriptor));
+        appendTo(sb, "addListenerMethod", getMethod(this.addMethodDescriptor));
+        appendTo(sb, "removeListenerMethod", getMethod(this.removeMethodDescriptor));
+    }
+
+    private static Method getMethod(MethodDescriptor descriptor) {
+        return (descriptor != null)
+                ? descriptor.getMethod()
+                : null;
+    }
 }
--- a/src/share/classes/java/beans/FeatureDescriptor.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/FeatureDescriptor.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2010 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
@@ -35,6 +35,7 @@
 
 import java.util.Enumeration;
 import java.util.Hashtable;
+import java.util.Map.Entry;
 
 /**
  * The FeatureDescriptor class is the common baseclass for PropertyDescriptor,
@@ -393,4 +394,52 @@
     private String name;
     private String displayName;
     private Hashtable<String, Object> table;
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return a string representation of the object
+     *
+     * @since 1.7
+     */
+    public String toString() {
+        StringBuilder sb = new StringBuilder(getClass().getName());
+        sb.append("[name=").append(this.name);
+        appendTo(sb, "displayName", this.displayName);
+        appendTo(sb, "shortDescription", this.shortDescription);
+        appendTo(sb, "preferred", this.preferred);
+        appendTo(sb, "hidden", this.hidden);
+        appendTo(sb, "expert", this.expert);
+        if ((this.table != null) && !this.table.isEmpty()) {
+            sb.append("; values={");
+            for (Entry<String, Object> entry : this.table.entrySet()) {
+                sb.append(entry.getKey()).append("=").append(entry.getValue()).append("; ");
+            }
+            sb.setLength(sb.length() - 2);
+            sb.append("}");
+        }
+        appendTo(sb);
+        return sb.append("]").toString();
+    }
+
+    void appendTo(StringBuilder sb) {
+    }
+
+    static void appendTo(StringBuilder sb, String name, Reference reference) {
+        if (reference != null) {
+            appendTo(sb, name, reference.get());
+        }
+    }
+
+    static void appendTo(StringBuilder sb, String name, Object value) {
+        if (value != null) {
+            sb.append("; ").append(name).append("=").append(value);
+        }
+    }
+
+    static void appendTo(StringBuilder sb, String name, boolean value) {
+        if (value) {
+            sb.append("; ").append(name);
+        }
+    }
 }
--- a/src/share/classes/java/beans/IndexedPropertyChangeEvent.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/IndexedPropertyChangeEvent.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2010 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
@@ -62,7 +62,6 @@
         this.index = index;
     }
 
-
     /**
      * Gets the index of the property that was changed.
      *
@@ -72,4 +71,8 @@
     public int getIndex() {
         return index;
     }
+
+    void appendTo(StringBuilder sb) {
+        sb.append("; index=").append(getIndex());
+    }
 }
--- a/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2010 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
@@ -26,7 +26,6 @@
 package java.beans;
 
 import java.lang.ref.Reference;
-
 import java.lang.reflect.Method;
 
 /**
@@ -117,8 +116,7 @@
      * This constructor takes the name of a simple property, and Method
      * objects for reading and writing the property.
      *
-     * @param propertyName The programmatic name of the pro
-perty.
+     * @param propertyName The programmatic name of the property.
      * @param readMethod The method used for reading the property values as an array.
      *          May be null if the property is write-only or must be indexed.
      * @param writeMethod The method used for writing the property values as an array.
@@ -518,20 +516,10 @@
         return result;
     }
 
-    /*
-    public String toString() {
-        String message = super.toString();
-
-        message += ", indexedType=";
-        message += getIndexedPropertyType();
-
-        message += ", indexedWriteMethod=";
-        message += indexedWriteMethodName;
-
-        message += ", indexedReadMethod=";
-        message += indexedReadMethodName;
-
-        return message;
+    void appendTo(StringBuilder sb) {
+        super.appendTo(sb);
+        appendTo(sb, "indexedPropertyType", this.indexedPropertyTypeRef);
+        appendTo(sb, "indexedReadMethod", this.indexedReadMethodRef);
+        appendTo(sb, "indexedWriteMethod", this.indexedWriteMethodRef);
     }
-    */
 }
--- a/src/share/classes/java/beans/MethodDescriptor.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/MethodDescriptor.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2010 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
@@ -27,9 +27,7 @@
 
 import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
-
 import java.lang.reflect.Method;
-
 import java.util.List;
 import java.util.ArrayList;
 
@@ -167,23 +165,6 @@
     }
 
     /*
-    public String toString() {
-        String message = "name=" + getName();
-        Class cls = getClass0();
-        if (cls != null) {
-            message += ", class=";
-            message += cls.getName();
-        }
-        String[] names = getParamNames();
-        if (names != null) {
-            for (int i = 0; i < names.length; i++) {
-                message += ", param=" + names[i];
-            }
-        }
-        return message;
-        } */
-
-    /*
      * Package-private constructor
      * Merge two method descriptors.  Where they conflict, give the
      * second argument (y) priority over the first argument (x).
@@ -233,4 +214,15 @@
         }
     }
 
+    void appendTo(StringBuilder sb) {
+        appendTo(sb, "method", this.methodRef);
+        if (this.parameterDescriptors != null) {
+            sb.append("; parameterDescriptors={");
+            for (ParameterDescriptor pd : this.parameterDescriptors) {
+                sb.append(pd).append(", ");
+            }
+            sb.setLength(sb.length() - 2);
+            sb.append("}");
+        }
+    }
 }
--- a/src/share/classes/java/beans/PropertyChangeEvent.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/PropertyChangeEvent.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2010 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
@@ -140,4 +140,25 @@
      * @see #getPropagationId
      */
     private Object propagationId;
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return a string representation of the object
+     *
+     * @since 1.7
+     */
+    public String toString() {
+        StringBuilder sb = new StringBuilder(getClass().getName());
+        sb.append("[propertyName=").append(getPropertyName());
+        appendTo(sb);
+        sb.append("; oldValue=").append(getOldValue());
+        sb.append("; newValue=").append(getNewValue());
+        sb.append("; propagationId=").append(getPropagationId());
+        sb.append("; source=").append(getSource());
+        return sb.append("]").toString();
+    }
+
+    void appendTo(StringBuilder sb) {
+    }
 }
--- a/src/share/classes/java/beans/PropertyDescriptor.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/PropertyDescriptor.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2010 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
@@ -26,7 +26,6 @@
 package java.beans;
 
 import java.lang.ref.Reference;
-
 import java.lang.reflect.Method;
 import java.lang.reflect.Constructor;
 
@@ -710,22 +709,12 @@
         return baseName;
     }
 
-    /*
-    public String toString() {
-        String message = "name=" + getName();
-        message += ", class=" + getClass0();
-        message += ", type=" + getPropertyType();
-
-        message += ", writeMethod=";
-        message += writeMethodName;
-
-        message += ", readMethod=";
-        message += readMethodName;
-
-        message += ", bound=" + bound;
-        message += ", constrained=" + constrained;
-
-        return message;
+    void appendTo(StringBuilder sb) {
+        appendTo(sb, "bound", this.bound);
+        appendTo(sb, "constrained", this.constrained);
+        appendTo(sb, "propertyEditorClass", this.propertyEditorClassRef);
+        appendTo(sb, "propertyType", this.propertyTypeRef);
+        appendTo(sb, "readMethod", this.readMethodRef);
+        appendTo(sb, "writeMethod", this.writeMethodRef);
     }
-    */
 }
--- a/src/share/classes/java/beans/XMLEncoder.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/beans/XMLEncoder.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2010 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
@@ -214,8 +214,8 @@
     private Object owner;
     private int indentation = 0;
     private boolean internal = false;
-    private Map valueToExpression;
-    private Map targetToStatementList;
+    private Map<Object, ValueData> valueToExpression;
+    private Map<Object, List<Statement>> targetToStatementList;
     private boolean preambleWritten = false;
     private NameGenerator nameGenerator;
 
@@ -287,8 +287,8 @@
         this.declaration = declaration;
         this.indentation = indentation;
         this.out = new OutputStreamWriter(out, cs.newEncoder());
-        valueToExpression = new IdentityHashMap();
-        targetToStatementList = new IdentityHashMap();
+        valueToExpression = new IdentityHashMap<Object, ValueData>();
+        targetToStatementList = new IdentityHashMap<Object, List<Statement>>();
         nameGenerator = new NameGenerator();
     }
 
@@ -331,13 +331,12 @@
         }
     }
 
-    private Vector statementList(Object target) {
-        Vector list = (Vector)targetToStatementList.get(target);
-        if (list != null) {
-            return list;
+    private List<Statement> statementList(Object target) {
+        List<Statement> list = targetToStatementList.get(target);
+        if (list == null) {
+            list = new ArrayList<Statement>();
+            targetToStatementList.put(target, list);
         }
-        list = new Vector();
-        targetToStatementList.put(target, list);
         return list;
     }
 
@@ -363,13 +362,13 @@
         }
         d.marked = true;
         Object target = exp.getTarget();
+        mark(exp);
         if (!(target instanceof Class)) {
             statementList(target).add(exp);
             // Pending: Why does the reference count need to
             // be incremented here?
             d.refs++;
         }
-        mark(exp);
     }
 
     private void mark(Statement stm) {
@@ -463,9 +462,9 @@
             preambleWritten = true;
         }
         indentation++;
-        Vector roots = statementList(this);
-        for(int i = 0; i < roots.size(); i++) {
-            Statement s = (Statement)roots.get(i);
+        List<Statement> statements = statementList(this);
+        while (!statements.isEmpty()) {
+            Statement s = statements.remove(0);
             if ("writeObject".equals(s.getMethodName())) {
                 outputValue(s.getArguments()[0], this, true);
             }
@@ -513,7 +512,7 @@
     }
 
     private ValueData getValueData(Object o) {
-        ValueData d = (ValueData)valueToExpression.get(o);
+        ValueData d = valueToExpression.get(o);
         if (d == null) {
             d = new ValueData();
             valueToExpression.put(o, d);
@@ -619,11 +618,11 @@
         }
 
         if (d.name != null) {
-            writeln("<object idref=" + quote(d.name) + "/>");
-            return;
+            outputXML(isArgument ? "object" : "void", " idref=" + quote(d.name), value);
         }
-
-        outputStatement(d.exp, outer, isArgument);
+        else if (d.exp != null) {
+            outputStatement(d.exp, outer, isArgument);
+        }
     }
 
     private static String quoteCharCode(int code) {
@@ -683,13 +682,6 @@
         String tag = (expression && isArgument) ? "object" : "void";
         String attributes = "";
         ValueData d = getValueData(value);
-        if (expression) {
-            if (d.refs > 1) {
-                String instanceName = nameGenerator.instanceName(value);
-                d.name = instanceName;
-                attributes = attributes + " id=" + quote(instanceName);
-            }
-        }
 
         // Special cases for targets.
         if (target == outer) {
@@ -706,13 +698,19 @@
         else {
             d.refs = 2;
             getValueData(target).refs++;
+            List<Statement> statements = statementList(target);
+            if (!statements.contains(exp)) {
+                statements.add(exp);
+            }
             outputValue(target, outer, false);
-            if (isArgument) {
-                outputValue(value, outer, false);
-            }
+            outputValue(value, outer, isArgument);
             return;
         }
-
+        if (expression && (d.refs > 1)) {
+            String instanceName = nameGenerator.instanceName(value);
+            d.name = instanceName;
+            attributes = attributes + " id=" + quote(instanceName);
+        }
 
         // Special cases for methods.
         if ((!expression && methodName.equals("set") && args.length == 2 &&
@@ -730,8 +728,11 @@
         else if (!methodName.equals("new") && !methodName.equals("newInstance")) {
             attributes = attributes + " method=" + quote(methodName);
         }
+        outputXML(tag, attributes, value, args);
+    }
 
-        Vector statements = statementList(value);
+    private void outputXML(String tag, String attributes, Object value, Object... args) {
+        List<Statement> statements = statementList(value);
         // Use XML's short form when there is no body.
         if (args.length == 0 && statements.size() == 0) {
             writeln("<" + tag + attributes + "/>");
@@ -745,8 +746,8 @@
             outputValue(args[i], null, true);
         }
 
-        for(int i = 0; i < statements.size(); i++) {
-            Statement s = (Statement)statements.get(i);
+        while (!statements.isEmpty()) {
+            Statement s = statements.remove(0);
             outputStatement(s, value, false);
         }
 
--- a/src/share/classes/java/lang/Iterable.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/lang/Iterable.java	Fri Mar 19 18:49:36 2010 -0700
@@ -27,8 +27,12 @@
 
 import java.util.Iterator;
 
-/** Implementing this interface allows an object to be the target of
- *  the "foreach" statement.
+/**
+ * Implementing this interface allows an object to be the target of
+ * the "foreach" statement.
+ *
+ * @param <T> the type of elements returned by the iterator
+ *
  * @since 1.5
  */
 public interface Iterable<T> {
--- a/src/share/classes/java/lang/String.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/lang/String.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1492,7 +1492,7 @@
      */
     public int hashCode() {
         int h = hash;
-        if (h == 0) {
+        if (h == 0 && count > 0) {
             int off = offset;
             char val[] = value;
             int len = count;
--- a/src/share/classes/java/security/IdentityScope.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/security/IdentityScope.java	Fri Mar 19 18:49:36 2010 -0700
@@ -129,7 +129,8 @@
     /**
      * Returns the system's identity scope.
      *
-     * @return the system's identity scope.
+     * @return the system's identity scope, or {@code null} if none has been
+     *         set.
      *
      * @see #setSystemScope
      */
--- a/src/share/classes/java/util/Collection.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/util/Collection.java	Fri Mar 19 18:49:36 2010 -0700
@@ -103,6 +103,8 @@
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
  * Java Collections Framework</a>.
  *
+ * @param <E> the type of elements in this collection
+ *
  * @author  Josh Bloch
  * @author  Neal Gafter
  * @see     Set
--- a/src/share/classes/java/util/DualPivotQuicksort.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/util/DualPivotQuicksort.java	Fri Mar 19 18:49:36 2010 -0700
@@ -253,7 +253,7 @@
                         a[less] = ak;
                     }
                     less++;
-                } else { // (a[k] > pivot1) -  Move a[k] to right part
+                } else { // (a[k] > pivot1) - Move a[k] to right part
                     /*
                      * We know that pivot1 == a[e3] == pivot2. Thus, we know
                      * that great will still be >= k when the following loop
@@ -531,7 +531,7 @@
                         a[less] = ak;
                     }
                     less++;
-                } else { // (a[k] > pivot1) -  Move a[k] to right part
+                } else { // (a[k] > pivot1) - Move a[k] to right part
                     /*
                      * We know that pivot1 == a[e3] == pivot2. Thus, we know
                      * that great will still be >= k when the following loop
@@ -826,7 +826,7 @@
                         a[less] = ak;
                     }
                     less++;
-                } else { // (a[k] > pivot1) -  Move a[k] to right part
+                } else { // (a[k] > pivot1) - Move a[k] to right part
                     /*
                      * We know that pivot1 == a[e3] == pivot2. Thus, we know
                      * that great will still be >= k when the following loop
@@ -1119,7 +1119,7 @@
                         a[less] = ak;
                     }
                     less++;
-                } else { // (a[k] > pivot1) -  Move a[k] to right part
+                } else { // (a[k] > pivot1) - Move a[k] to right part
                     /*
                      * We know that pivot1 == a[e3] == pivot2. Thus, we know
                      * that great will still be >= k when the following loop
@@ -1414,7 +1414,7 @@
                         a[less] = ak;
                     }
                     less++;
-                } else { // (a[k] > pivot1) -  Move a[k] to right part
+                } else { // (a[k] > pivot1) - Move a[k] to right part
                     /*
                      * We know that pivot1 == a[e3] == pivot2. Thus, we know
                      * that great will still be >= k when the following loop
@@ -1531,7 +1531,7 @@
      * Sorts the specified range of the array into ascending order. The range
      * to be sorted extends from the index {@code fromIndex}, inclusive, to
      * the index {@code toIndex}, exclusive. If {@code fromIndex == toIndex},
-     * the range to be sorted is empty  and the call is a no-op).
+     * the range to be sorted is empty and the call is a no-op).
      *
      * <p>The {@code <} relation does not provide a total order on all float
      * values: {@code -0.0f == 0.0f} is {@code true} and a {@code Float.NaN}
@@ -1787,7 +1787,7 @@
                         a[less] = ak;
                     }
                     less++;
-                } else { // (a[k] > pivot1) -  Move a[k] to right part
+                } else { // (a[k] > pivot1) - Move a[k] to right part
                     /*
                      * We know that pivot1 == a[e3] == pivot2. Thus, we know
                      * that great will still be >= k when the following loop
@@ -2160,7 +2160,7 @@
                         a[less] = ak;
                     }
                     less++;
-                } else { // (a[k] > pivot1) -  Move a[k] to right part
+                } else { // (a[k] > pivot1) - Move a[k] to right part
                     /*
                      * We know that pivot1 == a[e3] == pivot2. Thus, we know
                      * that great will still be >= k when the following loop
--- a/src/share/classes/java/util/Iterator.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/util/Iterator.java	Fri Mar 19 18:49:36 2010 -0700
@@ -41,6 +41,8 @@
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
  * Java Collections Framework</a>.
  *
+ * @param <E> the type of elements returned by this iterator
+ *
  * @author  Josh Bloch
  * @see Collection
  * @see ListIterator
--- a/src/share/classes/java/util/List.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/java/util/List.java	Fri Mar 19 18:49:36 2010 -0700
@@ -89,6 +89,8 @@
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
  * Java Collections Framework</a>.
  *
+ * @param <E> the type of elements in this list
+ *
  * @author  Josh Bloch
  * @author  Neal Gafter
  * @see Collection
--- a/src/share/classes/javax/swing/JTable.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/JTable.java	Fri Mar 19 18:49:36 2010 -0700
@@ -2506,10 +2506,7 @@
         Color old = this.selectionForeground;
         this.selectionForeground = selectionForeground;
         firePropertyChange("selectionForeground", old, selectionForeground);
-        if ( !selectionForeground.equals(old) )
-        {
-            repaint();
-        }
+        repaint();
     }
 
     /**
@@ -2547,10 +2544,7 @@
         Color old = this.selectionBackground;
         this.selectionBackground = selectionBackground;
         firePropertyChange("selectionBackground", old, selectionBackground);
-        if ( !selectionBackground.equals(old) )
-        {
-            repaint();
-        }
+        repaint();
     }
 
     /**
--- a/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Fri Mar 19 18:49:36 2010 -0700
@@ -169,15 +169,13 @@
                                                     + c + " when it only knows about "
                                                     + slider + ".");
 
-        LookAndFeel.uninstallBorder(slider);
-
         scrollTimer.stop();
         scrollTimer = null;
 
+        uninstallDefaults(slider);
         uninstallListeners( slider );
         uninstallKeyboardActions(slider);
 
-        focusInsets = null;
         insetCache = null;
         leftToRightCache = true;
         focusRect = null;
@@ -210,6 +208,12 @@
         if (focusInsets == null) focusInsets = new InsetsUIResource(2,2,2,2);
     }
 
+    protected void uninstallDefaults(JSlider slider) {
+        LookAndFeel.uninstallBorder(slider);
+
+        focusInsets = null;
+    }
+
     protected TrackListener createTrackListener(JSlider slider) {
         return new TrackListener();
     }
@@ -1571,20 +1575,8 @@
             offset = 0;
             scrollTimer.stop();
 
-            // This is the way we have to determine snap-to-ticks.  It's
-            // hard to explain but since ChangeEvents don't give us any
-            // idea what has changed we don't have a way to stop the thumb
-            // bounds from being recalculated.  Recalculating the thumb
-            // bounds moves the thumb over the current value (i.e., snapping
-            // to the ticks).
-            if (slider.getSnapToTicks() /*|| slider.getSnapToValue()*/ ) {
-                isDragging = false;
-                slider.setValueIsAdjusting(false);
-            }
-            else {
-                slider.setValueIsAdjusting(false);
-                isDragging = false;
-            }
+            isDragging = false;
+            slider.setValueIsAdjusting(false);
             slider.repaint();
         }
 
--- a/src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java	Fri Mar 19 18:49:36 2010 -0700
@@ -62,6 +62,7 @@
                      (scrollbar.getLayout() instanceof UIResource)) {
             scrollbar.setLayout(this);
         }
+        configureScrollBarColors();
         updateStyle(scrollbar);
     }
 
--- a/src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java	Fri Mar 19 18:49:36 2010 -0700
@@ -43,7 +43,7 @@
 
 /**
  * Provides the Synth L&F UI delegate for
- * {@link javax.swing.JSlider}.
+ * {@link JSlider}.
  *
  * @author Joshua Outwater
  * @since 1.7
@@ -65,7 +65,7 @@
      * the slider has not changed sizes since being last layed out. If necessary
      * we recompute the layout.
      */
-    private Dimension lastSize = null;
+    private Dimension lastSize;
 
     private int trackHeight;
     private int trackBorder;
@@ -109,7 +109,7 @@
      * Uninstalls default setting. This method is called when a
      * {@code LookAndFeel} is uninstalled.
      */
-    protected void uninstallDefaults() {
+    protected void uninstallDefaults(JSlider slider) {
         SynthContext context = getContext(slider, ENABLED);
         style.uninstallDefaults(context);
         context.dispose();
@@ -339,6 +339,7 @@
      */
     @Override
     protected void calculateGeometry() {
+        calculateThumbSize();
         layout();
         calculateThumbLocation();
     }
@@ -350,10 +351,6 @@
         SynthContext context = getContext(slider);
         SynthGraphicsUtils synthGraphics = style.getGraphicsUtils(context);
 
-        // Set the thumb size.
-        Dimension size = getThumbSize();
-        thumbRect.setSize(size.width, size.height);
-
         // Get the insets for the track.
         Insets trackInsets = new Insets(0, 0, 0, 0);
         SynthContext trackContext = getContext(slider, Region.SLIDER_TRACK);
@@ -557,39 +554,6 @@
      * @inheritDoc
      */
     @Override
-    protected void calculateTickRect() {
-        if (slider.getOrientation() == JSlider.HORIZONTAL) {
-            tickRect.x = trackRect.x;
-            tickRect.y = trackRect.y + trackRect.height + 2 + getTickLength();
-            tickRect.width = trackRect.width;
-            tickRect.height = getTickLength();
-
-            if (!slider.getPaintTicks()) {
-                --tickRect.y;
-                tickRect.height = 0;
-            }
-        } else {
-            if (SynthLookAndFeel.isLeftToRight(slider)) {
-                tickRect.x = trackRect.x + trackRect.width;
-                tickRect.width = getTickLength();
-            } else {
-                tickRect.width = getTickLength();
-                tickRect.x = trackRect.x - tickRect.width;
-            }
-            tickRect.y = trackRect.y;
-            tickRect.height = trackRect.height;
-
-            if (!slider.getPaintTicks()) {
-                --tickRect.x;
-                tickRect.width = 0;
-            }
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    @Override
     public void setThumbLocation(int x, int y) {
         super.setThumbLocation(x, y);
         // Value rect is tied to the thumb location.  We need to repaint when
@@ -865,13 +829,17 @@
                     valueRect.y, -1);
         }
 
-        SynthContext subcontext = getContext(slider, Region.SLIDER_TRACK);
-        paintTrack(subcontext, g, trackRect);
-        subcontext.dispose();
+        if (slider.getPaintTrack() && clip.intersects(trackRect)) {
+            SynthContext subcontext = getContext(slider, Region.SLIDER_TRACK);
+            paintTrack(subcontext, g, trackRect);
+            subcontext.dispose();
+        }
 
-        subcontext = getContext(slider, Region.SLIDER_THUMB);
-        paintThumb(subcontext, g, thumbRect);
-        subcontext.dispose();
+        if (clip.intersects(thumbRect)) {
+            SynthContext subcontext = getContext(slider, Region.SLIDER_THUMB);
+            paintThumb(subcontext, g, thumbRect);
+            subcontext.dispose();
+        }
 
         if (slider.getPaintTicks() && clip.intersects(tickRect)) {
             paintTicks(g);
--- a/src/share/classes/javax/swing/plaf/synth/SynthTableUI.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/plaf/synth/SynthTableUI.java	Fri Mar 19 18:49:36 2010 -0700
@@ -45,8 +45,7 @@
 import javax.swing.JTable;
 import javax.swing.LookAndFeel;
 import javax.swing.border.Border;
-import javax.swing.plaf.ComponentUI;
-import javax.swing.plaf.UIResource;
+import javax.swing.plaf.*;
 import javax.swing.plaf.basic.BasicTableUI;
 import javax.swing.table.DefaultTableCellRenderer;
 import javax.swing.table.JTableHeader;
@@ -158,7 +157,7 @@
                 if (gridColor == null) {
                     gridColor = style.getColor(context, ColorType.FOREGROUND);
                 }
-                table.setGridColor(gridColor);
+                table.setGridColor(gridColor == null ? new ColorUIResource(Color.GRAY) : gridColor);
             }
 
             useTableColors = style.getBoolean(context,
--- a/src/share/classes/javax/swing/plaf/synth/SynthToolBarUI.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/plaf/synth/SynthToolBarUI.java	Fri Mar 19 18:49:36 2010 -0700
@@ -248,23 +248,26 @@
                                                 toolBar.getOrientation());
     }
 
-    // Overloaded to do nothing so we can share listeners.
     /**
-     * @inheritDoc
+     * This implementation does nothing, because the {@code rollover}
+     * property of the {@code JToolBar} class is not used
+     * in the Synth Look and Feel.
      */
     @Override
     protected void setBorderToNonRollover(Component c) {}
 
-    // Overloaded to do nothing so we can share listeners.
     /**
-     * @inheritDoc
+     * This implementation does nothing, because the {@code rollover}
+     * property of the {@code JToolBar} class is not used
+     * in the Synth Look and Feel.
      */
     @Override
     protected void setBorderToRollover(Component c) {}
 
-    // Overloaded to do nothing so we can share listeners.
     /**
-     * @inheritDoc
+     * This implementation does nothing, because the {@code rollover}
+     * property of the {@code JToolBar} class is not used
+     * in the Synth Look and Feel.
      */
     @Override
     protected void setBorderToNormal(Component c) {}
--- a/src/share/classes/javax/swing/plaf/synth/SynthViewportUI.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/plaf/synth/SynthViewportUI.java	Fri Mar 19 18:49:36 2010 -0700
@@ -173,13 +173,20 @@
     }
 
     /**
-     * @inheritDoc
+     * Paints the border. The method is never called,
+     * because the {@code JViewport} class does not support a border.
+     * This implementation does nothing.
+     *
+     * @param context a component context
+     * @param g the {@code Graphics} to paint on
+     * @param x the X coordinate
+     * @param y the Y coordinate
+     * @param w width of the border
+     * @param h height of the border
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
                             int y, int w, int h) {
-        // This does nothing on purpose, JViewport doesn't allow a border
-        // and therefor this will NEVER be called.
     }
 
     /**
--- a/src/share/classes/javax/swing/text/DefaultEditorKit.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/javax/swing/text/DefaultEditorKit.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1461,13 +1461,17 @@
                             // Make sure the new visible location contains
                             // the location of dot, otherwise Caret will
                             // cause an additional scroll.
-                            adjustScrollIfNecessary(target, newVis, initialY,
-                                                    newIndex);
-                            if (select) {
-                                target.moveCaretPosition(newIndex);
-                            }
-                            else {
-                                target.setCaretPosition(newIndex);
+                            int newY = getAdjustedY(target, newVis, newIndex);
+
+                            if (direction == -1 && newY <= initialY || direction == 1 && newY >= initialY) {
+                                // Change index and correct newVis.y only if won't cause scrolling upward
+                                newVis.y = newY;
+
+                                if (select) {
+                                    target.moveCaretPosition(newIndex);
+                                } else {
+                                    target.setCaretPosition(newIndex);
+                                }
                             }
                         }
                     } catch (BadLocationException ble) { }
@@ -1513,34 +1517,27 @@
         }
 
         /**
-         * Adjusts the rectangle that indicates the location to scroll to
+         * Returns adjustsed {@code y} position that indicates the location to scroll to
          * after selecting <code>index</code>.
          */
-        private void adjustScrollIfNecessary(JTextComponent text,
-                                             Rectangle visible, int initialY,
-                                             int index) {
+        private int getAdjustedY(JTextComponent text, Rectangle visible, int index) {
+            int result = visible.y;
+
             try {
                 Rectangle dotBounds = text.modelToView(index);
 
-                if (dotBounds.y < visible.y ||
-                       (dotBounds.y > (visible.y + visible.height)) ||
-                       (dotBounds.y + dotBounds.height) >
-                       (visible.y + visible.height)) {
-                    int y;
-
-                    if (dotBounds.y < visible.y) {
-                        y = dotBounds.y;
-                    }
-                    else {
-                        y = dotBounds.y + dotBounds.height - visible.height;
-                    }
-                    if ((direction == -1 && y < initialY) ||
-                                        (direction == 1 && y > initialY)) {
-                        // Only adjust if won't cause scrolling upward.
-                        visible.y = y;
+                if (dotBounds.y < visible.y) {
+                    result = dotBounds.y;
+                } else {
+                    if ((dotBounds.y > visible.y + visible.height) ||
+                            (dotBounds.y + dotBounds.height > visible.y + visible.height)) {
+                        result = dotBounds.y + dotBounds.height - visible.height;
                     }
                 }
-            } catch (BadLocationException ble) {}
+            } catch (BadLocationException ble) {
+            }
+
+            return result;
         }
 
         /**
--- a/src/share/classes/sun/awt/AWTAccessor.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Fri Mar 19 18:49:36 2010 -0700
@@ -390,6 +390,30 @@
         boolean isTrayIconPopup(PopupMenu popupMenu);
     }
 
+    /*
+     * An accessor for the FileDialog class
+     */
+    public interface FileDialogAccessor {
+        /*
+         * Sets the files the user selects
+         */
+        void setFiles(FileDialog fileDialog, String directory, String files[]);
+
+        /*
+         * Sets the file the user selects
+         */
+        void setFile(FileDialog fileDialog, String file);
+
+        /*
+         * Sets the directory the user selects
+         */
+        void setDirectory(FileDialog fileDialog, String directory);
+
+        /*
+         * Returns whether the file dialog allows the multiple file selection.
+         */
+        boolean isMultipleMode(FileDialog fileDialog);
+    }
 
     /*
      * The java.awt.Component class accessor object.
@@ -432,6 +456,11 @@
     private static PopupMenuAccessor popupMenuAccessor;
 
     /*
+     * The java.awt.FileDialog class accessor object.
+     */
+    private static FileDialogAccessor fileDialogAccessor;
+
+    /*
      * Set an accessor object for the java.awt.Component class.
      */
     public static void setComponentAccessor(ComponentAccessor ca) {
@@ -567,4 +596,22 @@
         }
         return popupMenuAccessor;
     }
+
+    /*
+     * Set an accessor object for the java.awt.FileDialog class.
+     */
+    public static void setFileDialogAccessor(FileDialogAccessor fda) {
+        fileDialogAccessor = fda;
+    }
+
+    /*
+     * Retrieve the accessor object for the java.awt.FileDialog class.
+     */
+    public static FileDialogAccessor getFileDialogAccessor() {
+        if (fileDialogAccessor == null) {
+            unsafe.ensureClassInitialized(FileDialog.class);
+        }
+        return fileDialogAccessor;
+    }
+
 }
--- a/src/share/classes/sun/management/Flag.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/management/Flag.java	Fri Mar 19 18:49:36 2010 -0700
@@ -68,27 +68,42 @@
     }
 
     static Flag getFlag(String name) {
-        Flag[] fs = new Flag[1];
         String[] names = new String[1];
         names[0] = name;
-        int count = getFlags(names, fs, 1);
-        if (count == 1) {
-            return fs[0];
+
+        List<Flag> flags = getFlags(names, 1);
+        if (flags.isEmpty()) {
+            return null;
         } else {
-            return null;
+            // flags should have only one element
+            return flags.get(0);
         }
     }
 
     static List<Flag> getAllFlags() {
         int numFlags = getInternalFlagCount();
-        Flag[] fs = new Flag[numFlags];
 
         // Get all internal flags with names = null
-        int count = getFlags(null, fs, numFlags);
-        return Arrays.asList(fs);
+        return getFlags(null, numFlags);
+    }
+
+    private static List<Flag> getFlags(String[] names, int numFlags) {
+        Flag[] flags = new Flag[numFlags];
+        int count = getFlags(names, flags, numFlags);
+
+        List<Flag> result = new ArrayList<Flag>();
+        for (Flag f : flags) {
+            if (f != null) {
+                result.add(f);
+            }
+        }
+        return result;
     }
 
     private static native String[] getAllFlagNames();
+    // getFlags sets each element in the given flags array
+    // with a Flag object only if the name is valid and the
+    // type is supported. The flags array may contain null elements.
     private static native int getFlags(String[] names, Flag[] flags, int count);
     private static native int getInternalFlagCount();
 
--- a/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java	Fri Mar 19 18:49:36 2010 -0700
@@ -111,7 +111,7 @@
      * at the same time, then all but the first will block until
      * the first completes its authentication.
      */
-    static private HashMap requests = new HashMap ();
+    static private HashMap<String,Thread> requests = new HashMap<>();
 
     /* check if a request for this destination is in progress
      * return false immediately if not. Otherwise block until
@@ -125,7 +125,7 @@
         synchronized (requests) {
             Thread t, c;
             c = Thread.currentThread();
-            if ((t=(Thread)requests.get(key))==null) {
+            if ((t = requests.get(key)) == null) {
                 requests.put (key, c);
                 return false;
             }
@@ -147,8 +147,11 @@
      */
     static private void requestCompleted (String key) {
         synchronized (requests) {
-            boolean waspresent = requests.remove (key) != null;
-            assert waspresent;
+            Thread thread = requests.get(key);
+            if (thread != null && thread == Thread.currentThread()) {
+                boolean waspresent = requests.remove(key) != null;
+                assert waspresent;
+            }
             requests.notifyAll();
         }
     }
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Fri Mar 19 18:49:36 2010 -0700
@@ -423,7 +423,7 @@
 
             // Try keep-alive only on first attempt
             if (!failedOnce && http.getHttpKeepAliveSet()) {
-                if (http.usingProxy) {
+                if (http.usingProxy && tunnelState() != TunnelState.TUNNELING) {
                     requests.setIfNotSet("Proxy-Connection", "keep-alive");
                 } else {
                     requests.setIfNotSet("Connection", "keep-alive");
--- a/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Fri Mar 19 18:49:36 2010 -0700
@@ -59,10 +59,15 @@
     // pending events
     private List<WatchEvent<?>> events;
 
+    // maps a context to the last event for the context (iff the last queued
+    // event for the context is an ENTRY_MODIFY event).
+    private Map<Object,WatchEvent<?>> lastModifyEvents;
+
     protected AbstractWatchKey(AbstractWatchService watcher) {
         this.watcher = watcher;
         this.state = State.READY;
         this.events = new ArrayList<WatchEvent<?>>();
+        this.lastModifyEvents = new HashMap<Object,WatchEvent<?>>();
     }
 
     final AbstractWatchService watcher() {
@@ -86,6 +91,7 @@
      */
     @SuppressWarnings("unchecked")
     final void signalEvent(WatchEvent.Kind<?> kind, Object context) {
+        boolean isModify = (kind == StandardWatchEventKind.ENTRY_MODIFY);
         synchronized (this) {
             int size = events.size();
             if (size > 0) {
@@ -100,17 +106,43 @@
                     return;
                 }
 
+                // if this is a modify event and the last entry for the context
+                // is a modify event then we simply increment the count
+                if (!lastModifyEvents.isEmpty()) {
+                    if (isModify) {
+                        WatchEvent<?> ev = lastModifyEvents.get(context);
+                        if (ev != null) {
+                            assert ev.kind() == StandardWatchEventKind.ENTRY_MODIFY;
+                            ((Event<?>)ev).increment();
+                            return;
+                        }
+                    } else {
+                        // not a modify event so remove from the map as the
+                        // last event will no longer be a modify event.
+                        lastModifyEvents.remove(context);
+                    }
+                }
+
                 // if the list has reached the limit then drop pending events
                 // and queue an OVERFLOW event
                 if (size >= MAX_EVENT_LIST_SIZE) {
-                    events.clear();
                     kind = StandardWatchEventKind.OVERFLOW;
+                    isModify = false;
                     context = null;
                 }
             }
 
             // non-repeated event
-            events.add(new Event<Object>((WatchEvent.Kind<Object>)kind, context));
+            Event<Object> ev =
+                new Event<Object>((WatchEvent.Kind<Object>)kind, context);
+            if (isModify) {
+                lastModifyEvents.put(context, ev);
+            } else if (kind == StandardWatchEventKind.OVERFLOW) {
+                // drop all pending events
+                events.clear();
+                lastModifyEvents.clear();
+            }
+            events.add(ev);
             signal();
         }
     }
@@ -120,6 +152,7 @@
         synchronized (this) {
             List<WatchEvent<?>> result = events;
             events = new ArrayList<WatchEvent<?>>();
+            lastModifyEvents.clear();
             return result;
         }
     }
--- a/src/share/classes/sun/security/krb5/internal/crypto/EType.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/security/krb5/internal/crypto/EType.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 2000-2010 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
@@ -36,9 +36,9 @@
 import sun.security.krb5.EncryptedData;
 import sun.security.krb5.EncryptionKey;
 import sun.security.krb5.KrbException;
-import sun.security.krb5.Asn1Exception;
 import sun.security.krb5.KrbCryptoException;
 import javax.crypto.*;
+import java.util.Arrays;
 import java.util.List;
 import java.util.ArrayList;
 
@@ -48,6 +48,23 @@
 public abstract class EType {
 
     private static final boolean DEBUG = Krb5.DEBUG;
+    private static final boolean ALLOW_WEAK_CRYPTO;
+
+    static {
+        boolean allowed = true;
+        try {
+            Config cfg = Config.getInstance();
+            String temp = cfg.getDefault("allow_weak_crypto", "libdefaults");
+            if (temp != null && temp.equals("false")) allowed = false;
+        } catch (Exception exc) {
+            if (DEBUG) {
+                System.out.println ("Exception in getting allow_weak_crypto, " +
+                                    "using default value " +
+                                    exc.getMessage());
+            }
+        }
+        ALLOW_WEAK_CRYPTO = allowed;
+    }
 
     public static EType getInstance  (int eTypeConst)
         throws KdcErrException {
@@ -163,6 +180,10 @@
         return result;
     }
 
+    // Note: the first 2 entries of BUILTIN_ETYPES and BUILTIN_ETYPES_NOAES256
+    // should be kept DES-related. They will be removed when allow_weak_crypto
+    // is set to false.
+
     private static final int[] BUILTIN_ETYPES = new int[] {
         EncryptedData.ETYPE_DES_CBC_MD5,
         EncryptedData.ETYPE_DES_CBC_CRC,
@@ -189,10 +210,17 @@
         } catch (Exception e) {
             // should not happen
         }
+        int[] result;
         if (allowed < 256) {
-            return BUILTIN_ETYPES_NOAES256;
+            result = BUILTIN_ETYPES_NOAES256;
+        } else {
+            result = BUILTIN_ETYPES;
         }
-        return BUILTIN_ETYPES;
+        if (!ALLOW_WEAK_CRYPTO) {
+            // The first 2 etypes are now weak ones
+            return Arrays.copyOfRange(result, 2, result.length);
+        }
+        return result;
     }
 
     /**
@@ -207,9 +235,7 @@
             if (DEBUG) {
                 System.out.println("Exception while getting " +
                     configName + exc.getMessage());
-                System.out.println("Using defaults " +
-                    "des-cbc-md5, des-cbc-crc, des3-cbc-sha1," +
-                        " aes128cts, aes256cts, rc4-hmac");
+                System.out.println("Using default builtin etypes");
             }
             return getBuiltInDefaults();
         }
--- a/src/share/classes/sun/security/provider/JavaKeyStore.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/security/provider/JavaKeyStore.java	Fri Mar 19 18:49:36 2010 -0700
@@ -29,9 +29,9 @@
 import java.security.*;
 import java.security.cert.Certificate;
 import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
 import java.security.cert.CertificateException;
 import java.util.*;
+import sun.misc.IOUtils;
 
 import sun.security.pkcs.EncryptedPrivateKeyInfo;
 
@@ -677,50 +677,39 @@
                     entry.date = new Date(dis.readLong());
 
                     // Read the private key
-                    try {
-                        entry.protectedPrivKey = new byte[dis.readInt()];
-                    } catch (OutOfMemoryError e) {
-                        throw new IOException("Keysize too big");
-                    }
-                    dis.readFully(entry.protectedPrivKey);
+                    entry.protectedPrivKey =
+                            IOUtils.readFully(dis, dis.readInt(), true);
 
                     // Read the certificate chain
                     int numOfCerts = dis.readInt();
-                    try {
-                        if (numOfCerts > 0) {
-                            entry.chain = new Certificate[numOfCerts];
+                    if (numOfCerts > 0) {
+                        List<Certificate> certs = new ArrayList<>(
+                                numOfCerts > 10 ? 10 : numOfCerts);
+                        for (int j = 0; j < numOfCerts; j++) {
+                            if (xVersion == 2) {
+                                // read the certificate type, and instantiate a
+                                // certificate factory of that type (reuse
+                                // existing factory if possible)
+                                String certType = dis.readUTF();
+                                if (cfs.containsKey(certType)) {
+                                    // reuse certificate factory
+                                    cf = cfs.get(certType);
+                                } else {
+                                    // create new certificate factory
+                                    cf = CertificateFactory.getInstance(certType);
+                                    // store the certificate factory so we can
+                                    // reuse it later
+                                    cfs.put(certType, cf);
+                                }
+                            }
+                            // instantiate the certificate
+                            encoded = IOUtils.readFully(dis, dis.readInt(), true);
+                            bais = new ByteArrayInputStream(encoded);
+                            certs.add(cf.generateCertificate(bais));
+                            bais.close();
                         }
-                    } catch (OutOfMemoryError e) {
-                        throw new IOException
-                            ("Too many certificates in chain");
-                    }
-                    for (int j = 0; j < numOfCerts; j++) {
-                        if (xVersion == 2) {
-                            // read the certificate type, and instantiate a
-                            // certificate factory of that type (reuse
-                            // existing factory if possible)
-                            String certType = dis.readUTF();
-                            if (cfs.containsKey(certType)) {
-                                // reuse certificate factory
-                                cf = cfs.get(certType);
-                            } else {
-                                // create new certificate factory
-                                cf = CertificateFactory.getInstance(certType);
-                                // store the certificate factory so we can
-                                // reuse it later
-                                cfs.put(certType, cf);
-                            }
-                        }
-                        // instantiate the certificate
-                        try {
-                            encoded = new byte[dis.readInt()];
-                        } catch (OutOfMemoryError e) {
-                            throw new IOException("Certificate too big");
-                        }
-                        dis.readFully(encoded);
-                        bais = new ByteArrayInputStream(encoded);
-                        entry.chain[j] = cf.generateCertificate(bais);
-                        bais.close();
+                        // We can be sure now that numOfCerts of certs are read
+                        entry.chain = certs.toArray(new Certificate[numOfCerts]);
                     }
 
                     // Add the entry to the list
@@ -753,12 +742,7 @@
                             cfs.put(certType, cf);
                         }
                     }
-                    try {
-                        encoded = new byte[dis.readInt()];
-                    } catch (OutOfMemoryError e) {
-                        throw new IOException("Certificate too big");
-                    }
-                    dis.readFully(encoded);
+                    encoded = IOUtils.readFully(dis, dis.readInt(), true);
                     bais = new ByteArrayInputStream(encoded);
                     entry.cert = cf.generateCertificate(bais);
                     bais.close();
--- a/src/share/classes/sun/security/tools/KeyTool.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/security/tools/KeyTool.java	Fri Mar 19 18:49:36 2010 -0700
@@ -151,7 +151,7 @@
 
     enum Command {
         CERTREQ("Generates a certificate request",
-            ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE,
+            ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME,
             STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS,
             PROVIDERARG, PROVIDERPATH, V, PROTECTED),
         CHANGEALIAS("Changes an entry's alias",
@@ -167,7 +167,7 @@
             STORETYPE, PROVIDERNAME, PROVIDERCLASS, PROVIDERARG,
             PROVIDERPATH, V, PROTECTED),
         GENKEYPAIR("Generates a key pair",
-            ALIAS, KEYALG, KEYSIZE, SIGALG, DESTALIAS,
+            ALIAS, KEYALG, KEYSIZE, SIGALG, DESTALIAS, DNAME,
             STARTDATE, EXT, VALIDITY, KEYPASS, KEYSTORE,
             STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS,
             PROVIDERARG, PROVIDERPATH, V, PROTECTED),
@@ -176,7 +176,7 @@
             STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS,
             PROVIDERARG, PROVIDERPATH, V, PROTECTED),
         GENCERT("Generates certificate from a certificate request",
-            RFC, INFILE, OUTFILE, ALIAS, SIGALG,
+            RFC, INFILE, OUTFILE, ALIAS, SIGALG, DNAME,
             STARTDATE, EXT, VALIDITY, KEYPASS, KEYSTORE,
             STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS,
             PROVIDERARG, PROVIDERPATH, V, PROTECTED),
--- a/src/share/classes/sun/security/tools/TimestampedSigner.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/security/tools/TimestampedSigner.java	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007-2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2007-2010 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
@@ -375,7 +375,8 @@
                 }
                 if (!isSigner) {
                     keyPurposes = cert.getExtendedKeyUsage();
-                    if (! keyPurposes.contains(KP_TIMESTAMPING_OID)) {
+                    if (keyPurposes == null ||
+                            ! keyPurposes.contains(KP_TIMESTAMPING_OID)) {
                         throw new CertificateException(
                             "Certificate is not valid for timestamping");
                     }
--- a/src/share/classes/sun/util/resources/TimeZoneNames.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"Suriname Time", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"Suriname Zeit", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"Hora de Surinam", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_fr.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_fr.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"Heure du Surinam", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_it.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_it.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"Ora di Suriname", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_ja.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_ja.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"\u30b9\u30ea\u30ca\u30e0\u6642\u9593", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_ko.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_ko.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"\uc218\ub9ac\ub0a8 \uc2dc\uac04", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"Surinam, normaltid", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"\u82cf\u5229\u5357\u65f6\u95f4", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java	Fri Mar 19 18:49:36 2010 -0700
@@ -384,6 +384,7 @@
             {"America/Manaus", AMT},
             {"America/Marigot", AST},
             {"America/Martinique", AST},
+            {"America/Matamoros", CST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
@@ -403,6 +404,7 @@
             {"America/Noronha", NORONHA},
             {"America/North_Dakota/Center", CST},
             {"America/North_Dakota/New_Salem", CST},
+            {"America/Ojinaga", MST},
             {"America/Panama", EST},
             {"America/Pangnirtung", EST},
             {"America/Paramaribo", new String[] {"\u8607\u5229\u5357\u6642\u9593", "SRT",
@@ -419,6 +421,7 @@
             {"America/Resolute", RST},
             {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santa_Isabel", PST},
             {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
--- a/src/share/lib/security/java.security	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/lib/security/java.security	Fri Mar 19 18:49:36 2010 -0700
@@ -118,11 +118,6 @@
 keystore.type=jks
 
 #
-# Class to instantiate as the system scope:
-#
-system.scope=sun.security.provider.IdentityDatabase
-
-#
 # List of comma-separated packages that start with or equal this string
 # will cause a security exception to be thrown when
 # passed to checkPackageAccess unless the
--- a/src/share/native/sun/management/Flag.c	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/share/native/sun/management/Flag.c	Fri Mar 19 18:49:36 2010 -0700
@@ -84,6 +84,7 @@
 
     jint num_flags, i, index;
     jmmVMGlobal* globals;
+    size_t gsize;
     const char* class_name = "sun/management/Flag";
     const char* signature = "(Ljava/lang/String;Ljava/lang/Object;ZZLcom/sun/management/VMOption$Origin;)V";
     jobject origin;
@@ -100,12 +101,14 @@
         return 0;
     }
 
-    globals = (jmmVMGlobal*) malloc(count * sizeof(jmmVMGlobal));
+    gsize = count * sizeof(jmmVMGlobal);
+    globals = (jmmVMGlobal*) malloc(gsize);
     if (globals == NULL) {
         JNU_ThrowOutOfMemoryError(env, 0);
         return 0;
     }
 
+    memset(globals, 0, gsize);
     num_flags = jmm_interface->GetVMGlobals(env, names, globals, count);
     if (num_flags == 0) {
         free(globals);
--- a/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java	Fri Mar 19 18:49:36 2010 -0700
@@ -37,6 +37,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import sun.util.logging.PlatformLogger;
+import sun.awt.AWTAccessor;
 
 class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListener, ItemListener, KeyEventDispatcher, XChoicePeerListener {
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFileDialogPeer");
@@ -171,6 +172,10 @@
         filterField = new TextField();
         selectionField = new TextField();
 
+        boolean isMultipleMode =
+            AWTAccessor.getFileDialogAccessor().isMultipleMode(target);
+        fileList.setMultipleMode(isMultipleMode);
+
         // the insets used by the components in the fileDialog
         Insets noInset = new Insets(0, 0, 0, 0);
         Insets textFieldInset = new Insets(0, 8, 0, 8);
@@ -380,7 +385,8 @@
      * handle the selection event
      */
     void handleSelection(String file) {
-        int index = file.lastIndexOf('/');
+
+        int index = file.lastIndexOf(java.io.File.separatorChar);
 
         if (index == -1) {
             savedDir = this.dir;
@@ -389,8 +395,12 @@
             savedDir = file.substring(0, index+1);
             savedFile = file.substring(index+1);
         }
-        target.setDirectory(savedDir);
-        target.setFile(savedFile);
+
+        AWTAccessor.FileDialogAccessor fileDialogAccessor = AWTAccessor.getFileDialogAccessor();
+
+        fileDialogAccessor.setDirectory(target, savedDir);
+        fileDialogAccessor.setFile(target, savedFile);
+        fileDialogAccessor.setFiles(target, savedDir, fileList.getSelectedItems());
     }
 
     /**
@@ -404,8 +414,13 @@
         setFilterField(null);
         directoryList.clear();
         fileList.clear();
-        target.setFile(null);
-        target.setDirectory(null);
+
+        AWTAccessor.FileDialogAccessor fileDialogAccessor = AWTAccessor.getFileDialogAccessor();
+
+        fileDialogAccessor.setDirectory(target, null);
+        fileDialogAccessor.setFile(target, null);
+        fileDialogAccessor.setFiles(target, null, null);
+
         handleQuitButton();
     }
 
--- a/src/solaris/classes/sun/nio/fs/UnixPath.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixPath.java	Fri Mar 19 18:49:36 2010 -0700
@@ -624,8 +624,11 @@
     public boolean endsWith(Path other) {
         UnixPath that = checkPath(other);
 
+        int thisLen = path.length;
+        int thatLen = that.path.length;
+
         // other path is longer
-        if (that.path.length > path.length)
+        if (thatLen > thisLen)
             return false;
 
         // other path is absolute so this path must be absolute
@@ -643,10 +646,10 @@
             if (thatOffsetCount == thisOffsetCount) {
                 if (thisOffsetCount == 0)
                     return true;
-                int expectedLen = path.length;
+                int expectedLen = thisLen;
                 if (this.isAbsolute() && !that.isAbsolute())
                     expectedLen--;
-                if (that.path.length != expectedLen)
+                if (thatLen != expectedLen)
                     return false;
             } else {
                 // this path has more elements so given path must be relative
@@ -658,7 +661,9 @@
         // compare bytes
         int thisPos = offsets[thisOffsetCount - thatOffsetCount];
         int thatPos = that.offsets[0];
-        while (thatPos < that.path.length) {
+        if ((thatLen - thatPos) != (thisLen - thisPos))
+            return false;
+        while (thatPos < thatLen) {
             if (this.path[thisPos++] != that.path[thatPos++])
                 return false;
         }
--- a/src/solaris/native/java/io/UnixFileSystem_md.c	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/solaris/native/java/io/UnixFileSystem_md.c	Fri Mar 19 18:49:36 2010 -0700
@@ -414,9 +414,9 @@
     jlong rv = 0L;
 
     WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) {
-        struct statvfs fsstat;
-        memset(&fsstat, 0, sizeof(struct statvfs));
-        if (statvfs(path, &fsstat) == 0) {
+        struct statvfs64 fsstat;
+        memset(&fsstat, 0, sizeof(fsstat));
+        if (statvfs64(path, &fsstat) == 0) {
             switch(t) {
             case java_io_FileSystem_SPACE_TOTAL:
                 rv = jlong_mul(long_to_jlong(fsstat.f_frsize),
--- a/src/solaris/native/sun/net/spi/DefaultProxySelector.c	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/solaris/native/sun/net/spi/DefaultProxySelector.c	Fri Mar 19 18:49:36 2010 -0700
@@ -44,6 +44,7 @@
  * The GConf-2 settings used are:
  * - /system/http_proxy/use_http_proxy          boolean
  * - /system/http_proxy/use_authentcation       boolean
+ * - /system/http_proxy/use_same_proxy          boolean
  * - /system/http_proxy/host                    string
  * - /system/http_proxy/authentication_user     string
  * - /system/http_proxy/authentication_password string
@@ -158,6 +159,7 @@
   char *mode = NULL;
   int pport = 0;
   int use_proxy;
+  int use_same_proxy = 0;
   const char* urlhost;
   jobject isa = NULL;
   jobject proxy = NULL;
@@ -179,6 +181,15 @@
          * entries.
          */
 
+        use_same_proxy = (*my_get_bool_func)(gconf_client, "/system/http_proxy/use_same_proxy", NULL);
+        if (use_same_proxy) {
+          use_proxy = (*my_get_bool_func)(gconf_client, "/system/http_proxy/use_http_proxy", NULL);
+          if (use_proxy) {
+            phost = (*my_get_string_func)(gconf_client, "/system/http_proxy/host", NULL);
+            pport = (*my_get_int_func)(gconf_client, "/system/http_proxy/port", NULL);
+          }
+        }
+
         /**
          * HTTP:
          * /system/http_proxy/use_http_proxy (boolean)
@@ -188,8 +199,10 @@
         if (strcasecmp(cproto, "http") == 0) {
           use_proxy = (*my_get_bool_func)(gconf_client, "/system/http_proxy/use_http_proxy", NULL);
           if (use_proxy) {
-            phost = (*my_get_string_func)(gconf_client, "/system/http_proxy/host", NULL);
-            pport = (*my_get_int_func)(gconf_client, "/system/http_proxy/port", NULL);
+            if (!use_same_proxy) {
+              phost = (*my_get_string_func)(gconf_client, "/system/http_proxy/host", NULL);
+              pport = (*my_get_int_func)(gconf_client, "/system/http_proxy/port", NULL);
+            }
             CHECK_NULL(type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID));
           }
         }
@@ -203,8 +216,10 @@
         if (strcasecmp(cproto, "https") == 0) {
           mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
           if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            phost = (*my_get_string_func)(gconf_client, "/system/proxy/secure_host", NULL);
-            pport = (*my_get_int_func)(gconf_client, "/system/proxy/secure_port", NULL);
+            if (!use_same_proxy) {
+              phost = (*my_get_string_func)(gconf_client, "/system/proxy/secure_host", NULL);
+              pport = (*my_get_int_func)(gconf_client, "/system/proxy/secure_port", NULL);
+            }
             use_proxy = (phost != NULL);
             if (use_proxy)
               type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
@@ -220,8 +235,10 @@
         if (strcasecmp(cproto, "ftp") == 0) {
           mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
           if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            phost = (*my_get_string_func)(gconf_client, "/system/proxy/ftp_host", NULL);
-            pport = (*my_get_int_func)(gconf_client, "/system/proxy/ftp_port", NULL);
+            if (!use_same_proxy) {
+              phost = (*my_get_string_func)(gconf_client, "/system/proxy/ftp_host", NULL);
+              pport = (*my_get_int_func)(gconf_client, "/system/proxy/ftp_port", NULL);
+            }
             use_proxy = (phost != NULL);
             if (use_proxy)
               type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
@@ -237,8 +254,10 @@
         if (strcasecmp(cproto, "gopher") == 0) {
           mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
           if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            phost = (*my_get_string_func)(gconf_client, "/system/proxy/gopher_host", NULL);
-            pport = (*my_get_int_func)(gconf_client, "/system/proxy/gopher_port", NULL);
+            if (!use_same_proxy) {
+              phost = (*my_get_string_func)(gconf_client, "/system/proxy/gopher_host", NULL);
+              pport = (*my_get_int_func)(gconf_client, "/system/proxy/gopher_port", NULL);
+            }
             use_proxy = (phost != NULL);
             if (use_proxy)
               type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
@@ -254,8 +273,10 @@
         if (strcasecmp(cproto, "socks") == 0) {
           mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
           if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            phost = (*my_get_string_func)(gconf_client, "/system/proxy/socks_host", NULL);
-            pport = (*my_get_int_func)(gconf_client, "/system/proxy/socks_port", NULL);
+            if (!use_same_proxy) {
+              phost = (*my_get_string_func)(gconf_client, "/system/proxy/socks_host", NULL);
+              pport = (*my_get_int_func)(gconf_client, "/system/proxy/socks_port", NULL);
+            }
             use_proxy = (phost != NULL);
             if (use_proxy)
               type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_socksID);
--- a/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Fri Mar 19 18:49:36 2010 -0700
@@ -117,26 +117,57 @@
         }
     }
 
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    void handleSelected(final String file) {
+    /*
+     * The function converts the file names (the buffer parameter)
+     * in the Windows format into the Java format and saves the results
+     * into the FileDialog instance.
+     *
+     * If it's the multi-select mode, the buffer contains the current
+     * directory followed by the short names of the files.
+     * The directory and file name strings are NULL separated.
+     * If it's the single-select mode, the buffer doesn't have the NULL
+     * separator between the path and the file name.
+     *
+     * NOTE: This method is called by privileged threads.
+     *       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
+     */
+    void handleSelected(final char[] buffer)
+    {
+        String[] wFiles = (new String(buffer)).split("\0"); // NULL is the delimiter
+        boolean multiple = (wFiles.length > 1);
+
+        String jDirectory = null;
+        String jFile = null;
+        String jFiles[] = null;
+
+        if (multiple) {
+            jDirectory = wFiles[0];
+            jFiles = new String[wFiles.length - 1];
+            System.arraycopy(wFiles, 1, jFiles, 0, jFiles.length);
+            jFile = jFiles[1]; // choose any file
+        } else {
+            int index = wFiles[0].lastIndexOf(java.io.File.separatorChar);
+            if (index == -1) {
+                jDirectory = "."+java.io.File.separator;
+                jFile = wFiles[0];
+            } else {
+                jDirectory = wFiles[0].substring(0, index + 1);
+                jFile = wFiles[0].substring(index + 1);
+            }
+            jFiles = new String[] { jFile };
+        }
+
         final FileDialog fileDialog = (FileDialog)target;
+        AWTAccessor.FileDialogAccessor fileDialogAccessor = AWTAccessor.getFileDialogAccessor();
+
+        fileDialogAccessor.setDirectory(fileDialog, jDirectory);
+        fileDialogAccessor.setFile(fileDialog, jFile);
+        fileDialogAccessor.setFiles(fileDialog, jDirectory, jFiles);
+
         WToolkit.executeOnEventHandlerThread(fileDialog, new Runnable() {
-            public void run() {
-                int index = file.lastIndexOf(java.io.File.separatorChar);/*2509*//*ibm*/
-                String dir;
-
-                if (index == -1) {
-                    dir = "."+java.io.File.separator;
-                    fileDialog.setFile(file);
-                }
-                else {
-                    dir = file.substring(0, index + 1);
-                    fileDialog.setFile(file.substring(index + 1));
-                }
-                fileDialog.setDirectory(dir);
-                fileDialog.hide();
-            }
+             public void run() {
+                 fileDialog.hide();
+             }
         });
     } // handleSelected()
 
@@ -144,11 +175,14 @@
     //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
     void handleCancel() {
         final FileDialog fileDialog = (FileDialog)target;
+
+        AWTAccessor.getFileDialogAccessor().setFile(fileDialog, null);
+        AWTAccessor.getFileDialogAccessor().setFiles(fileDialog, null, null);
+
         WToolkit.executeOnEventHandlerThread(fileDialog, new Runnable() {
-            public void run() {
-                fileDialog.setFile(null);
-                fileDialog.hide();
-            }
+             public void run() {
+                 fileDialog.hide();
+             }
         });
     } // handleCancel()
 
@@ -244,4 +278,9 @@
     public void createScreenSurface(boolean isResize) {}
     @Override
     public void replaceSurfaceData() {}
+
+    public boolean isMultipleMode() {
+        FileDialog fileDialog = (FileDialog)target;
+        return AWTAccessor.getFileDialogAccessor().isMultipleMode(fileDialog);
+    }
 }
--- a/src/windows/native/sun/windows/awt_FileDialog.cpp	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/windows/native/sun/windows/awt_FileDialog.cpp	Fri Mar 19 18:49:36 2010 -0700
@@ -44,6 +44,7 @@
 jmethodID AwtFileDialog::handleSelectedMID;
 jmethodID AwtFileDialog::handleCancelMID;
 jmethodID AwtFileDialog::checkFilenameFilterMID;
+jmethodID AwtFileDialog::isMultipleModeMID;
 
 /* FileDialog ids */
 jfieldID AwtFileDialog::modeID;
@@ -57,6 +58,13 @@
 /* Non-localized suffix of the filter string */
 static const TCHAR s_additionalString[] = TEXT(" (*.*)\0*.*\0");
 
+// Default limit of the output buffer.
+#define SINGLE_MODE_BUFFER_LIMIT     MAX_PATH+1
+#define MULTIPLE_MODE_BUFFER_LIMIT   32768
+
+// The name of the property holding the pointer to the OPENFILENAME structure.
+static LPCTSTR OpenFileNameProp = TEXT("AWT_OFN");
+
 /***********************************************************************/
 
 void
@@ -140,6 +148,8 @@
                                                                            FileDialogWndProc);
             ::SetProp(parent, NativeDialogWndProcProp, reinterpret_cast<HANDLE>(lpfnWndProc));
 
+            ::SetProp(parent, OpenFileNameProp, (void *)lParam);
+
             break;
         }
         case WM_DESTROY: {
@@ -149,6 +159,7 @@
                                                        lpfnWndProc);
             ::RemoveProp(parent, ModalDialogPeerProp);
             ::RemoveProp(parent, NativeDialogWndProcProp);
+            ::RemoveProp(parent, OpenFileNameProp);
             break;
         }
         case WM_NOTIFY: {
@@ -174,6 +185,30 @@
                     // to unblock all the windows blocked by this dialog as it will
                     // be closed soon
                     env->CallVoidMethod(peer, AwtFileDialog::setHWndMID, (jlong)0);
+                } else if (notifyEx->hdr.code == CDN_SELCHANGE) {
+                    // reallocate the buffer if the buffer is too small
+                    LPOPENFILENAME lpofn = (LPOPENFILENAME)GetProp(parent, OpenFileNameProp);
+
+                    UINT nLength = CommDlg_OpenSave_GetSpec(parent, NULL, 0) +
+                                   CommDlg_OpenSave_GetFolderPath(parent, NULL, 0);
+
+                    if (lpofn->nMaxFile < nLength)
+                    {
+                        // allocate new buffer
+                        LPTSTR newBuffer = new TCHAR[nLength];
+
+                        if (newBuffer) {
+                            memset(newBuffer, 0, nLength * sizeof(TCHAR));
+                            LPTSTR oldBuffer = lpofn->lpstrFile;
+                            lpofn->lpstrFile = newBuffer;
+                            lpofn->nMaxFile = nLength;
+                            // free the previously allocated buffer
+                            if (oldBuffer) {
+                                delete[] oldBuffer;
+                            }
+
+                        }
+                    }
                 }
             }
             break;
@@ -193,7 +228,6 @@
     WCHAR unicodeChar = L' ';
     LPTSTR fileBuffer = NULL;
     LPTSTR currentDirectory = NULL;
-    OPENFILENAME ofn;
     jint mode = 0;
     BOOL result = FALSE;
     DWORD dlgerr;
@@ -204,6 +238,10 @@
     jobject target = NULL;
     jobject parent = NULL;
     AwtComponent* awtParent = NULL;
+    jboolean multipleMode = JNI_FALSE;
+
+    OPENFILENAME ofn;
+    memset(&ofn, 0, sizeof(ofn));
 
     /*
      * There's a situation (see bug 4906972) when InvokeFunction (by which this method is called)
@@ -233,7 +271,16 @@
             (jstring)env->GetObjectField(target, AwtFileDialog::dirID);
         JavaStringBuffer directoryBuffer(env, directory);
 
-        fileBuffer = new TCHAR[MAX_PATH+1];
+        multipleMode = env->CallBooleanMethod(peer, AwtFileDialog::isMultipleModeMID);
+
+        UINT bufferLimit;
+        if (multipleMode == JNI_TRUE) {
+            bufferLimit = MULTIPLE_MODE_BUFFER_LIMIT;
+        } else {
+            bufferLimit = SINGLE_MODE_BUFFER_LIMIT;
+        }
+        LPTSTR fileBuffer = new TCHAR[bufferLimit];
+        memset(fileBuffer, 0, bufferLimit * sizeof(TCHAR));
 
         file = (jstring)env->GetObjectField(target, AwtFileDialog::fileID);
         if (file != NULL) {
@@ -244,8 +291,6 @@
             fileBuffer[0] = _T('\0');
         }
 
-        memset(&ofn, 0, sizeof(ofn));
-
         ofn.lStructSize = sizeof(ofn);
         ofn.lpstrFilter = s_fileFilterString;
         ofn.nFilterIndex = 1;
@@ -265,19 +310,23 @@
             ofn.hwndOwner = NULL;
         }
         ofn.lpstrFile = fileBuffer;
-        ofn.nMaxFile = MAX_PATH;
+        ofn.nMaxFile = bufferLimit;
         ofn.lpstrTitle = titleBuffer;
         ofn.lpstrInitialDir = directoryBuffer;
         ofn.Flags = OFN_LONGNAMES | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY |
                     OFN_ENABLEHOOK | OFN_EXPLORER | OFN_ENABLESIZING;
         fileFilter = env->GetObjectField(peer,
         AwtFileDialog::fileFilterID);
-    if (!JNU_IsNull(env,fileFilter)) {
-        ofn.Flags |= OFN_ENABLEINCLUDENOTIFY;
-    }
+        if (!JNU_IsNull(env,fileFilter)) {
+            ofn.Flags |= OFN_ENABLEINCLUDENOTIFY;
+        }
         ofn.lCustData = (LPARAM)peer;
         ofn.lpfnHook = (LPOFNHOOKPROC)FileDialogHookProc;
 
+        if (multipleMode == JNI_TRUE) {
+            ofn.Flags |= OFN_ALLOWMULTISELECT;
+        }
+
         // Save current directory, so we can reset if it changes.
         currentDirectory = new TCHAR[MAX_PATH+1];
 
@@ -318,11 +367,12 @@
 
         // Report result to peer.
         if (result) {
-            jstring tmpJString = (_tcslen(ofn.lpstrFile) == 0 ?
-                JNU_NewStringPlatform(env, L"") :
-                JNU_NewStringPlatform(env, ofn.lpstrFile));
-            env->CallVoidMethod(peer, AwtFileDialog::handleSelectedMID, tmpJString);
-            env->DeleteLocalRef(tmpJString);
+            jint length = (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile);
+            jcharArray jnames = env->NewCharArray(length);
+            env->SetCharArrayRegion(jnames, 0, length, (jchar*)ofn.lpstrFile);
+
+            env->CallVoidMethod(peer, AwtFileDialog::handleSelectedMID, jnames);
+            env->DeleteLocalRef(jnames);
         } else {
             env->CallVoidMethod(peer, AwtFileDialog::handleCancelMID);
         }
@@ -338,7 +388,8 @@
         env->DeleteGlobalRef(peer);
 
         delete[] currentDirectory;
-        delete[] fileBuffer;
+        if (ofn.lpstrFile)
+            delete[] ofn.lpstrFile;
         throw;
     }
 
@@ -351,7 +402,8 @@
     env->DeleteGlobalRef(peer);
 
     delete[] currentDirectory;
-    delete[] fileBuffer;
+    if (ofn.lpstrFile)
+        delete[] ofn.lpstrFile;
 }
 
 BOOL
@@ -416,6 +468,18 @@
     env->DeleteGlobalRef(self);
 }
 
+// Returns the length of the double null terminated output buffer
+UINT AwtFileDialog::GetBufferLength(LPTSTR buffer, UINT limit)
+{
+    UINT index = 0;
+    while ((index < limit) &&
+           (buffer[index] != NULL || buffer[index+1] != NULL))
+    {
+        index++;
+    }
+    return index;
+}
+
 /************************************************************************
  * WFileDialogPeer native methods
  */
@@ -434,11 +498,12 @@
     AwtFileDialog::setHWndMID =
         env->GetMethodID(cls, "setHWnd", "(J)V");
     AwtFileDialog::handleSelectedMID =
-        env->GetMethodID(cls, "handleSelected", "(Ljava/lang/String;)V");
+        env->GetMethodID(cls, "handleSelected", "([C)V");
     AwtFileDialog::handleCancelMID =
         env->GetMethodID(cls, "handleCancel", "()V");
     AwtFileDialog::checkFilenameFilterMID =
         env->GetMethodID(cls, "checkFilenameFilter", "(Ljava/lang/String;)Z");
+    AwtFileDialog::isMultipleModeMID = env->GetMethodID(cls, "isMultipleMode", "()Z");
 
     /* java.awt.FileDialog fields */
     cls = env->FindClass("java/awt/FileDialog");
@@ -455,6 +520,7 @@
     DASSERT(AwtFileDialog::setHWndMID != NULL);
     DASSERT(AwtFileDialog::handleSelectedMID != NULL);
     DASSERT(AwtFileDialog::handleCancelMID != NULL);
+    DASSERT(AwtFileDialog::isMultipleModeMID != NULL);
 
     DASSERT(AwtFileDialog::modeID != NULL);
     DASSERT(AwtFileDialog::dirID != NULL);
--- a/src/windows/native/sun/windows/awt_FileDialog.h	Fri Mar 12 01:09:13 2010 +0000
+++ b/src/windows/native/sun/windows/awt_FileDialog.h	Fri Mar 19 18:49:36 2010 -0700
@@ -49,6 +49,7 @@
     static jmethodID handleSelectedMID;
     static jmethodID handleCancelMID;
     static jmethodID checkFilenameFilterMID;
+    static jmethodID isMultipleModeMID;
 
     /* java.awt.FileDialog field and method ids */
     static jfieldID modeID;
@@ -68,6 +69,9 @@
     static void _DisposeOrHide(void *param);
     static void _ToFront(void *param);
     static void _ToBack(void *param);
+
+private:
+    static UINT GetBufferLength(LPTSTR buffer, UINT limit);
 };
 
 #endif /* FILE_DIALOG_H */
--- a/test/Makefile	Fri Mar 12 01:09:13 2010 +0000
+++ b/test/Makefile	Fri Mar 19 18:49:36 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1995-2009 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1995-2010 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
@@ -37,25 +37,19 @@
 AWK       = awk
 CAT       = cat
 CD        = cd
-CHMOD     = chmod
 CP        = cp
 CUT       = cut
 ECHO      = echo
 EGREP     = egrep
 EXPAND    = expand
-EXPR      = expr
-KILL      = /usr/bin/kill
 MKDIR     = mkdir
-NOHUP     = nohup
 PWD       = pwd
 SED       = sed
-SLEEP     = sleep
 SORT      = sort
 TEE       = tee
 UNAME     = uname
 UNIQ      = uniq
 WC        = wc
-XHOST     = xhost
 ZIP       = zip
 
 # Get OS name from uname
@@ -211,66 +205,6 @@
   ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
 endif
 
-# DISPLAY settings for virtual frame buffer
-START_XVFB = start-Xvfb.sh
-NOHUP_OUTPUT = $(ABS_TEST_OUTPUT_DIR)/start-Xvfb.nohup-output.txt
-DISPLAY_PID_FILE=$(ABS_TEST_OUTPUT_DIR)/xvfb-display-number.txt
-DISPLAY_SLEEP_TIME=10
-DISPLAY_MAX_SLEEPS=10
-ifeq ($(OS_NAME),solaris)
-  VIRTUAL_FRAME_BUFFER = true
-endif
-ifeq ($(OS_NAME),linux)
-  VIRTUAL_FRAME_BUFFER = true
-endif
-
-# Does not work yet, display dies as soon as it gets used. :^(
-VIRTUAL_FRAME_BUFFER = false
-
-# Are we using a VIRTUAL_FRAME_BUFFER (Xvfb)
-ifeq ($(VIRTUAL_FRAME_BUFFER),true)
-  
-  PREP_DISPLAY = \
-    $(CP) $(START_XVFB) $(ABS_TEST_OUTPUT_DIR); \
-    $(CHMOD) a+x $(ABS_TEST_OUTPUT_DIR)/$(START_XVFB); \
-    ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \
-      $(NOHUP) $(ABS_TEST_OUTPUT_DIR)/$(START_XVFB) $(DISPLAY_PID_FILE) > $(NOHUP_OUTPUT) 2>&1 && \
-      $(SLEEP) $(DISPLAY_SLEEP_TIME) ) & \
-    count=1; \
-    while [ ! -s $(DISPLAY_PID_FILE) ] ; do \
-      $(ECHO) "Sleeping $(DISPLAY_SLEEP_TIME) more seconds, DISPLAY not ready"; \
-      $(SLEEP) $(DISPLAY_SLEEP_TIME); \
-      count=`$(EXPR) $${count} '+' 1`; \
-      if [ $${count} -gt $(DISPLAY_MAX_SLEEPS) ] ; then \
-        $(ECHO) "ERROR: DISPLAY not ready, giving up on DISPLAY"; \
-        exit 9; \
-      fi; \
-    done ; \
-    DISPLAY=":`$(CAT) $(DISPLAY_PID_FILE)`"; \
-    export DISPLAY; \
-    $(CAT) $(NOHUP_OUTPUT); \
-    $(ECHO) "Prepared DISPLAY=$${DISPLAY}"; \
-    $(XHOST) || \
-    ( $(ECHO) "ERROR: No display" ; exit 8)
-
-  KILL_DISPLAY = \
-    ( \
-      DISPLAY=":`$(CAT) $(DISPLAY_PID_FILE)`"; \
-      export DISPLAY; \
-      if [ -s "$(DISPLAY_PID_FILE)" ] ; then \
-        $(KILL) `$(CAT) $(DISPLAY_PID_FILE)` > /dev/null 2>&1; \
-        $(KILL) -9 `$(CAT) $(DISPLAY_PID_FILE)` > /dev/null 2>&1; \
-      fi; \
-      $(ECHO) "Killed DISPLAY=$${DISPLAY}"; \
-    )
-
-else
-  
-  PREP_DISPLAY = $(ECHO) "VIRTUAL_FRAME_BUFFER=$(VIRTUAL_FRAME_BUFFER)"
-  KILL_DISPLAY = $(ECHO) "VIRTUAL_FRAME_BUFFER=$(VIRTUAL_FRAME_BUFFER)"
-
-endif
-
 # How to create the test bundle (pass or fail, we want to create this)
 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
 ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`     \
@@ -327,7 +261,7 @@
     $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
   fi; \
   $(CAT) $(STATS_TXT); \
-  $(ZIP_UP_RESULTS) && $(KILL_DISPLAY) ; \
+  $(ZIP_UP_RESULTS) ; \
   $(TESTEXIT) \
 )
 
@@ -629,7 +563,6 @@
 	(                                                                    \
 	  ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)");                   \
             export JT_HOME;                                                  \
-	    $(PREP_DISPLAY) &&                                               \
             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
               $(JTREG_BASIC_OPTIONS)                                         \
               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport  \
--- a/test/ProblemList.txt	Fri Mar 12 01:09:13 2010 +0000
+++ b/test/ProblemList.txt	Fri Mar 19 18:49:36 2010 -0700
@@ -1,6 +1,6 @@
 ###########################################################################
 #
-# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2009-2010 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
@@ -431,6 +431,12 @@
 
 # jdk_management
 
+# Fails on linux: KO: StringMonitor notification missed or not emitted
+javax/management/monitor/NonComparableAttributeValueTest.java	generic-all
+
+# Port conflict? Fails with communication error
+sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh generic-all
+
 # Fails on Windows 2000, Test failed for iiop java.lang.NullPointerException
 #  at org.omg.stub.javax.management.remote.rmi._RMIConnectionImpl_Tie._invoke(Unknown Source)
 #  at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:653)
@@ -583,6 +589,9 @@
 # Suspect many of these tests auffer from using fixed ports, no concrete 
 #   evidence.
 
+# Times out on Windows X64
+sun/net/www/http/KeepAliveStream/KeepAliveStreamCloseWithWrongContentLength.java generic-all
+
 # Dies on Solaris 10 sparc and sparcv9, Linux  -ea -esa with 
 #   Interrupted or IO exception, maybe writing to non-unique named file?
 com/sun/net/httpserver/bugs/B6373555.java			generic-all
@@ -692,7 +701,6 @@
 java/net/URLConnection/ZeroContentLength.java		 	generic-all
 
 # Solaris 11 i586 fails with samevm, not sure why
-java/net/Authenticator/B4769350.java				generic-all
 java/net/HttpURLConnection/HttpResponseCode.java		generic-all
 java/net/ResponseCache/B6181108.java				generic-all
 java/net/ResponseCache/ResponseCacheTest.java			generic-all
@@ -737,6 +745,13 @@
 # Suspect many of these tests auffer from using fixed ports, no concrete 
 #   evidence.
 
+# Occasionally Failing with java.lang.AssertionError on Windows X64
+#  at sun.nio.ch.PendingIoCache.clearPendingIoMap(PendingIoCache.java:144)
+#java/nio/channels/FileChannel/ReleaseOnCloseDeadlock.java	windows-all
+
+# Some kind of sleep/wake problem on Windows X64
+java/nio/channels/Selector/Wakeup.java				windows-all
+
 # Fails with -ea -esa, Assertion error, but only on Solaris 10 machines?
 com/sun/nio/sctp/SctpChannel/Send.java				generic-all
 com/sun/nio/sctp/SctpChannel/Shutdown.java			generic-all
@@ -933,6 +948,18 @@
 
 # jdk_security
 
+# Unknown problem, could be a jtreg -samevm issue?
+#  Error while cleaning up threads after test
+java/security/Security/SynchronizedAccess.java			generic-all
+
+# Failing on Solaris X64 (-d64 -server) with:
+#  GSSException: Failure unspecified at GSS-API level 
+#    (Mechanism level: Specified version of key is not available (44))
+sun/security/krb5/auto/BasicKrb5Test.java			generic-all
+
+# Solaris X86 failures, readjar.jks: No such file or directory
+sun/security/tools/keytool/readjar.sh				generic-all
+
 # Fails with -ea -esa, but only on Solaris sparc? Suspect it is timing out
 sun/security/tools/keytool/standard.sh				generic-all
 
@@ -1257,6 +1284,13 @@
 
 # jdk_util
 
+# Fails with assertion error on windows
+#   11 separate stacktraces created... file reuse problem?
+java/util/zip/ZipFile/ReadLongZipFileName.java			generic-all
+
+# Recent failure on all platforms
+sun/util/resources/TimeZone/Bug6317929.java			generic-all
+
 # Fails with -ea -esa on all platforms with Assertion error
 java/util/ResourceBundle/Test4300693.java			generic-all
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jndi/ldap/InvalidLdapFilters.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,311 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6916202
+ * @summary More cases of invalid ldap filters accepted and processed
+ * @run main/othervm InvalidLdapFilters valid (cn=Babs)
+ * @run main/othervm InvalidLdapFilters valid (&(cn=Bob))
+ * @run main/othervm InvalidLdapFilters valid (&(objectClass=*)(uid=*))
+ * @run main/othervm InvalidLdapFilters valid (|(cn=Bob))
+ * @run main/othervm InvalidLdapFilters valid (|(objectClass=*)(uid=*))
+ * @run main/othervm InvalidLdapFilters valid (!(cn=Tim))
+ * @run main/othervm InvalidLdapFilters valid (!(!(cn=Tim)))
+ * @run main/othervm InvalidLdapFilters valid (!(&(objectClass=*)(uid=*)))
+ * @run main/othervm InvalidLdapFilters valid (!(|(objectClass=*)(uid=*)))
+ * @run main/othervm InvalidLdapFilters valid (o=univ*of*mich*)
+ * @run main/othervm InvalidLdapFilters valid (seeAlso=)
+ * @run main/othervm InvalidLdapFilters valid (cn:caseExactMatch:=Flintstone)
+ * @run main/othervm InvalidLdapFilters valid (cn:=Betty)
+ * @run main/othervm InvalidLdapFilters valid (sn:dn:2.4.6.8.10:=Barney)
+ * @run main/othervm InvalidLdapFilters valid (o:dn:=Ace)
+ * @run main/othervm InvalidLdapFilters valid (:1.2.3:=Wilma)
+ * @run main/othervm InvalidLdapFilters valid (:DN:2.4.6.8.10:=Dino)
+ * @run main/othervm InvalidLdapFilters valid (1.2.3=abc)
+ * @run main/othervm InvalidLdapFilters valid (cn;lang-de;lang-en=abc)
+ * @run main/othervm InvalidLdapFilters valid (owner=abc)
+ * @run main/othervm InvalidLdapFilters valid (sn;lang-en:dn:2.4.6.8.10:=Barney)
+ * @run main/othervm InvalidLdapFilters valid
+         (&(objectClass=Person)(|(sn=Jensen)(cn=Bab*)))
+ * @run main/othervm InvalidLdapFilters invalid "(&(cn=Robert Dean)))"
+ * @run main/othervm InvalidLdapFilters invalid (&|(cn=Bob))
+ * @run main/othervm InvalidLdapFilters invalid (&&(cn=Bob))
+ * @run main/othervm InvalidLdapFilters invalid (|&(cn=Bob))
+ * @run main/othervm InvalidLdapFilters invalid (||(cn=Bob))
+ * @run main/othervm InvalidLdapFilters invalid (:1.2.:=Wilma)
+ * @run main/othervm InvalidLdapFilters invalid (::DN:2.4.6.8.10:=Dino)
+ * @run main/othervm InvalidLdapFilters invalid (:DN::2.4.6.8.10:=Dino)
+ * @run main/othervm InvalidLdapFilters invalid (:DN:2.4.6.8.10::=Dino)
+ * @run main/othervm InvalidLdapFilters invalid (:DN:2.4.6..8.10:=Dino)
+ * @run main/othervm InvalidLdapFilters invalid (:DN:2.4.6.8.:=Dino)
+ * @run main/othervm InvalidLdapFilters invalid (1.2.;::=abc)
+ * @run main/othervm InvalidLdapFilters invalid (1.2.3;::=abc)
+ * @run main/othervm InvalidLdapFilters invalid (1.2.3;x;=abc)
+ * @run main/othervm InvalidLdapFilters invalid (1.2.3:x::=abc)
+ * @run main/othervm InvalidLdapFilters invalid (1.2.3:x=abc)
+ * @run main/othervm InvalidLdapFilters invalid (sn;:dn:2.4.6.8.10:=Barney)
+ * @run main/othervm InvalidLdapFilters invalid "\"((objectClass=*)&(uid=*))\""
+ * @run main/othervm InvalidLdapFilters invalid "&(objectClass=*)(uid=*)"
+ * @run main/othervm InvalidLdapFilters invalid "(:DN:2.4.6.8.10:cn:=Dino)"
+ * @run main/othervm InvalidLdapFilters invalid "(:DN:2.4.6.8.10:cn=Dino)"
+ * @run main/othervm InvalidLdapFilters invalid
+         "((objectCategory=person)(cn=u)(!(cn=u2*)))"
+ * @run main/othervm InvalidLdapFilters invalid
+         "((&(objectClass=user)(cn=andy*)(cn=steve*)(cn=bob*)))"
+ *
+ * @author Xuelei Fan
+ */
+
+import java.io.*;
+import javax.naming.*;
+import javax.naming.directory.*;
+import java.util.Properties;
+import java.util.Hashtable;
+
+import java.net.Socket;
+import java.net.ServerSocket;
+
+public class InvalidLdapFilters {
+    // Should we run the client or server in a separate thread?
+    //
+    // Both sides can throw exceptions, but do you have a preference
+    // as to which side should be the main thread.
+    static boolean separateServerThread = true;
+
+    // use any free port by default
+    volatile int serverPort = 0;
+
+    // Is the server ready to serve?
+    volatile static boolean serverReady = false;
+
+    // Define the server side of the test.
+    //
+    // If the server prematurely exits, serverReady will be set to true
+    // to avoid infinite hangs.
+    void doServerSide() throws Exception {
+        ServerSocket serverSock = new ServerSocket(serverPort);
+
+        // signal client, it's ready to accecpt connection
+        serverPort = serverSock.getLocalPort();
+        serverReady = true;
+
+        // accept a connection
+        Socket socket = serverSock.accept();
+        System.out.println("Server: Connection accepted");
+
+        InputStream is = socket.getInputStream();
+        OutputStream os = socket.getOutputStream();
+
+        // read the bindRequest
+        while (is.read() != -1) {
+            // ignore
+            is.skip(is.available());
+            break;
+        }
+
+        byte[] bindResponse = {0x30, 0x0C, 0x02, 0x01, 0x01, 0x61, 0x07, 0x0A,
+                               0x01, 0x00, 0x04, 0x00, 0x04, 0x00};
+        // write bindResponse
+        os.write(bindResponse);
+        os.flush();
+
+        // ignore any more request.
+        while (is.read() != -1) {
+            // ignore
+            is.skip(is.available());
+        }
+
+        is.close();
+        os.close();
+        socket.close();
+        serverSock.close();
+    }
+
+    //  Define the client side of the test.
+    //
+    // If the server prematurely exits, serverReady will be set to true
+    // to avoid infinite hangs.
+    void doClientSide() throws Exception {
+        // Wait for server to get started.
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        // set up the environment for creating the initial context
+        Hashtable<Object, Object> env = new Hashtable<Object, Object>();
+        env.put(Context.INITIAL_CONTEXT_FACTORY,
+                                "com.sun.jndi.ldap.LdapCtxFactory");
+        env.put(Context.PROVIDER_URL, "ldap://localhost:" + serverPort);
+        env.put("com.sun.jndi.ldap.read.timeout", "1000");
+
+        // env.put(Context.SECURITY_AUTHENTICATION, "simple");
+        // env.put(Context.SECURITY_PRINCIPAL,"cn=root");
+        // env.put(Context.SECURITY_CREDENTIALS,"root");
+
+        // create initial context
+        DirContext context = new InitialDirContext(env);
+
+        // searching
+        SearchControls scs = new SearchControls();
+        scs.setSearchScope(SearchControls.SUBTREE_SCOPE);
+
+        try {
+            NamingEnumeration answer =
+                    context.search("o=sun,c=us", searchFilter, scs);
+        } catch (InvalidSearchFilterException isfe) {
+            if (filterIsValid) {
+                // unexpected filter exception.
+                throw new Exception("Unexpected ISFE", isfe);
+            } else {
+                // ignore, it is the expected filter exception.
+                System.out.println("Expected exception: " + isfe.getMessage());
+            }
+        } catch (NamingException ne) {
+            // maybe a read timeout exception, as the server does not response.
+            if (filterIsValid) {
+                System.out.println("Expected exception: " + ne.getMessage());
+            } else {
+                throw new Exception("Not an InvalidSearchFilterException", ne);
+            }
+        }
+
+        context.close();
+    }
+
+    private static boolean filterIsValid;
+    private static String searchFilter;
+
+    private static void parseArguments(String[] args) {
+        System.out.println("arguments length: " + args.length);
+        if (args[0].equals("valid")) {
+          filterIsValid = true;
+        }
+
+        searchFilter = args[1];
+    }
+
+    /*
+     * ============================================================
+     * The remainder is just support stuff
+     */
+
+    // client and server thread
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    // client and server exceptions
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    void startServer(boolean newThread) throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                public void run() {
+                    try {
+                        doServerSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died...");
+                        System.err.println(e);
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            doServerSide();
+        }
+    }
+
+    void startClient(boolean newThread) throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                public void run() {
+                    try {
+                        doClientSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our client thread just died.
+                         */
+                        System.err.println("Client died...");
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            doClientSide();
+        }
+    }
+
+    // Primary constructor, used to drive remainder of the test.
+    InvalidLdapFilters() throws Exception {
+        if (separateServerThread) {
+            startServer(true);
+            startClient(false);
+        } else {
+            startClient(true);
+            startServer(false);
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            serverThread.join();
+        } else {
+            clientThread.join();
+        }
+
+        /*
+         * When we get here, the test is pretty much over.
+         *
+         * If the main thread excepted, that propagates back
+         * immediately.  If the other thread threw an exception, we
+         * should report back.
+         */
+        if (serverException != null) {
+            System.out.print("Server Exception:");
+            throw serverException;
+        }
+        if (clientException != null) {
+            System.out.print("Client Exception:");
+            throw clientException;
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        // parse the customized arguments
+        parseArguments(args);
+
+        // start the test
+        new InvalidLdapFilters();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/FileDialog/MultipleMode/MultipleMode.html	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,20 @@
+<html>
+<!--  
+  @test
+  @bug 6467204
+  @summary Need to implement "extended" native FileDialog for JFileChooser
+  @author dmitry.cherepanov@sun.com area=awt.filedialog
+  @run applet/manual=yesno MultipleMode.html
+  -->
+<head>
+<title> MultipleMode </title>
+</head>
+<body>
+
+<h1>MultipleMode<br>Bug ID: 6467204</h1>
+
+<p> See the dialog box (usually in upper left corner) for instructions</p>
+
+<APPLET CODE="MultipleMode.class" WIDTH=200 HEIGHT=200></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/FileDialog/MultipleMode/MultipleMode.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,289 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+  test
+  @bug 6467204
+  @summary Need to implement "extended" native FileDialog for JFileChooser
+  @author dmitry.cherepanov@sun.com area=awt.filedialog
+  @run applet/manual=yesno MultipleMode.html
+*/
+
+// Note there is no @ in front of test above.  This is so that the
+//  harness will not mistake this file as a test file.  It should
+//  only see the html file as a test file. (the harness runs all
+//  valid test files, so it would run this test twice if this file
+//  were valid as well as the html file.)
+// Also, note the area= after Your Name in the author tag.  Here, you
+//  should put which functional area the test falls in.  See the
+//  AWT-core home page -> test areas and/or -> AWT team  for a list of
+//  areas.
+// There are several places where ManualYesNoTest appear.  It is
+//  recommended that these be changed by a global search and replace,
+//  such as  ESC-%  in xemacs.
+
+
+
+/**
+ * MultipleMode.java
+ *
+ * summary:
+ */
+
+import java.applet.Applet;
+import java.awt.*;
+import java.awt.event.*;
+import java.io.File;
+
+
+//Manual tests should run as applet tests if possible because they
+// get their environments cleaned up, including AWT threads, any
+// test created threads, and any system resources used by the test
+// such as file descriptors.  (This is normally not a problem as
+// main tests usually run in a separate VM, however on some platforms
+// such as the Mac, separate VMs are not possible and non-applet
+// tests will cause problems).  Also, you don't have to worry about
+// synchronisation stuff in Applet tests the way you do in main
+// tests...
+
+
+public class MultipleMode extends Applet
+{
+    //Declare things used in the test, like buttons and labels here
+
+    public void init()
+    {
+        //Create instructions for the user here, as well as set up
+        // the environment -- set the layout manager, add buttons,
+        // etc.
+        this.setLayout (new BorderLayout ());
+
+        String[] instructions =
+        {
+            " 1. Turn the 'multiple' checkbox off and press the 'open' button ",
+            " 2. Verify that the file dialog doesn't allow the multiple file selection ",
+            " 3. Select any file and close the file dialog ",
+            " 4. The results will be displayed, verify the results ",
+            " 5. Turn the 'multiple' checkbox on and press the 'open' button ",
+            " 6. Verify that the file dialog allows the multiple file selection ",
+            " 7. Select several files and close the file dialog ",
+            " 8. The results will be displayed, verify the results "
+        };
+        Sysout.createDialogWithInstructions( instructions );
+
+    }//End  init()
+
+    public void start ()
+    {
+        final Checkbox mode = new Checkbox("multiple", true);
+        Button open = new Button("open");
+        open.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                FileDialog d = new FileDialog((Frame)null);
+                d.setMultipleMode(mode.getState());
+                d.setVisible(true);
+
+                // print the results
+                Sysout.println("DIR:");
+                Sysout.println(d.getDirectory());
+                Sysout.println("FILE:");
+                Sysout.println(d.getFile());
+                Sysout.println("FILES:");
+                File files[] = d.getFiles();
+                for (File f : files) {
+                    Sysout.println(String.valueOf(f));
+                }
+            }
+        });
+
+        setLayout(new FlowLayout());
+        add(mode);
+        add(open);
+
+        //Get things going.  Request focus, set size, et cetera
+        setSize (200,200);
+        setVisible(true);
+        validate();
+
+    }// start()
+
+    //The rest of this class is the actions which perform the test...
+
+    //Use Sysout.println to communicate with the user NOT System.out!!
+    //Sysout.println ("Something Happened!");
+
+}// class ManualYesNoTest
+
+/* Place other classes related to the test after this line */
+
+
+
+
+
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+  chunk of code whose purpose is to make user
+  interaction uniform, and thereby make it simpler
+  to read and understand someone else's test.
+ ****************************************************/
+
+/**
+ This is part of the standard test machinery.
+ It creates a dialog (with the instructions), and is the interface
+  for sending text messages to the user.
+ To print the instructions, send an array of strings to Sysout.createDialog
+  WithInstructions method.  Put one line of instructions per array entry.
+ To display a message for the tester to see, simply call Sysout.println
+  with the string to be displayed.
+ This mimics System.out.println but works within the test harness as well
+  as standalone.
+ */
+
+class Sysout
+{
+    private static TestDialog dialog;
+    private static boolean numbering = false;
+    private static int messageNumber = 0;
+
+    public static void createDialogWithInstructions( String[] instructions )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        dialog.printInstructions( instructions );
+        dialog.setVisible(true);
+        println( "Any messages for the tester will display here." );
+    }
+
+    public static void createDialog( )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        String[] defInstr = { "Instructions will appear here. ", "" } ;
+        dialog.printInstructions( defInstr );
+        dialog.setVisible(true);
+        println( "Any messages for the tester will display here." );
+    }
+
+    /* Enables message counting for the tester. */
+    public static void enableNumbering(boolean enable){
+        numbering = enable;
+    }
+
+    public static void printInstructions( String[] instructions )
+    {
+        dialog.printInstructions( instructions );
+    }
+
+
+    public static void println( String messageIn )
+    {
+        if (numbering) {
+            messageIn = "" + messageNumber + " " + messageIn;
+            messageNumber++;
+        }
+        dialog.displayMessage( messageIn );
+    }
+
+}// Sysout  class
+
+/**
+  This is part of the standard test machinery.  It provides a place for the
+   test instructions to be displayed, and a place for interactive messages
+   to the user to be displayed.
+  To have the test instructions displayed, see Sysout.
+  To have a message to the user be displayed, see Sysout.
+  Do not call anything in this dialog directly.
+  */
+class TestDialog extends Dialog
+{
+
+    TextArea instructionsText;
+    TextArea messageText;
+    int maxStringLength = 80;
+
+    //DO NOT call this directly, go through Sysout
+    public TestDialog( Frame frame, String name )
+    {
+        super( frame, name );
+        int scrollBoth = TextArea.SCROLLBARS_BOTH;
+        instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+        add( "North", instructionsText );
+
+        messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+        add("Center", messageText);
+
+        pack();
+
+        setVisible(true);
+    }// TestDialog()
+
+    //DO NOT call this directly, go through Sysout
+    public void printInstructions( String[] instructions )
+    {
+        //Clear out any current instructions
+        instructionsText.setText( "" );
+
+        //Go down array of instruction strings
+
+        String printStr, remainingStr;
+        for( int i=0; i < instructions.length; i++ )
+        {
+            //chop up each into pieces maxSringLength long
+            remainingStr = instructions[ i ];
+            while( remainingStr.length() > 0 )
+            {
+                //if longer than max then chop off first max chars to print
+                if( remainingStr.length() >= maxStringLength )
+                {
+                    //Try to chop on a word boundary
+                    int posOfSpace = remainingStr.
+                        lastIndexOf( ' ', maxStringLength - 1 );
+
+                    if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
+
+                    printStr = remainingStr.substring( 0, posOfSpace + 1 );
+                    remainingStr = remainingStr.substring( posOfSpace + 1 );
+                }
+                //else just print
+                else
+                {
+                    printStr = remainingStr;
+                    remainingStr = "";
+                }
+
+                instructionsText.append( printStr + "\n" );
+
+            }// while
+
+        }// for
+
+    }//printInstructions()
+
+    //DO NOT call this directly, go through Sysout
+    public void displayMessage( String messageIn )
+    {
+        messageText.append( messageIn + "\n" );
+        System.out.println(messageIn);
+    }
+
+}// TestDialog  class
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/beans/Introspector/Test4498236.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4498236
+ * @summary Tests toString methods
+ * @author Sergey Malenkov
+ */
+
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.beans.BeanDescriptor;
+import java.beans.EventSetDescriptor;
+import java.beans.FeatureDescriptor;
+import java.beans.IndexedPropertyChangeEvent;
+import java.beans.IndexedPropertyDescriptor;
+import java.beans.MethodDescriptor;
+import java.beans.ParameterDescriptor;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+
+public class Test4498236 {
+
+    public static void main(String[] args) throws Exception {
+        PropertyChangeEvent event = new PropertyChangeEvent("source", null, null, null);
+        event.setPropagationId("id");
+        test("[propertyName=null; oldValue=null; newValue=null; propagationId=id; source=source]", event);
+        test("[propertyName=name; oldValue=old; newValue=new; propagationId=null; source=source]",
+             new PropertyChangeEvent("source", "name", "old", "new")
+        );
+        test("[propertyName=array; index=5; oldValue=old; newValue=new; propagationId=null; source=source]",
+             new IndexedPropertyChangeEvent("source", "array", "old", "new", 5)
+        );
+        FeatureDescriptor fd = new FeatureDescriptor();
+        fd.setName("n");
+        fd.setDisplayName("dn");
+        fd.setShortDescription("sd");
+        fd.setPreferred(true);
+        fd.setHidden(true);
+        fd.setExpert(true);
+        fd.setValue("first", "value");
+        test("[name=n; displayName=dn; shortDescription=sd; preferred; hidden; expert; values={first=value}]", fd);
+        test("[name=String; beanClass=class java.lang.String]",
+             new BeanDescriptor(String.class)
+        );
+        test("[name=Object; beanClass=class java.lang.Object; customizerClass=class java.lang.String]",
+             new BeanDescriptor(Object.class, String.class)
+        );
+        test("[name=Object; beanClass=class java.lang.Object; customizerClass=class java.lang.String]",
+             new BeanDescriptor(Object.class, String.class)
+        );
+        test("[name=equals; method=public boolean java.lang.Object.equals(java.lang.Object)]",
+             new MethodDescriptor(Object.class.getMethod("equals", Object.class))
+        );
+        test("[name=equals; method=public boolean java.lang.Object.equals(java.lang.Object); parameterDescriptors={java.beans.ParameterDescriptor[name=null]}]",
+             new MethodDescriptor(Object.class.getMethod("equals", Object.class), new ParameterDescriptor[] {
+                     new ParameterDescriptor()
+             })
+        );
+        Class type = KeyListener.class;
+        String[] names = { "keyTyped", "keyPressed", "keyReleased" };
+        Method[] methods = new Method[names.length];
+        for (int i = 0; i < names.length; i++) {
+            methods[i] = type.getMethod(names[i], KeyEvent.class);
+        }
+        test("[name=key; inDefaultEventSet; listenerType=interface java.awt.event.KeyListener; getListenerMethod=public java.awt.event.KeyListener Test4498236.getKeyListeners(); addListenerMethod=public void Test4498236.addKeyListener(java.awt.event.KeyListener); removeListenerMethod=public void Test4498236.removeKeyListener(java.awt.event.KeyListener)]",
+             new EventSetDescriptor(Test4498236.class, "key", type, names[0])
+        );
+        test("[name=$$$; inDefaultEventSet; listenerType=interface java.awt.event.KeyListener; addListenerMethod=public void Test4498236.add(java.awt.event.KeyListener); removeListenerMethod=public void Test4498236.remove(java.awt.event.KeyListener)]",
+             new EventSetDescriptor(Test4498236.class, "$$$", type, names, "add", "remove")
+        );
+        test("[name=$$$; inDefaultEventSet; listenerType=interface java.awt.event.KeyListener; getListenerMethod=public java.awt.event.KeyListener Test4498236.get(); addListenerMethod=public void Test4498236.add(java.awt.event.KeyListener); removeListenerMethod=public void Test4498236.remove(java.awt.event.KeyListener)]",
+             new EventSetDescriptor(Test4498236.class, "$$$", type, names, "add", "remove", "get")
+        );
+        test("[name=$$$; inDefaultEventSet; listenerType=interface java.awt.event.KeyListener; addListenerMethod=public void Test4498236.add(java.awt.event.KeyListener); removeListenerMethod=public void Test4498236.remove(java.awt.event.KeyListener)]",
+             new EventSetDescriptor("$$$", type, methods, Test4498236.class.getMethod("add", type), Test4498236.class.getMethod("remove", type))
+        );
+        test("[name=$$$; inDefaultEventSet; listenerType=interface java.awt.event.KeyListener; getListenerMethod=public java.awt.event.KeyListener Test4498236.get(); addListenerMethod=public void Test4498236.add(java.awt.event.KeyListener); removeListenerMethod=public void Test4498236.remove(java.awt.event.KeyListener)]",
+             new EventSetDescriptor("$$$", type, methods, Test4498236.class.getMethod("add", type), Test4498236.class.getMethod("remove", type), Test4498236.class.getMethod("get"))
+        );
+        test("[name=value; propertyType=boolean; readMethod=public boolean Test4498236.isValue(); writeMethod=public void Test4498236.setValue(boolean)]",
+             new PropertyDescriptor("value", Test4498236.class)
+        );
+        test("[name=$$$]",
+             new PropertyDescriptor("$$$", Test4498236.class, null, null)
+        );
+        test("[name=$$$; propertyType=boolean; readMethod=public boolean Test4498236.getValue()]",
+             new PropertyDescriptor("$$$", Test4498236.class, "getValue", null)
+        );
+        test("[name=$$$; propertyType=boolean; readMethod=public boolean Test4498236.getValue(); writeMethod=public void Test4498236.setValue(boolean)]",
+             new PropertyDescriptor("$$$", Test4498236.class, "getValue", "setValue")
+        );
+        test("[name=$$$]",
+             new PropertyDescriptor("$$$", null, null)
+        );
+        test("[name=$$$; propertyType=boolean; readMethod=public boolean Test4498236.getValue()]",
+             new PropertyDescriptor("$$$", Test4498236.class.getMethod("getValue"), null)
+        );
+        test("[name=$$$; propertyType=boolean; readMethod=public boolean Test4498236.getValue(); writeMethod=public void Test4498236.setValue(boolean)]",
+             new PropertyDescriptor("$$$", Test4498236.class.getMethod("getValue"), Test4498236.class.getMethod("setValue", boolean.class))
+        );
+        test("[name=index; propertyType=class [I; readMethod=public int[] Test4498236.getIndex(); writeMethod=public void Test4498236.setIndex(int[]); indexedPropertyType=int; indexedReadMethod=public int Test4498236.getIndex(int); indexedWriteMethod=public void Test4498236.setIndex(int,int)]",
+             new IndexedPropertyDescriptor("index", Test4498236.class)
+        );
+        test("[name=$$$; propertyType=class [I; readMethod=public int[] Test4498236.getIndex(); writeMethod=public void Test4498236.setIndex(int[]); indexedPropertyType=int; indexedReadMethod=public int Test4498236.getIndex(int); indexedWriteMethod=public void Test4498236.setIndex(int,int)]",
+             new IndexedPropertyDescriptor("$$$", Test4498236.class, "getIndex", "setIndex", "getIndex", "setIndex")
+        );
+        test("[name=$$$; propertyType=class [I; readMethod=public int[] Test4498236.getIndex(); writeMethod=public void Test4498236.setIndex(int[]); indexedPropertyType=int; indexedReadMethod=public int Test4498236.getIndex(int); indexedWriteMethod=public void Test4498236.setIndex(int,int)]",
+             new IndexedPropertyDescriptor("$$$", Test4498236.class.getMethod("getIndex"), Test4498236.class.getMethod("setIndex", new int[0].getClass()), Test4498236.class.getMethod("getIndex", int.class), Test4498236.class.getMethod("setIndex", int.class, int.class) )
+        );
+    }
+
+    public void addKeyListener(KeyListener listener) {
+        add(listener);
+    }
+
+    public void removeKeyListener(KeyListener listener) {
+        remove(listener);
+    }
+
+    public KeyListener getKeyListeners() {
+        return null;
+    }
+
+    public void add(KeyListener listener) {
+    }
+
+    public void remove(KeyListener listener) {
+    }
+
+    public KeyListener get() {
+        return null;
+    }
+
+    public boolean isValue() {
+        return true;
+    }
+
+    public boolean getValue() {
+        return true;
+    }
+
+    public void setValue(boolean value) {
+    }
+
+    public int[] getIndex() {
+        return null;
+    }
+
+    public int getIndex(int index) {
+        return 0;
+    }
+
+    public void setIndex(int index, int value) {
+    }
+
+    public void setIndex(int[] value) {
+    }
+
+    private static void test(String expected, Object object) {
+        String actual = object.toString();
+        if (!actual.equals(object.getClass().getName() + expected)) {
+            throw new Error(actual);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/beans/XMLEncoder/Test5023550.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 5023550
+ * @summary Tests complex references to owner
+ * @author Sergey Malenkov
+ */
+
+import java.beans.DefaultPersistenceDelegate;
+import java.beans.Encoder;
+import java.beans.Expression;
+import java.beans.XMLDecoder;
+import java.beans.XMLEncoder;
+
+public class Test5023550 extends AbstractTest {
+    public static void main(String[] args) {
+        new Test5023550().test(true);
+    }
+
+    private final Owner owner = new Owner();
+
+    @Override
+    protected void initialize(XMLEncoder encoder) {
+        encoder.setOwner(this.owner);
+        encoder.setPersistenceDelegate(A.class, new ADelegate());
+        encoder.setPersistenceDelegate(B.class, new BDelegate());
+        encoder.setPersistenceDelegate(C.class, new CDelegate());
+    }
+
+    @Override
+    protected void initialize(XMLDecoder decoder) {
+        decoder.setOwner(this.owner);
+    }
+
+    protected Object getObject() {
+        return this.owner.newA(this.owner.newB().newC());
+    }
+
+    public static class Owner {
+        public A newA(C c) {
+            return new A(c);
+        }
+
+        public B newB() {
+            return new B();
+        }
+    }
+
+    public static class A {
+        private final C c;
+
+        private A(C c) {
+            this.c = c;
+        }
+
+        public C getC() {
+            return this.c;
+        }
+    }
+
+    public static class B {
+        public C newC() {
+            return new C(this);
+        }
+    }
+
+    public static class C {
+        private final B b;
+
+        private C(B b) {
+            this.b = b;
+        }
+
+        public B getB() {
+            return this.b;
+        }
+    }
+
+    public static class ADelegate extends DefaultPersistenceDelegate {
+        protected Expression instantiate(Object old, Encoder out) {
+            XMLEncoder encoder = (XMLEncoder) out;
+            A a = (A) old;
+            return new Expression(old, encoder.getOwner(), "newA", new Object[] { a.getC() });
+        }
+    }
+
+    public static class BDelegate extends DefaultPersistenceDelegate {
+        protected Expression instantiate(Object old, Encoder out) {
+            XMLEncoder encoder = (XMLEncoder) out;
+            return new Expression(old, encoder.getOwner(), "newB", new Object[0]);
+        }
+    }
+
+    public static class CDelegate extends DefaultPersistenceDelegate {
+        protected Expression instantiate(Object old, Encoder out) {
+            C c = (C) old;
+            return new Expression(c, c.getB(), "newC", new Object[0]);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/beans/XMLEncoder/Test5023557.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 5023557
+ * @summary Tests complex references
+ * @author Sergey Malenkov
+ */
+
+import java.beans.DefaultPersistenceDelegate;
+import java.beans.Encoder;
+import java.beans.Expression;
+import java.beans.XMLEncoder;
+
+public class Test5023557 extends AbstractTest {
+    public static void main(String[] args) {
+        new Test5023557().test(true);
+    }
+
+    @Override
+    protected void initialize(XMLEncoder encoder) {
+        encoder.setPersistenceDelegate(B.class, new BDelegate());
+        encoder.setPersistenceDelegate(C.class, new CDelegate());
+    }
+
+    protected Object getObject() {
+        A a = new A();
+        return a.newC(a.newB());
+    }
+
+    public static class A {
+        public B newB() {
+            return new B(this);
+        }
+
+        public C newC(B b) {
+            return new C(b);
+        }
+    }
+
+    public static class B {
+        private final A a;
+
+        private B(A a) {
+            this.a = a;
+        }
+
+        public A getA() {
+            return this.a;
+        }
+    }
+
+    public static class C {
+        private final B b;
+
+        private C(B b) {
+            this.b = b;
+        }
+
+        public B getB() {
+            return this.b;
+        }
+    }
+
+    public static class BDelegate extends DefaultPersistenceDelegate {
+        protected Expression instantiate(Object old, Encoder out) {
+            B b = (B) old;
+            return new Expression(b, b.getA(), "newB", new Object[0]);
+        }
+    }
+
+    public static class CDelegate extends DefaultPersistenceDelegate {
+        protected Expression instantiate(Object old, Encoder out) {
+            C c = (C) old;
+            return new Expression(c, c.getB().getA(), "newC", new Object[] { c.getB() });
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/beans/XMLEncoder/Test6921644.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,197 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6921644
+ * @summary Tests references to cached integer
+ * @author Sergey Malenkov
+ */
+
+import java.beans.ConstructorProperties;
+import java.util.ArrayList;
+import java.util.List;
+
+public final class Test6921644 extends AbstractTest {
+    public static void main(String[] args) {
+        new Test6921644().test(true);
+    }
+
+    protected Object getObject() {
+        Owner<Author> o = new Owner<Author>(100); // it works if ID >= 128
+
+        Category c = new Category(o);
+
+        Document d1 = new Document(o);
+        Document d2 = new Document(o);
+        Document d3 = new Document(o);
+
+        Author a1 = new Author(o);
+        Author a2 = new Author(o);
+        Author a3 = new Author(o);
+
+        o.getList().add(a1);
+        o.getList().add(a2);
+        o.getList().add(a3);
+
+        a3.setRef(o.getId());
+
+        d2.setCategory(c);
+        d3.setCategory(c);
+
+        a1.addDocument(d1);
+        a1.addDocument(d2);
+        a3.addDocument(d3);
+
+        c.addDocument(d2);
+        c.addDocument(d3);
+
+        return o;
+    }
+
+    public static class Owner<T> {
+        private int id;
+        private List<T> list = new ArrayList<T>();
+
+        @ConstructorProperties("id")
+        public Owner(int id) {
+            this.id = id;
+        }
+
+        public int getId() {
+            return this.id;
+        }
+
+        public List<T> getList() {
+            return this.list;
+        }
+
+        public void setList(List<T> list) {
+            this.list = list;
+        }
+    }
+
+    public static class Author {
+        private int id;
+        private int ref;
+        private Owner owner;
+        private List<Document> list = new ArrayList<Document>();
+
+        @ConstructorProperties("owner")
+        public Author(Owner<Author> owner) {
+            this.owner = owner;
+            this.id = owner.getId();
+        }
+
+        public Owner getOwner() {
+            return this.owner;
+        }
+
+        public Integer getId() {
+            return this.id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public Integer getRef() {
+            return this.ref;
+        }
+
+        public void setRef(Integer ref) {
+            this.ref = ref;
+        }
+
+        public List<Document> getList() {
+            return this.list;
+        }
+
+        public void setList(List<Document> list) {
+            this.list = list;
+        }
+
+        public void addDocument(Document document) {
+            this.list.add(document);
+            document.setAuthor(this);
+        }
+    }
+
+    public static class Category {
+        private Owner owner;
+        private List<Document> list = new ArrayList<Document>();
+
+        @ConstructorProperties("owner")
+        public Category(Owner owner) {
+            this.owner = owner;
+        }
+
+        public Owner getOwner() {
+            return this.owner;
+        }
+
+        public List<Document> getList() {
+            return this.list;
+        }
+
+        public void setList(List<Document> list) {
+            this.list = list;
+        }
+
+        public void addDocument(Document document) {
+            this.list.add(document);
+            document.setCategory(this);
+        }
+    }
+
+    public static class Document {
+        private Owner owner;
+        private Author author;
+        private Category category;
+
+        @ConstructorProperties("owner")
+        public Document(Owner owner) {
+            this.owner = owner;
+        }
+
+        public Owner getOwner() {
+            return this.owner;
+        }
+
+        public Author getAuthor() {
+            return this.author;
+        }
+
+        public void setAuthor(Author author) {
+            this.author = author;
+        }
+
+        public Category getCategory() {
+            return this.category;
+        }
+
+        public void setCategory(Category category) {
+            this.category = category;
+        }
+    }
+}
--- a/test/java/net/Authenticator/B4769350.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/test/java/net/Authenticator/B4769350.java	Fri Mar 19 18:49:36 2010 -0700
@@ -26,9 +26,12 @@
  * @bug 4769350
  * @library ../../../sun/net/www/httptest/
  * @build HttpCallback HttpServer ClosedChannelList HttpTransaction AbstractCallback
- * @run main B4769350 server
- * @run main B4769350 proxy
+ * @run main/othervm B4769350 server
+ * @run main/othervm B4769350 proxy
  * @summary proxy authentication username and password caching only works in serial case
+ * Run in othervm since the test sets system properties that are read by the
+ * networking stack and cached when the HTTP handler is invoked, and previous
+ * tests may already have invoked the HTTP handler.
  */
 
 import java.io.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/ProxySelector/SystemProxies.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * This is a manual test to determine the proxies set on the system for various
+ * protocols. See bug 6912868.
+ */
+import java.net.Proxy;
+import java.net.ProxySelector;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+
+public class SystemProxies {
+
+    static final String uriAuthority = "myMachine/";
+    static final ProxySelector proxySel = ProxySelector.getDefault();
+
+    public static void main(String[] args) {
+        if (! "true".equals(System.getProperty("java.net.useSystemProxies"))) {
+            System.out.println("Usage: java -Djava.net.useSystemProxies SystemProxies");
+            return;
+        }
+
+        printProxies("http://");
+        printProxies("https://");
+        printProxies("ftp://");
+    }
+
+    static void printProxies(String proto) {
+        String uriStr =  proto + uriAuthority;
+        try {
+            List<Proxy> proxies = proxySel.select(new URI(uriStr));
+            System.out.println("Proxies returned for " + uriStr);
+            for (Proxy proxy : proxies)
+                System.out.println("\t" + proxy);
+        } catch (URISyntaxException e) {
+            System.err.println(e);
+        }
+    }
+}
--- a/test/java/nio/file/Files/PrintFileTree.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/test/java/nio/file/Files/PrintFileTree.java	Fri Mar 19 18:49:36 2010 -0700
@@ -28,27 +28,33 @@
 
 /**
  * Invokes Files.walkFileTree to traverse a file tree and prints
- * each of the directories and files. The -L option causes symbolic
- * links to be followed.
+ * each of the directories and files. The -follow option causes symbolic
+ * links to be followed and the -printCycles option will print links
+ * where the target of the link is an ancestor directory.
  */
 
 public class PrintFileTree {
 
     public static void main(String[] args) throws Exception {
         boolean followLinks = false;
-        Path dir;
-
-        if (args[0].equals("-L")) {
-            followLinks = true;
-            dir = Paths.get(args[1]);
-        } else {
-            dir = Paths.get(args[0]);
+        boolean printCycles = false;
+        int i = 0;
+        while (i < (args.length-1)) {
+            switch (args[i]) {
+                case "-follow"      : followLinks = true; break;
+                case "-printCycles" : printCycles = true;  break;
+                default:
+                    throw new RuntimeException(args[i] + " not recognized");
+            }
+            i++;
         }
+        Path dir = Paths.get(args[i]);
 
         Set<FileVisitOption> options = new HashSet<FileVisitOption>();
         if (followLinks)
             options.add(FileVisitOption.FOLLOW_LINKS);
 
+        final boolean reportCycles = printCycles;
         Files.walkFileTree(dir, options, Integer.MAX_VALUE, new FileVisitor<FileRef>() {
             public FileVisitResult preVisitDirectory(FileRef dir) {
                 System.out.println(dir);
@@ -59,7 +65,8 @@
                 return FileVisitResult.CONTINUE;
             }
             public FileVisitResult visitFile(FileRef file, BasicFileAttributes attrs) {
-                System.out.println(file);
+                if (!attrs.isDirectory() || reportCycles)
+                    System.out.println(file);
                 return FileVisitResult.CONTINUE;
             }
             public FileVisitResult postVisitDirectory(FileRef dir, IOException exc) {
--- a/test/java/nio/file/Files/walk_file_tree.sh	Fri Mar 12 01:09:13 2010 +0000
+++ b/test/java/nio/file/Files/walk_file_tree.sh	Fri Mar 19 18:49:36 2010 -0700
@@ -61,12 +61,20 @@
 diff out1 out2
 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 
-# repeat test following links (use -follow instead of -L
-# to allow running on older systems)
-$JAVA PrintFileTree -L "$ROOT" > out1
-find "$ROOT" -follow > out2
+# repeat test following links. Some versions of find(1) output
+# cycles (sym links to ancestor directories), other versions do
+# not. For that reason we run PrintFileTree with the -printCycles
+# option when the output without this option differs to find(1).
+find "$ROOT" -follow > out1
+$JAVA PrintFileTree -follow "$ROOT" > out2
 diff out1 out2
-if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
+if [ $? != 0 ];
+  then 
+    # re-run printing cycles to stdout
+    $JAVA PrintFileTree -follow -printCycles "$ROOT" > out2
+    diff out1 out2
+    if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
+  fi
 
 # test SKIP_SIBLINGS
 $JAVA SkipSiblings "$ROOT"
--- a/test/java/nio/file/Path/CheckPermissions.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/test/java/nio/file/Path/CheckPermissions.java	Fri Mar 19 18:49:36 2010 -0700
@@ -197,7 +197,7 @@
     }
 
     public static void main(String[] args) throws IOException {
-        Path dir = Paths.get(System.getProperty("test.src", "."));
+        Path dir = Paths.get(System.getProperty("test.dir", "."));
         Path file = dir.resolve("file1234").createFile();
         try {
             LoggingSecurityManager.install();
--- a/test/java/nio/file/Path/PathOps.java	Fri Mar 12 01:09:13 2010 +0000
+++ b/test/java/nio/file/Path/PathOps.java	Fri Mar 19 18:49:36 2010 -0700
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6838333
+ * @bug 4313887 6838333 6925932
  * @summary Unit test for java.nio.file.Path path operations
  */
 
@@ -614,17 +614,34 @@
         test("/foo")
             .ends("foo")
             .ends("/foo")
-            .notEnds("/");
+            .notEnds("fool");
         test("/foo/bar")
             .ends("bar")
             .ends("foo/bar")
             .ends("/foo/bar")
-            .notEnds("/bar");
+            .notEnds("ar")
+            .notEnds("barack")
+            .notEnds("/bar")
+            .notEnds("o/bar");
         test("foo")
-            .ends("foo");
+            .ends("foo")
+            .notEnds("oo")
+            .notEnds("oola");
         test("foo/bar")
             .ends("bar")
-            .ends("foo/bar");
+            .ends("foo/bar")
+            .notEnds("r")
+            .notEnds("barmaid")
+            .notEnds("/bar");
+        test("foo/bar/gus")
+            .ends("gus")
+            .ends("bar/gus")
+            .ends("foo/bar/gus")
+            .notEnds("g")
+            .notEnds("/gus")
+            .notEnds("r/gus")
+            .notEnds("barack/gus")
+            .notEnds("bar/gust");
 
         // elements
         test("a/b/c")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/nio/file/WatchService/LotsOfEvents.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,222 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6907760 6929532
+ * @summary Tests WatchService behavior when lots of events are pending
+ * @library ..
+ * @run main/timeout=180 LotsOfEvents
+ */
+
+import java.nio.file.*;
+import static java.nio.file.StandardWatchEventKind.*;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+public class LotsOfEvents {
+
+    static final Random rand = new Random();
+
+    public static void main(String[] args) throws Exception {
+        Path dir = TestUtil.createTemporaryDirectory();
+        try {
+            testOverflowEvent(dir);
+            testModifyEventsQueuing(dir);
+        } finally {
+            TestUtil.removeAll(dir);
+        }
+    }
+
+    /**
+     * Tests that OVERFLOW events are not retreived with other events.
+     */
+    static void testOverflowEvent(Path dir)
+        throws IOException, InterruptedException
+    {
+        WatchService watcher = dir.getFileSystem().newWatchService();
+        try {
+            dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE);
+
+            // create a lot of files
+            int n = 1024;
+            Path[] files = new Path[n];
+            for (int i=0; i<n; i++) {
+                files[i] = dir.resolve("foo" + i).createFile();
+            }
+
+            // give time for events to accumulate (improve chance of overflow)
+            Thread.sleep(1000);
+
+            // check that we see the create events (or overflow)
+            drainAndCheckOverflowEvents(watcher, ENTRY_CREATE, n);
+
+            // delete the files
+            for (int i=0; i<n; i++) {
+                files[i].delete();
+            }
+
+            // give time for events to accumulate (improve chance of overflow)
+            Thread.sleep(1000);
+
+            // check that we see the delete events (or overflow)
+            drainAndCheckOverflowEvents(watcher, ENTRY_DELETE, n);
+        } finally {
+            watcher.close();
+        }
+    }
+
+    static void drainAndCheckOverflowEvents(WatchService watcher,
+                                            WatchEvent.Kind<?> expectedKind,
+                                            int count)
+        throws IOException, InterruptedException
+    {
+        // wait for key to be signalled - the timeout is long to allow for
+        // polling implementations
+        WatchKey key = watcher.poll(15, TimeUnit.SECONDS);
+        if (key != null && count == 0)
+            throw new RuntimeException("Key was signalled (unexpected)");
+        if (key == null && count > 0)
+            throw new RuntimeException("Key not signalled (unexpected)");
+
+        int nread = 0;
+        boolean gotOverflow = false;
+        while (key != null) {
+            List<WatchEvent<?>> events = key.pollEvents();
+            for (WatchEvent<?> event: events) {
+                WatchEvent.Kind<?> kind = event.kind();
+                if (kind == expectedKind) {
+                    // expected event kind
+                    if (++nread > count)
+                        throw new RuntimeException("More events than expected!!");
+                } else if (kind == OVERFLOW) {
+                    // overflow event should not be retrieved with other events
+                    if (events.size() > 1)
+                        throw new RuntimeException("Overflow retrieved with other events");
+                    gotOverflow = true;
+                } else {
+                    throw new RuntimeException("Unexpected event '" + kind + "'");
+                }
+            }
+            if (!key.reset())
+                throw new RuntimeException("Key is no longer valid");
+            key = watcher.poll(2, TimeUnit.SECONDS);
+        }
+
+        // check that all expected events were received or there was an overflow
+        if (nread < count && !gotOverflow)
+            throw new RuntimeException("Insufficient events");
+    }
+
+    /**
+     * Tests that check that ENTRY_MODIFY events are queued efficiently
+     */
+    static void testModifyEventsQueuing(Path dir)
+        throws IOException, InterruptedException
+    {
+        // this test uses a random number of files
+        final int nfiles = 5 + rand.nextInt(10);
+        DirectoryEntry[] entries = new DirectoryEntry[nfiles];
+        for (int i=0; i<nfiles; i++) {
+            entries[i] = new DirectoryEntry(dir.resolve("foo" + i));
+
+            // "some" of the files exist, some do not.
+            entries[i].deleteIfExists();
+            if (rand.nextBoolean())
+                entries[i].create();
+        }
+
+        WatchService watcher = dir.getFileSystem().newWatchService();
+        try {
+            dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
+
+            // do several rounds of noise and test
+            for (int round=0; round<10; round++) {
+
+                // make some noise!!!
+                for (int i=0; i<100; i++) {
+                    DirectoryEntry entry = entries[rand.nextInt(nfiles)];
+                    int action = rand.nextInt(10);
+                    switch (action) {
+                        case 0 : entry.create(); break;
+                        case 1 : entry.deleteIfExists(); break;
+                        default: entry.modifyIfExists();
+                    }
+                }
+
+                // process events and ensure that we don't get repeated modify
+                // events for the same file.
+                WatchKey key = watcher.poll(15, TimeUnit.SECONDS);
+                while (key != null) {
+                    Set<Path> modified = new HashSet<Path>();
+                    for (WatchEvent<?> event: key.pollEvents()) {
+                        WatchEvent.Kind<?> kind = event.kind();
+                        Path file = (kind == OVERFLOW) ? null : (Path)event.context();
+                        if (kind == ENTRY_MODIFY) {
+                            boolean added = modified.add(file);
+                            if (!added) {
+                                throw new RuntimeException(
+                                    "ENTRY_MODIFY events not queued efficiently");
+                            }
+                        } else {
+                            if (file != null) modified.remove(file);
+                        }
+                    }
+                    if (!key.reset())
+                        throw new RuntimeException("Key is no longer valid");
+                    key = watcher.poll(2, TimeUnit.SECONDS);
+                }
+            }
+
+        } finally {
+            watcher.close();
+        }
+    }
+
+    static class DirectoryEntry {
+        private final Path file;
+        DirectoryEntry(Path file) {
+            this.file = file;
+        }
+        void create() throws IOException {
+            if (file.notExists())
+                file.createFile();
+
+        }
+        void deleteIfExists() throws IOException {
+            file.deleteIfExists();
+        }
+        void modifyIfExists() throws IOException {
+            if (file.exists()) {
+                OutputStream out = file.newOutputStream(StandardOpenOption.APPEND);
+                try {
+                    out.write("message".getBytes());
+                } finally {
+                    out.close();
+                }
+            }
+        }
+    }
+
+}
--- a/test/java/nio/file/WatchService/OverflowEventIsLoner.java	Fri Mar 12 01:09:13 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
- * Copyright 2010 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-/* @test
- * @bug 6907760
- * @summary Check that the OVERFLOW event is not retrieved with other events
- * @library ..
- */
-
-import java.nio.file.*;
-import static java.nio.file.StandardWatchEventKind.*;
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-public class OverflowEventIsLoner {
-
-    static void drainEvents(WatchService watcher,
-                            WatchEvent.Kind<?> expectedKind,
-                            int count)
-        throws IOException, InterruptedException
-    {
-        // wait for key to be signalled - the timeout is long to allow for
-        // polling implementations
-        WatchKey key = watcher.poll(15, TimeUnit.SECONDS);
-        if (key != null && count == 0)
-            throw new RuntimeException("Key was signalled (unexpected)");
-        if (key == null && count > 0)
-            throw new RuntimeException("Key not signalled (unexpected)");
-
-        int nread = 0;
-        boolean gotOverflow = false;
-        do {
-            List<WatchEvent<?>> events = key.pollEvents();
-            for (WatchEvent<?> event: events) {
-                WatchEvent.Kind<?> kind = event.kind();
-                if (kind == expectedKind) {
-                    // expected event kind
-                    if (++nread > count)
-                        throw new RuntimeException("More events than expected!!");
-                } else if (kind == OVERFLOW) {
-                    // overflow event should not be retrieved with other events
-                    if (events.size() > 1)
-                        throw new RuntimeException("Overflow retrieved with other events");
-                    gotOverflow = true;
-                } else {
-                    throw new RuntimeException("Unexpected event '" + kind + "'");
-                }
-            }
-            if (!key.reset())
-                throw new RuntimeException("Key is no longer valid");
-            key = watcher.poll(2, TimeUnit.SECONDS);
-        } while (key != null);
-
-        // check that all expected events were received or there was an overflow
-        if (nread < count && !gotOverflow)
-            throw new RuntimeException("Insufficient events");
-    }
-
-
-    static void test(Path dir) throws IOException, InterruptedException {
-        WatchService watcher = dir.getFileSystem().newWatchService();
-        try {
-            WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE);
-
-            // create a lot of files
-            int n = 1024;
-            Path[] files = new Path[n];
-            for (int i=0; i<n; i++) {
-                files[i] = dir.resolve("foo" + i).createFile();
-            }
-
-            // give time for events to accumulate (improve chance of overflow)
-            Thread.sleep(1000);
-
-            // check that we see the create events (or overflow)
-            drainEvents(watcher, ENTRY_CREATE, n);
-
-            // delete the files
-            for (int i=0; i<n; i++) {
-                files[i].delete();
-            }
-
-            // give time for events to accumulate (improve chance of overflow)
-            Thread.sleep(1000);
-
-            // check that we see the delete events (or overflow)
-            drainEvents(watcher, ENTRY_DELETE, n);
-        } finally {
-            watcher.close();
-        }
-    }
-
-    public static void main(String[] args) throws Exception {
-        Path dir = TestUtil.createTemporaryDirectory();
-        try {
-            test(dir);
-        } finally {
-            TestUtil.removeAll(dir);
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/security/IdentityScope/NoDefaultSystemScope.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6921001
+ * @summary The default system identity scope is now null.
+ */
+import java.security.*;
+
+public class NoDefaultSystemScope {
+
+    public static void main(String args[]) throws Exception {
+        IdentityScope s = IdentityScope.getSystemScope();
+
+        if (s != null) {
+            throw new Exception("The default system scope should be null");
+        }
+        System.out.println("TEST PASSED");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JEditorPane/6917744/bug6917744.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6917744
+ * @summary JScrollPane Page Up/Down keys do not handle correctly html tables with different cells contents
+ * @author Pavel Porvatov
+ * @run main bug6917744
+ */
+
+import java.awt.*;
+import java.awt.event.KeyEvent;
+import java.io.IOException;
+import javax.swing.*;
+
+import sun.awt.SunToolkit;
+
+public class bug6917744 {
+    private static JFrame frame;
+
+    private static JEditorPane editorPane;
+
+    private static JScrollPane scrollPane;
+
+    private static Robot robot;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+        robot = new Robot();
+        robot.setAutoDelay(100);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame = new JFrame();
+
+                editorPane = new JEditorPane();
+
+                try {
+                    editorPane.setPage(bug6917744.class.getResource("/test.html"));
+                } catch (IOException e) {
+                    throw new RuntimeException("HTML resource not found", e);
+                }
+
+                scrollPane = new JScrollPane(editorPane);
+
+                frame.getContentPane().add(scrollPane);
+                frame.setSize(400, 300);
+                frame.setVisible(true);
+            }
+        });
+
+        toolkit.realSync();
+
+        for (int i = 0; i < 50; i++) {
+            robot.keyPress(KeyEvent.VK_PAGE_DOWN);
+        }
+
+        toolkit.realSync();
+
+        // Check that we at the end of document
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                BoundedRangeModel model = scrollPane.getVerticalScrollBar().getModel();
+
+                if (model.getValue() + model.getExtent() != model.getMaximum()) {
+                    throw new RuntimeException("Invalid HTML position");
+                }
+            }
+        });
+
+        toolkit.realSync();
+
+        for (int i = 0; i < 50; i++) {
+            robot.keyPress(KeyEvent.VK_PAGE_UP);
+        }
+
+        toolkit.realSync();
+
+        // Check that we at the begin of document
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                BoundedRangeModel model = scrollPane.getVerticalScrollBar().getModel();
+
+                if (model.getValue() != model.getMinimum()) {
+                    throw new RuntimeException("Invalid HTML position");
+                }
+
+                frame.dispose();
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JEditorPane/6917744/test.html	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,494 @@
+<html>
+<body bgcolor="#ffffff">
+<table border="0">
+<tr>
+<td>&nbsp;</td>
+<td valign="top">
+
+<font size="+1" face="Arial, Helvetica, sans-serif">
+    <b>TEST FOR JScrollPane BUG</b> <br>
+</font>
+<font face="Arial, Helvetica, sans-serif" size="-1">
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+This is a test html file.
+<br>
+<font size="+1" face="Arial, Helvetica, sans-serif">
+    <b>END OF TEST FOR JScrollPane BUG</b> <br>
+</font>
+</font>
+</td>
+<td>&nbsp;</td>
+</tr>
+</table>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JScrollBar/6924059/bug6924059.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6924059
+ * @summary SynthScrollBarUI.configureScrollBarColors() should have spec different from the overridden method
+ * @author Pavel Porvatov
+ * @run main bug6924059
+ */
+
+import javax.swing.*;
+import javax.swing.plaf.synth.SynthLookAndFeel;
+import javax.swing.plaf.synth.SynthScrollBarUI;
+
+public class bug6924059 {
+    private static boolean isMethodCalled;
+
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(new SynthLookAndFeel());
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                new JScrollBar().setUI(new SynthScrollBarUI() {
+                    protected void configureScrollBarColors() {
+                        super.configureScrollBarColors();
+                        isMethodCalled = true;
+                    }
+                });
+
+                if (!isMethodCalled) {
+                    throw new RuntimeException("The configureScrollBarColors was not called");
+                }
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JSlider/6848475/bug6848475.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6848475
+ * @summary JSlider does not display the correct value of its BoundedRangeModel
+ * @author Pavel Porvatov
+ * @run main bug6848475
+ */
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.plaf.SliderUI;
+import javax.swing.plaf.basic.BasicSliderUI;
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.lang.reflect.Field;
+
+public class bug6848475 {
+    private static JFrame frame;
+
+    private static JSlider slider;
+
+    private static Robot robot;
+
+    private static int thumbRectX;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+        robot = new Robot();
+        robot.setAutoDelay(100);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame = new JFrame();
+
+                DefaultBoundedRangeModel sliderModel = new DefaultBoundedRangeModel() {
+                    public void setValue(int n) {
+                        // Don't allow value to be changed
+                    }
+                };
+
+                slider = new JSlider(sliderModel);
+
+                frame.getContentPane().add(slider);
+                frame.pack();
+                frame.setVisible(true);
+            }
+        });
+
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                Point p = slider.getLocationOnScreen();
+
+                robot.mouseMove(p.x, p.y);
+            }
+        });
+
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                thumbRectX = getThumbRectField().x;
+
+                Point p = slider.getLocationOnScreen();
+
+                robot.mouseMove(p.x, p.y);
+                robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+                robot.mouseMove(p.x + 20, p.y);
+                robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+            }
+        });
+
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                Rectangle newThumbRect = getThumbRectField();
+
+                if (newThumbRect.x != thumbRectX) {
+                    throw new RuntimeException("Test failed: the thumb was moved");
+                }
+
+                frame.dispose();
+            }
+        });
+    }
+
+    private static Rectangle getThumbRectField() {
+        try {
+            SliderUI ui = slider.getUI();
+
+            Field field = BasicSliderUI.class.getDeclaredField("thumbRect");
+
+            field.setAccessible(true);
+
+            return (Rectangle) field.get(ui);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JSlider/6918861/bug6918861.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6918861
+ * @summary SynthSliderUI.uninstallDefaults() is not called when UI is uninstalled
+ * @author Pavel Porvatov
+ * @run main bug6918861
+ */
+
+import javax.swing.*;
+import javax.swing.plaf.synth.SynthLookAndFeel;
+import javax.swing.plaf.synth.SynthSliderUI;
+
+public class bug6918861 {
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(new SynthLookAndFeel());
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JSlider slider = new JSlider();
+
+                HackedSynthSliderUI ui = new HackedSynthSliderUI(slider);
+
+                slider.setUI(ui);
+
+                if (ui.counter != 111) {
+                    throw new RuntimeException("Some installers of SynthSliderUI weren't invoked");
+                }
+
+                slider.setUI(null);
+
+                if (ui.counter != 0) {
+                    throw new RuntimeException("Some uninstallers of SynthSliderUI weren't invoked");
+                }
+            }
+        });
+    }
+
+    private static class HackedSynthSliderUI extends SynthSliderUI {
+        private int counter;
+
+        protected HackedSynthSliderUI(JSlider c) {
+            super(c);
+        }
+
+        protected void installDefaults(JSlider slider) {
+            super.installDefaults(slider);
+
+            counter += 1;
+        }
+
+        protected void uninstallDefaults(JSlider slider) {
+            super.uninstallDefaults(slider);
+
+            counter -= 1;
+        }
+
+        protected void installListeners(JSlider slider) {
+            super.installListeners(slider);
+
+            counter += 10;
+        }
+
+        protected void uninstallListeners(JSlider slider) {
+            super.uninstallListeners(slider);
+
+            counter -= 10;
+        }
+
+        protected void installKeyboardActions(JSlider slider) {
+            super.installKeyboardActions(slider);
+
+            counter += 100;
+        }
+
+        protected void uninstallKeyboardActions(JSlider slider) {
+            super.uninstallKeyboardActions(slider);
+
+            counter -= 100;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JSlider/6923305/bug6923305.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6923305
+ * @summary SynthSliderUI paints the slider track when the slider's "paintTrack" property is set to false
+ * @author Pavel Porvatov
+ * @run main bug6923305
+ */
+
+import javax.swing.*;
+import javax.swing.plaf.synth.SynthContext;
+import javax.swing.plaf.synth.SynthLookAndFeel;
+import javax.swing.plaf.synth.SynthSliderUI;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+
+public class bug6923305 {
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(new SynthLookAndFeel());
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JSlider slider = new JSlider();
+
+                slider.setUI(new SynthSliderUI(slider) {
+                    @Override
+                    protected void paintTrack(SynthContext context, Graphics g, Rectangle trackBounds) {
+                        throw new RuntimeException("Test failed: the SynthSliderUI.paintTrack was invoked");
+                    }
+                });
+
+                slider.setPaintTrack(false);
+                slider.setSize(slider.getPreferredSize());
+
+                BufferedImage bufferedImage = new BufferedImage(slider.getWidth(), slider.getHeight(),
+                        BufferedImage.TYPE_INT_ARGB);
+
+                slider.paint(bufferedImage.getGraphics());
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTable/6913768/bug6913768.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6913768
+ * @summary With default SynthLookAndFeel instance installed new JTable creation leads to throwing NPE
+ * @author Pavel Porvatov
+ * @run main bug6913768
+ */
+
+import javax.swing.*;
+import javax.swing.plaf.synth.SynthLookAndFeel;
+
+public class bug6913768 {
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(new SynthLookAndFeel());
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JFrame frame = new JFrame();
+
+                JTable table = new JTable(new Object[][]{{"1", "2"}, {"3", "4"}},
+                        new Object[]{"col1", "col2"});
+
+                frame.getContentPane().add(new JScrollPane(table));
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.setSize(300, 200);
+                frame.setLocationRelativeTo(null);
+                frame.setVisible(true);
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/krb5/etype/WeakCrypto.java	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2010 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+/*
+ * @test
+ * @bug 6844909
+ * @run main/othervm WeakCrypto
+ * @summary support allow_weak_crypto in krb5.conf
+ */
+
+import java.io.File;
+import sun.security.krb5.internal.crypto.EType;
+import sun.security.krb5.EncryptedData;
+
+public class WeakCrypto {
+    public static void main(String[] args) throws Exception {
+        System.setProperty("java.security.krb5.conf",
+                System.getProperty("test.src", ".") +
+                File.separator +
+                "weakcrypto.conf");
+        int[] etypes = EType.getBuiltInDefaults();
+
+        for (int i=0, length = etypes.length; i<length; i++) {
+            if (etypes[i] == EncryptedData.ETYPE_DES_CBC_CRC ||
+                    etypes[i] == EncryptedData.ETYPE_DES_CBC_MD4 ||
+                    etypes[i] == EncryptedData.ETYPE_DES_CBC_MD5) {
+                throw new Exception("DES should not appear");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/krb5/etype/weakcrypto.conf	Fri Mar 19 18:49:36 2010 -0700
@@ -0,0 +1,2 @@
+[libdefaults]
+allow_weak_crypto = false