changeset 5014:a2f0e47299a7

Merge
author cgruszka
date Tue, 17 Apr 2012 21:26:22 -0400
parents d1b9d039fb26 bdba5717e827
children 791ad9acadef
files
diffstat 42 files changed, 2019 insertions(+), 401 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Apr 06 10:54:39 2012 -0400
+++ b/.hgtags	Tue Apr 17 21:26:22 2012 -0400
@@ -167,3 +167,4 @@
 420027ae37b33e350877f3616ec857c00bd4c958 jdk7u6-b02
 8e8cedfb1ee265f4aff8441bae2ebf0f5b1ee853 jdk7u6-b03
 7bfc566a0e6df163f5fac561435663c23980df46 jdk7u6-b04
+26243ee3de2ec24bc616b2e002b2ef22429e7129 jdk7u6-b05
--- a/make/common/Defs-linux.gmk	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/common/Defs-linux.gmk	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. 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
@@ -74,55 +74,91 @@
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
-# Default OBJCOPY comes from GNU Binutils on Linux:
-DEF_OBJCOPY=/usr/bin/objcopy
-ifdef CROSS_COMPILE_ARCH
-  # don't try to generate .debuginfo files when cross compiling
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
-      "skipping .debuginfo generation.")
-  OBJCOPY=
+# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
+# enabled with debug info files ZIP'ed to save space. For VARIANT !=
+# OPT builds, FDS is always enabled, after all a debug build without
+# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has
+# meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a VARIANT == OPT build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a VARIANT != OPT build,
+# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the
+# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same
+# variable name is used, then different values can be picked up by
+# different parts of the build. Just to be clear, we only need two
+# variable names because the incoming option value can be overridden
+# in some situations, e.g., a VARIANT != OPT build.
+
+ifeq ($(VARIANT), OPT)
+  FULL_DEBUG_SYMBOLS ?= 1
+  ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
 else
-  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-  ifneq ($(ALT_OBJCOPY),)
-    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
-    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
-    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-  endif
+  # debug variants always get Full Debug Symbols (if available)
+  ENABLE_FULL_DEBUG_SYMBOLS = 1
 endif
+_JUNK_ := $(shell \
+  echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
-# The setting of OBJCOPY above enables the JDK build to import
-# .debuginfo files from the HotSpot build. However, adding FDS
-# support to the JDK build will occur in phases so a different
-# make variable is used to indicate that a particular library
-# supports FDS.
-
-ifeq ($(OBJCOPY),)
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
-else
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
-
-  # Library stripping policies for .debuginfo configs:
-  #   all_strip - strips everything from the library
-  #   min_strip - strips most stuff from the library; leaves minimum symbols
-  #   no_strip  - does not strip the library at all
-  #
-  # Oracle security policy requires "all_strip". A waiver was granted on
-  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
-  #
-  DEF_STRIP_POLICY="min_strip"
-  ifeq ($(ALT_STRIP_POLICY),)
-    STRIP_POLICY=$(DEF_STRIP_POLICY)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  # Default OBJCOPY comes from GNU Binutils on Linux:
+  DEF_OBJCOPY=/usr/bin/objcopy
+  ifdef CROSS_COMPILE_ARCH
+    # don't try to generate .debuginfo files when cross compiling
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
+        "skipping .debuginfo generation.")
+    OBJCOPY=
   else
-    STRIP_POLICY=$(ALT_STRIP_POLICY)
+    OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+    ifneq ($(ALT_OBJCOPY),)
+      _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+      # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+      OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+    endif
   endif
 
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
-endif
+  # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
+  # JDK build to import .debuginfo or .diz files from the HotSpot build.
+  # However, adding FDS support to the JDK build will occur in phases
+  # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS)
+  # is used to indicate that a particular library supports FDS.
+
+  ifeq ($(OBJCOPY),)
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+    ENABLE_FULL_DEBUG_SYMBOLS=0
+  else
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+    # Library stripping policies for .debuginfo configs:
+    #   all_strip - strips everything from the library
+    #   min_strip - strips most stuff from the library; leaves minimum symbols
+    #   no_strip  - does not strip the library at all
+    #
+    # Oracle security policy requires "all_strip". A waiver was granted on
+    # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+    #
+    # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
+    STRIP_POLICY ?= min_strip
+
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+
+    # HACK: disable ZIP_DEBUGINFO_FILES by default until install repo
+    # changes are promoted
+    ZIP_DEBUGINFO_FILES ?= 0
+
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
+  endif
 endif
 
 #
@@ -413,6 +449,7 @@
 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
 SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
+SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz
 
 # The JDI - Serviceability Agent binding is not currently supported
 # on Linux-ia64.
--- a/make/common/Defs-solaris.gmk	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/common/Defs-solaris.gmk	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2012, Oracle and/or its affiliates. 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
@@ -74,67 +74,99 @@
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
-ifdef ENABLE_FULL_DEBUG_SYMBOLS
-# Only check for Full Debug Symbols support on Solaris if it is
-# specifically enabled. Hopefully, it can be enabled by default
-# once the .debuginfo size issues are worked out.
+# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
+# enabled with debug info files ZIP'ed to save space. For VARIANT !=
+# OPT builds, FDS is always enabled, after all a debug build without
+# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has
+# meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a VARIANT == OPT build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a VARIANT != OPT build,
+# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the
+# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same
+# variable name is used, then different values can be picked up by
+# different parts of the build. Just to be clear, we only need two
+# variable names because the incoming option value can be overridden
+# in some situations, e.g., a VARIANT != OPT build.
 
-# Default OBJCOPY comes from the SUNWbinutils package:
-DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
-ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
-  # On Solaris AMD64/X64, gobjcopy is not happy and fails:
-  #
-  # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
-  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
-  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-  # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
-  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
-  OBJCOPY=
+ifeq ($(VARIANT), OPT)
+  FULL_DEBUG_SYMBOLS ?= 1
+  ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
 else
-  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-  ifneq ($(ALT_OBJCOPY),)
-    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
-    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
-    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+  # debug variants always get Full Debug Symbols (if available)
+  ENABLE_FULL_DEBUG_SYMBOLS = 1
+endif
+_JUNK_ := $(shell \
+  echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  # Default OBJCOPY comes from the SUNWbinutils package:
+  DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
+  ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
+    # On Solaris AMD64/X64, gobjcopy is not happy and fails:
+    #
+    # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
+    # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+    # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
+    # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+    # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
+    # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+    # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
+    OBJCOPY=
+  else
+    OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+    ifneq ($(ALT_OBJCOPY),)
+      _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+      # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+      OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+    endif
   endif
-endif
 
-ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
-# The setting of OBJCOPY above enables the JDK build to import
-# .debuginfo files from the HotSpot build. However, adding FDS
-# support to the JDK build will occur in phases so a different
-# make variable is used to indicate that a particular library
-# supports FDS.
+  # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
+  # JDK build to import .debuginfo or .diz files from the HotSpot build.
+  # However, adding FDS support to the JDK build will occur in phases
+  # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS)
+  # is used to indicate that a particular library supports FDS.
 
-ifeq ($(OBJCOPY),)
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
-else
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+  ifeq ($(OBJCOPY),)
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+    ENABLE_FULL_DEBUG_SYMBOLS=0
+  else
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
 
-  # Library stripping policies for .debuginfo configs:
-  #   all_strip - strips everything from the library
-  #   min_strip - strips most stuff from the library; leaves minimum symbols
-  #   no_strip  - does not strip the library at all
-  #
-  # Oracle security policy requires "all_strip". A waiver was granted on
-  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
-  #
-  DEF_STRIP_POLICY="min_strip"
-  ifeq ($(ALT_STRIP_POLICY),)
-    STRIP_POLICY=$(DEF_STRIP_POLICY)
-  else
-    STRIP_POLICY=$(ALT_STRIP_POLICY)
+    # Library stripping policies for .debuginfo configs:
+    #   all_strip - strips everything from the library
+    #   min_strip - strips most stuff from the library; leaves minimum symbols
+    #   no_strip  - does not strip the library at all
+    #
+    # Oracle security policy requires "all_strip". A waiver was granted on
+    # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+    #
+    #
+    # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
+    STRIP_POLICY ?= min_strip
+
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+
+    # HACK: disable ZIP_DEBUGINFO_FILES by default until install repo
+    # changes are promoted
+    ZIP_DEBUGINFO_FILES ?= 0
+
+    _JUNK_ := $(shell \
+      echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
   endif
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
-endif
-endif
 endif
 
 #
@@ -754,5 +786,6 @@
 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
 SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
+SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz
 INCLUDE_SA=true
 
--- a/make/common/Defs-windows.gmk	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/common/Defs-windows.gmk	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. 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
@@ -76,6 +76,47 @@
 
 EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
 
+# Full Debug Symbols has been enabled on Windows since JDK1.4.1.
+# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
+# enabled with debug info files ZIP'ed to save space. For VARIANT !=
+# OPT builds, FDS is always enabled, after all a debug build without
+# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has
+# meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a VARIANT == OPT build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a VARIANT != OPT build,
+# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the
+# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same
+# variable name is used, then different values can be picked up by
+# different parts of the build. Just to be clear, we only need two
+# variable names because the incoming option value can be overridden
+# in some situations, e.g., a VARIANT != OPT build.
+
+ifeq ($(VARIANT), OPT)
+  FULL_DEBUG_SYMBOLS ?= 1
+  ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+else
+  # debug variants always get Full Debug Symbols (if available)
+  ENABLE_FULL_DEBUG_SYMBOLS = 1
+endif
+_JUNK_ := $(shell \
+  echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  # HACK: disable ZIP_DEBUGINFO_FILES by default until install repo
+  # changes are promoted
+  ZIP_DEBUGINFO_FILES ?= 0
+else
+  ZIP_DEBUGINFO_FILES=0
+endif
+_JUNK_ := $(shell echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
+
 # C Compiler flag definitions
 
 #
@@ -202,7 +243,10 @@
   #   /D _STATIC_CPPLIB
   #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
   #   
-  CFLAGS_COMMON  += -Zi -nologo
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    CFLAGS_COMMON  += -Zi
+  endif
+  CFLAGS_COMMON  += -nologo
   CFLAGS_OPT      = $(CC_OPT)
   CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
 
@@ -211,7 +255,9 @@
   # All builds get the same runtime setting
   CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
 
-  LDEBUG = /debug
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    LDEBUG = /debug
+  endif
   
   ifeq ($(VTUNE_SUPPORT), true)
     OTHER_CFLAGS = -Z7 -Ox 
@@ -245,7 +291,9 @@
 #
 # Output options (use specific filenames to avoid parallel compile errors)
 #
-CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
+endif
 
 #
 # Use -wdNNNN to disable warning NNNN.
@@ -306,6 +354,7 @@
 SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX)
 SAMAP_NAME = $(LIB_PREFIX)sawindbg.map
 SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb
+SA_DIZ_NAME = $(LIB_PREFIX)sawindbg.diz
 
 ifeq ($(ARCH), ia64)
   # SA will never be supported here.
--- a/make/common/Library.gmk	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/common/Library.gmk	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2012, Oracle and/or its affiliates. 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
@@ -170,17 +170,23 @@
 # build it into $(OBJDIR) so that the other generated files get put 
 # there, then copy just the DLL (and MAP file) to the requested directory.
 #
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  MAP_OPTION="-map:$(OBJDIR)/$(LIBRARY).map"
+endif
+
 $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
 	@$(prep-target)
 	@$(MKDIR) -p $(OBJDIR)
 	$(LINK) -dll -out:$(OBJDIR)/$(@F) \
-	  -map:$(OBJDIR)/$(LIBRARY).map \
+	  $(MAP_OPTION) \
 	  $(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \
 	  $(OTHER_LCF) $(JAVALIB) $(LDLIBS)
 	$(CP) $(OBJDIR)/$(@F) $@
 	@$(call binary_file_verification,$@)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 	$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
 	$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
+endif
 
 endif # LIBRARY
 
--- a/make/common/Program.gmk	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/common/Program.gmk	Tue Apr 17 21:26:22 2012 -0400
@@ -171,6 +171,10 @@
 	@$(prep-target)
 	$(SED) 's%IMVERSION%$(IMVERSION)%g;s%PROGRAM%$(PROGRAM)%g' $< > $@
 
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  MAP_OPTION="-map:$(OBJDIR)/$(PROGRAM).map"
+endif
+
   # We used a hand-crafted manifest file for all executables.
   # It is tweaked to embed the build number and executable name.
   # Use ";#2" for .dll and ";#1" for .exe in the MT command below:
@@ -179,7 +183,7 @@
 	@set -- $?; \
 	    $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
 	$(LINK) -out:$@ /STACK:$(STACK_SIZE) \
-	    -map:$(OBJDIR)/$(PROGRAM).map $(LFLAGS) $(LDFLAGS) \
+	    $(MAP_OPTION) $(LFLAGS) $(LDFLAGS) \
 	    @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
   ifdef MT
 	$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
--- a/make/common/shared/Sanity.gmk	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/common/shared/Sanity.gmk	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. 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
@@ -1031,11 +1031,22 @@
 	    "      and/or check your value of ALT_HOTSPOT_LIB_PATH. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 	@#
 	@# Check for the .map files - its OK if they are not there..
 	@#
-  ifeq ($(ARCH_DATA_MODEL), 32)
+    ifeq ($(ARCH_DATA_MODEL), 32)
 	@# There is no 64-bit HotSpot client VM
+      ifeq ($(ZIP_DEBUGINFO_FILES),1)
+	@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.diz ]; then \
+	  $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .diz files. \n" \
+	    "        These files are optional and aid in the debugging of the JVM. \n" \
+	    "        Please check your access to \n" \
+	    "          $(HOTSPOT_CLIENT_PATH)/jvm.diz \n" \
+	    "        and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
+	    "" >> $(WARNING_FILE) ; \
+	fi
+      else
 	@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.map ]; then \
 	  $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .map files. \n" \
 	    "        These files are optional and aid in the debugging of the JVM. \n" \
@@ -1052,7 +1063,18 @@
 	    "        and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
 	    "" >> $(WARNING_FILE) ; \
 	fi
-  endif
+      endif
+    endif
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+	@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.diz ]; then \
+	  $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .diz files. \n" \
+	    "        These files are optional and aid in the debugging of the JVM. \n" \
+	    "        Please check your access to \n" \
+	    "          $(HOTSPOT_SERVER_PATH)/jvm.diz \n" \
+	    "        and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
+	    "" >> $(WARNING_FILE) ; \
+	fi
+    else
 	@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.map ]; then \
 	  $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .map files. \n" \
 	    "        These files are optional and aid in the debugging of the JVM. \n" \
@@ -1069,6 +1091,8 @@
 	    "        and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
 	    "" >> $(WARNING_FILE) ; \
 	fi
