changeset 6202:e66ec5b8c15e

Merge
author lana
date Fri, 30 Nov 2012 16:33:50 -0800
parents 43d2e02c4098 df5619994dc3
children fd8ba2d8baec
files
diffstat 13 files changed, 279 insertions(+), 221 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Nov 30 12:00:07 2012 -0800
+++ b/.hgtags	Fri Nov 30 16:33:50 2012 -0800
@@ -186,3 +186,5 @@
 50b8b17449d200c66bfd68fb4f3a9197432c9e2b jdk8-b62
 f117a3e06f78a258074674ad17601f99bcb1ce0d jdk8-b63
 26dbd73fb7662a29b3e47179fdc88a0bfa4e231e jdk8-b64
+130d3a54d28becaac0846137256c2684adb34c33 jdk8-b65
+4d337fae2250135729ee9ed2bf8baf3c60da5d6d jdk8-b66
--- a/makefiles/CompileDemos.gmk	Fri Nov 30 12:00:07 2012 -0800
+++ b/makefiles/CompileDemos.gmk	Fri Nov 30 16:33:50 2012 -0800
@@ -166,9 +166,9 @@
 $(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
 $(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*))
 $(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*))
-$(eval $(call SetupDemo,jconsole-plugin,scripting,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,,,,*.xml *.txt,,,,Main-Class: \n))
+$(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n))
 $(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*))
-$(eval $(call SetupDemo,JTop,management,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,JTop,,,README*))
+$(eval $(call SetupDemo,JTop,management,,JTop,,,README*))
 $(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*))
 $(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*))
 $(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n))
--- a/makefiles/CompileLaunchers.gmk	Fri Nov 30 12:00:07 2012 -0800
+++ b/makefiles/CompileLaunchers.gmk	Fri Nov 30 16:33:50 2012 -0800
@@ -238,7 +238,7 @@
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
 
 $(eval $(call SetupLauncher,jarsigner,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarSigner.Main"$(COMMA) }'))
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }'))
 
 $(eval $(call SetupLauncher,javac,\
     -DEXPAND_CLASSPATH_WILDCARDS \
--- a/makefiles/CompileNativeLibraries.gmk	Fri Nov 30 12:00:07 2012 -0800
+++ b/makefiles/CompileNativeLibraries.gmk	Fri Nov 30 16:33:50 2012 -0800
@@ -104,7 +104,7 @@
 		LANG:=C,\
 		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
-		LDFLAGS:=-nostdlib -r -arch i386 -arch x86_64,\
+		LDFLAGS:=-nostdlib -r -arch x86_64,\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm))
 
 $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) : $(BUILD_LIBFDLIBM)
@@ -240,7 +240,7 @@
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
 		LDFLAGS_SUFFIX_posix:=-ljvm -lverify, \
-		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc,\
+		LDFLAGS_SUFFIX_solaris:=-lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc,\
 		LDFLAGS_SUFFIX_linux:=$(LIBDL) $(BUILD_LIBFDLIBM),\
 		LDFLAGS_SUFFIX_macosx:=-L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
                                          -framework CoreFoundation \
@@ -905,57 +905,34 @@
 
 ##########################################################################################
 
-BUILD_LIBZIP_FILES:=\
-        CRC32.c \
-	Adler32.c \
-	Deflater.c \
-	Inflater.c \
-	ZipFile.c \
-	zip_util.c
-
+BUILD_LIBZIP_EXCLUDES :=
 ifeq ($(USE_EXTERNAL_LIBZ),true)
-	LIBZ:=-lz
+    LIBZ := -lz
+    LIBZIP_EXCLUDES += zlib-1.2.5
 else
-BUILD_LIBZIP_FILES += \
-	compress.c \
-	deflate.c \
-	gzclose.c \
-	gzlib.c \
-	gzread.c \
-	gzwrite.c \
-	infback.c \
-	inffast.c \
-	inflate.c \
-	inftrees.c \
-	trees.c \
-	uncompr.c \
-	zadler32.c \
-	zcrc32.c \
-	zutil.c
-LIBZ_INCLUDE:=-I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+    ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
 endif
 
-BUILD_LIBZIP_REORDER:=
+BUILD_LIBZIP_REORDER :=
 ifeq ($(OPENJDK_TARGET_OS), solaris)
     ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-        BUILD_LIBZIP_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