+    endif
+  endif	
 endif	
 
 
--- a/make/java/redist/Makefile	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/java/redist/Makefile	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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
@@ -61,9 +61,13 @@
 JVMDTRACE_NAME         = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
 
 JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.debuginfo
+JVM_DIZ_NAME             = $(LIB_PREFIX)jvm.diz
 LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.debuginfo
+LIBJSIG_DIZ_NAME         = $(LIB_PREFIX)jsig.diz
 JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
+JVMDB_DIZ_NAME           = $(LIB_PREFIX)jvm$(DB_SUFFIX).diz
 JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
+JVMDTRACE_DIZ_NAME       = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).diz
 
 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
 
@@ -86,10 +90,17 @@
 ifndef BUILD_CLIENT_ONLY
   IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
                 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
-  ifneq ($(OBJCOPY),)
-    # the import JDK may not contain .debuginfo files
-    ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),)
-      IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+      # the import JDK may not contain .diz files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME)
+      endif
+    else
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME)
+      endif
     endif
   endif
 else
@@ -101,10 +112,17 @@
 ifeq ($(ARCH_DATA_MODEL), 32)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
                  $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt
-  ifneq ($(OBJCOPY),)
-    # the import JDK may not contain .debuginfo files
-    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),)
-      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+      # the import JDK may not contain .diz files
+      ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME)
+      endif
+    else
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME)
+      endif
     endif
   endif
 endif
@@ -121,20 +139,56 @@
 
 # Get the hotspot .map and .pdb files for client and server
 ifndef BUILD_CLIENT_ONLY
-IMPORT_LIST += \
-	$(LIBDIR)/$(JVMLIB_NAME) \
-	$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
-	$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
+  IMPORT_LIST += $(LIBDIR)/$(JVMLIB_NAME)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+      # the import JDK may not contain .diz files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME)
+      endif
+    else
+      # the import JDK may not contain .pdb files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME)),)
+        # assume .map file is present if .pdb file is preset
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
+	  $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
+      endif
+    endif
+  endif
 endif
 
 # Add .map and .pdb files to the import path for client and kernel VMs. 
 # These are only available on 32-bit windows builds. 
 ifeq ($(ARCH_DATA_MODEL), 32)
-  IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \
-                 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME)
-  ifeq ($(DO_KERNEL), true)
-    IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME) \
-                   $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+      # the import JDK may not contain .diz files
+      ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME)
+      endif
+    else
+      # the import JDK may not contain .pdb files
+      ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)),)
+        # assume .map file is present if .pdb file is preset
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \
+                       $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME)
+      endif
+    endif
+    ifeq ($(DO_KERNEL), true)
+      ifeq ($(ZIP_DEBUGINFO_FILES),1)
+        # the import JDK may not contain .diz files
+        ifneq ($(wildcard $(HOTSPOT_KERNEL_PATH)/$(JVM_DIZ_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_DIZ_NAME)
+        endif
+      else
+        # the import JDK may not contain .pdb files
+        ifneq ($(wildcard $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)),)
+          # assume .map file is present if .pdb file is preset
+          IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME) \
+                         $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME)
+        endif
+      endif
+    endif
   endif
 endif
 
@@ -165,10 +219,22 @@
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
 
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME):
+	@$(prep-target)
+	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)  $@
+
+$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_DIZ_NAME):
+	@$(prep-target)
+	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVM_DIZ_NAME)  $@
+
 ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME):
+	@$(prep-target)
+	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME) $@
 endif
 
 #  Windows     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Windows
@@ -176,18 +242,33 @@
 #  NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  NOT Windows
 
 IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) 
-ifneq ($(OBJCOPY),)
-  # the import JDK may not contain .debuginfo files
-  ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
-    IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+    # the import JDK may not contain .diz files
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DIZ_NAME)
+    endif
+  else
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+    endif
   endif
 endif
 ifndef BUILD_CLIENT_ONLY
   IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
-  ifneq ($(OBJCOPY),)
-    # the import JDK may not contain the target of the symlink
-    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
-      IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+      # the import JDK may not contain the target of the symlink
+      ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),)
+        # check for the .diz file, but create the .debuginfo link
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+      endif
+    else
+      # the import JDK may not contain the target of the symlink
+      ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+      endif
     endif
   endif
 endif
@@ -195,19 +276,33 @@
 ifeq ($(PLATFORM), solaris)
   ifndef BUILD_CLIENT_ONLY
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
-    ifneq ($(OBJCOPY),)
-      # the import JDK may not contain .debuginfo files
-      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
-        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+      ifeq ($(ZIP_DEBUGINFO_FILES),1)
+        # the import JDK may not contain .diz files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DIZ_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DIZ_NAME)
+        endif
+      else
+        # the import JDK may not contain .debuginfo files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+        endif
       endif
     endif
     # The conditional can be removed when import JDKs contain these files.
     ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
       IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
-      ifneq ($(OBJCOPY),)
-        # the import JDK may not contain .debuginfo files
-        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
-          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
+      ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+        ifeq ($(ZIP_DEBUGINFO_FILES),1)
+          # the import JDK may not contain .diz files
+          ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DIZ_NAME)),)
+            IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DIZ_NAME)
+          endif
+        else
+          # the import JDK may not contain .debuginfo files
+          ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
+            IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
+          endif
         endif
       endif
     else
@@ -220,10 +315,18 @@
 ifeq ($(ARCH_DATA_MODEL), 32)
 
 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
-ifneq ($(OBJCOPY),)
-  # the import JDK may not contain the target of the symlink
-  ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
-    IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+    # the import JDK may not contain the target of the symlink
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),)
+      # check for the .diz file, but create the .debuginfo link
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+    endif
+  else
+    # the import JDK may not contain the target of the symlink
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+    endif
   endif
 endif
 
@@ -231,10 +334,17 @@
 #  solaris   vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  solaris
 
 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
-ifneq ($(OBJCOPY),)
-  # the import JDK may not contain .debuginfo files
-  ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
-    IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+    # the import JDK may not contain .diz files
+    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DIZ_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DIZ_NAME)
+    endif
+  else
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+    endif
   endif
 endif
 
@@ -243,13 +353,22 @@
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME)
-  ifneq ($(OBJCOPY),)
-    # the import JDK may not contain .debuginfo files
-    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
-      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
-      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
-      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
-  endif
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+      # the import JDK may not contain .diz files
+      ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DIZ_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DIZ_NAME)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DIZ_NAME)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DIZ_NAME)
+      endif
+    else
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
+        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+      endif
+    endif
   endif
 else
   $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
@@ -259,10 +378,17 @@
   # The conditional can be removed when import JDKs contain these files.
   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
-    ifneq ($(OBJCOPY),)
-      # the import JDK may not contain .debuginfo files
-      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),)
-        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
+    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+      ifeq ($(ZIP_DEBUGINFO_FILES),1)
+        # the import JDK may not contain .diz files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DIZ_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DIZ_NAME)
+        endif
+      else
+        # the import JDK may not contain .debuginfo files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
+        endif
       endif
     endif
   else
@@ -272,10 +398,17 @@
   # The conditional can be removed when import JDKs contain these files.
   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
-    ifneq ($(OBJCOPY),)
-      # the import JDK may not contain .debuginfo files
-      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),)
-        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+      ifeq ($(ZIP_DEBUGINFO_FILES),1)
+        # the import JDK may not contain .diz files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DIZ_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DIZ_NAME)
+        endif
+      else
+        # the import JDK may not contain .debuginfo files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+        endif
       endif
     endif
   else
@@ -304,9 +437,14 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
-ifneq ($(OBJCOPY),)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)
+	$(install-import-file)
+  else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
 	$(install-import-file)
+  endif
 endif
 
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME)
@@ -317,9 +455,14 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
-ifneq ($(OBJCOPY),)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+$(LIB_LOCATION)/$(LIBJSIG_DIZ_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)
+	$(install-import-file)
+  else
 $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
 	$(install-import-file)
+  endif
 endif
 
 ifndef BUILD_CLIENT_ONLY
@@ -328,22 +471,24 @@
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_NAME))
 
-ifneq ($(OBJCOPY),)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+# we don't create a symlink to a libjsig.diz file
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
-endif
+  endif
 else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_NAME))
 
-ifneq ($(OBJCOPY),)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+# we don't create a symlink to a libjsig.diz file
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
-endif
+  endif
 endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
@@ -354,12 +499,20 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
-ifneq ($(OBJCOPY),)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DIZ_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DIZ_NAME)
+	$(install-import-file)
+  else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
 	$(install-import-file)
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
 	$(install-import-file)
+  endif
 endif
 
 ifndef BUILD_CLIENT_ONLY
@@ -371,13 +524,21 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
-ifneq ($(OBJCOPY),)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DIZ_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DIZ_NAME)
+	$(install-import-file)
+    else
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
 	$(install-import-file)
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
 	$(install-import-file)
-endif
+    endif
+  endif
 endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
@@ -388,12 +549,20 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
-ifneq ($(OBJCOPY),)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DIZ_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DIZ_NAME)
+	$(install-import-file)
+  else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
 	$(install-import-file)
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
 	$(install-import-file)
+  endif
 endif
 
 ifndef BUILD_CLIENT_ONLY
@@ -409,7 +578,17 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
-ifneq ($(OBJCOPY),)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(ZIP_DEBUGINFO_FILES),1)
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DIZ_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DIZ_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME)
+	$(install-import-file)
+  else
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
 	$(install-import-file)
 
@@ -418,6 +597,7 @@
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
 	$(install-import-file)
+  endif
 endif
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
--- a/make/java/redist/sajdi/Makefile	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/java/redist/sajdi/Makefile	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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
@@ -54,14 +54,26 @@
 ifeq ($(INCLUDE_SA), true)
   IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
                  $(LIB_LOCATION)/$(SALIB_NAME)
-  ifeq ($(PLATFORM), windows)
-    IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
-                   $(LIB_LOCATION)/$(SAPDB_NAME)
-  endif
-  ifneq ($(OBJCOPY),)
-    # the import JDK may not contain .debuginfo files
-    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
-      IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+      # the import JDK may not contain .diz files
+      ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DIZ_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SA_DIZ_NAME)
+      endif
+    else
+      ifeq ($(PLATFORM), windows)
+        # the import JDK may not contain .pdb files
+        ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SAPDB_NAME)),)
+          # assume .map file is present if .pdb is present
+          IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
+                         $(LIB_LOCATION)/$(SAPDB_NAME)
+        endif
+      else
+        # the import JDK may not contain .debuginfo files
+        ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
+        endif
+      endif
     endif
   endif
 endif # INCLUDE_SA
@@ -80,17 +92,22 @@
 $(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
 	$(install-import-file)
 
-ifeq ($(PLATFORM), windows)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+$(LIB_LOCATION)/$(SA_DIZ_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DIZ_NAME)
+	$(install-import-file)
+    else
+      ifeq ($(PLATFORM), windows)
 $(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
 	$(install-import-file)
 
 $(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
 	$(install-import-file)
-endif # windows
-
-  ifneq ($(OBJCOPY),)
+      else
 $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME)
 	$(install-import-file)
+      endif
+    endif
   endif
 endif # INCLUDE_SA
 
--- a/make/jprt.gmk	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/jprt.gmk	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2012, Oracle and/or its affiliates. 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,17 +27,24 @@
 
 JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
 
+ifeq ($(PLATFORM),windows)
+  ZIPFLAGS=-q
+else
+  # store symbolic links as the link
+  ZIPFLAGS=-q -y
+endif
+
 jprt_build_product:  all images
 	( $(CD) $(OUTPUTDIR)/j2sdk-image && \
-	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
+	  $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 jprt_build_fastdebug: fastdebug images
 	( $(CD) $(OUTPUTDIR)/j2sdk-image && \
-	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
+	  $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 jprt_build_debug: debug images 
 	( $(CD) $(OUTPUTDIR)/j2sdk-image && \
-	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
+	  $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 #
 # Phonies to avoid accidents.
--- a/make/jprt.properties	Fri Apr 06 10:54:39 2012 -0400
+++ b/make/jprt.properties	Tue Apr 17 21:26:22 2012 -0400
@@ -104,6 +104,7 @@
     ${jprt.my.test.target.set:TESTNAME=jdk_beans1},		\
     ${jprt.my.test.target.set:TESTNAME=jdk_beans2},             \
     ${jprt.my.test.target.set:TESTNAME=jdk_beans3},             \
+    ${jprt.my.test.target.set:TESTNAME=jdk_sound},              \
     ${jprt.my.test.target.set:TESTNAME=jdk_swing}
 
 # JCK test targets in test/Makefile (no windows)
--- a/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Tue Apr 17 21:26:22 2012 -0400
@@ -89,38 +89,36 @@
     }
 
     public void handleKeyEvent(int eventType, int modifierFlags, String characters,
+                               String charsIgnoringMods, boolean isRepeat, short keyCode,
+                               boolean needsKeyTyped) {
+        responder.handleKeyEvent(eventType, modifierFlags, charsIgnoringMods, keyCode, needsKeyTyped);
+    }
+
+    // REMIND: delete this method once 'deploy' changes for 7156194 is pushed
+    public void handleKeyEvent(int eventType, int modifierFlags, String characters,
                                String charsIgnoringMods, boolean isRepeat, short keyCode) {
-        responder.handleKeyEvent(eventType, modifierFlags, charsIgnoringMods, keyCode);
+        handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods, isRepeat, keyCode, true);
     }
 
     public void handleInputEvent(String text) {
-        new RuntimeException("Not implemented");
+        responder.handleInputEvent(text);
     }
 
     public void handleFocusEvent(boolean focused) {
         this.focused = focused;
-        updateOverlayWindowActiveState();
+        if (parentWindowActive) {
+            responder.handleWindowFocusEvent(focused);
+        }
     }
 
     public void handleWindowFocusEvent(boolean parentWindowActive) {
         this.parentWindowActive = parentWindowActive;
-        updateOverlayWindowActiveState();
+        if (focused) {
+            responder.handleWindowFocusEvent(parentWindowActive);
+        }
     }
 
     public boolean isParentWindowActive() {
         return parentWindowActive;
     }
-
-    /*
-     * May change appearance of contents of window, and generate a
-     * WINDOW_ACTIVATED event.
-     */
-    private void updateOverlayWindowActiveState() {
-        final boolean showAsFocused = parentWindowActive && focused;
-        dispatchEvent(
-            new FocusEvent(this, showAsFocused ?
-                                 FocusEvent.FOCUS_GAINED :
-                                 FocusEvent.FOCUS_LOST));
-     }
-
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Tue Apr 17 21:26:22 2012 -0400
@@ -123,7 +123,7 @@
      * Handles key events.
      */
     void handleKeyEvent(int eventType, int modifierFlags, String chars,
-                        short keyCode) {
+                        short keyCode, boolean needsKeyTyped) {
         boolean isFlagsChangedEvent =
             isNpapiCallback ? (eventType == CocoaConstants.NPCocoaEventFlagsChanged) :
                               (eventType == CocoaConstants.NSFlagsChanged);
@@ -179,6 +179,10 @@
         peer.dispatchKeyEvent(jeventType, when, jmodifiers,
                               jkeyCode, javaChar, jkeyLocation);
 
+        // Current browser may be sending input events, so don't
+        // post the KEY_TYPED here.
+        postsTyped &= needsKeyTyped;
+
         // That's the reaction on the PRESSED (not RELEASED) event as it comes to
         // appear in MacOSX.
         // Modifier keys (shift, etc) don't want to send TYPED events.
@@ -191,4 +195,23 @@
                                   KeyEvent.KEY_LOCATION_UNKNOWN);
         }
     }
+
+    void handleInputEvent(String text) {
+        if (text != null) {
+            int index = 0, length = text.length();
+            char c;
+            while (index < length) {
+                c = text.charAt(index);
+                peer.dispatchKeyEvent(KeyEvent.KEY_TYPED,
+                                      System.currentTimeMillis(),
+                                      0, KeyEvent.VK_UNDEFINED, c,
+                                      KeyEvent.KEY_LOCATION_UNKNOWN);
+                index++;
+            }
+        }
+    }
+
+    void handleWindowFocusEvent(boolean gained) {
+        peer.notifyActivation(gained);
+    }
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Tue Apr 17 21:26:22 2012 -0400
@@ -49,9 +49,9 @@
         super(0, true);
     }
 
-    public void initialize(LWWindowPeer peer) {
+    public void initialize(LWWindowPeer peer, CPlatformResponder responder) {
         this.peer = peer;
-        this.responder = new CPlatformResponder(peer, false);
+        this.responder = responder;
 
         if (!LWCToolkit.getSunAwtDisableCALayers()) {
             this.windowLayer = new CGLLayer(peer);
@@ -199,7 +199,7 @@
 
     private void deliverKeyEvent(NSEvent event) {
         responder.handleKeyEvent(event.getType(), event.getModifierFlags(),
-                                 event.getCharactersIgnoringModifiers(), event.getKeyCode());
+                                 event.getCharactersIgnoringModifiers(), event.getKeyCode(), true);
     }
 
     private void deliverWindowDidExposeEvent() {
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Tue Apr 17 21:26:22 2012 -0400
@@ -206,6 +206,7 @@
     private boolean visible = false; // visibility status from native perspective
     private boolean undecorated; // initialized in getInitialStyleBits()
     private Rectangle normalBounds = null; // not-null only for undecorated maximized windows
+    private CPlatformResponder responder;
 
     public CPlatformWindow(final PeerType peerType) {
         super(0, true);
@@ -230,8 +231,9 @@
         final long parentNSWindowPtr = (owner != null ? owner.getNSWindowPtr() : 0);
         String warningString = target.getWarningString();
 
+        responder = new CPlatformResponder(peer, false);
         contentView = new CPlatformView();
-        contentView.initialize(peer);
+        contentView.initialize(peer, responder);
 
         final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), styleBits, 0, 0, 0, 0);
         setPtr(nativeWindowPtr);
@@ -858,7 +860,7 @@
             focusLogger.fine("the app is inactive, so the notification is ignored");
             return;
         }
-        peer.notifyActivation(gained);
+        responder.handleWindowFocusEvent(gained);
     }
 
     private void deliverMoveResizeEvent(int x, int y, int width, int height) {
--- a/src/macosx/native/sun/awt/CMenuItem.m	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/macosx/native/sun/awt/CMenuItem.m	Tue Apr 17 21:26:22 2012 -0400
@@ -126,10 +126,8 @@
     [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
         AWT_ASSERT_APPKIT_THREAD;
 
-        if (![theKeyEquivalent isEqualToString:@""]) {
-            [fMenuItem setKeyEquivalent:theKeyEquivalent];
-            [fMenuItem setKeyEquivalentModifierMask:modifierMask];
-        }
+        [fMenuItem setKeyEquivalent:theKeyEquivalent];
+        [fMenuItem setKeyEquivalentModifierMask:modifierMask];
         [fMenuItem setTitle:theLabel];
     }];
 }
--- a/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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 @@
 import java.security.Key;
 import java.security.NoSuchAlgorithmException;
 import java.security.SecureRandom;
+import java.security.ProviderException;
 import java.security.spec.AlgorithmParameterSpec;
 import java.security.spec.InvalidKeySpecException;
 import javax.crypto.KeyAgreementSpi;