+        BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
     endif
 endif
 
 ifeq ($(LIBZIP_CAN_USE_MMAP), true)
-     BUILD_LIBZIP_MMAP:=-DUSE_MMAP
+     BUILD_LIBZIP_MMAP := -DUSE_MMAP
 endif
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBZIP,\
                 LIBRARY:=zip,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip \
-                     $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
-		INCLUDE_FILES:=$(BUILD_LIBZIP_FILES), \
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
+		SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip,\
+		EXCLUDES:=$(LIBZIP_EXCLUDES),\
 		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(LIBZ_INCLUDE) \
+                        $(ZLIB_CPPFLAGS) \
 		        -I$(JDK_TOPDIR)/src/share/native/java/io \
                         -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io,\
 		CFLAGS_posix:=$(BUILD_LIBZIP_MMAP) -UDEBUG,\
@@ -1238,15 +1215,7 @@
     $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\
                 LIBRARY:=lcms,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms \
-		     $(JDK_TOPDIR)/src/share/native/sun/java2d/,\
-		INCLUDE_FILES:=cmscam02.c cmscgats.c cmscnvrt.c cmserr.c \
-			       cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c \
-			       cmsio1.c cmslut.c cmsmd5.c cmsmtrx.c \
-			       cmsnamed.c cmsopt.c cmshalf.c cmspack.c cmspcs.c \
-			       cmsplugin.c cmsps2.c cmssamp.c cmssm.c \
-			       cmstypes.c cmsvirt.c cmswtpnt.c cmsxform.c \
-			       LCMS.c,\
+                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms,\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(filter-out -xc99=%none,$(CFLAGS_JDKLIB)) \
@@ -2006,7 +1975,7 @@
 ##########################################################################################
 
 ifeq ($(OPENJDK_TARGET_OS_API),posix)
-  # TODO make this work on macosx
+
   ifneq ($(OPENJDK_TARGET_OS),macosx)
 
     SCTP_WERROR := -Werror
@@ -2034,7 +2003,6 @@
 		LDFLAGS_SUFFIX_posix:=-lnio -lnet,\
 		LDFLAGS_SUFFIX_solaris:=-lsocket -ljava -ljvm -lc,\
 		LDFLAGS_SUFFIX_macosx:=-ljava -ljvm,\
-		INCLUDE_FILES:=SctpNet.c SctpChannelImpl.c SctpServerChannelImpl.c,\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsctp))
 
     BUILD_LIBRARIES += $(BUILD_LIBSCTP)
@@ -2105,7 +2073,7 @@
 
 ifneq ($(USE_EXTERNAL_LIBZ),true)
 	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-	LIBJLI_CFLAGS += $(LIBZ_INCLUDE)
+	LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
 	BUILD_LIBJLI_FILES += \
 		inflate.c \
 		inftrees.c \
@@ -2416,8 +2384,14 @@
 	$(JDK_TOPDIR)/src/share/native/sun/awt/giflib \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen \
-        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
+	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
+else
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
+endif
+
 
 LIBSPLASHSCREEN_CFLAGS:=-DSPLASHSCREEN -DPNG_NO_MMX_CODE \
 	$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
@@ -2443,104 +2417,11 @@
 	LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
 endif
 