@@ -234,31 +235,15 @@
     protected byte[] engineGenerateSecret()
         throws IllegalStateException
     {
-        if (generateSecret == false) {
-            throw new IllegalStateException
-                ("Key agreement has not been completed yet");
+        int expectedLen = (init_p.bitLength() + 7) >>> 3;
+        byte[] result = new byte[expectedLen];
+        try {
+            engineGenerateSecret(result, 0);
+        } catch (ShortBufferException sbe) {
+            // should never happen since secret lengths in the two
+            // methods are identical
         }
-
-        // Reset the key agreement here (in case anything goes wrong)
-        generateSecret = false;
-
-        // get the modulus
-        BigInteger modulus = init_p;
-
-        BigInteger tmpResult = y.modPow(x, modulus);
-        byte[] secret = tmpResult.toByteArray();
-
-        /*
-         * BigInteger.toByteArray will sometimes put a sign byte up front, but
-         * we NEVER want one.
-         */
-        if ((tmpResult.bitLength() % 8) == 0) {
-            byte retval[] = new byte[secret.length - 1];
-            System.arraycopy(secret, 1, retval, 0, retval.length);
-            return retval;
-        } else {
-            return secret;
-        }
+        return result;
     }
 
     /**
@@ -301,39 +286,51 @@
         }
 
         BigInteger modulus = init_p;
+        int expectedLen = (modulus.bitLength() + 7) >>> 3;
+        if ((sharedSecret.length - offset) < expectedLen) {
+            throw new ShortBufferException
+                    ("Buffer too short for shared secret");
+        }
+
+        // Reset the key agreement after checking for ShortBufferException
+        // above, so user can recover w/o losing internal state
+        generateSecret = false;
+
+        /*
+         * NOTE: BigInteger.toByteArray() returns a byte array containing
+         * the two's-complement representation of this BigInteger with
+         * the most significant byte is in the zeroth element. This
+         * contains the minimum number of bytes required to represent
+         * this BigInteger, including at least one sign bit whose value
+         * is always 0.
+         *
+         * Keys are always positive, and the above sign bit isn't
+         * actually used when representing keys.  (i.e. key = new
+         * BigInteger(1, byteArray))  To obtain an array containing
+         * exactly expectedLen bytes of magnitude, we strip any extra
+         * leading 0's, or pad with 0's in case of a "short" secret.
+         */
         byte[] secret = this.y.modPow(this.x, modulus).toByteArray();
-
-        // BigInteger.toByteArray will sometimes put a sign byte up front,
-        // but we NEVER want one.
-        if ((secret.length << 3) != modulus.bitLength()) {
-            if ((sharedSecret.length - offset) < (secret.length - 1)) {
-                throw new ShortBufferException
-                    ("Buffer too short for shared secret");
+        if (secret.length == expectedLen) {
+            System.arraycopy(secret, 0, sharedSecret, offset,
+                             secret.length);
+        } else {
+            // Array too short, pad it w/ leading 0s
+            if (secret.length < expectedLen) {
+                System.arraycopy(secret, 0, sharedSecret,
+                    offset + (expectedLen - secret.length),
+                    secret.length);
+            } else {
+                // Array too long, check and trim off the excess
+                if ((secret.length == (expectedLen+1)) && secret[0] == 0) {
+                    // ignore the leading sign byte
+                    System.arraycopy(secret, 1, sharedSecret, offset, expectedLen);
+                } else {
+                    throw new ProviderException("Generated secret is out-of-range");
+                }
             }
-            System.arraycopy(secret, 1, sharedSecret, offset,
-                             secret.length - 1);
-
-            // Reset the key agreement here (not earlier!), so that people
-            // can recover from ShortBufferException above without losing
-            // internal state
-            generateSecret = false;
-
-            return secret.length - 1;
-
-        } else {
-            if ((sharedSecret.length - offset) < secret.length) {
-                throw new ShortBufferException
-                    ("Buffer too short to hold shared secret");
-            }
-            System.arraycopy(secret, 0, sharedSecret, offset, secret.length);
-
-            // Reset the key agreement here (not earlier!), so that people
-            // can recover from ShortBufferException above without losing
-            // internal state
-            generateSecret = false;
-
-            return secret.length;
         }
+        return expectedLen;
     }
 
     /**
--- a/src/share/classes/com/sun/jndi/dns/DnsClient.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/com/sun/jndi/dns/DnsClient.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. 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
@@ -577,8 +577,8 @@
         // enqueue only the first response, responses for retries are ignored.
         //
         synchronized (queuesLock) {
-            if (reqs.contains(xid)) { // enqueue only the first response
-                resps.put(xid, pkt);
+            if (reqs.contains(hdr.xid)) { // enqueue only the first response
+                resps.put(hdr.xid, pkt);
             }
         }
 
--- a/src/share/classes/java/lang/management/ManagementFactory.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/java/lang/management/ManagementFactory.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. 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
@@ -42,7 +42,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
-import java.util.TreeSet;
+import java.util.HashSet;
 import java.security.AccessController;
 import java.security.Permission;
 import java.security.PrivilegedAction;
@@ -787,7 +787,7 @@
            getPlatformManagementInterfaces()
     {
         Set<Class<? extends PlatformManagedObject>> result =
-            new TreeSet<>();
+            new HashSet<>();
         for (PlatformComponent component: PlatformComponent.values()) {
             result.add(component.getMXBeanInterface());
         }
--- a/src/share/classes/javax/swing/JPopupMenu.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/javax/swing/JPopupMenu.java	Tue Apr 17 21:26:22 2012 -0400
@@ -358,17 +358,20 @@
         int scrBottomY = scrBounds.y + scrHeight;
 
         // Ensure that popup menu fits the screen
-        if (popupRightX > (long)scrRightX) {
+        if (popupRightX > (long) scrRightX) {
             popupLocation.x = scrRightX - popupSize.width;
-            if( popupLocation.x < scrBounds.x ) {
-                popupLocation.x = scrBounds.x ;
-            }
         }
-        if (popupBottomY > (long)scrBottomY) {
+
+        if (popupBottomY > (long) scrBottomY) {
             popupLocation.y = scrBottomY - popupSize.height;
-            if( popupLocation.y < scrBounds.y ) {
-                popupLocation.y = scrBounds.y;
-            }
+        }
+
+        if (popupLocation.x < scrBounds.x) {
+            popupLocation.x = scrBounds.x;
+        }
+
+        if (popupLocation.y < scrBounds.y) {
+            popupLocation.y = scrBounds.y;
         }
 
         return popupLocation;
--- a/src/share/classes/javax/swing/plaf/synth/SynthComboPopup.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/javax/swing/plaf/synth/SynthComboPopup.java	Tue Apr 17 21:26:22 2012 -0400
@@ -26,13 +26,9 @@
 package javax.swing.plaf.synth;
 
 import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.plaf.basic.*;
+import javax.swing.plaf.ComboBoxUI;
+import javax.swing.plaf.basic.BasicComboPopup;
 import java.awt.*;
-import java.awt.event.*;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeEvent;
-import java.io.Serializable;
 
 
 /**
@@ -52,6 +48,7 @@
      *
      * @see #createList
      */
+    @Override
     protected void configureList() {
         list.setFont( comboBox.getFont() );
         list.setCellRenderer( comboBox.getRenderer() );
@@ -67,4 +64,27 @@
         }
         installListListeners();
     }
+
+    /**
+     * @inheritDoc
+     *
+     * Overridden to take into account any popup insets specified in
+     * SynthComboBoxUI
+     */
+    @Override
+    protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
+        ComboBoxUI ui = comboBox.getUI();
+        if (ui instanceof SynthComboBoxUI) {
+            SynthComboBoxUI sui = (SynthComboBoxUI) ui;
+            if (sui.popupInsets != null) {
+                Insets i = sui.popupInsets;
+                return super.computePopupBounds(
+                        px + i.left,
+                        py + i.top,
+                        pw - i.left - i.right,
+                        ph - i.top - i.bottom);
+            }
+        }
+        return super.computePopupBounds(px, py, pw, ph);
+    }
 }
--- a/src/share/classes/sun/awt/image/ImageWatched.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/sun/awt/image/ImageWatched.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2012, Oracle and/or its affiliates. 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
@@ -143,6 +143,7 @@
         if (iw != null && !isWatcher(iw)) {
             watcherList = new WeakLink(iw, watcherList);
         }