-LIBSPLASHSCREEN_FILES:=\
-	java_awt_SplashScreen.c \
-	splashscreen_gfx_impl.c \
-	splashscreen_gif.c \
-	splashscreen_impl.c \
-	splashscreen_jpeg.c \
-	splashscreen_png.c \
-	png.c \
-	pngerror.c \
-	pngget.c \
-	pngmem.c  \
-	pngpread.c \
-	pngread.c \
-	pngrio.c \
-	pngrtran.c \
-	pngrutil.c \
-	pngset.c \
-	pngtrans.c \
-	pngwio.c \
-	pngwrite.c \
-	pngwtran.c \
-	pngwutil.c \
-	dgif_lib.c \
-	gif_err.c \
-	gifalloc.c \
-	jcomapi.c \
-	jdapimin.c \
-	jdapistd.c \
-	jdcoefct.c \
-	jdcolor.c \
-	jddctmgr.c \
-	jdhuff.c \
-	jdinput.c \
-	jdmainct.c \
-	jdmarker.c \
-	jdmaster.c \
-	jdmerge.c \
-	jdphuff.c \
-	jdpostct.c \
-	jdsample.c \
-	jerror.c \
-	jidctflt.c \
-	jidctfst.c \
-	jidctint.c \
-	jidctred.c \
-	jmemmgr.c \
-	jmemnobs.c \
-	jquant1.c \
-	jquant2.c \
-	jutils.c \
-	jcapimin.c \
-	jcapistd.c \
-	jccoefct.c \
-	jccolor.c \
-	jcdctmgr.c \
-	jchuff.c \
-	jcinit.c \
-	jcmainct.c \
-	jcmarker.c \
-	jcmaster.c \
-	jcparam.c \
-	jcphuff.c \
-	jcprepct.c \
-	jcsample.c \
-	jctrans.c \
-	jdtrans.c \
-	jfdctflt.c \
-	jfdctfst.c \
-	jfdctint.c
-
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-LIBSPLASHSCREEN_FILES += splashscreen_sys.c
-else
-LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
-LIBSPLASHSCREEN_FILES += splashscreen_sys.m
-endif
-
 LIBSPLASHSCREEN_LDFLAGS_SUFFIX:=
 
 ifneq ($(USE_EXTERNAL_LIBZ),true)
 	LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-	LIBSPLASHSCREEN_CFLAGS += $(LIBZ_INCLUDE)
-	LIBSPLASHSCREEN_FILES += \
-		compress.c \
-		deflate.c \
-		gzclose.c \
-		gzlib.c \
-		gzread.c \
-		gzwrite.c \
-		infback.c \
-		inffast.c \
-		inflate.c \
-		inftrees.c \
-		trees.c \
-		uncompr.c \
-		zadler32.c \
-		zcrc32.c \
-		zutil.c
+	LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
@@ -2560,7 +2441,7 @@
 		LIBRARY:=splashscreen,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBSPLASHSCREEN_DIRS),\
-		INCLUDE_FILES:=$(LIBSPLASHSCREEN_FILES),\
+		EXCLUDE_FILES:=imageioJPEG.c jpegdecoder.c pngtest.c,\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB),\
@@ -2683,14 +2564,13 @@
 BUILD_LIBKRB5_NAME:=
 ifeq ($(OPENJDK_TARGET_OS), windows)
      BUILD_LIBKRB5_NAME:=w2k_lsa_auth
-     BUILD_LIBKRB5_FILES:=NativeCreds.c WindowsDirectory.c
      BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
      BUILD_LIBKRB5_LIBS:=advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
 			 gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
 			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
 else ifeq ($(OPENJDK_TARGET_OS), macosx)
      BUILD_LIBKRB5_NAME:=osxkrb5
-     BUILD_LIBKRB5_FILES:=nativeccache.c
+     BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5
      BUILD_LIBKRB5_LIBS:=-framework Kerberos
 endif
 
@@ -2698,9 +2578,7 @@
 $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5,\
 		LIBRARY:=$(BUILD_LIBKRB5_NAME),\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-                     $(BUILD_LIBKRB5_SRC) ,\
-		INCLUDE_FILES:=$(BUILD_LIBKRB5_FILES),\
+		SRC:=$(BUILD_LIBKRB5_SRC),\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
@@ -3071,18 +2949,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBAPPLESCRIPTENGINE_FILES:=\
-	AppleScriptEngine.m \
-        AppleScriptExecutionContext.m \
-        AS_NS_ConversionUtils.m \
-        NS_Java_ConversionUtils.m
-
 $(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE,\
 		LIBRARY:=AppleScriptEngine,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/apple/applescript,\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBAPPLESCRIPTENGINE_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
@@ -3107,18 +2978,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBOSXAPP_FILES:=\
-	NSApplicationAWT.m \
-	QueuingApplicationDelegate.m \
-	PropertiesUtilities.m \
-	ThreadUtilities.m
-
 $(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP,\
 		LIBRARY:=osxapp,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/sun/osxapp,\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBOSXAPP_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
@@ -3151,14 +3015,6 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBOSX_FILES:=\
-    Dispatch.m \
-    CFileManager.m \
-    KeystoreImpl.m \
-    JavaAppLauncher.m \
-    MacOSXPreferencesFile.m \
-    SCDynamicStoreConfig.m
-
 LIBOSX_DIRS:=\
   $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
   $(JDK_TOPDIR)/src/macosx/native/java/util \
@@ -3171,7 +3027,6 @@
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBOSX_DIRS),\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBOSX_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
                         $(foreach dir,$(LIBOSX_DIRS),-I$(dir)) \
@@ -3341,22 +3196,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBOSXUI_FILES:=\
-        AquaFileView.m \
-        AquaLookAndFeel.m \
-        AquaNativeResources.m \
-        JRSUIConstantSync.m \
-        JRSUIController.m \
-        JRSUIFocus.m \
-        ScreenPopupFactory.m \
-        ScreenMenu.m
-
 $(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI,\
 		LIBRARY:=osxui,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/com/apple/laf,\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBOSXUI_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
                         -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
--- a/makefiles/CreateJars.gmk	Fri Nov 30 12:00:07 2012 -0800
+++ b/makefiles/CreateJars.gmk	Fri Nov 30 16:33:50 2012 -0800
@@ -420,6 +420,23 @@
 JARS+=$(IMAGES_OUTPUTDIR)/lib/jsse.jar
 
 ##########################################################################################
+# Create manifest for security jars
+
+#
+# Include these extra attributes for now, should probably take out.
+#
+JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf
+$(JCE_MANIFEST): $(MAINMANIFEST)
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#"       \
+               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+               $(MAINMANIFEST) >> $@.tmp
+	$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
+	$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
+	$(MV) $@.tmp $@
+
+##########################################################################################
 
 SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
 
@@ -440,8 +457,11 @@
 	SUFFIXES:=.class,\
 	INCLUDES:=sun/security/pkcs11,\
 	JAR:=$(SUNPKCS11_JAR_DST), \
+        MANIFEST:=$(JCE_MANIFEST), \
 	SKIP_METAINF := true))
 