+        watcherList = watcherList.removeWatcher(null);
     }
 
     public synchronized boolean isWatcher(ImageObserver iw) {
--- a/src/share/classes/sun/security/pkcs11/P11KeyAgreement.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/sun/security/pkcs11/P11KeyAgreement.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. 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
@@ -198,8 +198,22 @@
             token.p11.C_GetAttributeValue(session.id(), keyID, attributes);
             byte[] secret = attributes[0].getByteArray();
             token.p11.C_DestroyObject(session.id(), keyID);
-            // trim leading 0x00 bytes per JCE convention
-            return P11Util.trimZeroes(secret);
+            // Some vendors, e.g. NSS, trim off the leading 0x00 byte(s) from
+            // the generated secret. Thus, we need to check the secret length
+            // and trim/pad it so the returned value has the same length as
+            // the modulus size
+            if (secret.length == secretLen) {
+                return secret;
+            } else {
+                if (secret.length > secretLen) {
+                    // Shouldn't happen; but check just in case
+                    throw new ProviderException("generated secret is out-of-range");
+                }
+                byte[] newSecret = new byte[secretLen];
+                System.arraycopy(secret, 0, newSecret, secretLen - secret.length,
+                    secret.length);
+                return newSecret;
+            }
         } catch (PKCS11Exception e) {
             throw new ProviderException("Could not derive key", e);
         } finally {
--- a/src/share/classes/sun/security/ssl/AppOutputStream.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/sun/security/ssl/AppOutputStream.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. 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
@@ -91,9 +91,20 @@
         // however they like; if we buffered here, they couldn't.
         try {
             do {
+                boolean holdRecord = false;
                 int howmuch;
                 if (isFirstRecordOfThePayload && c.needToSplitPayload()) {
                     howmuch = Math.min(0x01, r.availableDataBytes());
+                    /*
+                     * Nagle's algorithm (TCP_NODELAY) was coming into
+                     * play here when writing short (split) packets.
+                     * Signal to the OutputRecord code to internally
+                     * buffer this small packet until the next outbound
+                     * packet (of any type) is written.
+                     */
+                    if ((len != 1) && (howmuch == 1)) {
+                        holdRecord = true;
+                    }
                 } else {
                     howmuch = Math.min(len, r.availableDataBytes());
                 }
@@ -108,7 +119,7 @@
                     off += howmuch;
                     len -= howmuch;
                 }
-                c.writeRecord(r);
+                c.writeRecord(r, holdRecord);
                 c.checkWrite();
             } while (len > 0);
         } catch (Exception e) {
--- a/src/share/classes/sun/security/ssl/EngineOutputRecord.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/sun/security/ssl/EngineOutputRecord.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. 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
@@ -155,8 +155,9 @@
      * data to be generated/output before the exception is ever
      * generated.
      */
-    void writeBuffer(OutputStream s, byte [] buf, int off, int len)
-            throws IOException {
+    @Override
+    void writeBuffer(OutputStream s, byte [] buf, int off, int len,
+            int debugOffset) throws IOException {
         /*
          * Copy data out of buffer, it's ready to go.
          */
@@ -196,7 +197,8 @@
             // compress();              // eventually
             addMAC(writeMAC);
             encrypt(writeCipher);
-            write((OutputStream)null);  // send down for processing
+            write((OutputStream)null, false,   // send down for processing
+                (ByteArrayOutputStream)null);
         }
         return;
     }
--- a/src/share/classes/sun/security/ssl/OutputRecord.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/sun/security/ssl/OutputRecord.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. 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
@@ -28,6 +28,7 @@
 
 import java.io.*;
 import java.nio.*;
+import java.util.Arrays;
 
 import javax.net.ssl.SSLException;
 import sun.misc.HexDumpEncoder;
@@ -227,6 +228,24 @@
     }
 
     /*
+     * Increases the capacity if necessary to ensure that it can hold
+     * at least the number of elements specified by the minimum
+     * capacity argument.
+     *
+     * Note that the increased capacity is only can be used for held
+     * record buffer. Please DO NOT update the availableDataBytes()
+     * according to the expended buffer capacity.
+     *
+     * @see availableDataBytes()
+     */
+    private void ensureCapacity(int minCapacity) {
+        // overflow-conscious code
+        if (minCapacity > buf.length) {
+            buf = Arrays.copyOf(buf, minCapacity);
+        }
+    }
+
+    /*
      * Return the type of SSL record that's buffered here.
      */
     final byte contentType() {
@@ -243,7 +262,8 @@
      * that synchronization be done elsewhere.  Also, this does its work
      * in a single low level write, for efficiency.
      */
-    void write(OutputStream s) throws IOException {
+    void write(OutputStream s, boolean holdRecord,
+            ByteArrayOutputStream heldRecordBuffer) throws IOException {
         /*
          * Don't emit content-free records.  (Even change cipher spec
          * messages have a byte of data!)
@@ -300,7 +320,49 @@
         }
         firstMessage = false;
 
-        writeBuffer(s, buf, 0, count);
+        /*
+         * The upper levels may want us to delay sending this packet so
+         * multiple TLS Records can be sent in one (or more) TCP packets.
+         * If so, add this packet to the heldRecordBuffer.
+         *
+         * NOTE:  all writes have been synchronized by upper levels.
+         */
+        int debugOffset = 0;
+        if (holdRecord) {
+            /*
+             * If holdRecord is true, we must have a heldRecordBuffer.
+             *
+             * Don't worry about the override of writeBuffer(), because
+             * when holdRecord is true, the implementation in this class
+             * will be used.
+             */
+            writeBuffer(heldRecordBuffer, buf, 0, count, debugOffset);
+        } else {
+            // It's time to send, do we have buffered data?
+            // May or may not have a heldRecordBuffer.
+            if (heldRecordBuffer != null && heldRecordBuffer.size() > 0) {
+                int heldLen = heldRecordBuffer.size();
+
+                // Ensure the capacity of this buffer.
+                ensureCapacity(count + heldLen);
+
+                // Slide everything in the buffer to the right.
+                System.arraycopy(buf, 0, buf, heldLen, count);
+
+                // Prepend the held record to the buffer.
+                System.arraycopy(
+                    heldRecordBuffer.toByteArray(), 0, buf, 0, heldLen);
+                count += heldLen;
+
+                // Clear the held buffer.
+                heldRecordBuffer.reset();
+
+                // The held buffer has been dumped, set the debug dump offset.
+                debugOffset = heldLen;
+            }
+            writeBuffer(s, buf, 0, count, debugOffset);
+        }
+
         reset();
     }
 
@@ -309,15 +371,18 @@
      * we'll override this method and let it take the appropriate
      * action.
      */
-    void writeBuffer(OutputStream s, byte [] buf, int off, int len)
-            throws IOException {
+    void writeBuffer(OutputStream s, byte [] buf, int off, int len,
+            int debugOffset) throws IOException {
+
         s.write(buf, off, len);
         s.flush();
 
+        // Output only the record from the specified debug offset.
         if (debug != null && Debug.isOn("packet")) {
             try {
                 HexDumpEncoder hd = new HexDumpEncoder();
-                ByteBuffer bb = ByteBuffer.wrap(buf, off, len);
+                ByteBuffer bb = ByteBuffer.wrap(
+                        buf, off + debugOffset, len - debugOffset);
 
                 System.out.println("[Raw write]: length = " +
                     bb.remaining());
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. 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
@@ -376,6 +376,12 @@
      */
     private boolean isFirstAppOutputRecord = true;
 
+    /*
+     * If AppOutputStream needs to delay writes of small packets, we
+     * will use this to store the data until we actually do the write.
+     */
+    private ByteArrayOutputStream heldRecordBuffer = null;
+
     //
     // CONSTRUCTORS AND INITIALIZATION CODE
     //
@@ -656,13 +662,24 @@
     //
 
     /*
+     * AppOutputStream calls may need to buffer multiple outbound
+     * application packets.
+     *
+     * All other writeRecord() calls will not buffer, so do not hold
+     * these records.
+     */
+    void writeRecord(OutputRecord r) throws IOException {
+        writeRecord(r, false);
+    }
+
+    /*
      * Record Output. Application data can't be sent until the first
      * handshake establishes a session.
      *
      * NOTE:  we let empty records be written as a hook to force some
      * TCP-level activity, notably handshaking, to occur.
      */
-    void writeRecord(OutputRecord r) throws IOException {
+    void writeRecord(OutputRecord r, boolean holdRecord) throws IOException {
         /*
          * The loop is in case of HANDSHAKE --> ERROR transitions, etc
          */
@@ -733,7 +750,7 @@
                 try {
                     if (writeLock.tryLock(getSoLinger(), TimeUnit.SECONDS)) {
                         try {
-                            writeRecordInternal(r);
+                            writeRecordInternal(r, holdRecord);
                         } finally {
                             writeLock.unlock();
                         }
@@ -781,7 +798,7 @@
             } else {
                 writeLock.lock();
                 try {
-                    writeRecordInternal(r);
+                    writeRecordInternal(r, holdRecord);
                 } finally {
                     writeLock.unlock();
                 }
@@ -789,11 +806,28 @@
         }
     }
 
-    private void writeRecordInternal(OutputRecord r) throws IOException {
+    private void writeRecordInternal(OutputRecord r,
+            boolean holdRecord) throws IOException {
         // r.compress(c);
         r.addMAC(writeMAC);
         r.encrypt(writeCipher);
-        r.write(sockOutput);
+
+        if (holdRecord) {
+            // If we were requested to delay the record due to possibility
+            // of Nagle's being active when finally got to writing, and
+            // it's actually not, we don't really need to delay it.
+            if (getTcpNoDelay()) {
+                holdRecord = false;
+            } else {
+                // We need to hold the record, so let's provide
+                // a per-socket place to do it.
+                if (heldRecordBuffer == null) {
+                    // Likely only need 37 bytes.
+                    heldRecordBuffer = new ByteArrayOutputStream(40);
+                }
+            }
+        }
+        r.write(sockOutput, holdRecord, heldRecordBuffer);
 
         /*
          * Check the sequence number state
--- a/src/share/demo/jfc/TransparentRuler/README.txt	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/share/demo/jfc/TransparentRuler/README.txt	Tue Apr 17 21:26:22 2012 -0400
@@ -1,14 +1,10 @@
 
 To run the Ruler demo:
 
-  java -jar Ruler.jar
+  java -jar TransparentRuler.jar
 
 These instructions assume that this installation's version of the java
 command is in your path.  If it isn't, then you should either
 specify the complete path to the java command or update your
 PATH environment variable as described in the installation
 instructions for the Java(TM) SE Development Kit.
-
-KNOWN ISSUES:
-Context menu is clipped with the window shape. The issues are:
-CR 7027486 JPopupMenu doesn't take window shape into account
--- a/src/windows/native/sun/windows/awt_Component.cpp	Fri Apr 06 10:54:39 2012 -0400
+++ b/src/windows/native/sun/windows/awt_Component.cpp	Tue Apr 17 21:26:22 2012 -0400
@@ -302,6 +302,7 @@
         delete m_childList;
 
     DestroyDropTarget();
+    ReleaseDragCapture(0);
 
     if (m_myControlID != 0) {
         AwtComponent* parent = GetParent();
--- a/test/Makefile	Fri Apr 06 10:54:39 2012 -0400
+++ b/test/Makefile	Tue Apr 17 21:26:22 2012 -0400
@@ -437,7 +437,8 @@
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has problems, and doesn't help performance as much as others.
 JDK_ALL_TARGETS += jdk_awt
-jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt)
+jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \
+         javax/imageio javax/print sun/pisces)
 	$(call RunOthervmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
@@ -500,9 +501,8 @@
 # Stable samevm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_misc
 jdk_misc: $(call TestDirs, \
-          demo javax/imageio javax/naming javax/print javax/script \
-          javax/smartcardio javax/sound com/sun/java com/sun/jndi \
-	  com/sun/org com/sun/xml sun/misc sun/pisces)
+          demo/jvmti demo/zipfs javax/naming javax/script \
+          javax/smartcardio com/sun/jndi com/sun/xml sun/misc)
 	$(call RunAgentvmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
@@ -557,6 +557,7 @@
 JDK_ALL_TARGETS += jdk_security3
 jdk_security3: $(call TestDirs, com/sun/security lib/security \
                javax/security sun/security \
+               com/sun/org/apache/xml/internal/security \
                com/oracle/security/ucrypto)
 	$(call SharedLibraryPermissions,sun/security)
 	$(call RunOthervmBatch)
@@ -565,10 +566,16 @@
 jdk_security: jdk_security1 jdk_security2 jdk_security3
 	@$(SummaryInfo)
 
+# Stable samevm testruns (minus items from PROBLEM_LIST)
+JDK_ALL_TARGETS += jdk_sound
+jdk_sound: $(call TestDirs, javax/sound)
+	$(call RunAgentvmBatch)
+
 # Stable othervm testruns (minus items from PROBLEM_LIST)
 #   Using samevm has problems, and doesn't help performance as much as others.
 JDK_ALL_TARGETS += jdk_swing
-jdk_swing: $(call TestDirs, javax/swing sun/java2d)
+jdk_swing: $(call TestDirs, javax/swing sun/java2d \
+           demo/jfc com/sun/java/swing)
 	$(call RunOthervmBatch)
 
 # Stable samevm testruns (minus items from PROBLEM_LIST)
--- a/test/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/test/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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,7 +23,7 @@
 
 /*
  * @test
- * @bug 0000000
+ * @bug 7146728
  * @summary DHKeyAgreement2
  * @author Jan Luehe
  */
@@ -52,15 +52,12 @@
 
 public class DHKeyAgreement2 {
 
+    private static final String SUNJCE = "SunJCE";
     private DHKeyAgreement2() {}
 
     public static void main(String argv[]) throws Exception {
             String mode = "USE_SKIP_DH_PARAMS";
 
-            // Add JCE to the list of providers
-            SunJCE jce = new SunJCE();
-            Security.addProvider(jce);
-
             DHKeyAgreement2 keyAgree = new DHKeyAgreement2();
 
             if (argv.length > 1) {
@@ -86,7 +83,7 @@
             // Some central authority creates new DH parameters
             System.err.println("Creating Diffie-Hellman parameters ...");
             AlgorithmParameterGenerator paramGen
-                = AlgorithmParameterGenerator.getInstance("DH");
+                = AlgorithmParameterGenerator.getInstance("DH", SUNJCE);
             paramGen.init(512);
             AlgorithmParameters params = paramGen.generateParameters();
             dhSkipParamSpec = (DHParameterSpec)params.getParameterSpec
@@ -103,7 +100,7 @@
          * above
          */
         System.err.println("ALICE: Generate DH keypair ...");
-        KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
+        KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", SUNJCE);
         aliceKpairGen.initialize(dhSkipParamSpec);
         KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
         System.out.println("Alice DH public key:\n" +
@@ -112,14 +109,14 @@
                            aliceKpair.getPrivate().toString());
         DHParameterSpec dhParamSpec =
             ((DHPublicKey)aliceKpair.getPublic()).getParams();
-        AlgorithmParameters algParams = AlgorithmParameters.getInstance("DH");
+        AlgorithmParameters algParams = AlgorithmParameters.getInstance("DH", SUNJCE);
         algParams.init(dhParamSpec);
         System.out.println("Alice DH parameters:\n"
                            + algParams.toString());
 
         // Alice executes Phase1 of her version of the DH protocol
         System.err.println("ALICE: Execute PHASE1 ...");
-        KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
+        KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", SUNJCE);
         aliceKeyAgree.init(aliceKpair.getPrivate());
 
         // Alice encodes her public key, and sends it over to Bob.
@@ -130,7 +127,7 @@
          * in encoded format.
          * He instantiates a DH public key from the encoded key material.
          */
-        KeyFactory bobKeyFac = KeyFactory.getInstance("DH");
+        KeyFactory bobKeyFac = KeyFactory.getInstance("DH", SUNJCE);
         X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec
             (alicePubKeyEnc);
         PublicKey alicePubKey = bobKeyFac.generatePublic(x509KeySpec);
@@ -144,7 +141,7 @@
 
         // Bob creates his own DH key pair
         System.err.println("BOB: Generate DH keypair ...");
-        KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
+        KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH", SUNJCE);
         bobKpairGen.initialize(dhParamSpec);
         KeyPair bobKpair = bobKpairGen.generateKeyPair();
         System.out.println("Bob DH public key:\n" +
@@ -154,7 +151,7 @@
 
         // Bob executes Phase1 of his version of the DH protocol
         System.err.println("BOB: Execute PHASE1 ...");
-        KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
+        KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH", SUNJCE);
         bobKeyAgree.init(bobKpair.getPrivate());
 
         // Bob encodes his public key, and sends it over to Alice.
@@ -166,7 +163,7 @@
          * Before she can do so, she has to instanticate a DH public key
          * from Bob's encoded key material.
          */
-        KeyFactory aliceKeyFac = KeyFactory.getInstance("DH");
+        KeyFactory aliceKeyFac = KeyFactory.getInstance("DH", SUNJCE);
         x509KeySpec = new X509EncodedKeySpec(bobPubKeyEnc);
         PublicKey bobPubKey = aliceKeyFac.generatePublic(x509KeySpec);
         System.err.println("ALICE: Execute PHASE2 ...");
@@ -187,49 +184,32 @@
         byte[] aliceSharedSecret = aliceKeyAgree.generateSecret();
         int aliceLen = aliceSharedSecret.length;
 
+        // check if alice's key agreement has been reset afterwards
+        try {
+            aliceKeyAgree.generateSecret();
+            throw new Exception("Error: alice's KeyAgreement not reset");
+        } catch (IllegalStateException e) {
+            System.out.println("EXPECTED:  " + e.getMessage());
+        }
+
         byte[] bobSharedSecret = new byte[aliceLen];
         int bobLen;
         try {
             // provide output buffer that is too short
             bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 1);
-
-            /*
-             * Gatekeeper's note:
-             * We should not be getting here, but every so often, we
-             * get a failure, either a "ShortBufferException" or
-             * "Key agreement has not been completed yet" in the
-             * generateSecret(bobSharedSecret, 0) below.
-             *
-             * This will help to figure out why we're dropping through
-             * and not failing.
-             */
-            System.out.println("NIGHTLY:  Should *NOT* be here!!!\n" +
-                "aliceLen = " + aliceLen + "\n" +
-                "Alice's shared secret");
-
-            try {
-                HexDumpEncoder hd = new HexDumpEncoder();
-
-                hd.encodeBuffer(
-                    new ByteArrayInputStream(aliceSharedSecret), System.out);
-            } catch (IOException e) { }
-
-            System.out.println("bobLen = " + bobLen);
-
-            try {
-                HexDumpEncoder hd = new HexDumpEncoder();
-
-                hd.encodeBuffer(
-                    new ByteArrayInputStream(bobSharedSecret), System.out);
-            } catch (IOException e) { }
-
-            throw new Exception("Shouldn't be succeeding.");
         } catch (ShortBufferException e) {
             System.out.println("EXPECTED:  " + e.getMessage());
         }
+        // retry w/ output buffer of required size
+        bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 0);
 
-        // provide output buffer of required size
-        bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 0);
+        // check if bob's key agreement has been reset afterwards
+        try {
+            bobKeyAgree.generateSecret(bobSharedSecret, 0);
+            throw new Exception("Error: bob's KeyAgreement not reset");
+        } catch (IllegalStateException e) {
+            System.out.println("EXPECTED:  " + e.getMessage());
+        }
 
         System.out.println("Alice secret: " + toHexString(aliceSharedSecret));
         System.out.println("Bob secret: " + toHexString(bobSharedSecret));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Frame/WindowDragTest/WindowDragTest.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+  @test
+  @bug 7128738
+  @summary dragged dialog freezes system on dispose
+  @author Oleg Pekhovskiy: area=awt.toplevel
+  @library ../../regtesthelpers
+  @run main WindowDragTest
+*/
+
+import java.awt.Frame;
+import java.awt.event.InputEvent;
+import java.awt.AWTException;
+import test.java.awt.regtesthelpers.Util;
+import java.awt.Robot;
+import java.awt.Point;
+import java.awt.Dimension;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+public class WindowDragTest {
+
+    static boolean passed = false;
+
+    public static void main(String[] args) {
+        try {
+            Robot robot = new Robot();
+            robot.setAutoDelay(1000);
+
+            Frame frame1 = new Frame();
+            frame1.setBounds(50, 50, 300, 200);
+            frame1.setVisible(true);
+            frame1.toFront();
+            frame1.addMouseListener(new MouseAdapter() {
+                @Override
+                public void mouseClicked(MouseEvent e) {
+                    // Clicking frame1 succeeded - mouse is not captured
+                    passed = true;
+                }
+            });
+            robot.delay(1000);
+
+            Frame frame2 = new Frame();
+            frame2.setBounds(100, 100, 300, 200);
+            frame2.setVisible(true);
+            frame2.toFront();
+            robot.delay(1000);
+
+            Point p = frame2.getLocationOnScreen();
+            Dimension d = frame2.getSize();
+
+            // Move cursor to frame2 title bar to drag
+            robot.mouseMove(p.x + (int)(d.getWidth() / 2), p.y + (int)frame2.getInsets().top / 2);
+            Util.waitForIdle(robot);
+
+            // Start window dragging
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            Util.waitForIdle(robot);
+
+            // Dispose window being dragged
+            frame2.dispose();
+            Util.waitForIdle(robot);
+
+            // Release mouse button to be able to get MOUSE_CLICKED event on Util.clickOnComp()
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+            Util.waitForIdle(robot);
+
+            // Click frame1 to check whether mouse is not captured by frame2
+            Util.clickOnComp(frame1, robot);
+            Util.waitForIdle(robot);
+
+            frame1.dispose();
+            if (passed) {
+                System.out.println("Test passed.");
+            }
+            else {
+                System.out.println("Test failed.");
+                throw new RuntimeException("Test failed.");
+            }
+        }
+        catch (AWTException e) {
+            throw new RuntimeException("AWTException occurred - problem creating robot!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/management/ManagementFactory/GetPlatformManagementInterfaces.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     7074616
+ * @summary Basic unit test of the
+ *          ManagementFactory.getPlatformManagementInterfaces() method
+ * @author  Frederic Parain
+ *
+ * @run main GetPlatformManagementInterfaces
+ */
+
+import java.lang.management.*;
+import java.io.IOException;
+import java.util.*;
+import javax.management.*;
+
+import static java.lang.management.ManagementFactory.*;
+
+public class GetPlatformManagementInterfaces {
+
+    private static enum ManagementInterfaces {
+        CLASS_LOADING_MXBEAN(ClassLoadingMXBean.class),
+        COMPILATION_MXBEAN(CompilationMXBean.class),
+        MEMORY_MXBEAN(MemoryMXBean.class),
+        OPERATING_SYSTEM_MXBEAN(OperatingSystemMXBean.class),
+        RUNTIME_MXBEAN(RuntimeMXBean.class),
+        THREAD_MXBEAN(ThreadMXBean.class),
+        GARBAGE_COLLECTOR_MXBEAN(GarbageCollectorMXBean.class),
+        MEMORY_MANAGER_MXBEAN(MemoryManagerMXBean.class),
+        MEMORY_POOL_MXBEAN(MemoryPoolMXBean.class);
+
+        private final Class<? extends PlatformManagedObject> managementInterface;
+        private ManagementInterfaces(Class<? extends PlatformManagedObject> minterface) {
+            managementInterface = minterface;
+        }
+        public Class<? extends PlatformManagedObject> getManagementInterface() {
+            return managementInterface;
+        }
+    };
+
+    public static void main(String[] args) {
+        Set<Class<? extends PlatformManagedObject>> interfaces =
+            ManagementFactory.getPlatformManagementInterfaces();
+        for(Class<? extends PlatformManagedObject> pom : interfaces) {
+            List<? extends PlatformManagedObject> list =
+                ManagementFactory.getPlatformMXBeans(pom);
+        }
+        for(ManagementInterfaces mi : ManagementInterfaces.values()) {
+            if(!interfaces.contains(mi.getManagementInterface())) {
+                throw new RuntimeException(mi.getManagementInterface() + " not in ManagementInterfaces set");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JFileChooser/4524490/bug4524490.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4524490
+ * @summary Tests if in JFileChooser, ALT+L does not bring focus to 'Files' selection list in Motif LAF
+ * @library ../../regtesthelpers
+ * @build Util
+ * @author Konstantin Eremin
+ * @run main bug4524490
+ */
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.KeyEvent;
+import javax.swing.*;
+import sun.awt.OSInfo;
+import sun.awt.SunToolkit;
+
+public class bug4524490 {
+
+    private static JFileChooser fileChooser;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
+
+        SwingUtilities.invokeLater(new Runnable() {
+
+            public void run() {
+                fileChooser = new JFileChooser();
+                fileChooser.showOpenDialog(null);
+            }
+        });
+
+        toolkit.realSync();
+
+        if (OSInfo.OSType.MACOSX.equals(OSInfo.getOSType())) {
+            Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_L);
+        } else {
+            Util.hitKeys(robot, KeyEvent.VK_ALT, KeyEvent.VK_L);
+        }
+        checkFocus();
+    }
+
+    private static void checkFocus() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                JList list = (JList) Util.findSubComponent(fileChooser, "javax.swing.JList");
+                System.out.println("list focus: " + list.isFocusOwner());
+                if (!list.isFocusOwner()) {
+                    throw new RuntimeException("Focus is not transfered to the Folders list.");
+                }
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTable/4220171/bug4220171.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4220171
+ * @author Konstantin Eremin
+ * @summary Tests
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main bug4220171
+ */
+import java.awt.Color;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import javax.swing.*;
+import javax.swing.border.LineBorder;
+import sun.awt.SunToolkit;
+
+public class bug4220171 {
+
+    private static JTable table;
+
+    public static void main(String args[]) throws Exception {
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        toolkit.realSync();
+
+        clickMouse(robot, 0, 0);
+        Util.hitKeys(robot, KeyEvent.VK_A, KeyEvent.VK_B, KeyEvent.VK_ENTER);
+        toolkit.realSync();
+        checkCell(0, 0);
+
+        clickMouse(robot, 0, 1);
+        Util.hitKeys(robot, KeyEvent.VK_D, KeyEvent.VK_E, KeyEvent.VK_ENTER);
+        toolkit.realSync();
+        checkCell(0, 1);
+
+        clickMouse(robot, 1, 0);
+        Util.hitKeys(robot, KeyEvent.VK_1, KeyEvent.VK_2, KeyEvent.VK_ENTER);
+        toolkit.realSync();
+        checkCell(1, 0);
+
+        clickMouse(robot, 1, 1);
+        Util.hitKeys(robot, KeyEvent.VK_4, KeyEvent.VK_5, KeyEvent.VK_ENTER);
+        toolkit.realSync();
+        checkCell(1, 1);
+    }
+
+    static void checkCell(final int row, final int column) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            public void run() {
+                if (table.getValueAt(row, column) != null) {
+                    throw new RuntimeException(
+                            String.format("Cell (%d, %d) is editable", row, column));
+                }
+            }
+        });
+    }
+
+    static void clickMouse(Robot robot, int row, int column) throws Exception {
+        Point point = getCellClickPoint(row, column);
+        robot.mouseMove(point.x, point.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+    }
+
+    private static Point getCellClickPoint(final int row, final int column) throws Exception {
+        final Point[] result = new Point[1];
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                Rectangle rect = table.getCellRect(row, column, false);
+                Point point = new Point(rect.x + rect.width / 2,
+                        rect.y + rect.height / 2);
+                SwingUtilities.convertPointToScreen(point, table);
+                result[0] = point;
+            }
+        });
+
+        return result[0];
+    }
+
+    private static void createAndShowGUI() {
+        JFrame frame = new JFrame("Test");
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.setSize(200, 200);
+
+        table = new JTable(2, 2);
+        table.setEnabled(false);
+
+        frame.getContentPane().add(table);
+        frame.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JToolTip/4846413/bug4846413.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4846413
+ * @summary Checks if No tooltip modification when no KeyStroke modifier
+ * @library ../../regtesthelpers
+ * @build Util
+ * @author Konstantin Eremin
+ * @run main bug4846413
+ */
+import java.awt.Dimension;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import javax.swing.*;
+import java.awt.event.*;
+import javax.swing.plaf.metal.MetalToolTipUI;
+import sun.awt.SunToolkit;
+
+public class bug4846413 {
+
+    private static volatile boolean isTooltipAdded;
+    private static JButton button;
+
+    public static void main(String[] args) throws Exception {
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+
+        javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        toolkit.realSync();
+
+        Point movePoint = getButtonPoint();
+        robot.mouseMove(movePoint.x, movePoint.y);
+        toolkit.realSync();
+
+        long timeout = System.currentTimeMillis() + 9000;
+        while (!isTooltipAdded && (System.currentTimeMillis() < timeout)) {
+            try {Thread.sleep(500);} catch (Exception e) {}
+        }
+
+        checkToolTip();
+    }
+
+    private static void checkToolTip() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                JToolTip tooltip = (JToolTip) Util.findSubComponent(
+                        JFrame.getFrames()[0], "JToolTip");
+
+                if (tooltip == null) {
+                    throw new RuntimeException("Tooltip has not been found!");
+                }
+
+                MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
+                tooltipUI.installUI(tooltip);
+
+                if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
+                    throw new RuntimeException("Tooltip acceleration is not properly set!");
+                }
+
+            }
+        });
+    }
+
+    private static Point getButtonPoint() throws Exception {
+        final Point[] result = new Point[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                Point p = button.getLocationOnScreen();
+                Dimension size = button.getSize();
+                result[0] = new Point(p.x + size.width / 2, p.y + size.height / 2);
+            }
+        });
+        return result[0];
+    }
+
+    private static void createAndShowGUI() {
+        JFrame frame = new JFrame("Test");
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.setSize(200, 200);
+
+        button = new JButton("Press me");
+        button.setToolTipText("test");
+        button.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
+                KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0, true), "someCommand");
+        button.getActionMap().put("someCommand", null);
+        frame.getContentPane().add(button);
+
+        JLayeredPane layeredPane = (JLayeredPane) Util.findSubComponent(
+                frame, "JLayeredPane");
+        layeredPane.addContainerListener(new ContainerAdapter() {
+
+            @Override
+            public void componentAdded(ContainerEvent e) {
+                isTooltipAdded = true;
+            }
+        });
+
+        frame.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTree/4330357/bug4330357.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4330357
+ * @summary Tests that real editor in JTree cleans up after editing was stopped
+ * @library ../../regtesthelpers
+ * @build Util
+ * @author Peter Zhelezniakov
+ * @run main bug4330357
+ */
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.tree.*;
+import sun.awt.SunToolkit;
+
+public class bug4330357 {
+
+    private static JTree tree;
+    private static JButton button;
+    private static Robot robot;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        robot = new Robot();
+        robot.setAutoDelay(50);
+
+        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+
+        javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        toolkit.realSync();
+
+        clickMouse(getTreeRowClickPoint(1));
+        Util.hitKeys(robot, KeyEvent.VK_F2);
+        Util.hitKeys(robot, KeyEvent.VK_A, KeyEvent.VK_B, KeyEvent.VK_C);
+        toolkit.realSync();
+
+        if (!hasComponent(JTextField.class)) {
+            throw new RuntimeException("Cell editor is missed for path: color");
+        }
+
+
+        clickMouse(getButtonClickPoint());
+        toolkit.realSync();
+
+        clickMouse(getTreeRowClickPoint(2));
+        Util.hitKeys(robot, KeyEvent.VK_F2);
+        toolkit.realSync();
+
+        if (!hasComponent(JComboBox.class)) {
+            throw new RuntimeException("Cell editor is missed for path: sports");
+        }
+
+        if (hasComponent(JTextField.class)) {
+            throw new RuntimeException("Cell editor is wrongly shown for path: color");
+        }
+    }
+
+    static void clickMouse(Point point) {
+        robot.mouseMove(point.x, point.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+    }
+
+    private static Point getTreeRowClickPoint(final int row) throws Exception {
+        final Point[] result = new Point[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+
+                Rectangle rect = tree.getRowBounds(row);
+                Point p = new Point(rect.x + rect.width / 2, rect.y + 2);
+                SwingUtilities.convertPointToScreen(p, tree);
+                result[0] = p;
+            }
+        });
+
+        return result[0];
+    }
+
+    private static Point getButtonClickPoint() throws Exception {
+        final Point[] result = new Point[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                Point p = button.getLocationOnScreen();
+                Dimension size = button.getSize();
+                result[0] = new Point(p.x + size.width / 2, p.y + size.height / 2);
+            }
+        });
+        return result[0];
+    }
+
+    static boolean hasComponent(final Class cls) throws Exception {
+        final boolean[] result = new boolean[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                result[0] = Util.findSubComponent(tree, cls.getName()) != null;
+            }
+        });
+
+        return result[0];
+    }
+
+    private static void createAndShowGUI() {
+        JFrame frame = new JFrame("Test");
+        frame.setSize(200, 200);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        tree = new JTree();
+        tree.setEditable(true);
+
+        final TestEditor testEditor = new TestEditor();
+        tree.setCellEditor(new DefaultTreeCellEditor(tree,
+                (DefaultTreeCellRenderer) tree.getCellRenderer(),
+                testEditor));
+
+        button = new JButton("stop");
+
+        button.addActionListener(new ActionListener() {
+
+            public void actionPerformed(ActionEvent ae) {
+                testEditor.stopCellEditing();
+            }
+        });
+
+        frame.getContentPane().add(new JScrollPane(tree), BorderLayout.CENTER);
+        frame.getContentPane().add(button, BorderLayout.SOUTH);
+        frame.setVisible(true);
+    }
+
+    static class TestEditor extends AbstractCellEditor implements TreeCellEditor {
+
+        private JComboBox comboBox;
+        private JTextField textField;
+        private boolean comboBoxActive;
+
+        TestEditor() {
+            comboBox = new JComboBox(new String[]{"one", "two"});
+            textField = new JTextField();
+        }
+
+        public Component getTreeCellEditorComponent(JTree tree, Object value,
+                boolean isSelected,
+                boolean expanded,
+                boolean leaf, int row) {
+            if (row % 2 == 0) {
+                comboBoxActive = true;
+                return comboBox;
+            }
+            comboBoxActive = false;
+            return textField;
+        }
+
+        public Object getCellEditorValue() {
+            if (comboBoxActive) {
+                return comboBox.getSelectedItem();
+            }
+            return textField.getText();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/plaf/synth/7158712/bug7158712.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+   @bug 7158712
+   @summary Synth Property "ComboBox.popupInsets" is ignored
+   @library ../../../regtesthelpers
+   @author Pavel Porvatov
+*/
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.plaf.basic.BasicComboPopup;
+import javax.swing.plaf.synth.SynthLookAndFeel;
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.io.ByteArrayInputStream;
+import java.util.concurrent.Callable;
+
+public class bug7158712 {
+    private static final String SYNTH_XML = "<synth>" +
+            "    <style id=\"all\">" +
+            "      <font name=\"Dialog\" size=\"12\"/>" +
+            "    </style>" +
+            "    <bind style=\"all\" type=\"REGION\" key=\".*\"/>" +
+            "    <style id=\"arrowButton\">" +
+            "      <property key=\"ArrowButton.size\" type=\"integer\" value=\"18\"/>" +
+            "    </style>" +
+            "    <bind style=\"arrowButton\" type=\"region\" key=\"ArrowButton\"/>" +
+            "    <style id=\"comboBox\">" +
+            "      <property key=\"ComboBox.popupInsets\" type=\"insets\" value=\"-5 -5 5 -5\"/>" +
+            "    </style>" +
+            "    <bind style=\"comboBox\" type=\"region\" key=\"ComboBox\"/>" +
+            "</synth>";
+
+    private static JComboBox<String> comboBox;
+
+    public static void main(String[] args) throws Exception {
+        Robot robot = new Robot();
+
+        robot.setAutoDelay(500);
+
+        SynthLookAndFeel laf = new SynthLookAndFeel();
+
+        laf.load(new ByteArrayInputStream(SYNTH_XML.getBytes("UTF8")), bug7158712.class);
+
+        UIManager.setLookAndFeel(laf);
+
+        EventQueue.invokeAndWait(new Runnable() {
+            public void run() {
+                comboBox = new JComboBox<>(
+                        new String[]{"Very Looooooooooooooooooooong Text Item 1", "Item 2"});
+
+                JFrame frame = new JFrame();
+
+                frame.add(comboBox, BorderLayout.NORTH);
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.setSize(new Dimension(400, 300));
+                frame.setLocationRelativeTo(null);
+                frame.setVisible(true);
+            }
+        });
+
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+
+        Point comboBoxLocation = Util.invokeOnEDT(new Callable<Point>() {
+            @Override
+            public Point call() throws Exception {
+                return comboBox.getLocationOnScreen();
+            }
+        });
+
+        robot.mouseMove(comboBoxLocation.x, comboBoxLocation.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                BasicComboPopup popup = (BasicComboPopup) comboBox.getAccessibleContext().getAccessibleChild(0);
+
+                Point popupPoint = popup.getLocationOnScreen();
+                Point comboBoxPoint = comboBox.getLocationOnScreen();
+
+                if (comboBoxPoint.x - 5 != popupPoint.x ||
+                        comboBoxPoint.y + comboBox.getHeight() - 5 != popupPoint.y) {
+                    throw new RuntimeException("Invalid popup coordinates. Popup location: " + popupPoint +
+                            ", comboBox location: " + comboBoxPoint);
+                }
+
+                System.out.println("Test bug7158712 passed");
+            }
+        });
+    }
+}
--- a/test/javax/swing/regtesthelpers/Util.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/test/javax/swing/regtesthelpers/Util.java	Tue Apr 17 21:26:22 2012 -0400
@@ -24,8 +24,10 @@
 import javax.swing.*;
 import java.awt.*;
 import java.awt.image.BufferedImage;
+import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.concurrent.Callable;
 
 /**
  * <p>This class contains utilities useful for regression testing.
@@ -117,6 +119,30 @@
         System.out.println("Got OOME");
     }
 
+    /**
+     * Find a sub component by class name.
+     * Always run this method on the EDT thread
+     */
+    public static Component findSubComponent(Component parent, String className) {
+        String parentClassName = parent.getClass().getName();
+
+        if (parentClassName.contains(className)) {
+            return parent;
+        }
+
+        if (parent instanceof Container) {
+            for (Component child : ((Container) parent).getComponents()) {
+                Component subComponent = findSubComponent(child, className);
+
+                if (subComponent != null) {
+                    return subComponent;
+                }
+            }
+        }
+
+        return null;
+    }
+
      /**
      * Hits keys by robot.
      */
@@ -129,4 +155,31 @@
             robot.keyRelease(keys[i]);
         }
     }
+
+    /**
+     * Invokes the <code>task</code> on the EDT thread.
+     *
+     * @return result of the <code>task</code>
+     */
+    public static <T> T invokeOnEDT(final Callable<T> task) throws Exception {
+        final List<T> result = new ArrayList<>(1);
+        final Exception[] exception = new Exception[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    result.add(task.call());
+                } catch (Exception e) {
+                    exception[0] = e;
+                }
+            }
+        });
+
+        if (exception[0] != null) {
+            throw exception[0];
+        }
+
+        return result.get(0);
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/awt/image/ImageWatched/AddNoLeak.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.image.ImageObserver;
+import java.awt.image.ImageProducer;
+import java.awt.image.ImageConsumer;
+import java.awt.Image;
+import java.awt.Container;
+
+/* @test 1.0 12/01/17
+   @bug 7104151
+   @summary Make sure that we don't leak image observers (or related objects)
+   @run main/othervm AddNoLeak
+   @author David Buck
+*/
+
+public class AddNoLeak {
+    public static void main(String[] args) {
+        System.setProperty("java.awt.headless", "true");
+        Container cont = new Container();
+        Image img = cont.createImage(new DummyImageSource());
+        for(int i=0;i < 15000;i++) {
+            img.getWidth(new ImageObserver() {
+                public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {return false;}
+            });
+            if (i % 100 == 0) {
+                System.gc();
+            }
+        }
+    }
+
+    private static class DummyImageSource implements ImageProducer {
+        public void addConsumer(ImageConsumer ic){}
+        public boolean isConsumer(ImageConsumer ic){return false;}
+        public void removeConsumer(ImageConsumer ic){}
+        public void startProduction(ImageConsumer ic){}
+        public void requestTopDownLeftRightResend(ImageConsumer ic){}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/pkcs11/KeyAgreement/TestInterop.java	Tue Apr 17 21:26:22 2012 -0400
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 7146728
+ * @summary Interop test for DH with secret that has a leading 0x00 byte
+ * @library ..
+ */
+import java.math.BigInteger;
+import java.util.*;
+
+import java.security.*;
+
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class TestInterop extends PKCS11Test {
+
+    private final static BigInteger p = new BigInteger
+    ("171718397966129586011229151993178480901904202533705695869569760169920539"
+    + "80807543778874708672297590042574075430109846864794139516459381007417046"
+    + "27996080624930219892858374168155487210358743785481212360509485282294161"
+    + "39585571568998066586304075565145536350296006867635076744949977849997684"
+    + "222020336013226588207303");
+
+    private final static BigInteger g = new BigInteger("2");
+
+    private final static BigInteger ya = new BigInteger
+    ("687709211571508809414670982463565909269384277848448625781941269577397703"
+    + "73675199968849153119146758339814638228795348558483510369322822476757204"
+    + "22158455966026517829008713407587339322132253724742557954802911059639161"
+    + "24827916158465757962384625410294483756242900146397201260757102085985457"
+    + "09397033481077351036224");
+
+    private final static BigInteger xa = new BigInteger
+    ("104917367119952955556289227181599819745346393858545449202252025137706135"
+    + "98100778613457655440586438263591136003106529323555991109623536177695714"
+    + "66884181531401472902830508361532232717792847436112280721439936797741371"
+    + "245140912614191507");
+
+    private final static BigInteger yb  = new BigInteger
+    ("163887874871842952463100699681506173424091615364591742415764095471629919"
+    + "08421025296419917755446931473037086355546823601999684501737493240373415"
+    + "65608293667837249198973539289354492348897732633852665609611113031379864"
+    + "58514616034107537409230452318065341748503347627733368519091332060477528"
+    + "173423377887175351037810");
+
+    private final static BigInteger xb = new BigInteger
+    ("127757517533485947079959908591028646859165238853082197617179368337276371"
+    + "51601819447716934542027725311863797141734616730248519214531856941516613"
+    + "30313414180008978013330410484011186019824874948204261839391153650949864"
+    + "429505597086564709");
+
+    public void main(Provider prov) throws Exception {
+        if (prov.getService("KeyAgreement", "DH") == null) {
+            System.out.println("DH not supported, skipping");
+            return;
+        }
+        try {
+            System.out.println("testing generateSecret()");
+
+            DHPublicKeySpec publicSpec;
+            DHPrivateKeySpec privateSpec;
+            KeyFactory kf = KeyFactory.getInstance("DH");
+            KeyAgreement ka = KeyAgreement.getInstance("DH", prov);
+            KeyAgreement kbSunJCE = KeyAgreement.getInstance("DH", "SunJCE");
+            DHPrivateKeySpec privSpecA = new DHPrivateKeySpec(xa, p, g);
+            DHPublicKeySpec pubSpecA = new DHPublicKeySpec(ya, p, g);
+            PrivateKey privA = kf.generatePrivate(privSpecA);
+            PublicKey pubA = kf.generatePublic(pubSpecA);
+
+            DHPrivateKeySpec privSpecB = new DHPrivateKeySpec(xb, p, g);
+            DHPublicKeySpec pubSpecB = new DHPublicKeySpec(yb, p, g);
+            PrivateKey privB = kf.generatePrivate(privSpecB);
+            PublicKey pubB = kf.generatePublic(pubSpecB);
+
+            ka.init(privA);
+            ka.doPhase(pubB, true);
+            byte[] n1 = ka.generateSecret();
+
+            kbSunJCE.init(privB);
+            kbSunJCE.doPhase(pubA, true);
+            byte[] n2 = kbSunJCE.generateSecret();
+
+            if (Arrays.equals(n1, n2) == false) {
+                throw new Exception("values mismatch!");
+            } else {
+                System.out.println("values: same");
+            }
+
+            System.out.println("testing generateSecret(byte[], int)");
+            byte[] n3 = new byte[n1.length];
+            ka.init(privB);
+            ka.doPhase(pubA, true);
+            int n3Len = ka.generateSecret(n3, 0);
+            if (n3Len != n3.length) {
+                throw new Exception("PKCS11 Length mismatch!");
+            } else System.out.println("PKCS11 Length: ok");
+            byte[] n4 = new byte[n2.length];
+            kbSunJCE.init(privA);
+            kbSunJCE.doPhase(pubB, true);
+            int n4Len = kbSunJCE.generateSecret(n4, 0);
+            if (n4Len != n4.length) {
+                throw new Exception("SunJCE Length mismatch!");
+            } else System.out.println("SunJCE Length: ok");
+
+            if (Arrays.equals(n3, n4) == false) {
+                throw new Exception("values mismatch! ");
+            } else {
+                System.out.println("values: same");
+            }
+        } catch (Exception ex) {
+            System.out.println("Unexpected ex: " + ex);
+            ex.printStackTrace();
+            throw ex;
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        main(new TestInterop());
+    }
+}
--- a/test/sun/security/pkcs11/KeyAgreement/TestShort.java	Fri Apr 06 10:54:39 2012 -0400
+++ b/test/sun/security/pkcs11/KeyAgreement/TestShort.java	Tue Apr 17 21:26:22 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. 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,7 +23,7 @@
 
 /**
  * @test
- * @bug 4942494
+ * @bug 4942494 7146728
  * @summary KAT test for DH (normal and with secret that has leading a 0x00 byte)
  * @author Andreas Sterbenz
  * @library ..
@@ -66,7 +66,7 @@
     ("433011588852527167500079509018272713204454720683");
 
     private final static byte[] s2 = parse
-    ("19:c7:f1:bb:2e:3d:93:fa:02:d2:e9:9f:75:32:b9:e6:7a:a0:4a:10:45:81:d4:2b:"
+    ("00:19:c7:f1:bb:2e:3d:93:fa:02:d2:e9:9f:75:32:b9:e6:7a:a0:4a:10:45:81:d4:2b:"
     + "e2:77:4c:70:41:39:7c:19:fa:65:64:47:49:8a:ad:0a:fa:9d:e9:62:68:97:c5:52"
     + ":b1:37:03:d9:cd:aa:e1:bd:7e:71:0c:fc:15:a1:95");
 
@@ -88,31 +88,36 @@
             System.out.println("DH not supported, skipping");
             return;
         }
-        DHPublicKeySpec publicSpec;
-        DHPrivateKeySpec privateSpec;
-        KeyFactory kf = KeyFactory.getInstance("DH", provider);
-        KeyAgreement ka = KeyAgreement.getInstance("DH", provider);
-//      KeyAgreement ka = KeyAgreement.getInstance("DH");
+        try {
+            DHPublicKeySpec publicSpec;
+            DHPrivateKeySpec privateSpec;
+            KeyFactory kf = KeyFactory.getInstance("DH", provider);
+            KeyAgreement ka = KeyAgreement.getInstance("DH", provider);
 
-        PrivateKey pr1 = kf.generatePrivate(new DHPrivateKeySpec(x1, p, g));
-        PublicKey pu2 = kf.generatePublic(new DHPublicKeySpec(y2, p, g));
-        PublicKey pu3 = kf.generatePublic(new DHPublicKeySpec(y3, p, g));
+            PrivateKey pr1 = kf.generatePrivate(new DHPrivateKeySpec(x1, p, g));
+            PublicKey pu2 = kf.generatePublic(new DHPublicKeySpec(y2, p, g));
+            PublicKey pu3 = kf.generatePublic(new DHPublicKeySpec(y3, p, g));
 
-        ka.init(pr1);
-        ka.doPhase(pu2, true);
-        byte[] n2 = ka.generateSecret();
-        if (Arrays.equals(s2, n2) == false) {
-            throw new Exception("mismatch 2");
+            ka.init(pr1);
+            ka.doPhase(pu2, true);
+            byte[] n2 = ka.generateSecret();
+            if (Arrays.equals(s2, n2) == false) {
+                throw new Exception("mismatch 2");
+            }
+            System.out.println("short ok");
+
+            ka.init(pr1);
+            ka.doPhase(pu3, true);
+            byte[] n3 = ka.generateSecret();
+            if (Arrays.equals(s3, n3) == false) {
+                throw new Exception("mismatch 3");
+            }
+            System.out.println("normal ok");
+        } catch (Exception ex) {
+            System.out.println("Unexpected Exception: " + ex);
+            ex.printStackTrace();
+            throw ex;
         }
-        System.out.println("short ok");
-
-        ka.init(pr1);
-        ka.doPhase(pu3, true);
-        byte[] n3 = ka.generateSecret();
-        if (Arrays.equals(s3, n3) == false) {
-            throw new Exception("mismatch 3");
-        }
-        System.out.println("normal ok");
 
 /*
         KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH", provider);