+    $(SUNPKCS11_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(SUNPKCS11_JAR_DST)
@@ -452,9 +472,9 @@
 
 ifndef OPENJDK
 
-SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
+    SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
 
-$(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
+    $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
@@ -462,13 +482,16 @@
 
 else
 
-$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
+    $(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:=sun/security/ec,\
 		JAR:=$(SUNEC_JAR_DST), \
+                MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
 
+    $(SUNEC_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(SUNEC_JAR_DST)
@@ -505,9 +528,11 @@
 		SUFFIXES:=.class,\
 		INCLUDES:= com/sun/crypto/provider,\
 		JAR:=$(SUNJCE_PROVIDER_JAR_DST), \
-		MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
-		EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
+                MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
+
+    $(SUNJCE_PROVIDER_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(SUNJCE_PROVIDER_JAR_DST)
@@ -516,9 +541,9 @@
 
 ifndef OPENJDK
 
-JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
+    JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
 
-$(JCE_JAR_DST) : $(JCE_JAR_SRC)
+    $(JCE_JAR_DST) : $(JCE_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
@@ -526,14 +551,16 @@
 
 else
 
-$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
+    $(eval $(call SetupArchive,BUILD_JCE_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:= javax/crypto sun/security/internal,\
 		JAR:=$(JCE_JAR_DST), \
-		MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
-		EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
+                MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
+
+    $(JCE_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(JCE_JAR_DST)
--- a/src/share/classes/sun/awt/im/InputContext.java	Fri Nov 30 12:00:07 2012 -0800
+++ b/src/share/classes/sun/awt/im/InputContext.java	Fri Nov 30 16:33:50 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, 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
@@ -786,7 +786,7 @@
     public void disableNativeIM() {
         InputMethod inputMethod = getInputMethod();
         if (inputMethod != null && inputMethod instanceof InputMethodAdapter) {
-            ((InputMethodAdapter)inputMethod).disableInputMethod();
+            ((InputMethodAdapter)inputMethod).stopListening();
         }
     }
 
--- a/src/share/classes/sun/awt/im/InputMethodAdapter.java	Fri Nov 30 12:00:07 2012 -0800
+++ b/src/share/classes/sun/awt/im/InputMethodAdapter.java	Fri Nov 30 16:33:50 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, 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
@@ -79,7 +79,6 @@
 
     /**
      * Informs the input method adapter not to listen to the native events.
-     * This method is called when a Java input method is active.
      */
     protected void stopListening() {
         // ignore - adapters can override if needed
--- a/src/solaris/classes/sun/awt/X11InputMethod.java	Fri Nov 30 12:00:07 2012 -0800
+++ b/src/solaris/classes/sun/awt/X11InputMethod.java	Fri Nov 30 16:33:50 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, 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
@@ -415,6 +415,10 @@
             setXICFocus(getPeer(lastXICFocussedComponent), false, isLastXICActive);
             lastXICFocussedComponent = null;
             isLastXICActive = false;
+
+            resetXIC();
+            needResetXICClient = null;
+            needResetXIC = false;
         }
     }
 
--- a/src/solaris/classes/sun/java2d/xr/XRRenderer.java	Fri Nov 30 12:00:07 2012 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRRenderer.java	Fri Nov 30 16:33:50 2012 -0800
@@ -27,7 +27,6 @@
 
 import java.awt.*;
 import java.awt.geom.*;
-
 import sun.awt.SunToolkit;
 import sun.java2d.SunGraphics2D;
 import sun.java2d.loops.*;
@@ -39,6 +38,9 @@
 import sun.java2d.pipe.ShapeSpanIterator;
 import sun.java2d.pipe.LoopPipe;
 
+import static sun.java2d.xr.XRUtils.clampToShort;
+import static sun.java2d.xr.XRUtils.clampToUShort;
+
 /**
  * XRender provides only accalerated rectangles. To emulate higher "order"
  *  geometry we have to pass everything else to DoPath/FillSpans.
@@ -70,17 +72,16 @@
 
     public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2) {
         Region compClip = sg2d.getCompClip();
-        int transX1 = x1 + sg2d.transX;
-        int transY1 = y1 + sg2d.transY;
-        int transX2 = x2 + sg2d.transX;
-        int transY2 = y2 + sg2d.transY;
+        int transX1 = Region.clipAdd(x1, sg2d.transX);
+        int transY1 = Region.clipAdd(y1, sg2d.transY);
+        int transX2 = Region.clipAdd(x2, sg2d.transX);
+        int transY2 = Region.clipAdd(y2, sg2d.transY);
 
         // Non clipped fast path
         if (compClip.contains(transX1, transY1)
                 && compClip.contains(transX2, transY2)) {
+            SunToolkit.awtLock();
             try {
-                SunToolkit.awtLock();
-
                 validateSurface(sg2d);
                 tileManager.addLine(transX1, transY1, transX2, transY2);
                 tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
@@ -115,20 +116,40 @@
         draw(sg2d, new Polygon(xpoints, ypoints, npoints));
     }
 
-    public synchronized void fillRect(SunGraphics2D sg2d,
-                                      int x, int y, int width, int height) {
+    public void fillRect(SunGraphics2D sg2d, int x, int y, int width, int height) {
+        x = Region.clipAdd(x, sg2d.transX);
+        y = Region.clipAdd(y, sg2d.transY);
+
+        /*
+         * Limit x/y to signed short, width/height to unsigned short,
+         * to match the X11 coordinate limits for rectangles.
+         * Correct width/height in case x/y have been modified by clipping.
+         */
+        if (x > Short.MAX_VALUE || y > Short.MAX_VALUE) {
+            return;
+        }
+
+        int x2 = Region.dimAdd(x, width);
+        int y2 = Region.dimAdd(y, height);
+
+        if (x2 < Short.MIN_VALUE || y2 < Short.MIN_VALUE) {
+            return;
+        }
+
+        x = clampToShort(x);
+        y = clampToShort(y);
+        width = clampToUShort(x2 - x);
+        height = clampToUShort(y2 - y);
+
+        if (width == 0 || height == 0) {
+            return;
+        }
+
         SunToolkit.awtLock();
         try {
             validateSurface(sg2d);
-
-            XRSurfaceData xrsd = (XRSurfaceData) sg2d.surfaceData;
-
-            x += sg2d.transform.getTranslateX();
-            y += sg2d.transform.getTranslateY();
-
             tileManager.addRect(x, y, width, height);
-            tileManager.fillMask(xrsd);
-
+            tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
         } finally {
             SunToolkit.awtUnlock();
         }
--- a/src/solaris/classes/sun/java2d/xr/XRUtils.java	Fri Nov 30 12:00:07 2012 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRUtils.java	Fri Nov 30 16:33:50 2012 -0800
@@ -255,7 +255,7 @@
                            : (x < Short.MIN_VALUE ? Short.MIN_VALUE : x));
     }
 
-    public static short clampToUShort(int x) {
-        return (short) (x > 65535 ? 65535 : (x < 0) ? 0 : x);
+    public static int clampToUShort(int x) {
+        return (x > 65535 ? 65535 : (x < 0) ? 0 : x);
     }
 }
--- a/test/java/beans/EventHandler/Test6277266.java	Fri Nov 30 12:00:07 2012 -0800
+++ b/test/java/beans/EventHandler/Test6277266.java	Fri Nov 30 16:33:50 2012 -0800
@@ -51,9 +51,11 @@
                     )
             );
             throw new Error("SecurityException expected");
+        } catch (SecurityException exception) {
+            return; // expected security exception in JDK 7
         } catch (InvocationTargetException exception) {
             if (exception.getCause() instanceof SecurityException){
-                return; // expected security exception
+                return; // expected security exception in JDK 8
             }
             throw new Error("unexpected exception", exception);
         } catch (InterruptedException exception) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/StyledEditorKit/4506788/bug4506788.html	Fri Nov 30 16:33:50 2012 -0800
@@ -0,0 +1,28 @@
+<!--
+ 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.
+-->
+
+<Html>
+<Body>
+<APPLET  code="bug4506788.class" WIDTH = 600 HEIGHT = 400></APPLET>
+</Body>
+</Html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/StyledEditorKit/4506788/bug4506788.java	Fri Nov 30 16:33:50 2012 -0800
@@ -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 4506788 7147408
+ @summary  Tests if cursor gets stuck after insertion a character
+ @author Denis Sharypov
+ @run applet bug4506788.html
+ */
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.reflect.InvocationTargetException;
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import sun.awt.SunToolkit;
+
+public class bug4506788 extends JApplet {
+
+    private volatile boolean passed = false;
+    private JEditorPane jep;
+    private SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+    @Override
+    public void init() {
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    createAndShowGUI();
+                }
+            });
+        } catch (InterruptedException | InvocationTargetException ex) {
+            ex.printStackTrace();
+            throw new RuntimeException("FAILED: SwingUtilities.invokeAndWait method failed then creating and showing GUI");
+        }
+    }
+
+    @Override
+    public void start() {
+        Robot robot;
+        try {
+            robot = new Robot();
+        } catch (AWTException e) {
+            throw new RuntimeException("Robot could not be created");
+        }
+
+        toolkit.realSync();
+
+        Point p;
+        try {
+            p = getJEPLocOnScreen();
+        } catch (Exception e) {
+            throw new RuntimeException("Could not get JEditorPane location on screen");
+        }
+
+        robot.setAutoDelay(50);
+        robot.mouseMove(p.x, p.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        robot.keyPress(KeyEvent.VK_RIGHT);
+        robot.keyRelease(KeyEvent.VK_RIGHT);
+        robot.keyPress(KeyEvent.VK_X);
+        robot.keyRelease(KeyEvent.VK_X);
+        robot.keyPress(KeyEvent.VK_RIGHT);
+        robot.keyRelease(KeyEvent.VK_RIGHT);
+
+        toolkit.realSync();
+
+        if (!passed) {
+            throw new RuntimeException("Test failed.");
+        }
+    }
+
+    private Point getJEPLocOnScreen() throws Exception {
+
+        final Point[] result = new Point[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                result[0] = jep.getLocationOnScreen();
+            }
+        });
+
+        return result[0];
+    }
+
+    private void createAndShowGUI() {
+        jep = new JEditorPane();
+        String text = "abc";
+        JFrame f = new JFrame();
+        jep.setEditorKit(new StyledEditorKit());
+        jep.setText(text);
+        jep.addCaretListener(new CaretListener() {
+            @Override
+            public void caretUpdate(CaretEvent e) {
+                passed = (e.getDot() == 3);
+            }
+        });
+
+        DefaultStyledDocument doc = (DefaultStyledDocument) jep.getDocument();
+        MutableAttributeSet atr = new SimpleAttributeSet();
+        StyleConstants.setBold(atr, true);
+        doc.setCharacterAttributes(1, 1, atr, false);
+
+        f.getContentPane().add(jep);
+        f.setSize(100, 100);
+        f.setVisible(true);
+    }
+}