ports/java/openjdk7/files/patch-set
Greg Lewis 53c61a4f9d . Update to 7u11.
Security:	CVE-2013-0422
2013-01-18 04:28:38 +00:00

32336 lines
1.1 MiB
Raw Blame History

--- .hgtags 2012-08-10 09:07:00.000000000 -0700
+++ .hgtags 2013-01-16 08:57:46.000000000 -0800
@@ -123,6 +123,7 @@
2d38c2a79c144c30cd04d143d83ee7ec6af40771 jdk7-b146
3ac30b3852876ccad6bd61697b5f9efa91ca7bc6 jdk7u1-b01
d91364304d7c4ecd34caffdba2b840aeb0d10b51 jdk7-b147
+00b623147f23ef8a92a25c4c28ef8681dc1d1b52 7u0
34451dc0580d5c95d97b95a564e6198f36545d68 jdk7u1-b02
bf735d852f79bdbb3373c777eec3ff27e035e7ba jdk7u1-b03
f66a2bada589f4157789e6f66472954d2f1c114e jdk7u1-b04
@@ -197,5 +198,27 @@
29f6fb1833eb2a696b95e8985126f2d70f511a82 jdk7u6-b21
31cdab09d719fe60876c7f3a472386c1455d93e2 jdk7u6-b22
d1c709f1196a73d1df10d04a221b10e30fd2eb48 jdk7u6-b23
-1ab3edf5061fdde3a6f6510373a92444445af710 jdk7u8-b01
-d7a94c8cbbbfadbd9e2f3e4737eb7deb572dedc9 jdk7u8-b02
+e4def733cc8c58e83b7cefa7edd89a3e2b793520 jdk7u6-b24
+f5f546dba006778854e7a81141fc1b44acd257a4 jdk7u6-b30
+43775eae8df6c874fb3631c86009505cf3821b1f jdk7u7-b10
+a380c75873bfb578e605d4362edb18c08698cc3e jdk7u7-b30
+d7f2b3949f9c9ff1115ea61c496d3cd4c62e2759 jdk7u7-b11
+82c51e6a3bea0dd8feb1bd3033e847dbdc5d9f99 jdk7u7-b31
+5ca487420f9c2cf6d39acf1e842d13bf8ef0ca07 jdk7u7-b01
+dbfa9c57853c2dd9cd4e4a139d83b519573d8031 jdk7u7-b02
+bae912f95f2aa1d22dbc0ff62816b71861965cd6 jdk7u9-b03
+0000000000000000000000000000000000000000 jdk7u7-b01
+5ca487420f9c2cf6d39acf1e842d13bf8ef0ca07 jdk7u9-b01
+0000000000000000000000000000000000000000 jdk7u7-b02
+dbfa9c57853c2dd9cd4e4a139d83b519573d8031 jdk7u9-b02
+3159fbe20e2d9501007aae8ca3db58978d754561 jdk7u9-b04
+d9c8fa0606fdfff242175ce904c525a6fc40d6e5 jdk7u9-b05
+d934ce27cddbc9ba7236791f177872491204a41e jdk7u10-b10
+5a5ee5b70d563d5817b6ec023d275e9b17256459 jdk7u10-b11
+48b58c2d665c9a1d3598b981e46f87f9bcdd5b46 jdk7u10-b12
+1b9618b61e29c09b92f83956c613acf36ccabb38 jdk7u10-b13
+c50e1a044e4fcc1a94b79b42f3629beb07624010 jdk7u10-b14
+137087461db28f935493940658f31be760098f00 jdk7u10-b15
+c8a37a49fc90ae31b864544d6d4a9f6137d4995d jdk7u10-b16
+494e838439db7f0f4e36f7dcfeba06d2bef78c8d jdk7u10-b17
+dce9058d2151e6b5c84898c13cfd1521a627a296 jdk7u10-b18
--- corba/.hgtags 2012-08-10 09:09:50.000000000 -0700
+++ corba/.hgtags 2013-01-16 08:57:47.000000000 -0800
@@ -123,6 +123,7 @@
770227a4087e4e401fe87ccd19738440111c3948 jdk7-b146
36f0efbc66ef8ace3cca8aa8d0c88f3334080f8a jdk7u1-b01
73323cb3396260d93e0ab731fd2d431096ceed0f jdk7-b147
+578c4d2c534cc761f5f5cc0d8360471bb8d5f94f 7u0
9515a2d034b4727c11aeea36354a549fbc469c4f jdk7u1-b02
dd71cb354c573c1addcda269a7dd9144bfce9587 jdk7u1-b03
eaee830124aa453627591d8f9eccb39d7e040876 jdk7u1-b04
@@ -197,5 +198,27 @@
353c15c4bc371f2f8258344c988d1403477cc140 jdk7u6-b21
793b80c0316fcafa18668bced26acb41af3be07d jdk7u6-b22
2a8376123fbb81bc4b2f643ff7cfaf7f87b21c35 jdk7u6-b23
-353c15c4bc371f2f8258344c988d1403477cc140 jdk7u8-b01
-d17ca8d088f7cc0dd42230472f534c8d1e415bcb jdk7u8-b02
+02512f61591f55d84458d1ea4ce84eecb7324f89 jdk7u6-b24
+8b20875b3faa01ef56331045de88747df278eaeb jdk7u6-b30
+d7fe6c13adf9e06d98c061449d171bc06c2ba0a3 jdk7u7-b10
+496baf62d0550c704505b0ff6f390279f6a569e0 jdk7u7-b30
+e57e4274a3575f278115cc8ef03c5bdf3c43a7ed jdk7u7-b11
+06cbc4af754ea8f2e3b7d0b1701d1a69ce9d5075 jdk7u7-b31
+8737f43e092ea52dd85dcf164736eea3b9b364e6 jdk7u7-b01
+ec602836c4e173927911673d253bb8baa1e3d170 jdk7u7-b02
+a163e56c6679d10dc64ec48f35e67c3a5942afba jdk7u9-b03
+0000000000000000000000000000000000000000 jdk7u7-b01
+8737f43e092ea52dd85dcf164736eea3b9b364e6 jdk7u9-b01
+0000000000000000000000000000000000000000 jdk7u7-b02
+ec602836c4e173927911673d253bb8baa1e3d170 jdk7u9-b02
+268470f3f0d0d7e9b04c579c551571097f0b0305 jdk7u9-b04
+a5dced409c4b7f940db80846f6efabac74523b0e jdk7u9-b05
+ba68d4ad02c465a36344a34eba34491466ec17d4 jdk7u10-b10
+a738921b001a92381bf355a2bb1ecd742ecee352 jdk7u10-b11
+e52708ecb2c32b366c251e4083fbb37e22a425c3 jdk7u10-b12
+5cd2ef642635a7d0a79a7c28343b2ddfd0e6aa4a jdk7u10-b13
+2d53a2c7e4b989ceba356abfc8dc2129269a134f jdk7u10-b14
+c488cd628db35eb09d8ef9e10ffd00c9a93d0778 jdk7u10-b15
+64f09d7549d304fbfd3c29b4f148bf44e8e3e979 jdk7u10-b16
+57c3355153d1624fd98618097c1a82ab3ffc66f8 jdk7u10-b17
+f2a347637a55fa4de9542a8dcab72ad6fac44d2b jdk7u10-b18
--- get_source.sh 2012-08-10 09:07:01.000000000 -0700
+++ get_source.sh 2013-01-15 23:01:23.000000000 -0800
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 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
@@ -26,7 +26,7 @@
#
# Get clones of all nested repositories
-sh ./make/scripts/hgforest.sh clone $*
+sh ./make/scripts/hgforest.sh clone
# Update all existing repositories to the latest sources
sh ./make/scripts/hgforest.sh pull -u
--- hotspot/.hgtags 2012-08-10 09:20:36.000000000 -0700
+++ hotspot/.hgtags 2013-01-16 09:04:00.000000000 -0800
@@ -182,6 +182,7 @@
38fa55e5e79232d48f1bb8cf27d88bc094c9375a hs21-b16
81d815b05abb564aa1f4100ae13491c949b9a07e jdk7-b147
81d815b05abb564aa1f4100ae13491c949b9a07e hs21-b17
+f1a18ada5853af49fce54d43dd5a5b67dc291470 7u0
9b0ca45cd756d538c4c30afab280a91868eee1a5 jdk7u2-b01
0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01
31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02
@@ -318,5 +319,27 @@
02a6c89432d724119565f9ba25672829b136fc5f jdk7u6-b21
a79d86eef6ac995a1fc35554f082f3a61abe9ae0 jdk7u6-b22
df57f6208cb76b4e8d1a0bd0eea3d2ad577cb79b jdk7u6-b23
-02a6c89432d724119565f9ba25672829b136fc5f jdk7u8-b01
-528502f930967f70c320472a002418f1e38029e0 jdk7u8-b02
+b03c2687fb16514652e79261ad68d2c601dcee62 jdk7u6-b24
+cffde29ea7cc8647f17002a4d0e94065dcd82839 jdk7u6-b30
+f7933fecea9aa494e4032e17ff07e5fcec4b5961 jdk7u7-b10
+eeef33dc4b40f9ba50c4c9b1ac61b30f0f2523bf jdk7u7-b30
+f1551c70c7f598b7049bcc33e530fc738a81c7a4 jdk7u7-b11
+6b9db7216dd4b7846faf372f19566a418c8e391f jdk7u7-b31
+b66bb0e3224ff15259361a5b501bf8fa6b346113 jdk7u7-b01
+ca6943c94e6075fc28353d52ac6ea52c80aef9bb jdk7u7-b02
+e043d96d767d8ba4d74d53c477af8e07b78b6128 jdk7u9-b03
+0000000000000000000000000000000000000000 jdk7u7-b01
+b66bb0e3224ff15259361a5b501bf8fa6b346113 jdk7u9-b01
+0000000000000000000000000000000000000000 jdk7u7-b02
+ca6943c94e6075fc28353d52ac6ea52c80aef9bb jdk7u9-b02
+ed42837374ac730ddaf2fd28814017c665634a8b jdk7u9-b04
+da4aa289ac100017f850ed4d492e8054db6a1e28 jdk7u9-b05
+d2e25680db9d4209b3f0f51e5c848284cedea508 jdk7u10-b10
+d37fd995683ab5bc2d941648ce7bf8bd194732f2 jdk7u10-b11
+f26f3d92e6d9ef7842b2d785f92439dbb15e670e jdk7u10-b12
+58881c615a5179bcea69148d0b3eb47a1f1a7de8 jdk7u10-b13
+cdbf4d442b56ece8ac521c65b59087682e5ae918 jdk7u10-b14
+63e8b49b329e4b50547b13f5c732665bed535732 jdk7u10-b15
+1cb34ef50bddc334c8538cf85d8612383debc74f jdk7u10-b16
+5c154a591de987d515f5b102a988bcf96d439f53 jdk7u10-b17
+78c7e1b4a006342230e04fbb73f637834207abef jdk7u10-b18
--- hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2012-08-10 09:21:14.000000000 -0700
+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2013-01-16 09:04:00.000000000 -0800
@@ -33,6 +33,7 @@
import sun.jvm.hotspot.debugger.remote.*;
import sun.jvm.hotspot.debugger.windbg.*;
import sun.jvm.hotspot.debugger.linux.*;
+import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.runtime.*;
--- hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2012-08-10 09:21:38.000000000 -0700
+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2013-01-16 09:04:00.000000000 -0800
@@ -35,6 +35,7 @@
import sun.jvm.hotspot.debugger.windbg.*;
import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.sparc.*;
+import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.debugger.remote.*;
import sun.jvm.hotspot.livejvm.*;
import sun.jvm.hotspot.memory.*;
--- hotspot/make/bsd/Makefile 2012-08-10 09:22:55.000000000 -0700
+++ hotspot/make/bsd/Makefile 2013-01-16 09:04:00.000000000 -0800
@@ -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
@@ -211,6 +211,8 @@
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
+
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
#-------------------------------------------------------------------------------
@@ -337,9 +339,11 @@
# Doc target. This is the same for all build options.
# Hence create a docs directory beside ...$(ARCH)_[...]
+# We specify 'BUILD_FLAVOR=product' so that the proper
+# ENABLE_FULL_DEBUG_SYMBOLS value is used.
docs: checks
$(QUIETLY) mkdir -p $(SUBDIR_DOCS)
- $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs
+ $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs
# Synonyms for win32-like targets.
compiler2: jvmg product
--- hotspot/make/bsd/makefiles/buildtree.make 2012-08-10 09:22:57.000000000 -0700
+++ hotspot/make/bsd/makefiles/buildtree.make 2013-01-16 09:04:00.000000000 -0800
@@ -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
@@ -242,6 +242,16 @@
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
[ -n "$(CFLAGS_BROWSE)" ] && \
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
+ [ -n "$(ENABLE_FULL_DEBUG_SYMBOLS)" ] && \
+ echo && echo "ENABLE_FULL_DEBUG_SYMBOLS = $(ENABLE_FULL_DEBUG_SYMBOLS)"; \
+ [ -n "$(OBJCOPY)" ] && \
+ echo && echo "OBJCOPY = $(OBJCOPY)"; \
+ [ -n "$(STRIP_POLICY)" ] && \
+ echo && echo "STRIP_POLICY = $(STRIP_POLICY)"; \
+ [ -n "$(ZIP_DEBUGINFO_FILES)" ] && \
+ echo && echo "ZIP_DEBUGINFO_FILES = $(ZIP_DEBUGINFO_FILES)"; \
+ [ -n "$(ZIPEXE)" ] && \
+ echo && echo "ZIPEXE = $(ZIPEXE)"; \
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
echo && \
echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \
@@ -359,7 +369,7 @@
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
echo "JDK=${JAVA_HOME}"; \
- ) > $@
+ ) > $@
.dbxrc: $(BUILDTREE_MAKE)
@echo Creating $@ ...
--- hotspot/make/bsd/makefiles/defs.make 2012-08-10 09:22:57.000000000 -0700
+++ hotspot/make/bsd/makefiles/defs.make 2013-01-16 09:04:00.000000000 -0800
@@ -86,7 +86,7 @@
VM_PLATFORM = bsd_i486
HS_ARCH = x86
# We have to reset ARCH to i386 since SRCARCH relies on it
- ARCH = i386
+ ARCH = i386
endif
endif
@@ -124,6 +124,107 @@
HS_ARCH = ppc
endif
+# determine if HotSpot is being built in JDK6 or earlier version
+JDK6_OR_EARLIER=0
+ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
+ # if the longer variable names (newer build style) are set, then check those
+ ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
+ JDK6_OR_EARLIER=1
+ endif
+else
+ # the longer variables aren't set so check the shorter variable names
+ ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
+ JDK6_OR_EARLIER=1
+ endif
+endif
+
+ifeq ($(JDK6_OR_EARLIER),0)
+ # Full Debug Symbols is supported on JDK7 or newer.
+ # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
+ # builds is enabled with debug info files ZIP'ed to save space. For
+ # BUILD_FLAVOR != product 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 BUILD_FLAVOR == product 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 BUILD_FLAVOR !=
+ # product 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 BUILD_FLAVOR != product
+ # build.
+
+ ifeq ($(BUILD_FLAVOR), product)
+ 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)")
+ # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+
+ 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
+ OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+ ifneq ($(ALT_OBJCOPY),)
+ _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+ OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+ endif
+ endif
+ else
+ OBJCOPY=
+ endif
+
+ ifeq ($(OBJCOPY),)
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+ ENABLE_FULL_DEBUG_SYMBOLS=0
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+ 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)")
+
+ ZIP_DEBUGINFO_FILES ?= 1
+
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
+ endif
+endif
+
JDK_INCLUDE_SUBDIR=bsd
# Library suffix
@@ -141,18 +242,39 @@
# client and server subdirectories have symbolic links to ../libjsig.so
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
+ else
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
+ endif
+endif
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
ifndef BUILD_CLIENT_ONLY
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
+ else
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
+ endif
+ endif
endif
ifneq ($(ZERO_BUILD), true)
ifeq ($(ARCH_DATA_MODEL), 32)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
+ else
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
+ endif
+ endif
endif
endif
@@ -164,6 +286,15 @@
$(EXPORT_LIB_DIR)/sa-jdi.jar
ADD_SA_BINARIES/universal = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
$(EXPORT_LIB_DIR)/sa-jdi.jar
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+ ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+ else
+ ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+ ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+ endif
+endif
ADD_SA_BINARIES/ppc =
ADD_SA_BINARIES/ia64 =
ADD_SA_BINARIES/arm =
--- hotspot/make/bsd/makefiles/gcc.make 2012-08-10 09:22:57.000000000 -0700
+++ hotspot/make/bsd/makefiles/gcc.make 2013-01-16 09:04:00.000000000 -0800
@@ -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
@@ -124,7 +124,11 @@
ARCHFLAG/ia64 =
ARCHFLAG/sparc = -m32 -mcpu=v9
ARCHFLAG/sparcv9 = -m64 -mcpu=v9
+ARCHFLAG/arm = -fsigned-char
ARCHFLAG/zero = $(ZERO_ARCHFLAG)
+ifndef E500V2
+ARCHFLAG/ppc = -mcpu=powerpc
+endif
# Darwin-specific build flags
ifeq ($(OS_VENDOR), Darwin)
@@ -285,6 +289,26 @@
DEBUG_CFLAGS += -gstabs
endif
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ FASTDEBUG_CFLAGS/ia64 = -g
+ FASTDEBUG_CFLAGS/amd64 = -g
+ FASTDEBUG_CFLAGS/arm = -g
+ FASTDEBUG_CFLAGS/ppc = -g
+ FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
+ ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
+ FASTDEBUG_CFLAGS += -gstabs
+ endif
+
+ OPT_CFLAGS/ia64 = -g
+ OPT_CFLAGS/amd64 = -g
+ OPT_CFLAGS/arm = -g
+ OPT_CFLAGS/ppc = -g
+ OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
+ ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
+ OPT_CFLAGS += -gstabs
+ endif
+endif
+
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_CFLAGS = -g
@@ -302,3 +326,9 @@
ifdef MINIMIZE_RAM_USAGE
CFLAGS += -DMINIMIZE_RAM_USAGE
endif
+
+ifdef CROSS_COMPILE_ARCH
+ STRIP = $(ALT_COMPILER_PATH)/strip
+else
+ STRIP = strip
+endif
--- hotspot/make/bsd/makefiles/jsig.make 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/jsig.make 2013-01-16 09:04:00.000000000 -0800
@@ -36,9 +36,16 @@
LIBJSIG_G = lib$(JSIG_G).so
endif
+LIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo
+LIBJSIG_DIZ = lib$(JSIG).diz
+LIBJSIG_G_DEBUGINFO = lib$(JSIG_G).debuginfo
+LIBJSIG_G_DIZ = lib$(JSIG_G).diz
+
JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm
DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG)
+DEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO)
+DEST_JSIG_DIZ = $(JDK_LIBDIR)/$(LIBJSIG_DIZ)
LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
@@ -57,11 +64,33 @@
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
- $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $<
+ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $<
$(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); }
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
+ ifeq ($(STRIP_POLICY),all_strip)
+ $(QUIETLY) $(STRIP) $@
+ else
+ ifeq ($(STRIP_POLICY),min_strip)
+ $(QUIETLY) $(STRIP) -S $@
+ # implied else here is no stripping at all
+ endif
+ endif
+ [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); }
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO)
+ $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO)
+ [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); }
+ endif
+endif
install_jsig: $(LIBJSIG)
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
+ $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
+ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
+ $(QUIETLY) test -f $(LIBJSIG_DIZ) && \
+ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
.PHONY: install_jsig
--- hotspot/make/bsd/makefiles/launcher.make 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/launcher.make 2013-01-16 09:04:00.000000000 -0800
@@ -50,7 +50,7 @@
LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
else
LAUNCHER.o = launcher.o
- LFLAGS_LAUNCHER += -L`pwd`
+ LFLAGS_LAUNCHER += -L`pwd`
# The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a
# freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting
--- hotspot/make/bsd/makefiles/mapfile-vers-debug 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/mapfile-vers-debug 2013-01-16 09:04:00.000000000 -0800
@@ -221,6 +221,7 @@
JVM_SetArrayElement;
JVM_SetClassSigners;
JVM_SetLength;
+ JVM_SetNativeThreadName;
JVM_SetPrimitiveArrayElement;
JVM_SetProtectionDomain;
JVM_SetSockOpt;
@@ -244,24 +245,6 @@
JVM_Yield;
JVM_handle_bsd_signal;
- # Old reflection routines
- # These do not need to be present in the product build in JDK 1.4
- # but their code has not been removed yet because there will not
- # be a substantial code savings until JVM_InvokeMethod and
- # JVM_NewInstanceFromConstructor can also be removed; see
- # reflectionCompat.hpp.
- JVM_GetClassConstructor;
- JVM_GetClassConstructors;
- JVM_GetClassField;
- JVM_GetClassFields;
- JVM_GetClassMethod;
- JVM_GetClassMethods;
- JVM_GetField;
- JVM_GetPrimitiveField;
- JVM_NewInstance;
- JVM_SetField;
- JVM_SetPrimitiveField;
-
# debug JVM
JVM_AccessVMBooleanFlag;
JVM_AccessVMIntFlag;
--- hotspot/make/bsd/makefiles/mapfile-vers-product 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/mapfile-vers-product 2013-01-16 09:04:00.000000000 -0800
@@ -221,6 +221,7 @@
JVM_SetArrayElement;
JVM_SetClassSigners;
JVM_SetLength;
+ JVM_SetNativeThreadName;
JVM_SetPrimitiveArrayElement;
JVM_SetProtectionDomain;
JVM_SetSockOpt;
@@ -244,24 +245,6 @@
JVM_Yield;
JVM_handle_bsd_signal;
- # Old reflection routines
- # These do not need to be present in the product build in JDK 1.4
- # but their code has not been removed yet because there will not
- # be a substantial code savings until JVM_InvokeMethod and
- # JVM_NewInstanceFromConstructor can also be removed; see
- # reflectionCompat.hpp.
- JVM_GetClassConstructor;
- JVM_GetClassConstructors;
- JVM_GetClassField;
- JVM_GetClassFields;
- JVM_GetClassMethod;
- JVM_GetClassMethods;
- JVM_GetField;
- JVM_GetPrimitiveField;
- JVM_NewInstance;
- JVM_SetField;
- JVM_SetPrimitiveField;
-
# miscellaneous functions
jio_fprintf;
jio_printf;
--- hotspot/make/bsd/makefiles/ppc.make 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/ppc.make 2013-01-16 09:04:00.000000000 -0800
@@ -28,3 +28,6 @@
# Must also specify if CPU is big endian
CFLAGS += -DVM_BIG_ENDIAN
+ifdef E500V2
+ASFLAGS += -Wa,-mspe -Wa,--defsym -Wa,E500V2=1
+endif
--- hotspot/make/bsd/makefiles/saproc.make 2012-08-10 09:22:59.000000000 -0700
+++ hotspot/make/bsd/makefiles/saproc.make 2013-01-16 09:04:00.000000000 -0800
@@ -36,6 +36,11 @@
LIBSAPROC_G = lib$(SAPROC_G).so
endif
+LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo
+LIBSAPROC_DIZ = lib$(SAPROC).diz
+LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo
+LIBSAPROC_G_DIZ = lib$(SAPROC_G).diz
+
AGENT_DIR = $(GAMMADIR)/agent
SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)
@@ -66,7 +71,9 @@
SAMAPFILE = $(SASRCDIR)/mapfile
-DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
+DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
+DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO)
+DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ)
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
@@ -114,10 +121,32 @@
-o $@ \
$(SALIBS)
$(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
+ ifeq ($(STRIP_POLICY),all_strip)
+ $(QUIETLY) $(STRIP) $@
+ else
+ ifeq ($(STRIP_POLICY),min_strip)
+ $(QUIETLY) $(STRIP) -S $@
+ # implied else here is no stripping at all
+ endif
+ endif
+ [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); }
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO)
+ $(RM) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO)
+ [ -f $(LIBSAPROC_G_DIZ) ] || { ln -s $(LIBSAPROC_DIZ) $(LIBSAPROC_G_DIZ); }
+ endif
+endif
install_saproc: $(BUILDLIBSAPROC)
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
+ test -f $(LIBSAPROC_DEBUGINFO) && \
+ cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
+ test -f $(LIBSAPROC_DIZ) && \
+ cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
fi
--- hotspot/make/bsd/makefiles/vm.make 2012-08-10 09:22:59.000000000 -0700
+++ hotspot/make/bsd/makefiles/vm.make 2013-01-16 09:04:00.000000000 -0800
@@ -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
@@ -60,10 +60,16 @@
# The order is important for the precompiled headers to work.
INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
-ifeq (${VERSION}, debug)
+# SYMFLAG is used by {jsig,saproc}.make
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ # always build with debug info when we can create .debuginfo files
SYMFLAG = -g
else
- SYMFLAG =
+ ifeq (${VERSION}, debug)
+ SYMFLAG = -g
+ else
+ SYMFLAG =
+ endif
endif
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
@@ -100,9 +106,11 @@
CXXFLAGS += -DDEFAULT_LIBPATH="\"$(DEFAULT_LIBPATH)\""
endif
-ifndef JAVASE_EMBEDDED
+ifndef JAVASE_EMBEDDED
+ifneq (${ARCH},arm)
CFLAGS += -DINCLUDE_TRACE
endif
+endif
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS += $(CFLAGS_WARN/BYFILE)
@@ -145,6 +153,11 @@
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
endif
+LIBJVM_DEBUGINFO = lib$(JVM).debuginfo
+LIBJVM_DIZ = lib$(JVM).diz
+LIBJVM_G_DEBUGINFO = lib$(JVM)$(G_SUFFIX).debuginfo
+LIBJVM_G_DIZ = lib$(JVM)$(G_SUFFIX).diz
+
SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
SOURCE_PATHS=\
@@ -155,11 +168,13 @@
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
-ifndef JAVASE_EMBEDDED
+ifndef JAVASE_EMBEDDED
+ifneq (${ARCH},arm)
SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
find $(HS_ALT_SRC)/share/vm/jfr -type d; \
fi)
endif
+endif
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
CORE_PATHS+=$(GENERATED)/jvmtifiles
@@ -316,11 +331,38 @@
rm -f $@.1; ln -s $@ $@.1; \
[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
}
+ifeq ($(CROSS_COMPILE_ARCH),)
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
+ ifeq ($(STRIP_POLICY),all_strip)
+ $(QUIETLY) $(STRIP) $@
+ else
+ ifeq ($(STRIP_POLICY),min_strip)
+ $(QUIETLY) $(STRIP) -S $@
+ # implied else here is no stripping at all
+ endif
+ endif
+ $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
+ $(RM) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
+ [ -f $(LIBJVM_G_DIZ) ] || { ln -s $(LIBJVM_DIZ) $(LIBJVM_G_DIZ); }
+ endif
+ endif
+endif
-DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
+DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR)
+DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM)
+DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
+DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
install_jvm: $(LIBJVM)
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
+ $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
+ cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
+ $(QUIETLY) test -f $(LIBJVM_DIZ) && \
+ cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
#----------------------------------------------------------------------
--- hotspot/make/hotspot_version 2012-08-10 09:23:01.000000000 -0700
+++ hotspot/make/hotspot_version 2013-01-16 08:57:49.000000000 -0800
@@ -34,8 +34,8 @@
HOTSPOT_VM_COPYRIGHT=Copyright 2012
HS_MAJOR_VER=23
-HS_MINOR_VER=2
-HS_BUILD_NUMBER=09
+HS_MINOR_VER=6
+HS_BUILD_NUMBER=04
JDK_MAJOR_VER=1
JDK_MINOR_VER=7
--- hotspot/make/solaris/makefiles/defs.make 2012-08-10 09:23:12.000000000 -0700
+++ hotspot/make/solaris/makefiles/defs.make 2013-01-16 09:04:00.000000000 -0800
@@ -194,8 +194,8 @@
endif
ifeq ($(ARCH_DATA_MODEL), 32)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)
--- hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2012-08-10 09:23:56.000000000 -0700
+++ hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2013-01-16 09:04:00.000000000 -0800
@@ -71,7 +71,11 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
+#ifdef _ALLBSD_SOURCE
+define_pd_global(bool, UseMembar, true);
+#else
define_pd_global(bool, UseMembar, false);
+#endif
// GC Ergo Flags
define_pd_global(intx, CMSYoungGenPerWorker, 16*M); // default max size of CMS young gen, per GC worker thread
--- hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp 2012-08-10 09:23:58.000000000 -0700
+++ hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp 2013-01-16 08:57:49.000000000 -0800
@@ -698,6 +698,17 @@
if (arg_slots.is_constant() && arg_slots.as_constant() == 0)
return;
+ // We have to insert at least one word, so bang the stack.
+ if (UseStackBanging) {
+ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register
+ __ mov(G3_method_handle, temp_reg);
+ int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0);
+ if (frame_size <= 0)
+ frame_size = 256 * Interpreter::stackElementSize; // conservative
+ __ generate_stack_overflow_check(frame_size);
+ __ mov(temp_reg, G3_method_handle);
+ }
+
assert_different_registers(argslot_reg, temp_reg, temp2_reg, temp3_reg,
(!arg_slots.is_register() ? Gargs : arg_slots.as_register()));
@@ -1702,6 +1713,14 @@
"copied argument(s) must fall within current frame");
}
+ if (UseStackBanging) {
+ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register
+ __ mov(G3_method_handle, O3_scratch);
+ // Bang the stack before pushing args.
+ int frame_size = 256 * Interpreter::stackElementSize; // conservative
+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame));
+ __ mov(O3_scratch, G3_method_handle);
+ }
// insert location is always the bottom of the argument list:
__ neg(O1_stack_move);
push_arg_slots(_masm, O0_argslot, O1_stack_move, O2_scratch, O3_scratch);
@@ -2118,6 +2137,18 @@
// The return handler will further cut back the stack when it takes
// down the RF. Perhaps there is a way to streamline this further.
+ if (UseStackBanging) {
+ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register
+ __ mov(G3_method_handle, O4_scratch);
+ // Bang the stack before recursive call.
+ // Even if slots == 0, we are inside a RicochetFrame.
+ int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1;
+ if (frame_size < 0) {
+ frame_size = 256 * Interpreter::stackElementSize; // conservative
+ }
+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame));
+ __ mov(O4_scratch, G3_method_handle);
+ }
// State during recursive call:
// ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc |
__ jump_to_method_handle_entry(G3_method_handle, O1_scratch);
--- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp 2012-08-10 09:24:07.000000000 -0700
+++ hotspot/src/cpu/x86/vm/methodHandles_x86.cpp 2013-01-16 08:57:49.000000000 -0800
@@ -691,6 +691,14 @@
if (VerifyMethodHandles)
verify_stack_move(_masm, arg_slots, -1);
+ // We have to insert at least one word, so bang the stack.
+ if (UseStackBanging) {
+ int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0);
+ if (frame_size <= 0)
+ frame_size = 256 * Interpreter::stackElementSize; // conservative
+ __ generate_stack_overflow_check(frame_size);
+ }
+
// Make space on the stack for the inserted argument(s).
// Then pull down everything shallower than rax_argslot.
// The stacked return address gets pulled down with everything else.
@@ -1769,6 +1777,11 @@
"copied argument(s) must fall within current frame");
}
+ if (UseStackBanging) {
+ // Bang the stack before pushing args.
+ int frame_size = 256 * Interpreter::stackElementSize; // conservative
+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame));
+ }
// insert location is always the bottom of the argument list:
Address insert_location = __ argument_address(constant(0));
int pre_arg_words = insert_location.disp() / wordSize; // return PC is pushed
@@ -2206,6 +2219,15 @@
// The return handler will further cut back the stack when it takes
// down the RF. Perhaps there is a way to streamline this further.
+ if (UseStackBanging) {
+ // Bang the stack before recursive call.
+ // Even if slots == 0, we are inside a RicochetFrame.
+ int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1;
+ if (frame_size < 0) {
+ frame_size = 256 * Interpreter::stackElementSize; // conservative
+ }
+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame));
+ }
// State during recursive call:
// ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc |
__ jump_to_method_handle_entry(rcx_recv, rdx_temp);
@@ -2366,10 +2388,15 @@
// case in a 32-bit version of the VM) we have to save 'rsi'
// on the stack because later on (at 'L_array_is_empty') 'rsi'
// will be overwritten.
- { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); }
+ if (rsi_temp == saved_last_sp) {
+ __ push(saved_last_sp);
+ // Need to re-push return PC to keep it on stack top.
+ __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr());
+ __ push(saved_last_sp);
+ }
// Also prepare a handy macro which restores 'rsi' if required.
#define UNPUSH_RSI \
- { if (rsi_temp == saved_last_sp) __ pop(saved_last_sp); }
+ { if (rsi_temp == saved_last_sp) { __ pop(saved_last_sp); __ pop(saved_last_sp); } }
__ jmp(L_array_is_empty);
__ bind(L_skip);
@@ -2382,7 +2409,12 @@
// called in the case of a null pointer exception will not be
// confused by the extra value on the stack (it expects the
// return pointer on top of the stack)
- { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); }
+ if (rsi_temp == saved_last_sp) {
+ __ push(saved_last_sp);
+ // Need to re-push return PC to keep it on stack top.
+ __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr());
+ __ push(saved_last_sp);
+ }
// Check the array type.
Register rbx_klass = rbx_temp;
--- hotspot/src/os/bsd/vm/decoder_bsd.cpp 1969-12-31 16:00:00.000000000 -0800
+++ hotspot/src/os/bsd/vm/decoder_bsd.cpp 2013-01-16 09:04:00.000000000 -0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1997, 2010, 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.
+ *
+ */
+
+#include "prims/jvm.h"
+#include "utilities/decoder_elf.hpp"
+
+#include <cxxabi.h>
+
+bool ElfDecoder::demangle(const char* symbol, char *buf, int buflen) {
+ int status;
+ char* result;
+ size_t size = (size_t)buflen;
+
+ // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small,
+ // __cxa_demangle will call system "realloc" for additional memory, which
+ // may use different malloc/realloc mechanism that allocates 'buf'.
+ if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) {
+ jio_snprintf(buf, buflen, "%s", result);
+ // call c library's free
+ ::free(result);
+ return true;
+ }
+ return false;
+}
+
--- hotspot/src/os/bsd/vm/os_bsd.cpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/os_bsd.cpp 2013-01-16 09:04:00.000000000 -0800
@@ -2341,14 +2341,14 @@
}
void os::print_os_info_brief(outputStream* st) {
- st->print("Bsd");
+ st->print("BSD");
os::Posix::print_uname_info(st);
}
void os::print_os_info(outputStream* st) {
st->print("OS:");
- st->print("Bsd");
+ st->print("BSD");
os::Posix::print_uname_info(st);
@@ -2357,10 +2357,6 @@
os::Posix::print_load_average(st);
}
-void os::pd_print_cpu_info(outputStream* st) {
- // Nothing to do for now.
-}
-
void os::print_memory_info(outputStream* st) {
st->print("Memory:");
@@ -2377,6 +2373,7 @@
st->print("(" UINT64_FORMAT "k free)",
os::available_memory() >> 10);
#ifndef _ALLBSD_SOURCE
+ // FIXME: Make this work for *BSD
st->print(", swap " UINT64_FORMAT "k",
((jlong)si.totalswap * si.mem_unit) >> 10);
st->print("(" UINT64_FORMAT "k free)",
@@ -2384,12 +2381,22 @@
#endif
st->cr();
+ // FIXME: Make this work for *BSD
// meminfo
st->print("\n/proc/meminfo:\n");
_print_ascii_file("/proc/meminfo", st);
st->cr();
}
+void os::pd_print_cpu_info(outputStream* st) {
+ // FIXME: Make this work for *BSD
+ st->print("\n/proc/cpuinfo:\n");
+ if (!_print_ascii_file("/proc/cpuinfo", st)) {
+ st->print(" <Not Available>");
+ }
+ st->cr();
+}
+
// Taken from /usr/include/bits/siginfo.h Supposed to be architecture specific
// but they're the same for all the bsd arch that we support
// and they're the same for solaris but there's no common place to put this.
@@ -2532,6 +2539,25 @@
len = strlen(buf);
jrelib_p = buf + len;
+#ifndef __APPLE__
+ snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
+ if (0 != access(buf, F_OK)) {
+ snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch);
+ }
+
+ if (0 == access(buf, F_OK)) {
+ // Use current module name "libjvm[_g].so" instead of
+ // "libjvm"debug_only("_g")".so" since for fastdebug version
+ // we should have "libjvm.so" but debug_only("_g") adds "_g"!
+ len = strlen(buf);
+ snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p);
+ } else {
+ // Go back to path of .so
+ rp = realpath(dli_fname, buf);
+ if (rp == NULL)
+ return;
+ }
+#else
// Add the appropriate library subdir
snprintf(jrelib_p, buflen-len, "/jre/lib");
if (0 != access(buf, F_OK)) {
@@ -2561,6 +2587,7 @@
if (rp == NULL)
return;
}
+#endif
}
}
}
@@ -2817,7 +2844,11 @@
}
void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) {
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ commit_memory(addr, bytes, alignment_hint, false);
+#else
::madvise(addr, bytes, MADV_DONTNEED);
+#endif
}
void os::numa_make_global(char *addr, size_t bytes) {
--- hotspot/src/os/bsd/vm/os_bsd.hpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/os_bsd.hpp 2013-01-16 09:04:00.000000000 -0800
@@ -103,6 +103,12 @@
static bool hugetlbfs_sanity_check(bool warn, size_t page_size);
+ static void print_full_memory_info(outputStream* st);
+#ifndef _ALLBSD_SOURCE
+ static void print_distro_info(outputStream* st);
+ static void print_libversion_info(outputStream* st);
+#endif
+
public:
static void init_thread_fpu_state();
--- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2013-01-16 09:04:00.000000000 -0800
@@ -31,10 +31,22 @@
# include "atomic_bsd_x86.inline.hpp"
# include "orderAccess_bsd_x86.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_sparc
+# include "atomic_bsd_sparc.inline.hpp"
+# include "orderAccess_bsd_sparc.inline.hpp"
+#endif
#ifdef TARGET_OS_ARCH_bsd_zero
# include "atomic_bsd_zero.inline.hpp"
# include "orderAccess_bsd_zero.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_arm
+# include "atomic_bsd_arm.inline.hpp"
+# include "orderAccess_bsd_arm.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_bsd_ppc
+# include "atomic_bsd_ppc.inline.hpp"
+# include "orderAccess_bsd_ppc.inline.hpp"
+#endif
// System includes
--- hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2013-01-16 09:04:00.000000000 -0800
@@ -34,11 +34,26 @@
# include "orderAccess_bsd_x86.inline.hpp"
# include "prefetch_bsd_x86.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_sparc
+# include "atomic_bsd_sparc.inline.hpp"
+# include "orderAccess_bsd_sparc.inline.hpp"
+# include "prefetch_bsd_sparc.inline.hpp"
+#endif
#ifdef TARGET_OS_ARCH_bsd_zero
# include "atomic_bsd_zero.inline.hpp"
# include "orderAccess_bsd_zero.inline.hpp"
# include "prefetch_bsd_zero.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_arm
+# include "atomic_bsd_arm.inline.hpp"
+# include "orderAccess_bsd_arm.inline.hpp"
+# include "prefetch_bsd_arm.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_bsd_ppc
+# include "atomic_bsd_ppc.inline.hpp"
+# include "orderAccess_bsd_ppc.inline.hpp"
+# include "prefetch_bsd_ppc.inline.hpp"
+#endif
// Contains inlined functions for class Thread and ThreadLocalStorage
--- hotspot/src/os/posix/vm/os_posix.cpp 2012-08-10 09:24:20.000000000 -0700
+++ hotspot/src/os/posix/vm/os_posix.cpp 2013-01-16 09:04:00.000000000 -0800
@@ -110,11 +110,19 @@
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%d", rlim.rlim_cur);
+#ifdef __OpenBSD__
+ st->print(", DATA ");
+ getrlimit(RLIMIT_DATA, &rlim);
+ if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
+ else st->print("%uk", rlim.rlim_cur >> 10);
+ st->cr();
+#else
st->print(", AS ");
getrlimit(RLIMIT_AS, &rlim);
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%uk", rlim.rlim_cur >> 10);
st->cr();
+#endif
}
void os::Posix::print_uname_info(outputStream* st) {
--- hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2012-08-10 09:24:32.000000000 -0700
+++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2013-01-16 09:04:00.000000000 -0800
@@ -52,7 +52,7 @@
/* Posix Thread IDs */ \
/**********************/ \
\
- declare_unsigned_integer_type(thread_t) \
+ declare_unsigned_integer_type(OS_THREAD_ID_TYPE) \
declare_unsigned_integer_type(pthread_t) \
\
/* This must be the last entry, and must be present */ \
--- hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2012-08-10 09:24:33.000000000 -0700
+++ hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2013-01-16 09:04:00.000000000 -0800
@@ -24,7 +24,7 @@
*/
#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) && !defined(__NetBSD__)
-#include <pthread.h>
+# include <pthread.h>
# include <pthread_np.h> /* For pthread_attr_get_np */
#endif
--- hotspot/src/share/vm/compiler/compilerOracle.cpp 2012-08-10 09:26:19.000000000 -0700
+++ hotspot/src/share/vm/compiler/compilerOracle.cpp 2013-01-16 08:57:49.000000000 -0800
@@ -575,7 +575,7 @@
char token[1024];
int pos = 0;
int c = getc(stream);
- while(c != EOF) {
+ while(c != EOF && pos < (int)(sizeof(token)-1)) {
if (c == '\n') {
token[pos++] = '\0';
parse_from_line(token);
@@ -596,7 +596,7 @@
int pos = 0;
const char* sp = str;
int c = *sp++;
- while (c != '\0') {
+ while (c != '\0' && pos < (int)(sizeof(token)-1)) {
if (c == '\n') {
token[pos++] = '\0';
parse_line(token);
--- hotspot/src/share/vm/opto/loopTransform.cpp 2012-08-10 09:27:38.000000000 -0700
+++ hotspot/src/share/vm/opto/loopTransform.cpp 2013-01-16 08:57:50.000000000 -0800
@@ -2733,6 +2733,8 @@
result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory);
_igvn.register_new_node_with_optimizer(result_mem);
+/* Disable following optimization until proper fix (add missing checks).
+
// If this fill is tightly coupled to an allocation and overwrites
// the whole body, allow it to take over the zeroing.
AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this);
@@ -2756,6 +2758,7 @@
#endif
}
}
+*/
// Redirect the old control and memory edges that are outside the loop.
Node* exit = head->loopexit()->proj_out(0);
--- hotspot/src/share/vm/runtime/arguments.cpp 2012-08-10 09:27:53.000000000 -0700
+++ hotspot/src/share/vm/runtime/arguments.cpp 2013-01-16 09:04:00.000000000 -0800
@@ -829,6 +829,9 @@
} else {
jio_fprintf(defaultStream::error_stream(), "%s", locked_message_buf);
}
+ } else {
+ jio_fprintf(defaultStream::error_stream(),
+ "Unrecognized VM option '%s'\n", argname);
}
// allow for commandline "commenting out" options like -XX:#+Verbose
@@ -857,7 +860,7 @@
bool result = true;
int c = getc(stream);
- while(c != EOF) {
+ while(c != EOF && pos < (int)(sizeof(token)-1)) {
if (in_white_space) {
if (in_comment) {
if (c == '\n') in_comment = false;
--- hotspot/src/share/vm/runtime/atomic.cpp 2012-08-10 09:27:53.000000000 -0700
+++ hotspot/src/share/vm/runtime/atomic.cpp 2013-01-16 09:04:00.000000000 -0800
@@ -54,6 +54,12 @@
#ifdef TARGET_OS_ARCH_windows_x86
# include "atomic_windows_x86.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_x86
+# include "atomic_bsd_x86.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_bsd_zero
+# include "atomic_bsd_zero.inline.hpp"
+#endif
#ifdef TARGET_OS_ARCH_linux_arm
# include "atomic_linux_arm.inline.hpp"
#endif
--- hotspot/src/share/vm/runtime/os.hpp 2012-08-10 09:28:05.000000000 -0700
+++ hotspot/src/share/vm/runtime/os.hpp 2013-01-16 09:04:00.000000000 -0800
@@ -30,6 +30,9 @@
#include "runtime/extendedPC.hpp"
#include "runtime/handles.hpp"
#include "utilities/top.hpp"
+#ifdef TARGET_OS_FAMILY_bsd
+# include "jvm_bsd.h"
+#endif
#ifdef TARGET_OS_FAMILY_linux
# include "jvm_linux.h"
#endif
@@ -694,8 +697,8 @@
# include "os_windows.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
-# include "os_posix.hpp"
# include "os_bsd.hpp"
+# include "os_posix.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_x86
# include "os_linux_x86.hpp"
--- hotspot/test/compiler/5091921/Test7005594.sh 2012-08-10 09:28:58.000000000 -0700
+++ hotspot/test/compiler/5091921/Test7005594.sh 2013-01-16 09:04:00.000000000 -0800
@@ -71,6 +71,9 @@
# Windows/MKS
MEM=`"$ROOTDIR/mksnt/sysinf" memory -v | grep "Total Physical Memory: " | sed 's/Total Physical Memory: *//g'`
MEM="$(($machine_memory / 1024))"
+elif [ -n `sysctl -n hw.physmem64 2> /dev/null` -o -n `sysctl -n hw.physmem 2> /dev/null` ];
+ # BSD
+ MEM=`sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }'`
else
echo "Unable to determine amount of physical memory on the machine"
fi
--- hotspot/test/compiler/7158807/Test7158807.java 1969-12-31 16:00:00.000000000 -0800
+++ hotspot/test/compiler/7158807/Test7158807.java 2013-01-16 08:57:50.000000000 -0800
@@ -0,0 +1,66 @@
+/*
+ * 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 7158807
+ * @summary Revise stack management with volatile call sites
+ * @author Marc Schonefeld
+ *
+ * @run main/othervm -XX:CompileThreshold=100 -Xbatch -Xss248k Test7158807
+ */
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodType;
+import java.lang.invoke.VolatileCallSite;
+
+public class Test7158807 {
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) throws Throwable {
+ for (int i = 0; i < 25600; i++) {
+ MethodType mt = MethodType.methodType(java.lang.String.class);
+ System.out.println(mt);
+ MethodType mt3 = null;
+ try {
+ mt3 = MethodType.genericMethodType(i);
+ } catch (IllegalArgumentException e) {
+ System.out.println("Passed");
+ System.exit(95);
+ }
+ System.out.println(i+":");
+ try {
+ VolatileCallSite vcs = new VolatileCallSite(mt3);
+ System.out.println(vcs);
+ MethodHandle mh = vcs.dynamicInvoker();
+ vcs.setTarget(mh);
+ // System.out.println(mh);
+ mh.invoke(mt, mh);
+ } catch (Throwable e) {
+ }
+ }
+ }
+}
+
--- hotspot/test/gc/6941923/test6941923.sh 2012-08-10 09:29:15.000000000 -0700
+++ hotspot/test/gc/6941923/test6941923.sh 2013-01-16 09:04:00.000000000 -0800
@@ -9,7 +9,7 @@
## skip on windows
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD )
NULL=/dev/null
PS=":"
FS="/"
--- hotspot/test/runtime/7020373/Test7020373.sh 2012-08-10 09:29:17.000000000 -0700
+++ hotspot/test/runtime/7020373/Test7020373.sh 2013-01-16 09:04:00.000000000 -0800
@@ -32,7 +32,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- hotspot/test/runtime/7110720/Test7110720.sh 2012-08-10 09:29:18.000000000 -0700
+++ hotspot/test/runtime/7110720/Test7110720.sh 2013-01-16 09:04:00.000000000 -0800
@@ -37,7 +37,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD )
FS="/"
RM=/bin/rm
CP=/bin/cp
--- hotspot/test/runtime/7158800/BadUtf8.java 2012-08-10 09:29:18.000000000 -0700
+++ hotspot/test/runtime/7158800/BadUtf8.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,1254 +0,0 @@
-/*
- * 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 7158800
- * @summary Test that 1200 symbols that hash to the same value triggers
- * the symbol table alternate hashing mechanism. There isn't actually a
- * way to verify this.
- */
-//
-// Generate large number of strings that hash to the same value
-// to slow down symbol table lookup.
-
-import java.io.BufferedOutputStream;
-import java.io.FileOutputStream;
-
-public class BadUtf8 {
-static String[] strings = {
- "EOcLKvbddZyPxYpb",
- "DncLKvbdPxmAGrqj",
- "DoCjjvbdpxoIHQdY",
- "EPCkKvbdqYoHfqEY",
- "DnbkKvbdezvYdiUX",
- "DnbjjvbdeEoRbXCj",
- "EObkKvbdbsCkUEKB",
- "EOcLKvbdnUtyjiqf",
- "DncLKvbdRWnDcMHc",
- "DoCkKvbdrSUkOLAm",
- "DncLKvbdfNFwGmJk",
- "EPDLKvbdvAdYroFI",
- "DoDLKvbdiGibyViu",
- "DncLKvbdYqNEhmFR",
- "DoCkKvbdEARhlzXX",
- "DncLKvbdSZjHsCvA",
- "DncKjvbdqTsgRqkU",
- "DnbjjvbdqAiFAXHd",
- "EPDKjvbdGcjvJaij",
- "DnbkKvbdwtldpxkn",
- "DoDKjvbdYkrETnMN",
- "EPCjjvbdbBWEfQQX",
- "EPCjjvbduMXwAtBX",
- "DncLKvbdbsCkTcia",
- "DoCjjvbdczYpYZRC",
- "EOcKjvbdFeiqmhsq",
- "DoCkKvbdKCicQibx",
- "EOcKjvbdZLrEUOLm",
- "DoCjjvbdaNKbStmH",
- "DoDKjvbdJbjDQjDY",
- "EPCkKvbdemFwGmKL",
- "EPDKjvbdZQleImEq",
- "DncKjvbdZjShPfbG",
- "DnbjjvbdqYnhHREY",
- "DoCkKvbdaRfDIUGL",
- "DoDKjvbdLrWlyuQz",
- "DnbjjvbdZisHofaf",
- "EObjjvbdhtydvrUb",
- "DnbjjvbdRotHKGEX",
- "EObjjvbdNeEThhkE",
- "EPCjjvbdZtJJZESn",
- "DoDKjvbdnPyxvLYb",
- "EPDKjvbdeEoRbWbj",
- "EOcLKvbdFxttaEXb",
- "EObjjvbddwystRez",
- "EPCjjvbdJpzEnenF",
- "DnbkKvbdTppntuIN",
- "EPCkKvbdTukpKUBR",
- "DnbkKvbdhlFEOUcZ",
- "EObkKvbdlhdUQuRa",
- "DnbjjvbdkClKqHUg",
- "EOcKjvbdqTtGqqkU",
- "DncKjvbdtkwvaUBX",
- "DoDKjvbdsQWOjCuf",
- "DncLKvbdEKIJuwjA",
- "DncKjvbdGLErcIMu",
- "EOcLKvbdNPwpumfs",
- "EObkKvbdnVUzLJrG",
- "DoCkKvbdcTDKsdKB",
- "DncKjvbdKRZdoFme",
- "EOcLKvbdemFvgNKL",
- "EPCkKvbdznopdblY",
- "EPDLKvbdOYPVzdOU",
- "DnbjjvbdsZlPsAhO",
- "DoDLKvbdKCjDRKDY",
- "DoCkKvbdhuZeXSVC",
- "EPDKjvbdOStVgEtp",
- "DncLKvbdvwMAvBWV",
- "EPDKjvbdBcoaWJlf",
- "EOcKjvbdZxdKODMS",
- "DoCjjvbdbsCkTcjB",
- "EOcLKvbdwWlAuaWV",
- "DnbjjvbdFejRnJUR",
- "DnbjjvbdmIdTqVSB",
- "DnbkKvbdqBIeAWhE",
- "DncKjvbdrMzJyMIJ",
- "DoCkKvbdZGvdAOsJ",
- "DncLKvbdjggLfFnL",
- "DoCjjvbdYqNFJMdq",
- "DoCkKvbdqZPHfqDx",
- "DncLKvbdOEdThiLE",
- "DoCkKvbdZirgpGaf",
- "EPDLKvbdziuQPdSt",
- "EObkKvbdKQyeOenF",
- "DoDLKvbduaDySndh",
- "DoCjjvbdVUNUGLvK",
- "DncKjvbdAMhYrvzY",
- "DnbkKvbdnQZxvKxb",
- "EPCjjvbdBhjakJFj",
- "DncLKvbdmfeYNNfy",
- "DoDLKvbdjlbLydfo",
- "DoDLKvbdpyPIGpcx",
- "EOcLKvbdnVUzLJqf",
- "DoCjjvbdmJETqVSB",
- "DoDLKvbdJTZAsMxM",
- "DoCkKvbdnQZxvLZC",
- "DoDKjvbdACqwizJQ",
- "DncKjvbdvBEZSoFI",
- "DncKjvbdGckVjCJj",
- "DncLKvbdiMFENtcZ",
- "Dnbjjvbdjuvmcaww",
- "DnbkKvbdZyEKNblS",
- "DoCjjvbduMYXBUBX",
- "DnbjjvbdFWYopNJe",
- "DoDKjvbdelfXGljL",
- "DnbjjvbdakLenmcA",
- "EPDKjvbdfILWRmpg",
- "EObjjvbdSLYeuHLT",
- "DoCjjvbdMfbolotk",
- "EPDLKvbdrRuKnKaN",
- "EOcKjvbdyzdnRhIh",
- "DoDLKvbdGAoRZJzm",
- "DoCjjvbdhlFDnUcZ",
- "EPDLKvbdmpZyVkYb",
- "DncKjvbdTpqPUuIN",
- "DncLKvbdHDjvJaij",
- "EPDLKvbdYlRcsmkm",
- "EPDLKvbdvlvAMdFN",
- "DncKjvbdIsZArmYM",
- "EOcLKvbdegjuqnQg",
- "EOcLKvbdZQmFJNFR",
- "DoCjjvbdZxdJmcMS",
- "EPCkKvbdlZTSTYgU",
- "DoDKjvbdqceJPnWB",
- "DncLKvbdVgwuxGxz",
- "DncKjvbdDnbkLXDE",
- "EPDLKvbdatbHYKsh",
- "DncKjvbdEzsqFLbi",
- "EPDLKvbdnVVZkKRf",
- "EOcKjvbdKeegbBQu",
- "EPCkKvbdKfGHaaRV",
- "EPDKjvbdmIctRVRa",
- "EPCjjvbdRMxBxnUz",
- "DnbjjvbdJYTbILpp",
- "EPCkKvbdTAEiHbPE",
- "EOcLKvbdfelZnGgA",
- "DoCjjvbdOStWGeUp",
- "EOcLKvbdemGXHNJk",
- "DoDKjvbdYTMAmUOx",
- "EPCkKvbdpyOhGpcx",
- "EPCkKvbdAMgxsWzY",
- "DnbjjvbdYkrETnMN",
- "EPDLKvbdUQqPUtgm",
- "DncKjvbdehKurNqH",
- "DoCjjvbdZMSETnLm",
- "DoDKjvbdIHGyyXwg",
- "EObjjvbdXGYzUAPT",
- "DoCjjvbdhbPCeWqR",
- "DoCkKvbdKNADzGuB",
- "DnbjjvbdFeirOJTq",
- "DncLKvbdaRecHtFk",
- "DnbkKvbdzoPpeClY",
- "EObkKvbdZRMeJMeR",
- "DnbjjvbdYfvdAPSi",
- "DncLKvbdJcKCqJcY",
- "EOcLKvbdqvokbhyR",
- "DoDLKvbdrRuLNjaN",
- "DoCjjvbdTlWPBWOi",
- "DoCkKvbdjvWnEBxX",
- "DoDLKvbdTkunaVoJ",
- "DoCkKvbdQZNAHTSK",
- "EObjjvbdqwPkbhyR",
- "EOcLKvbdNHDPlpUk",
- "DncLKvbdIHHZxxYH",
- "DncLKvbdtkxXAtAw",
- "DncLKvbdSCEFMJZL",
- "DnbjjvbdZQmEhldq",
- "DoCjjvbdNGbolotk",
- "DnbjjvbdnCKWwnmu",
- "DncLKvbdzHZMANEw",
- "DoDKjvbdmttykJrG",
- "DnbkKvbdlrZUzSci",
- "EPDKjvbdSKyGVHKs",
- "DoCjjvbdKVuGEFGi",
- "EPCjjvbdCIkBkIej",
- "DncLKvbdzHZMAMeX",
- "DnbkKvbdaSFbgsek",
- "DncLKvbdHDjujBij",
- "DoDKjvbdGZVUaDwb",
- "DnbjjvbdZnnJFEzK",
- "DoCkKvbdtcDUwWOo",
- "DoCkKvbdlBMoNALA",
- "EOcKjvbdNsUWHFUp",
- "DoDLKvbdVUNUFlVj",
- "DnbkKvbdhkdcnUcZ",
- "DncLKvbdLiBkqYAS",
- "EOcKjvbdzoPpdcLx",
- "EPDKjvbdijGIJmXr",
- "EOcKjvbdZisHofaf",
- "DoDLKvbdeOdrkUUS",
- "DoDLKvbdnPyxvKxb",
- "EPDKjvbdIxUBhMRQ",
- "DncLKvbdlhctRUqa",
- "DoDLKvbdmgFXlnGy",
- "DncKjvbdCJKbKiGK",
- "EOcLKvbddndrjtUS",
- "DnbjjvbdkDLjqGuH",
- "DncKjvbdmIcsptqa",
- "DoCkKvbdvvlAvBWV",
- "EObjjvbdjblLQftg",
- "DnbjjvbdCEQBWKMf",
- "DnbjjvbdBdPaVilf",
- "DoCkKvbdZxcjODLr",
- "DoCkKvbdEObjjwCd",
- "EPDKjvbdyTNhlqbH",
- "EPCkKvbdUMVoAvPJ",
- "DncKjvbdUxhUZjoO",
- "DncKjvbdqqtjmkAm",
- "DncKjvbdKfGICBRV",
- "EPCjjvbdVrOXaeLc",
- "EPDLKvbdwXLaWBWV",
- "EPCkKvbdjblKqHUg",
- "DnbjjvbduDCuWuoP",
- "EPDKjvbdNGbpMouL",
- "EObjjvbdBcoaVjNG",
- "DncLKvbdrWpMDIxq",
- "DncLKvbdhaoCdwRR",
- "DnbkKvbdFxtuBDwb",
- "DncKjvbdIjEAKPgE",
- "EOcLKvbduCbuXVoP",
- "DoDKjvbdZtIiZDsO",
- "DnbjjvbdEztRElCi",
- "DncLKvbdxmsHwsJD",
- "DnbjjvbdRbEElIxk",
- "DoDKjvbdWHwvXgYz",
- "EOcKjvbdQlwbYnUz",
- "EOcLKvbdVTltFkuj",
- "DncKjvbdliETptqa",
- "DnbkKvbddoErjtTr",
- "DoCkKvbdgPazvdXh",
- "DncKjvbdySmhlqag",
- "DoCjjvbdbPgHDkzd",
- "DoCkKvbdFWZPomKF",
- "EObjjvbdssSSxydc",
- "EObjjvbdzQnliJwA",
- "EObkKvbdKCjCpibx",
- "EPCjjvbdpyOhHREY",
- "DncLKvbddjJqutzn",
- "EObkKvbdBdQAujMf",
- "EPCkKvbdLAjflbXq",
- "DncLKvbdLBLGlaxR",
- "DoDLKvbdrpWPJbuf",
- "DoCjjvbdEKHiuxKA",
- "DoCjjvbdXsMAlsnx",
- "EObkKvbdptTgSSLU",
- "DoDKjvbdnHFXmNfy",
- "DncKjvbdCJKbKhej",
- "EPCjjvbdhlEdOUby",
- "EOcKjvbdKWUfEFGi",
- "DoDKjvbdZQmFJMdq",
- "EPCjjvbdiGjDZWKV",
- "EObkKvbdVAbQrprZ",
- "DoDKjvbdfekzNgHA",
- "DoDLKvbdnHEwlmgZ",
- "DncKjvbdwzHeexEr",
- "DoCjjvbdmpZxujyC",
- "EPDKjvbdwMvAMcdm",
- "DoCjjvbdfHkVrNqH",
- "EPCkKvbdYzbfRiuy",
- "EPCkKvbdZtIiZDrn",
- "DnbjjvbdjvWnDbYX",
- "DoCjjvbdOStVgEtp",
- "EPDLKvbdZMSETmlN",
- "EPDKjvbdBhjajhej",
- "EPCjjvbddoFTLUUS",
- "DnbkKvbdsQVoJcWG",
- "EPCjjvbdrEFJQNvB",
- "DoCjjvbdMpYRWOGs",
- "EOcLKvbdZirgpHBf",
- "EPDLKvbdyOTIXsJD",
- "DoCkKvbdKRZdnfNe",
- "DnbjjvbdbBWFFoow",
- "EPCjjvbdgFlZnHHA",
- "DnbkKvbdGGJrOIsq",
- "DoDLKvbduDCtwWPP",
- "EObjjvbdNddUIhjd",
- "DnbjjvbdxsNiMqag",
- "EObjjvbddeOrCWbj",
- "EObjjvbdPxmAGsRj",
- "EOcLKvbddeOrCXDK",
- "DoDLKvbddeOrBwCj",
- "DoCjjvbdVqnYCElD",
- "DnbkKvbdUyIUZjoO",
- "EObjjvbdeFOrCXDK",
- "EObkKvbdVrNxCFLc",
- "EObjjvbdTfzmkwWF",
- "EOcKjvbdIHGzZYYH",
- "EPDKjvbdtbbuXWPP",
- "DoCjjvbdZisIQHBf",
- "EObjjvbdbsCkUDjB",
- "EPCkKvbdVwJXudFH",
- "EPDKjvbdrouoKDVf",
- "EPCkKvbdFyVVBEYC",
- "DncLKvbdZnnIeEzK",
- "EPDLKvbdxVNFQxkn",
- "DoDKjvbdpxnggRDx",
- "DoDLKvbdqZOgfpcx",
- "DncKjvbdCIjakJGK",
- "EPCkKvbdCJLBjhej",
- "DoDLKvbdnPzYvKxb",
- "EOcKjvbdqTsgSRkU",
- "EOcLKvbdLBLGlaxR",
- "DoDLKvbdcbTMrAUN",
- "DncLKvbdzitoodSt",
- "DoDKjvbdJvUfDdfi",
- "EOcLKvbdHDjvKCJj",
- "EPCkKvbdeOeTKssr",
- "DnbkKvbdlYrqsYft",
- "DncLKvbdiiehKMxS",
- "DncKjvbdURQoVUhN",
- "DnbkKvbduMYXBUAw",
- "DoDLKvbdSPtHJfEX",
- "EObkKvbdqBJFAWgd",
- "EOcKjvbdFpATWgFy",
- "DoDLKvbdBsBDTfXS",
- "DncKjvbdjhHLfFmk",
- "DoCjjvbdCJKakIfK",
- "DnbkKvbddoFSjtTr",
- "EObkKvbdANIYsWzY",
- "EObjjvbdCTAbtFvr",
- "EObjjvbdrRtkOLAm",
- "DnbkKvbdkxsSTYgU",
- "DoCjjvbdnBiwXnmu",
- "EObjjvbdwtmEqYlO",
- "EPDKjvbdrylQTAhO",
- "DoDLKvbdtbbtvvOo",
- "EPCjjvbdZLrETmlN",
- "EPDLKvbdWXJYWDdg",
- "DoCkKvbdKQzFOfOF",
- "EPCjjvbdwzIFfXeS",
- "DncKjvbdRjyFuHLT",
- "EPDLKvbdULunaWPJ",
- "DncKjvbdUxhTykOn",
- "DnbkKvbdJcKCqKDY",
- "EPDLKvbdcbSmSATm",
- "DnbkKvbdegjurNqH",
- "EPDKjvbdZjTIQGbG",
- "EPCjjvbdiLddNuCy",
- "DoCjjvbdZQldiNEq",
- "EOcLKvbdakMGPODA",
- "EObjjvbdnHEwlmgZ",
- "EOcLKvbdBsAcUGXS",
- "EPCkKvbdiVZdwSUb",
- "EOcLKvbddCTNSAUN",
- "DnbkKvbdEXxMUUUM",
- "DncKjvbdYpldiMeR",
- "DoDKjvbdNddTiIjd",
- "DoDLKvbdZLqdUNlN",
- "EPCkKvbdiBncFWpq",
- "DncLKvbdiCPDEvqR",
- "EOcKjvbdUyHszKoO",
- "DncKjvbdhtydvqtb",
- "EPCjjvbdpxoHgQcx",
- "EObkKvbdkWWnDaxX",
- "DnbjjvbdBhkBkJFj",
- "DoCkKvbdRacdkhyL",
- "EOcLKvbdZjTHpHCG",
- "EPCkKvbdMowqWOGs",
- "DncLKvbdegjurNpg",
- "EObjjvbdfMfWfmKL",
- "EPDLKvbdZirgpGaf",
- "DoDLKvbdiZuFlQnG",
- "DncLKvbdFxuVAcxC",
- "EObkKvbdZisHofaf",
- "EOcKjvbdJSyBSmYM",
- "EPDLKvbdVYgtZkPO",
- "EOcKjvbdRbEFMJYk",
- "DncLKvbdrEFIonWB",
- "DncKjvbdKDJbqJcY",
- "EOcLKvbdhfjCxuiu",
- "EObjjvbdLLAhWAKZ",
- "DoCkKvbdRXNcblID",
- "DoDLKvbdcbSmSATm",
- "EOcLKvbdwWlAvAuu",
- "EObkKvbdiBnbdvpq",
- "DoCkKvbdNQXpumgT",
- "DncLKvbdkVwOECYX",
- "DnbkKvbdfoazwDxI",
- "DoDLKvbdbBWFFpPw",
- "DoDLKvbdvBDxsPEh",
- "EPDKjvbdJqZdoFme",
- "DoDLKvbdIryArmXl",
- "EPCjjvbdANIZSwZx",
- "EPCkKvbdVhYVxGxz",
- "DncKjvbdLAjgNCYR",
- "DncKjvbdxxIjCQZk",
- "DncKjvbdbiNKKewY",
- "EPCjjvbdlrZVZsEJ",
- "EPDKjvbdIryAsMwl",
- "DoCkKvbdtAHRIAAr",
- "EPDKjvbdJmAEZfuB",
- "EPCkKvbdZjSgogBf",
- "DoDLKvbdOXnuzcnU",
- "DnbkKvbdehKvRnQg",
- "EObjjvbdZyDimbkr",
- "DoDKjvbdmajWwoOV",
- "EOcKjvbdkMalZeHP",
- "EOcKjvbdIjEAJpHE",
- "EPCkKvbdDihKVxKA",
- "DncKjvbdNddUIiKd",
- "EObjjvbdqdFIpOWB",
- "DoCkKvbdxnShXsJD",
- "DoDLKvbdjmBkzEfo",
- "EOcLKvbdatagYLTh",
- "DoCjjvbdVhYVxHYz",
- "DnbjjvbdJbjDRKDY",
- "EPCjjvbdLBLHNCYR",
- "DnbjjvbdnGeYNOGy",
- "EOcLKvbdUsmTekvK",
- "EPCjjvbdtkxXBTaX",
- "EPCjjvbdzoPqFCkx",
- "DncKjvbdCIjbKhej",
- "DncKjvbdZLqdTmkm",
- "DoDKjvbdsPunicVf",
- "EOcKjvbdmgFXmNgZ",
- "EObkKvbdiMFENuCy",
- "DoDKjvbdhanbeXRR",
- "EObkKvbdACqwiyhp",
- "DncKjvbdZisIQHBf",
- "EPCjjvbdgQBzwDwh",
- "DnbjjvbdyYJJaoyk",
- "DoDKjvbdxUldqZMO",
- "EObkKvbdkClLQgVH",
- "EPCjjvbdZQldiMeR",
- "EPDLKvbdZyEKOClS",
- "EPDLKvbdcIlikFvx",
- "DoDKjvbdrzMQTBHn",
- "DnbjjvbdVYgtZkPO",
- "DoDLKvbdHEKuiajK",
- "EPCkKvbdczZQXxqC",
- "DoDKjvbdrDdiQNua",
- "DncLKvbdcImKLGWx",
- "DoCjjvbdVYgtZkPO",
- "EPDLKvbdZnnIeFZj",
- "EPDKjvbdMIakqYAS",
- "DoCkKvbdSLYfUgLT",
- "EPDLKvbdiCObdvpq",
- "DnbjjvbdRpUHKFcw",
- "DoDLKvbdIHHZyYXg",
- "EPCjjvbdypoMhiwA",
- "DnbkKvbdCEPaVjMf",
- "DnbkKvbderAvzlDP",
- "DnbkKvbdZQleImFR",
- "EOcKjvbdKRZdneme",
- "DoDLKvbdiBnbeXQq",
- "DncLKvbdEPDKjvcE",
- "EOcLKvbdauCGwkTh",
- "DncLKvbdEvZQPmJe",
- "EPCkKvbdURQnuVIN",
- "DncLKvbdegjvSOQg",
- "EPCjjvbdKaKgMawq",
- "DnbkKvbdRzKISbvA",
- "DncLKvbdiLdcnUcZ",
- "EPDLKvbdkDMKpfuH",
- "DoDLKvbdRbDdkhyL",
- "DnbjjvbdDwxMUUTl",
- "DnbkKvbdrpWPKCuf",
- "DnbkKvbdNVSqjmAX",
- "DoDKjvbdRbDeMIxk",
- "EOcLKvbdcyxpXyRC",
- "DncLKvbdRMwbYnUz",
- "EObjjvbdqlzJxlHi",
- "DoCkKvbdJYUCIMQp",
- "DncLKvbdLZQjSzuG",
- "EOcKjvbdxVNEqYkn",
- "DnbkKvbdZoOIeFZj",
- "DoCjjvbdBraCtFwS",
- "EOcLKvbdliDsqVSB",
- "EPCkKvbdeATqNXif",
- "DncLKvbdkMbLydgP",
- "EObjjvbdZxdJmbkr",
- "DoCjjvbdraellHLZ",
- "EObkKvbduDCuWvPP",
- "DoCkKvbdpstGrSLU",
- "DoCjjvbdLGFgbBQu",
- "DnbkKvbdhtzFWquC",
- "EObjjvbdoAKztHdO",
- "EPDLKvbdatafxKtI",
- "EPDKjvbdkWXNcaww",
- "DoCkKvbdwkXEHzzG",
- "EObkKvbdmgEwmNgZ",
- "DncKjvbdBiLCLJFj",
- "DoCjjvbdeOdsKssr",
- "EOcLKvbdfILWSORH",
- "EObkKvbdCDpAujMf",
- "EPDKjvbdKDKDQibx",
- "DoDKjvbdVUMtGLuj",
- "EObkKvbdrXQMCiYq",
- "DncKjvbdePEsLTtS",
- "DncLKvbdDxYLtUTl",
- "EPCkKvbdGYuVBEYC",
- "DncLKvbdNeEUIiKd",
- "EPCkKvbdpxoIHRDx",
- "EObjjvbdFkEsDHlu",
- "EObjjvbdssSSxzFD",
- "DoCkKvbdUtNTfMVj",
- "DnbjjvbdJcKDRKDY",
- "DncKjvbdqiAKEmOe",
- "DoDKjvbdtlXwAtBX",
- "DnbkKvbdxmsIYTIc",
- "EObkKvbdLrXMzUpz",
- "DoCjjvbdkxsSSxft",
- "DncKjvbdQlwaxnUz",
- "EObkKvbdjhGlFfNk",
- "EPCkKvbdxsNhmRag",
- "DoDLKvbdMfcPmQUk",
- "DoDKjvbdQvnEDLhD",
- "EObjjvbdVgxVxHYz",
- "DoDLKvbdlrYtyrdJ",
- "DoCjjvbdezvYeIsw",
- "DncLKvbdNddTiIjd",
- "EPDLKvbdGGJrNiUR",
- "EPDLKvbdRzJhTDWA",
- "EPCjjvbdvvkaWBVu",
- "EOcKjvbdRXNdCkgc",
- "EOcKjvbdQZNAHTSK",
- "EPCkKvbdsCGNLfkZ",
- "EOcLKvbdDwwktTsl",
- "EOcLKvbdqlzJyLgi",
- "EOcLKvbdxsNiMqag",
- "EOcLKvbdhzVFlROG",
- "EOcKjvbdEztRFMCi",
- "DnbkKvbdqiAJdmPF",
- "EPDLKvbdjcMKqGtg",
- "EObkKvbdTlWOaWOi",
- "EPDLKvbdURRPUuHm",
- "DoDKjvbdelfWgNKL",
- "EOcLKvbdGAnqZJzm",
- "EObjjvbdGZUuAdXb",
- "DoDLKvbduLwwAtAw",
- "DoCjjvbdZjTIQGbG",
- "EPCjjvbdRNXbYnUz",
- "EPDLKvbdiLeENtby",
- "EObjjvbdMowpunGs",
- "EOcKjvbdbiNJjevx",
- "DoDKjvbdEYYLstTl",
- "DoDLKvbdqUTfrRjt",
- "DoDKjvbdbsCkUEJa",
- "DoDKjvbdXsMBNUPY",
- "EPCjjvbdRNXaxnUz",
- "DoDLKvbdNGcQNQUk",
- "DnbjjvbdEARiMywX",
- "EPDKjvbdSKxfUfkT",
- "DncKjvbdhtyeXRtb",
- "DncKjvbdZLqcsnLm",
- "EObkKvbdZnmheEzK",
- "EObjjvbdtbcUvuno",
- "DnbjjvbdrzMQTBHn",
- "DnbjjvbdDwwktTsl",
- "EPDKjvbdkxsSTYgU",
- "DoDKjvbdIryArlxM",
- "DoDKjvbdnBivxOnV",
- "DoDKjvbdeATplwif",
- "EOcLKvbdKeegbApu",
- "EPCjjvbdMgDQMotk",
- "DoCjjvbduCbtwWOo",
- "DnbkKvbdyNsHwrhc",
- "DnbkKvbdtvNxJpsA",
- "EOcLKvbdqAheAWgd",
- "DoCkKvbdURQoUtgm",
- "EOcKjvbdqceIpOWB",
- "DoCkKvbdVwIwudFH",
- "DnbkKvbdbLMFnmcA",
- "EOcLKvbdZjTHpHBf",
- "EOcKjvbdRXNdCkhD",
- "EPDLKvbdiHJcZViu",
- "DoCjjvbdxxIjCPzL",
- "DnbkKvbdBcpBWJmG",
- "EPCkKvbdZyEKOCkr",
- "EPDKjvbdOTUWHFVQ",
- "DoCjjvbdIGgZxwwg",
- "EPDLKvbdFjeSbhMu",
- "EPDLKvbdhgKCxvJu",
- "EOcLKvbdNsUWGdtp",
- "EPDKjvbduVnXipsA",
- "DncLKvbdGYuVBEXb",
- "EPDLKvbdZtIhyESn",
- "DoDKjvbdZxdJmcLr",
- "DoCjjvbdUsltGLuj",
- "DoDKjvbdDoDLKvbd",
- "DncLKvbdrDdhpNvB",
- "EPDLKvbdKCjDRJbx",
- "DoDLKvbdxLWdHzyf",
- "EObkKvbdrzMQTAhO",
- "EOcLKvbdOFDtJJKd",
- "EPCkKvbdrSVKmjaN",
- "EOcKjvbdWWiYVdEg",
- "EOcKjvbdWWhwvDdg",
- "DncKjvbdpstHRqjt",
- "EPCkKvbdKWVFceGi",
- "DoCkKvbdZjShPfbG",
- "DoCkKvbdSxKlNzkY",
- "EPDLKvbdIwtCHkqQ",
- "EOcKjvbdsCGNLgLZ",
- "DncKjvbdzaAOfgCM",
- "DoDLKvbdxmrhYSiD",
- "DncLKvbdfMfWgMjL",
- "EPDKjvbdqFdEsuaI",
- "EOcLKvbdiLeDnUcZ",
- "DoCjjvbdKVuFceHJ",
- "DoCjjvbdfekzNgHA",
- "EOcKjvbdOFEThiLE",
- "EPDLKvbdqceJPnWB",
- "DoDLKvbduCbtwWOo",
- "DncKjvbdTqROtuIN",
- "DncKjvbdpedFUWBI",
- "DoDLKvbdrEFJQNua",
- "DoDLKvbdyXhjCPyk",
- "EPCkKvbdJYUBhLqQ",
- "EPCkKvbdtcCuXVno",
- "DoDLKvbdZLrEUOLm",
- "EPCkKvbdpstGrRjt",
- "DncLKvbddePSCXCj",
- "EObkKvbdauCHXjsh",
- "DoDLKvbdkHfkefNk",
- "EObjjvbdMRwMzUpz",
- "EObjjvbdaMkCTVNH",
- "DoCkKvbdGGJrNhtR",
- "EPDLKvbdvBDxrneI",
- "EPDLKvbdIHHZxwxH",
- "EOcLKvbdrJAJdmPF",
- "EOcKjvbdGZUuAdXb",
- "EOcLKvbdbUbHYLUI",
- "DnbjjvbdJzofYEAN",
- "EPDKjvbdFxtuBDxC",
- "DnbkKvbdQvnDbkgc",
- "EPDKjvbdJmADzGta",
- "DoDKjvbdZRMdhleR",
- "DnbkKvbdsrqsZZeD",
- "EObkKvbdrovPJbuf",
- "EPCjjvbddeOqbXCj",
- "EObjjvbdtcDVXVoP",
- "DncKjvbdMfbpNQVL",
- "DoCkKvbdhbPCeXQq",
- "DoCkKvbdNHComQVL",
- "EObjjvbdvBDxroFI",
- "EPCjjvbdnBivwoNu",
- "EObjjvbdbhljKewY",
- "EPDKjvbdZyDimcMS",
- "EObkKvbdWSOXbElD",
- "EOcKjvbdTfznMXVe",
- "EPCjjvbdZtJJYcsO",
- "DoCjjvbdRjxfVHLT",
- "DoCkKvbdVTltGMVj",
- "DncKjvbdYfwEAOri",
- "DncKjvbdYkrEUOMN",
- "EObkKvbdqGEEsuaI",
- "DncLKvbdjJfHimXr",
- "EPDLKvbddndsLUTr",
- "DnbkKvbdqBJFAWhE",
- "EPDLKvbdEOcKjwDE",
- "EPCkKvbdtvOYJqTA",
- "DncLKvbdkyTRsZHU",
- "DoCjjvbdTppnuVIN",
- "DncLKvbdwyhFeweS",
- "DncKjvbdsBelkgKy",
- "DoCjjvbdKDKCqJcY",
- "DoCjjvbdkClKqHVH",
- "DoCjjvbdcTCjtDia",
- "EPDLKvbdUVkpJtAq",
- "EPDLKvbdRyjITCvA",
- "DnbjjvbdJuuFcdgJ",
- "DoDKjvbdrJAJdmOe",
- "DncKjvbdJcJbqKCx",
- "DoDLKvbdJcJbqJcY",
- "DoDKjvbdeEoSCXDK",
- "DoDLKvbdSwjlNzkY",
- "EObjjvbdzitopDrt",
- "DoCkKvbdKWVGEEgJ",
- "DncKjvbdpssfqrKt",
- "EOcLKvbdUMWPBVoJ",
- "DncKjvbdyzdmrIIh",
- "EPCjjvbdxUldqZLn",
- "DoDLKvbdySnImRbH",
- "DoCjjvbdGdKvJaij",
- "DoCkKvbdxZgeewdr",
- "EObkKvbdiLddNuDZ",
- "DnbjjvbdSCDdkiZL",
- "DncKjvbdznpREcMY",
- "EOcLKvbdaRebhTfL",
- "DnbjjvbdZQldiMdq",
- "EPCjjvbdbrbjtEKB",
- "EOcKjvbdEARiMzXX",
- "DoDLKvbdXrkaNTnx",
- "EPCkKvbdQZNAHTRj",
- "DoDLKvbdEzspeLcJ",
- "EPCjjvbduVnYKRTA",
- "EObjjvbdJXtBhMQp",
- "EPDKjvbdeOdrjssr",
- "EPCjjvbdLqwMytpz",
- "EPDKjvbdUMVoBVoJ",
- "DncKjvbdRpUGifDw",
- "EPDLKvbdZyDinDLr",
- "DnbkKvbdNrsufeVQ",
- "EPCkKvbdZMSDtNlN",
- "EPCkKvbdySnJNSCH",
- "EPCjjvbdfMevfljL",
- "DncLKvbdXsMBNTnx",
- "DnbkKvbdpxoHfqDx",
- "DncLKvbdUQpntthN",
- "DncKjvbdIsZArlwl",
- "DoDLKvbdZGwEAOsJ",
- "EOcKjvbdVvhwvDdg",
- "EOcLKvbduWNxJqTA",
- "EPCjjvbdHEKvJaij",
- "DoDKjvbdrpWOjCuf",
- "DncLKvbdrpWOjDVf",
- "DoCjjvbdIHGzYwwg",
- "DoDLKvbdpxoIGqEY",
- "DoDLKvbdJcJbqKDY",
- "DoCjjvbdRWmdClHc",
- "EPCjjvbdFWYopNJe",
- "DncKjvbdmfdwlmfy",
- "DoCkKvbdxUleQxlO",
- "EObjjvbdnGdxMnGy",
- "EPCjjvbdvvlAvBVu",
- "DncLKvbddndsKssr",
- "EObjjvbdZMRcsnLm",
- "EOcKjvbdFxttaEXb",
- "DncKjvbdVUNTfMVj",
- "EOcLKvbdNrtWHFUp",
- "DoDKjvbdwuMdqYlO",
- "EPDLKvbdrXPkbhxq",
- "EObjjvbdrEFIpNua",
- "EObjjvbdziuQQDrt",
- "EOcLKvbdqYoIGpcx",
- "DnbjjvbdsQVoJcVf",
- "EObkKvbdkDMKpgUg",
- "EObjjvbdvBDyTPFI",
- "DncKjvbduCbuWvOo",
- "EPCjjvbdkVvnECYX",
- "DncLKvbdZGvdAOri",
- "DoCkKvbdrXPlDJZR",
- "EOcLKvbduCcVWvOo",
- "DoDKjvbdCEPaWJlf",
- "EPDKjvbddoErjssr",
- "DncKjvbdACqxKZiQ",
- "EPCjjvbdUVlPitAq",
- "EPDKjvbdjJfHjMxS",
- "EObkKvbdAMhYsWzY",
- "DoDKjvbdnBivxOmu",
- "EOcLKvbdbiNKKfXY",
- "EPDKjvbdYqMeIleR",
- "EObkKvbdJmADygUa",
- "EObjjvbdEPDLLWcE",
- "EPCjjvbdrXPkcIxq",
- "EOcLKvbdliDtQtqa",
- "DoCjjvbdmoyxujyC",
- "EPDLKvbddoFTLTsr",
- "EOcLKvbdCWzdJEpW",
- "DnbjjvbdrEEhpOWB",
- "DoDKjvbdZLrDtNkm",
- "EOcLKvbdLFfHbAqV",
- "EOcKjvbdmttzLKSG",
- "EOcLKvbdmbJvwoOV",
- "EOcKjvbdUaCQrqSZ",
- "DnbjjvbdmgExMnGy",
- "EPDKjvbddndrkUUS",
- "EObkKvbdDwwkstTl",
- "DoCkKvbdcJMjLFwY",
- "DnbjjvbdaNLBruMg",
- "DoDLKvbdQYmAHTRj",
- "DnbkKvbdsQWOicWG",
- "EObkKvbdMRwMzUpz",
- "DoDLKvbdZshiZDrn",
- "EPDLKvbdnPzYujxb",
- "EOcKjvbdCEQAujMf",
- "EPDLKvbdKefHbApu",
- "DoDLKvbdYpldiNFR",
- "DoCkKvbdFWZQQNJe",
- "DncLKvbdznpQeCkx",
- "EOcKjvbdnQZxvKxb",
- "DoCkKvbdVBBprpqy",
- "DnbkKvbdZirhPfaf",
- "DnbkKvbdegjvSNqH",
- "EOcLKvbdqdEiPnWB",
- "EObjjvbdBhkCKiGK",
- "EObjjvbdxZgfGYFS",
- "DnbjjvbdNQYQumgT",
- "EPCjjvbdxsNhlrBg",
- "DoCkKvbdQdDApRDr",
- "DoCkKvbdxxIiaoyk",
- "EPDKjvbdFeirNhtR",
- "DoCjjvbdegjvSOQg",
- "EObkKvbdqcdiQNvB",
- "DncLKvbdiMEdNtcZ",
- "DncLKvbdTqRPUthN",
- "EPCkKvbdwygeexFS",
- "DoDKjvbdyTOJMrBg",
- "DncLKvbdeEoRavbj",
- "EPCjjvbdtbcUvvOo",
- "EObjjvbdKCicRJcY",
- "EObjjvbdZyEKODMS",
- "DnbjjvbdmJDtQtrB",
- "DncLKvbdEARhlyvw",
- "DnbjjvbdIxTbILqQ",
- "EOcLKvbdwygefYFS",
- "DoCjjvbdznoqFCkx",
- "DoCjjvbdRpUGjGDw",
- "DncKjvbdhzVGMQnG",
- "EPCjjvbdhkeDnVCy",
- "EObkKvbdOEdUIiKd",
- "DncKjvbdrDeIomua",
- "DncLKvbdiHJbxuiu",
- "EPDKjvbddxZstRez",
- "EPDLKvbdmSYuZrdJ",
- "EObkKvbdVUNUFkvK",
- "EPDLKvbdNeEUJIjd",
- "DoCkKvbdiMEdNuCy",
- "DoDLKvbdRDcApQcr",
- "EPCjjvbdTlVoBVoJ",
- "EObjjvbdLBKgNBwq",
- "EPCkKvbdsCFllHKy",
- "EObjjvbdnVUzLJqf",
- "DoDKjvbdqrVLNkBN",
- "DoCkKvbdqFcdtWBI",
- "DncLKvbdbVCGxLTh",
- "EOcLKvbdeFPSCXCj",
- "EOcLKvbdRpTgKFdX",
- "EObjjvbdznpQeDLx",
- "EOcKjvbdjvXNcaxX",
- "DnbjjvbdHDkWJbJj",
- "DncKjvbdhkeENuDZ",
- "DnbkKvbdnUtyjjSG",
- "DoDKjvbdSQUHJfDw",
- "DncKjvbdbUbHYLUI",
- "EOcLKvbdNsTvGduQ",
- "EPDLKvbdSZigsCvA",
- "DncKjvbdMfcPlpUk",
- "DoDLKvbdxrnIlrBg",
- "DncKjvbdiLdcnVCy",
- "EPCjjvbdmfeYNOHZ",
- "DoCkKvbdjvWmcaxX",
- "DoDKjvbdbUbHXkUI",
- "DncKjvbdBhkBjiFj",
- "DoDLKvbdNHColpVL",
- "EOcKjvbdrykosAhO",
- "DncLKvbdqGDeUVaI",
- "DnbkKvbdhgJcZViu",
- "DnbjjvbduLxXAtBX",
- "EPCjjvbdYpleJNFR",
- "EPDLKvbdQvmdClHc",
- "DnbjjvbdJYTbIMRQ",
- "DncLKvbdznpRFDMY",
- "EOcLKvbdZnmiFEyj",
- "DnbkKvbdrRuLOLAm",
- "EObkKvbdhkeEOUby",
- "DncLKvbdYlSEUOLm",
- "DoCjjvbdhkdcmtby",
- "DncLKvbdddnrCXDK",
- "DoDLKvbdKaLHNCYR",
- "EOcKjvbdcyxpYZQb",
- "EPDLKvbdACqwjZhp",
- "DoCkKvbdBsBDTevr",
- "EObkKvbdeKJqvUzn",
- "EObkKvbdcImJkGWx",
- "DncLKvbdYSlAltOx",
- "DncLKvbdlrYtyrdJ",
- "EObkKvbdKxqJrztf",
- "EOcKjvbdsQWPJcVf",
- "DoDKjvbdkySqrxgU",
- "EObjjvbdeEoRbXCj",
- "EOcKjvbdHDkVjBij",
- "DoDLKvbdCTBCsfXS",
- "DoCjjvbdKCjDQibx",
- "DoCjjvbdlhdTqUrB",
- "DoDKjvbdTulQKTaR",
- "DoCkKvbdRjxetfkT",
- "EPCjjvbdEuyQQNKF",
- "EPCjjvbdDoDKkXDE",
- "DoCjjvbdsQWPJbuf",
- "DoDKjvbdhuZdvqtb",
- "EPDLKvbdiHKCyWJu",
- "EPDLKvbdLFegaaQu",
- "DoCjjvbdqZPHgRDx",
- "DncKjvbdUWMPjUAq",
- "DoDLKvbdTYKkmzjx",
- "DoDKjvbdegjvSOQg",
- "DnbkKvbdUtNTekvK",
- "EObkKvbdNsTvGeVQ",
- "DoDLKvbdfNFvgMjL",
- "EOcLKvbdZQmEiNEq",
- "EPDKjvbdBraDTfWr",
- "EPDKjvbdNGcQNQVL",
- "EPDLKvbdZyEKODMS",
- "EOcKjvbdBvzdIdpW",
- "EPCjjvbdACqwiyiQ",
- "DoCjjvbddePRawCj",
- "EPDKjvbdWWiXucdg",
- "DoDKjvbdWexzUAPT",
- "DnbjjvbdwXMBWBWV",
- "EOcLKvbdUyHszLOn",
- "EPCkKvbdOYOuzcnU",
- "EPCkKvbdhancEwQq",
- "DnbkKvbdjggLefOL",
- "EPCkKvbdFjdsDIMu",
- "DoDKjvbdrSUjmkBN",
- "DoDLKvbdZjTIQGaf",
- "DoDKjvbdMgDPmPtk",
- "EPDLKvbdWRmwbFMD",
- "DoCkKvbdzROmJKXA",
- "DnbkKvbdrDdiQNvB",
- "DnbjjvbduDCtwVoP",
- "EOcLKvbdCIjbLJFj",
- "EPDKjvbdXrkaMsnx",
- "EPDKjvbdVhXvXfxz",
- "DncKjvbdhbPDEwRR",
- "DoCkKvbdpxoHgQcx",
- "DoCkKvbduMXwBUBX",
- "EObjjvbdNeEThhjd",
- "DoCjjvbdirzhrkJz",
- "DoDLKvbdaMkCTUlg",
- "DncLKvbdWRnYBeLc",
- "DnbjjvbdGBPRZJzm",
- "EOcLKvbdeOeSjstS",
- "DoDLKvbdmIctRVSB",
- "DoCjjvbdZxdJnDMS",
- "DoCkKvbdRpTgKFcw",
- "DncLKvbdTukojTaR",
- "DnbjjvbdKRZdoFme",
- "DnbkKvbdURQoVUhN",
- "DoDLKvbdyYJKBozL",
- "EObkKvbdfNFwHMjL",
- "DoDLKvbdZisIQHBf",
- "EObkKvbdqFcdsuaI",
- "DncLKvbdzoPqFDLx",
- "DoDKjvbdSKxeuHLT",
- "EPDKjvbdsBemLfjy",
- "DoCjjvbdJbjCqJcY",
- "DoCjjvbdNPxRVnGs",
- "DncLKvbdGcjvJbKK",
- "EOcKjvbdrWpMDIxq",
- "EOcLKvbdQdDApQcr",
- "DoDKjvbdZMRdTnLm",
- "EOcLKvbddxZssrFz",
- "EObjjvbdUtNTfLuj",
- "EPCjjvbdLLBIWAKZ",
- "DoCkKvbdgFlZmfgA",
- "EPCjjvbdUVkoitAq",
- "DoDKjvbdDncKjvcE",
- "DoDLKvbdRpUHJfEX",
- "EPDKjvbdLqvlzVQz",
- "EPDKjvbdZMRdUOLm",
- "EOcLKvbdCJLBkIfK",
- "DncKjvbdaSFbhUFk",
- "EPDLKvbdZoNheEzK",
- "DncKjvbdUVlPjUAq",
- "DnbkKvbdKNADyfuB",
- "EObkKvbdZdwfzghb",
- "EPDLKvbdZtIhxcrn",
- "EObkKvbdGckViajK",
- "DncLKvbdFfJqmiUR",
- "DncKjvbdKWUfDdgJ",
- "DoDKjvbdMtrqjmAX",
- "EOcLKvbdsQWPKDVf",
- "DoCjjvbdwtleRZMO",
- "EObjjvbduaDxsPEh",
- "EPDLKvbdKxqJrzuG",
- "EOcKjvbdVAaprprZ",
- "EObjjvbdEuxopMjF",
- "DnbjjvbdyOTHwriD",
- "EPDLKvbdrpVnibvG",
- "EPDKjvbdkWWnDaww",
- "DncLKvbdrXPkbiYq",
- "DoDLKvbddxZssqez",
- "EOcLKvbdHDkWJbJj",
- "DncLKvbdEPCkLWcE",
- "DnbkKvbdEXwkstTl",
- "EObjjvbdqiAKEmOe",
- "DncLKvbdjAQGaQGj",
- "EPCjjvbdNeDtJJKd",
- "EPCjjvbdvwMBWBVu",
- "EPDKjvbdFejSOItR",
- "EOcLKvbdNPwqWOHT",
- "EPDKjvbdbsCjscia",
- "EObkKvbdyYIiaoyk",
- "DoDKjvbdLZQirzuG",
- "EObjjvbdSLZGVGjs",
- "DoCjjvbdAMgxsWzY",
- "DoDLKvbdEObjjwCd",
- "DnbkKvbdsPvOicWG",
- "EPCkKvbdrJAKElne",
- "EPCkKvbdauCGwjsh",
- "DncLKvbdegkWRnQg",
- "EPCkKvbdYpmEiNFR",
- "DoDKjvbduaDxsPFI",
- "DoCjjvbdcyxoxYqC",
- "DoCkKvbdkMakzFHP",
- "DnbjjvbdJbibqJbx",
- "DnbkKvbdWWhxWDeH",
- "DoCjjvbdssRsYzFD",
- "DoDKjvbdpyPIHRDx",
- "DncLKvbdwNWANDeN",
- "DoDKjvbdJYUBglRQ",
- "EObkKvbdXnRAYVVt",
- "DoCjjvbdUWLpKTaR",
- "DoDKjvbdTqROttgm",
- "EPCkKvbdVqnXaeMD",
- "EObjjvbdADRwiyiQ",
- "DoDKjvbdlrZUyrci",
- "EPDKjvbdvAdZSndh",
- "DoCkKvbdzoQQeDLx",
- "DnbkKvbdSQUGjFdX",
- "EOcLKvbdqBJFAXIE",
- "EObkKvbdSCEFLiZL",
- "DnbjjvbdzoQQdcMY",
- "DnbkKvbdpxngfqEY",
- "DncLKvbdbsDLUEKB",
- "DoCjjvbdXrlBMtOx",
- "EObjjvbdKCjDQicY",
- "DncLKvbdLrWlzUpz",
- "EObjjvbdaaWEfQQX",
- "EObjjvbdtlYWaTaX",
- "DnbkKvbdMowpunGs",
- "EObkKvbdSLYeuHKs",
- "EObkKvbdTAEhhCOd",
- "EPCkKvbdmSYtyrci",
- "DncLKvbdYkqcsnLm",
- "DoDLKvbdrylQTAgn",
- "DncLKvbdJXtCIMRQ",
- "EObkKvbdSBdElIyL",
- "DoDLKvbdwygefYFS",
- "DncKjvbdyXhibPzL",
- "EPCjjvbduaDxsPFI",
- "EObjjvbdZoNiFEzK",
- "EPCjjvbdkNBkyeHP",
- "EPCkKvbdWRnXadlD",
- "DncLKvbdRWmdDLhD",
- "DnbkKvbdmSYtzTDi",
- "EOcKjvbdkVwODbXw",
- "DncLKvbdQlxCZOUz",
- "EObjjvbdbhlijfXY",
- "EOcLKvbdXmqAXtut",
- "EOcLKvbdmbKXXnnV",
- "DoDKjvbdkHgMFfOL",
- "EPCkKvbdfekymgHA",
- "DoCjjvbdeKKRvUzn",
- "DoDKjvbdkHfkefNk",
- "DoCjjvbdyqPMiKXA",
- "DnbjjvbdUQqOtuIN",
- "EOcKjvbdEPCkKwDE",
- "DoDLKvbdZRNFIleR",
- "DnbjjvbdRacdlJZL",
- "EOcLKvbdTukoitAq",
- "EOcLKvbdZLrDtOMN",
- "EOcLKvbdgKfzcGAE",
- "EObjjvbdzjVQQESt",
- "EOcLKvbdcIlijevx",
- "EOcKjvbdGKdsDHmV",
- "DncLKvbdKkBHvAJy",
- "EOcKjvbdZMRctOLm",
- "EPCkKvbdADRxKZiQ",
- "EObjjvbdDwxLsssl",
- "EPDLKvbdUxgszLPO",
- "EPCkKvbdSQTfiedX",
- "EPCjjvbdNeEUJIkE",
- "DoDLKvbdpyPHfqDx",
- "DnbkKvbdyOShXsJD",
- "DncLKvbdLiBkpxAS",
- "DoDKjvbdaaWEepQX",
- "DoCjjvbdWSOYBeLc",
- "EOcKjvbdLFegbAqV",
- "EPDKjvbdffLzOGgA",
- "EObkKvbdFkErbglu",
- "DncLKvbdiZuFlROG",
- "DncKjvbdegkWRnQg",
- "DoDLKvbdQdDApRDr",
- "EOcLKvbdeYZtURez",
- "EObjjvbdrXQLcIxq",
- "DoDLKvbdxZhGGXeS",
- "DoDLKvbdGGKSOItR",
- "EObjjvbdjhHLfFnL",
- "EOcLKvbdUQpoUuHm",
- "DoCkKvbdXrlBNUPY",
- "DoDKjvbdJXtCIMRQ",
- "DnbkKvbdZMSDsnLm",
- "DncKjvbdCTBDUGWr",
- "DncKjvbdbhlikGXY",
- "DoDKjvbdXmqAYVWU",
- "DnbjjvbdliDsqVRa",
- "DnbkKvbdmajXYOnV",
- "EObjjvbdJpyePGNe",
- "DnbkKvbdCTAcUGXS",
- "DoDLKvbdCDpBVjNG",
- "EOcLKvbdxwhiaoyk",
- "DoDKjvbdxVNFQyMO",
- "EPCkKvbdVvhwvEEg",
- "DnbkKvbdFWYoomJe",
- "EOcKjvbdlrZUysEJ",
- "EPDKjvbdqquKnKaN",
- "DoCkKvbdTkunaVoJ",
- "EOcLKvbdfHkVrOQg",
- "EPDLKvbdiUzFWrUb",
- "DoDLKvbdtAGqIABS",
- "DoCkKvbdZRMdhmEq",
- "DnbkKvbdNsUVfeVQ",
- "EPDLKvbdqwPkbiZR",
- "DoCkKvbdNUsSLNAX",
- "DncKjvbdmpZxvKyC",
- "EPCkKvbdLYqKSztf",
- "EPDKjvbdZyEKODMS",
- "EPDKjvbdNGbomPuL",
- "DncKjvbdZMSDtNlN",
- "EPCjjvbdTXjkmzjx",
- "EObkKvbdBdQAvKMf",
- "EOcLKvbdkySrTYgU",
- "DnbkKvbdZoOIddzK",
- "DoCkKvbdZMSDsmkm",
- "EPCkKvbdCWzdIdpW",
- "DncLKvbdBvzdIdov",
- "DoCjjvbdaRfDHtFk",
- "DnbkKvbdWeyZtAOs",
- "DoDLKvbdnCJwYPOV",
- "DoCjjvbdEYYLstUM",
- "EOcLKvbdwtldqZMO",
- "EPCjjvbdFVxoomKF",
- "EObkKvbdyqPMhiwA",
- "DoDLKvbdkxrrSxgU",
- "DoCjjvbdeATqNYKG",
- "DncLKvbdJKEAJpHE",
- "DoCkKvbddndsLUTr",
- "DnbjjvbdqFceUWBI",
- "DoDLKvbdhkddOUby",
- "DncKjvbdGKdrcIMu",
- "EPCkKvbdelevflik",
- "DoDKjvbdhaoDFWqR",
- "DoCjjvbdYlSDsmlN",
- "EPCjjvbdiZuGLpmf",
- "EObkKvbdnCJvxPNu",
- "DnbkKvbdhzUelRNf",
- "DnbkKvbdZeYGzgiC",
- "DoCkKvbdDnbkLWbd",
- "DnbkKvbdnHFYMmfy",
- "DoCjjvbdePEsKtTr",
- "DnbjjvbdZQmEhleR",
- "DnbkKvbdTkunaVoJ",
- "DnbkKvbdFWZPpMjF",
- "DoDKjvbdSwkMNzkY",
- "EOcLKvbdwtldpyMO",
- "EOcKjvbdhkdcmtby",
- "DoCjjvbdNQXqWNfs",
- "EPDKjvbdzjUpPdTU",
- "DnbjjvbdqceJPnWB",
- "EPDKjvbdUyHsyjoO",
- "EPCkKvbdZshhxcsO",
- "DncKjvbdqAiFAWgd",
- "EObkKvbdgFkzOGgA",
- "DncKjvbdmgFYNNgZ",
- "DoDLKvbdDjHjWYKA",
- "DnbjjvbdJbicRKCx",
- "DnbkKvbdfNFwHMjL",
- "EPCkKvbdWSNxBdlD",
- "EPDLKvbdCJKbLJFj",
- "EPDKjvbdEOcKkXDE",
- "EPCkKvbdVrOYCElD",
- "DnbjjvbdCIkBjhej",
- "DoDLKvbddoFTKstS",
- "DnbjjvbduDDVXVoP",
- "EObkKvbdxwiKCPzL",
- "DnbkKvbdZGvdAPTJ",
- "DoDLKvbdBdPaVjNG",
- "EOcKjvbdIHGzYwxH",
- "DoCjjvbdGFjSNhsq",
- "DnbjjvbdlYsSSxgU",
- "EPCjjvbdqrUjnKaN",
- "EOcLKvbdtvOXipsA",
- "DoDLKvbdrounjCuf",
- "DoCkKvbdFVyPomKF",
- "EOcKjvbdNHCpNPtk",
- "EPDLKvbdWeyZtAPT",
- "EPDKjvbdjcLkQfuH",
- "EOcLKvbdzHZMAMeX",
- "DoCjjvbdUMWPBVni",
- "EOcKjvbdHELWKBjK",
- "DoDKjvbdMgComQUk",
- "DnbkKvbdiGjDZWJu",
- "DncKjvbdyqOmJKXA",
- "DoDKjvbdVZITyjoO",
- "DoCjjvbdzQoNJJwA",
- "EOcLKvbdGAoQxizm",
- "DoDKjvbdatagYKsh",
- "EPDKjvbdSBceMJYk",
- "DoDLKvbdMpYQvOHT",
- "DncKjvbdiCOcFWpq",
- "DoCjjvbdUGznLvvF",
- "EPDLKvbdANIYrvyx",
- "EPCjjvbdIwtCHkpp",
- "EObkKvbdJSyBSmYM",
- "EObkKvbdwuMdqYlO",
- "EObjjvbdmuVZkKSG",
- "DncLKvbdSPsfjFdX",
- "DoDLKvbdSQUHJedX",
- "DoDKjvbdiVZdwSUb",
- "EPDLKvbdRjxfVGkT",
- "EObjjvbdmpZyVkZC",
- "DncLKvbdhzUelROG",
- "EPCkKvbdxVMeRZMO",
- "EOcKjvbdxxIiapZk",
- "EOcKjvbdJSyBTNYM",
- "EPDKjvbdMSXMzUpz",
- "EObkKvbdJmADzHVB" };
-
- public static void main(java.lang.String[] unused) {
- try {
- BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("bad.out"));
- for (int i = 0; i < strings.length; i++) {
- out.write(strings[i].getBytes());
- out.write("\n".getBytes());
- }
- out.close();
- } catch (Exception e) {
- System.out.println("Some exception occurred");
- }
- }
-}
--- hotspot/test/runtime/7158800/InternTest.java 2012-08-10 09:29:18.000000000 -0700
+++ hotspot/test/runtime/7158800/InternTest.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,80 +0,0 @@
-/*
- * 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 7158800
- * @run shell/timeout=400 Test7158800.sh
- * @summary This test performs poorly if alternate hashing isn't used for
- * string table.
- * The timeout is handled by the shell file (which kills the process)
- */
-import java.util.*;
-import java.io.*;
-
-public class InternTest {
- public static void main (String args[]) throws Exception {
- final String badStringsFilename = "badstrings.txt";
-
- if (args.length == 0 || (!args[0].equals("bad") && !args[0].equals("normal"))) {
- System.out.println("Usage: java InternTest [normal|bad]");
- System.exit(1);
- }
-
- FileInputStream fstream = new FileInputStream(badStringsFilename);
- DataInputStream in = new DataInputStream(fstream);
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- String toIntern, toDiscard;
- int count = 0;
- long current = 0L;
- long last = System.currentTimeMillis();
-
- if (args[0].equals("bad")) {
- while ((toIntern = br.readLine()) != null) {
- toDiscard = new String((new Integer((int)(Math.random() * Integer.MAX_VALUE))).toString());
- toIntern.intern();
- count++;
- if (count % 10000 == 0 && count != 0) {
- current = System.currentTimeMillis();
- System.out.println(new Date(current) + ": interned " + count + " 0-hash strings - last 10000 took " + ((float)(current - last))/1000 + "s (" + ((float)(current - last))/10000000 + "s per String)");
- last = current;
- }
- }
- }
- if (args[0].equals("normal")) {
- while ((toDiscard = br.readLine()) != null) { // do the same read from the file to try and make the test fair
- toIntern = new String((new Integer((int)(Math.random() * Integer.MAX_VALUE))).toString());
- toIntern.intern();
- count++;
- if (count % 10000 == 0 && count != 0) {
- current = System.currentTimeMillis();
- System.out.println(new Date(current) + ": interned " + count + " normal strings - last 10000 took " + ((float)(current - last))/1000 + "s (" + ((float)(current - last))/10000000 + "s per String)");
- last = current;
- }
- }
- }
- in.close();
- }
-}
-
-
--- hotspot/test/runtime/7158800/Test7158800.sh 2012-08-10 09:29:19.000000000 -0700
+++ hotspot/test/runtime/7158800/Test7158800.sh 2013-01-16 09:04:00.000000000 -0800
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD )
NULL=/dev/null
PS=":"
FS="/"
--- hotspot/test/runtime/7158804/Test7158804.sh 1969-12-31 16:00:00.000000000 -0800
+++ hotspot/test/runtime/7158804/Test7158804.sh 2013-01-16 08:57:50.000000000 -0800
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+
+##
+## @test Test7158804.sh
+## @bug 7158804
+## @summary Improve config file parsing
+## @run shell Test7158804.sh
+##
+
+if [ "${TESTJAVA}" = "" ]
+then
+ echo "TESTJAVA not set. Test cannot execute. Failed."
+ exit 1
+fi
+echo "TESTJAVA=${TESTJAVA}"
+
+rm -f .hotspotrc
+echo -XX:+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >.hotspotrc
+${TESTJAVA}/bin/java ${TESTVMOPTS} -XX:+IgnoreUnrecognizedVMOptions -XX:Flags=.hotspotrc -version
+if [ $? -ne 0 ]
+then
+ echo "Test Failed"
+ exit 1
+fi
+rm -f .hotspotrc
+exit 0
--- hotspot/test/runtime/7162488/Test7162488.sh 1969-12-31 16:00:00.000000000 -0800
+++ hotspot/test/runtime/7162488/Test7162488.sh 2013-01-16 08:57:50.000000000 -0800
@@ -0,0 +1,77 @@
+#
+# 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 Test7162488.sh
+# @bug 7162488
+# @summary VM not printing unknown -XX options
+# @run shell Test7162488.sh
+#
+
+if [ "${TESTSRC}" = "" ]
+ then TESTSRC=.
+fi
+
+if [ "${TESTJAVA}" = "" ]
+then
+ PARENT=`dirname \`which java\``
+ TESTJAVA=`dirname ${PARENT}`
+ printf "TESTJAVA not set, selecting " ${TESTJAVA}
+ printf " If this is incorrect, try setting the variable manually.\n"
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+ Windows_* )
+ FS="\\"
+ ;;
+ * )
+ FS="/"
+ ;;
+esac
+
+JAVA=${TESTJAVA}${FS}bin${FS}java
+
+#
+# Just run with an option we are confident will not be recognized,
+# and check for the message:
+#
+OPTION=this_is_not_an_option
+
+${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep "Unrecognized VM option"
+if [ "$?" != "0" ]
+then
+ printf "FAILED: option not flagged as unrecognized.\n"
+ exit 1
+fi
+
+${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep ${OPTION}
+if [ "$?" != "0" ]
+then
+ printf "FAILED: bad option not named as being bad.\n"
+ exit 1
+fi
+
+printf "Passed.\n"
+
--- jaxp/.hgtags 2012-08-10 09:35:08.000000000 -0700
+++ jaxp/.hgtags 2013-01-16 08:58:02.000000000 -0800
@@ -123,6 +123,7 @@
bcd31fa1e3c6f51b4fdd427ef905188cdac57164 jdk7-b146
067fb18071e3872698f6218724958bd0cebf30a3 jdk7u1-b01
fc268cd1dd5d2e903ccd4b0275e1f9c2461ed30c jdk7-b147
+3170972bd3928a331c4c64a5c0c9632077fb399a 7u0
104ca42e1e7ca66b074a4619ce6420f15d8f454d jdk7u1-b02
64e323faadf65018c1ffc8bb9c97f7b664e87347 jdk7u1-b03
2256c20e66857f80cacda14ffdbc0979c929d7f8 jdk7u1-b04
@@ -197,5 +198,27 @@
7403701aa75848ca2a7b297909908b858134e132 jdk7u6-b21
fcf35906d1d88583878cd2e2d7c63dfba4e9f679 jdk7u6-b22
8824bcbfd7cd8059ededf70f1e7f2b06f02cb33f jdk7u6-b23
-1365e7472a3b737dda4a73e06ad41718d667d9be jdk7u8-b01
-0a313d4307930be3a64106b9b8c90f9342673aa0 jdk7u8-b02
+378f719cfb9491b766cd9f7cd47ad7fa3503e141 jdk7u6-b24
+5f1b80e8baec46fc28826a3a6ab8e1913c872f4c jdk7u6-b30
+2eafa8a6fd8fdb54b10045e247d1a57f9817f473 jdk7u7-b10
+c4aa15da8529451cc678d5747e7b82e9cc38627e jdk7u7-b30
+f6e11679b12e1548f407b78a940c568401dd2a19 jdk7u7-b11
+7840a267c777e22004912ad0aadd5258ac3d36c6 jdk7u7-b31
+61fc72e9fe26b3acf1572866143c22719c088b62 jdk7u7-b01
+78d9e4853388a2e7be18ff18c0b5330c074cb514 jdk7u7-b02
+fc7c5aa8c722f28c59560ce83140e803d853afc9 jdk7u9-b03
+0000000000000000000000000000000000000000 jdk7u7-b01
+61fc72e9fe26b3acf1572866143c22719c088b62 jdk7u9-b01
+0000000000000000000000000000000000000000 jdk7u7-b02
+78d9e4853388a2e7be18ff18c0b5330c074cb514 jdk7u9-b02
+b12a2d557c5e302b614c5f7e25ad6c8a0e138742 jdk7u9-b04
+ab4bbb93b3831aca230c62431f7fe02b56793450 jdk7u9-b05
+254ed6ae237ee631179819570cf7fb265c6fb3a8 jdk7u10-b10
+c1df39bcc9c1bcdfb2a92682650264b3b7771ce8 jdk7u10-b11
+00cfd60368048c4969785eb52ec50cf5691c4367 jdk7u10-b12
+51efccc2b4e908fa0475075739c1463d1dd50efc jdk7u10-b13
+c245a6332320a86342683e6f732f3f8f2f4de69a jdk7u10-b14
+89b043ba2e01e969090e23a5a7a2e9f7165ff5a0 jdk7u10-b15
+5449d5396bd8deee90f18f29899343129e3cdc4e jdk7u10-b16
+86c75e6aa3a7fa9a587fc7dd2d08af8aa8ffb9a9 jdk7u10-b17
+162a2c6ad8718a63253fa53724f704a4f85731bc jdk7u10-b18
--- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2012-08-10 09:36:39.000000000 -0700
+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2013-01-15 23:09:49.000000000 -0800
@@ -602,7 +602,7 @@
if (reader == null) {
stream = xmlInputSource.getByteStream();
if (stream == null) {
- URL location = new URL(expandedSystemId);
+ URL location = new URL(escapeNonUSAscii(expandedSystemId));
URLConnection connect = location.openConnection();
if (!(connect instanceof HttpURLConnection)) {
stream = connect.getInputStream();
@@ -2586,6 +2586,64 @@
} // fixURI(String):String
+ /**
+ * Escape invalid URI characters.
+ *
+ * Passed a URI that contains invalid characters (like spaces, non-ASCII Unicode characters, and the like),
+ * this function percent encodes the invalid characters per the URI specification (i.e., as a sequence of
+ * %-encoded UTF-8 octets).
+ *
+ * N.B. There are two problems. If the URI contains a '%' character, that might be an indication that
+ * the URI has already been escaped by the author, or it might be an invalid '%'. In the former case,
+ * it's important not to escape it, or we'll wind up with invalid, doubly-escaped '%'s. In the latter,
+ * the URI is broken if we don't encode it. Similarly, a '#' character might be the start of a fragment
+ * identifier or it might be an invalid '#'.
+ *
+ * Given that the former is vastly more likely than the latter in each case (most users are familiar with
+ * the magic status of '%' and '#' and they occur relatively infrequently in filenames, and if the user parses
+ * a proper Java File, we will already have %-escaped the URI), we simply assume that %'s and #'s are legit.
+ *
+ * Very rarely, we may be wrong. If so, tell the user to fix the clearly broken URI.
+ */
+ protected static String escapeNonUSAscii(String str) {
+ if (str == null) {
+ return str;
+ }
+
+ // get UTF-8 bytes for the string
+ StringBuffer buffer = new StringBuffer();
+ byte[] bytes = null;
+ byte b;
+ try {
+ bytes = str.getBytes("UTF-8");
+ } catch (java.io.UnsupportedEncodingException e) {
+ // should never happen
+ return str;
+ }
+ int len = bytes.length;
+ int ch;
+
+ // for each byte
+ for (int i = 0; i < len; i++) {
+ b = bytes[i];
+ // for non-ascii character: make it positive, then escape
+ if (b < 0) {
+ ch = b + 256;
+ buffer.append('%');
+ buffer.append(gHexChs[ch >> 4]);
+ buffer.append(gHexChs[ch & 0xf]);
+ }
+ else if (b != '%' && b != '#' && gNeedEscaping[b]) {
+ buffer.append('%');
+ buffer.append(gAfterEscaping1[b]);
+ buffer.append(gAfterEscaping2[b]);
+ }
+ else {
+ buffer.append((char)b);
+ }
+ }
+ return buffer.toString();
+ }
//
// Package visible methods
--- jaxws/.hgtags 2012-08-10 09:46:32.000000000 -0700
+++ jaxws/.hgtags 2013-01-16 08:58:04.000000000 -0800
@@ -123,6 +123,7 @@
05469dd4c3662c454f8a019e492543add60795cc jdk7-b146
c01bfd68d0528bc88348813c4d75d7f5c62bc4e2 jdk7u1-b01
d13b1f877bb5ed8dceb2f7ec10365d1db5f70b2d jdk7-b147
+ce6378e3c791c56b98cbf161804a07d0225b41c0 7u0
4c24f7019ce939a452154a83151294ad7da66a9d jdk7u1-b02
272778f529d11081f548f37fcd6a7aec0b11a8dd jdk7u1-b03
48b06a6e6f46e5bcd610f4bed57cd5067cf31f8c jdk7u1-b04
@@ -197,5 +198,27 @@
55dcda93e8c8b5c3170def946de35dd0407eab59 jdk7u6-b21
0fec2efe2452aed9736da39add4c7f71be561838 jdk7u6-b22
afb6d773328fa76cea65dc024a448cd931d111f2 jdk7u6-b23
-55dcda93e8c8b5c3170def946de35dd0407eab59 jdk7u8-b01
-c025e953f655b375f27f8f94493ceeb43ef1d979 jdk7u8-b02
+b8b85e62d2c5347df8cf2e825e51e3de178508ea jdk7u6-b24
+fb03d08f73e98f0dd67cb81632eb9b685de49b7e jdk7u6-b30
+739ffa9dffad4cc2febe66ca1c2d86496e80741a jdk7u7-b10
+e9a5a78329d0518efafd9f6f6149f359a7db4e2e jdk7u7-b30
+ed6262e7bb0db4cd116c31f3c88cbd7c0288de40 jdk7u7-b11
+538c248de3ef0fcb34c28295c1eab61269708137 jdk7u7-b31
+dc2e6882056c2d400d4cf3c78d67da8e20fc37cc jdk7u7-b01
+45cf55bc1732e8495425dceb385740c6852c0fc8 jdk7u7-b02
+0289894a64a628133bb63f1dc48b45593f96a14d jdk7u9-b03
+0000000000000000000000000000000000000000 jdk7u7-b01
+dc2e6882056c2d400d4cf3c78d67da8e20fc37cc jdk7u9-b01
+0000000000000000000000000000000000000000 jdk7u7-b02
+45cf55bc1732e8495425dceb385740c6852c0fc8 jdk7u9-b02
+66a2e01550a9e84e907a7f7b96e64ee90a4ec0e4 jdk7u9-b04
+f3e42e044584b1b21de29eef1b82974d273c77dc jdk7u9-b05
+dd8e4098681aa581d0398ad7d2d1e2547517c7e5 jdk7u10-b10
+1784290b63bcf021334b0accdb3868fdc4ca854e jdk7u10-b11
+fde9a060a04d9f9b54f36d645e91ec9a2b40cb81 jdk7u10-b12
+d7bf349cf0c60bc41a33c1f70969f11668deddb3 jdk7u10-b13
+17ec7a59002695c35dbd83a120b705e21d982d68 jdk7u10-b14
+75ecadd1f8fc5a218b1ed71b3c3df776d76e048e jdk7u10-b15
+ed609545e38c2e499437292c1541e4d1c2b8b992 jdk7u10-b16
+e63292c59ed8481864302cc3f53b498cbdea3470 jdk7u10-b17
+6a372e9b4ae978cdaf0b95277db31827794e2c1f jdk7u10-b18
--- jdk/.hgtags 2012-08-10 10:21:29.000000000 -0700
+++ jdk/.hgtags 2013-01-16 08:58:14.000000000 -0800
@@ -123,6 +123,7 @@
539e576793a8e64aaf160e0d6ab0b9723cd0bef0 jdk7-b146
69e973991866c948cf1808b06884ef2d28b64fcb jdk7u1-b01
f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147
+0870207843e2a74816dff1e33a717ffaf6f0a919 7u0
2baf612764d215e6f3a5b48533f74c6924ac98d7 jdk7u1-b02
a4781b6d9cfb6901452579adee17c9a17c1b584c jdk7u1-b03
b223ed9a5fdf8ce3af42adfa8815975811d70eae jdk7u1-b04
@@ -197,5 +198,27 @@
243717d7fe9589148951ffb5551264af0e446314 jdk7u6-b21
d78f2b600d393f45d6ace8ca0f29ad677624a775 jdk7u6-b22
0ae89e53f5300da1961984a7d81c220c7cf717d7 jdk7u6-b23
-df945ef30444adf08f3ef14b0c49c8bda6dda587 jdk7u8-b01
-dd1e513c05b8b8c8402e9ecf9c0d5bdbebb1a089 jdk7u8-b02
+1c775da998735711853cfe1ae1d6baddc5f12a66 jdk7u6-b24
+4bd0528374971157afd6372890f4250e1cf712d9 jdk7u6-b30
+78e01a6ca8d30e8fc4eb297d297a098edfb3fec6 jdk7u7-b10
+9666d4e4bbf3f80614e246d5c15df86154544013 jdk7u7-b30
+94154c14973aee7c5ff4846af7bcb71fe7a82fa5 jdk7u7-b11
+f93d2e3b2610b612401c95dd56d1a1122d35f676 jdk7u7-b31
+94a7d51992ae6fd31f9adc15c4976d6354dca14d jdk7u7-b01
+901c290c9c8b495a2696f10a87523363239d001b jdk7u7-b02
+0e2200a8762c1fdbd1ea812ba3f6535245372c81 jdk7u9-b03
+0000000000000000000000000000000000000000 jdk7u7-b01
+94a7d51992ae6fd31f9adc15c4976d6354dca14d jdk7u9-b01
+0000000000000000000000000000000000000000 jdk7u7-b02
+901c290c9c8b495a2696f10a87523363239d001b jdk7u9-b02
+7302c386ca9c6cd20c27d0a2adb0b142f679d6b3 jdk7u9-b04
+ffad06d7009576c3098705e05452ebc309a59e56 jdk7u9-b05
+c1efb11d7db509dafd7882811b2562ba593f6431 jdk7u10-b10
+0243e41000c6f76654725cac31ffdc95633c63e7 jdk7u10-b11
+c86a49dd4a0dca3a56f00429cfcffb2ad5f2a224 jdk7u10-b12
+c6de70ed568d190c9c7d9641b88b9b5f1bc36fd5 jdk7u10-b13
+abe96e9e10f973cf0fdacc1475e69a274ef76fcf jdk7u10-b14
+c9a0e381cd8eaf62bcacfd59b01c249de81ae167 jdk7u10-b15
+ed59989fb0635f2d4461173e218c43494f06bb82 jdk7u10-b16
+a1c5bac982a6d4aa58f551cb46cde53f526aca48 jdk7u10-b17
+115d1e4365293846bbc911cf312886c471e37fbd jdk7u10-b18
--- jdk/make/com/oracle/security/ucrypto/Makefile 2012-08-10 10:21:29.000000000 -0700
+++ jdk/make/com/oracle/security/ucrypto/Makefile 2013-01-16 08:58:09.000000000 -0800
@@ -198,9 +198,9 @@
#
# Build ucrypto.jar.
#
- $(UNSIGNED_DIR)/ucrypto.jar: build
+ $(UNSIGNED_DIR)/ucrypto.jar: build $(JCE_MANIFEST_FILE)
$(prep-target)
- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
--- jdk/make/com/sun/nio/Makefile 2012-08-10 10:21:31.000000000 -0700
+++ jdk/make/com/sun/nio/Makefile 2013-01-16 08:58:14.000000000 -0800
@@ -31,11 +31,18 @@
include $(BUILDDIR)/common/Defs.gmk
# MMM: disable for now
-ifneq ($(PLATFORM), macosx)
+ifeq (,$(findstring $(PLATFORM), bsd macosx))
include $(BUILDDIR)/common/Subdirs.gmk
SUBDIRS = sctp
endif
+ifeq ($(OS_VENDOR), FreeBSD)
+# FreeBSD 5.x and lower are unsupported, 6.x has no sctp support.
+ifneq ($(call MajorVersion,$(shell uname -r)), 6)
+include $(BUILDDIR)/common/Subdirs.gmk
+SUBDIRS = sctp
+endif
+endif
all build clean clobber::
$(SUBDIRS-loop)
--- jdk/make/com/sun/nio/sctp/Makefile 2012-08-10 10:21:31.000000000 -0700
+++ jdk/make/com/sun/nio/sctp/Makefile 2013-01-16 08:58:14.000000000 -0800
@@ -59,15 +59,11 @@
-I$(PLATFORM_SRC)/native/java/net \
-I$(CLASSHDRDIR)/../../../../java/java.nio/nio/CClassHeaders
+OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio
ifeq ($(PLATFORM), linux)
COMPILER_WARNINGS_FATAL=true
-#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl
+OTHER_LDLIBS += -lpthread $(LIBDL)
endif
-ifeq ($(PLATFORM), solaris)
-#LIBSCTP = -lsctp
-OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio
-endif # PLATFORM
else # windows
include $(BUILDDIR)/common/Classes.gmk
--- jdk/make/com/sun/security/auth/module/Makefile 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/security/auth/module/Makefile 2013-01-16 08:58:14.000000000 -0800
@@ -67,7 +67,7 @@
include FILES_c_solaris.gmk
endif # solaris
-ifneq (,$(findstring $(PLATFORM), linux macosx))
+ifneq (,$(findstring $(PLATFORM), linux bsd macosx))
LIBRARY = jaas_unix
include FILES_export_unix.gmk
include FILES_c_unix.gmk
--- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -43,7 +43,7 @@
sun/tools/attach/LinuxVirtualMachine.java
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_export = \
sun/tools/attach/BsdVirtualMachine.java
endif
--- jdk/make/com/sun/tools/attach/FILES_c.gmk 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -39,7 +39,7 @@
LinuxVirtualMachine.c
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_c = \
BsdVirtualMachine.c
endif
--- jdk/make/com/sun/tools/attach/FILES_java.gmk 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -43,7 +43,7 @@
sun/tools/attach/LinuxAttachProvider.java
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_java += \
sun/tools/attach/BsdAttachProvider.java
endif
--- jdk/make/com/sun/tools/attach/Makefile 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/Makefile 2013-01-16 08:58:14.000000000 -0800
@@ -38,7 +38,7 @@
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_m = mapfile-bsd
endif
include $(BUILDDIR)/common/Mapfile-vers.gmk
@@ -57,7 +57,7 @@
EXTRA_LIBS += psapi.lib
endif
-ifeq ($PLATFORM), macosx)
+ifeq ($(PLATFORM), macosx)
vpath %.c $(call NativeSrcDirList,,native/sun/tools/attach)
else
vpath %.c $(PLATFORM_SRC)/native/sun/tools/attach
--- jdk/make/common/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800
+++ jdk/make/common/Defs-bsd.gmk 2013-01-16 08:58:19.000000000 -0800
@@ -0,0 +1,490 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Makefile to specify compiler flags for programs and libraries
+# targeted to BSD. Should not contain any rules.
+#
+# WARNING: This file is shared with other workspaces.
+# So when it includes other files, it must use JDK_TOPDIR.
+#
+
+# Warning: the following variables are overriden by Defs.gmk. Set
+# values will be silently ignored:
+# CFLAGS (set $(OTHER_CFLAGS) instead)
+# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
+# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
+# LDFLAGS (set $(OTHER_LDFAGS) instead)
+# LDLIBS (set $(EXTRA_LIBS) instead)
+# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
+
+# Get shared JDK settings
+include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
+
+# Part of INCREMENTAL_BUILD mechanism.
+# Compiler emits things like: path/file.o: file.h
+# We want something like: relative_path/file.o relative_path/file.d: file.h
+CC_DEPEND = -MM
+CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
+
+ifndef PLATFORM_SRC
+ PLATFORM_SRC = $(BUILDDIR)/../src/solaris
+endif # PLATFORM_SRC
+
+# Location of the various .properties files specific to BSD platform
+ifndef PLATFORM_PROPERTIES
+ PLATFORM_PROPERTIES = $(BUILDDIR)/../src/solaris/lib
+endif # PLATFORM_SRC
+
+# BSD build pulls its platform sources from the solaris tree.
+JAVA_SRCDIR_LIST = src/macosx src/solaris src/share
+NATIVE_SRCDIR_LIST = src/macosx src/solaris src/share
+
+# Platform specific closed sources
+ifndef OPENJDK
+ ifndef CLOSED_PLATFORM_SRC
+ CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
+ endif
+endif
+
+# platform specific include files
+PLATFORM_INCLUDE_NAME = $(OS_NAME)
+PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
+
+# suffix used for make dependencies files.
+DEPEND_SUFFIX = d
+# The suffix applied to the library name for FDLIBM
+FDDLIBM_SUFFIX = a
+# The suffix applied to scripts (.bat for windows, nothing for unix)
+SCRIPT_SUFFIX =
+# CC compiler object code output directive flag value
+CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
+CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
+
+# 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)")
+# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ # Default OBJCOPY comes from GNU Binutils on BSD:
+ 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
+ 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
+
+ # 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
+ # and PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS) is used to indicate that a
+ # particular library or program 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)")
+
+ ZIP_DEBUGINFO_FILES ?= 1
+
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
+ endif
+endif
+
+#
+# Default optimization
+#
+
+ifndef OPTIMIZATION_LEVEL
+ ifeq ($(PRODUCT), java)
+ OPTIMIZATION_LEVEL = HIGHER
+ else
+ OPTIMIZATION_LEVEL = LOWER
+ endif
+endif
+ifndef FASTDEBUG_OPTIMIZATION_LEVEL
+ FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
+endif
+
+CC_OPT/NONE =
+CC_OPT/LOWER = -O2
+CC_OPT/HIGHER = -O3
+CC_OPT/HIGHEST = -O3
+
+CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
+
+# For all platforms, do not omit the frame pointer register usage.
+# We need this frame pointer to make it easy to walk the stacks.
+# This should be the default on X86, but ia64 and amd64 may not have this
+# as the default.
+CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_amd64 += -m64
+CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_i586 += -m32
+CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
+LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
+CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9
+LDFLAGS_COMMON_sparc += -m32 -mcpu=v9
+CFLAGS_REQUIRED_arm += -fsigned-char -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN
+ifeq ($(ZERO_BUILD), true)
+ CFLAGS_REQUIRED = $(ZERO_ARCHFLAG)
+ ifeq ($(ZERO_ENDIANNESS), little)
+ CFLAGS_REQUIRED += -D_LITTLE_ENDIAN
+ endif
+ LDFLAGS_COMMON += $(ZERO_ARCHFLAG)
+else
+ CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
+ LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
+endif
+
+# If this is a --hash-style=gnu system, use --hash-style=both
+# The gnu .hash section won't work on some Linux systems like SuSE 10.
+_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu')
+ifneq ($(_HAS_HASH_STYLE_GNU),)
+ LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
+endif
+LDFLAGS_COMMON += $(LDFLAGS_HASH_STYLE)
+
+#
+# Selection of warning messages
+#
+GCC_INHIBIT = -Wno-unused -Wno-parentheses
+GCC_STYLE =
+GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
+
+#
+# Treat compiler warnings as errors, if warnings not allowed
+#
+ifeq ($(COMPILER_WARNINGS_FATAL),true)
+ GCC_WARNINGS += -Werror
+endif
+
+#
+# Misc compiler options
+#
+ifneq ($(ARCH),ppc)
+ CFLAGS_COMMON = -fno-strict-aliasing
+endif
+PIC_CODE_LARGE = -fPIC
+PIC_CODE_SMALL = -fpic
+GLOBAL_KPIC = $(PIC_CODE_LARGE)
+CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
+ifeq ($(ARCH), amd64)
+ CFLAGS_COMMON += -pipe
+endif
+
+# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
+DEBUG_FLAG = -g
+ifeq ($(FASTDEBUG), true)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+ DEBUG_FLAG = -g1
+ endif
+endif
+
+# DEBUG_BINARIES overrides everything, use full -g debug information
+ifeq ($(DEBUG_BINARIES), true)
+ DEBUG_FLAG = -g
+ CFLAGS_REQUIRED += $(DEBUG_FLAG)
+endif
+
+# If Full Debug Symbols is enabled, then we want the same debug and
+# optimization flags as used by FASTDEBUG.
+#
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(VARIANT), OPT)
+ CC_OPT = $(DEBUG_FLAG) $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+ endif
+ endif
+endif
+
+CFLAGS_OPT = $(CC_OPT)
+CFLAGS_DBG = $(DEBUG_FLAG)
+CFLAGS_COMMON += $(CFLAGS_REQUIRED)
+
+CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
+CXXFLAGS_OPT = $(CC_OPT)
+CXXFLAGS_DBG = $(DEBUG_FLAG)
+CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
+
+# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
+ifeq ($(FASTDEBUG), true)
+ CFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+ CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+endif
+
+CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
+
+# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
+ifneq ($(ARCH),alpha)
+ CPP_ARCH_FLAGS += -D$(ARCH)
+else
+ CPP_ARCH_FLAGS += -D_$(ARCH)_
+endif
+
+CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
+ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
+
+ifeq ($(ARCH_DATA_MODEL), 64)
+CPPFLAGS_COMMON += -D_LP64=1
+endif
+
+CPPFLAGS_OPT = -DNDEBUG
+CPPFLAGS_DBG = -DDEBUG
+ifneq ($(PRODUCT), java)
+ CPPFLAGS_DBG += -DLOGGING
+endif
+
+# Libraries need to locate other libraries at runtime, and you can tell
+# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
+# buried inside the .so. The $ORIGIN says to look relative to where
+# the library itself is and it can be followed with relative paths from
+# that. By default we always look in $ORIGIN, optionally we add relative
+# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
+# On BSD we add a flag -z origin, not sure if this is necessary, but
+# doesn't seem to hurt.
+# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
+# Try: 'readelf -d lib*.so' to see these settings in a library.
+#
+Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/i586 = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/ia64 = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/arm =
+Z_ORIGIN_FLAG/ppc =
+Z_ORIGIN_FLAG/zero = -Xlinker -z -Xlinker origin
+
+LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY))
+
+LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN
+LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%)
+
+#
+# -L paths for finding and -ljava
+#
+LDFLAGS_OPT = -Xlinker -O1
+LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
+LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
+
+#
+# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
+# statically link libgcc but will print a warning with the flag. We don't
+# want the warning, so check gcc version first.
+#
+ifeq ($(CC_MAJORVER),3)
+ OTHER_LDFLAGS += -static-libgcc
+endif
+
+# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
+# (See Rules.gmk) The gcc 5 compiler might have an option for this?
+AUTOMATIC_PCH_OPTION =
+
+#
+# Post Processing of libraries/executables
+#
+ifeq ($(VARIANT), OPT)
+ ifneq ($(NO_STRIP), true)
+ ifneq ($(DEBUG_BINARIES), true)
+ # Debug 'strip -S' leaves local function Elf symbols (better stack
+ # traces)
+ POST_STRIP_PROCESS = $(STRIP) -S
+ endif
+ endif
+endif
+
+#
+# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
+#
+LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
+
+#
+# Support for Quantify.
+#
+ifdef QUANTIFY
+QUANTIFY_CMD = quantify
+QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
+LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
+endif
+
+# Using map files currently break compilation on FreeBSD during shared library
+# checks for some of the AWT native libraries.
+ifeq ($(OS_VENDOR), FreeBSD)
+LDNOMAP=true
+endif
+
+#
+# Path and option to link against the VM, if you have to. Note that
+# there are libraries that link against only -ljava, but they do get
+# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
+# the library itself should not.
+#
+VM_NAME = server
+JVMLIB = -Xlinker -rpath -Xlinker $(LIBDIR)/$(LIBARCH)/$(VM_NAME) -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
+JAVALIB = -ljava $(JVMLIB)
+
+#
+# We want to privatize JVM symbols on Solaris. This is so the user can
+# write a function called FindClass and this should not override the
+# FindClass that is inside the JVM. At this point in time we are not
+# concerned with other JNI libraries because we hope that there will
+# not be as many clashes there.
+#
+PRIVATIZE_JVM_SYMBOLS = false
+
+USE_PTHREADS = true
+override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME
+override AWT_RUNPATH =
+override HAVE_ALTZONE = false
+override HAVE_FILIOH = false
+override HAVE_GETHRTIME = false
+override HAVE_GETHRVTIME = false
+override LEX_LIBRARY = -lfl
+ifeq ($(STATIC_CXX),true)
+override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
+else
+override LIBCXX = -lstdc++
+endif
+override LIBPOSIX4 =
+override LIBSOCKET =
+override LIBNSL =
+override LIBSCF =
+override LIBTHREAD =
+override LIBDL =
+override MOOT_PRIORITIES = true
+override NO_INTERRUPTIBLE_IO = true
+override OPENWIN_HOME = $(X11_PATH)
+override OPENWIN_LIB = $(OPENWIN_HOME)/lib
+override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
+override SUN_CMM_SUBDIR =
+override THREADS_FLAG = native
+override USE_GNU_M4 = true
+override USING_GNU_TAR = true
+override WRITE_LIBVERSION = false
+
+# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
+# resulting resolved absolute name of the executable in the environment
+# variable EXECNAME. That executable name is then used that to locate the
+# installation area.
+override USE_EXECNAME = true
+
+# If your platform has DPS, it will have Type1 fonts too, in which case
+# it is best to enable DPS support until such time as 2D's rasteriser
+# can fully handle Type1 fonts in all cases. Default is "yes".
+# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
+# DPS (Displayable PostScript) is available on Solaris machines
+HAVE_DPS = no
+
+ifeq ($(OS_VENDOR), FreeBSD)
+ SYSTEM_ZLIB = true
+endif
+
+ifeq ($(OS_VENDOR), OpenBSD)
+ SYSTEM_ZLIB = true
+endif
+
+#
+# Japanese manpages
+#
+JA_SOURCE_ENCODING = eucJP
+JA_TARGET_ENCODINGS = UTF-8
+
+# Settings for the JDI - Serviceability Agent binding.
+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 ia64.
+ifeq ($(ARCH), ia64)
+ INCLUDE_SA = false
+else
+ INCLUDE_SA = true
+endif
+
+ifdef CROSS_COMPILE_ARCH
+ # X11 headers are not under /usr/include
+ OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
+ OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
+ OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
+endif
--- jdk/make/common/Defs-linux.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Defs-linux.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -429,6 +429,7 @@
override LIBDL = -ldl
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
+override OPENWIN_HOME = $(X11_PATH)
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
--- jdk/make/common/Defs-solaris.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Defs-solaris.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -753,6 +753,9 @@
# Network Services library
LIBNSL = -lnsl
+# Dynamic Loading library
+LIBDL = -ldl
+
# service configuration facility library
LIBSCF = -lscf
--- jdk/make/common/Defs.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Defs.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -179,15 +179,15 @@
ifdef ALT_FREETYPE_LIB_PATH
FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH)
- ifeq ($(PLATFORM), macosx)
+ ifneq (,$(findstring $(PLATFORM), bsd macosx))
USING_SYSTEM_FT_LIB=true
endif
else
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib
else
- ifeq ($(PLATFORM), macosx)
- FREETYPE_LIB_PATH = /usr/X11R6/lib
+ ifneq (,$(findstring $(PLATFORM), bsd macosx))
+ FREETYPE_LIB_PATH = $(X11_PATH)/lib
else
FREETYPE_LIB_PATH = /usr/lib
endif
@@ -201,8 +201,8 @@
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include
else
- ifeq ($(PLATFORM), macosx)
- FREETYPE_HEADERS_PATH = /usr/X11R6/include
+ ifneq (,$(findstring $(PLATFORM), bsd macosx))
+ FREETYPE_HEADERS_PATH = $(X11_PATH)/include
else
FREETYPE_HEADERS_PATH = /usr/include
endif
@@ -258,6 +258,10 @@
LDLIBS_COMMON = -pthread
endif
+ ifeq ($(PLATFORM), bsd)
+ LDLIBS_COMMON = -pthread
+ endif
+
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)
@@ -399,7 +403,7 @@
# We define an intermediate variable for Java files because
# we use its value later to help define $SOURCEPATH
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
VPATH0.java = $(subst $(ONESPACE),:,$(GENSRCDIR) $(call JavaSrcDirList,,classes))
else
VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
--- jdk/make/common/Library.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Library.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -299,8 +299,12 @@
ifeq ($(PLATFORM), solaris)
$(STRIP) -x $@
else
- # assume Linux
- $(STRIP) -g $@
+ ifeq ($(PLATFORM), linux)
+ $(STRIP) -g $@
+ else
+ # assume BSD
+ $(STRIP) -S $@
+ endif
endif
# implied else here is no stripping at all
endif
--- jdk/make/common/Mapfile-vers.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Mapfile-vers.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -76,7 +76,7 @@
endif # PLATFORM
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
--- jdk/make/common/Program.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Program.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -95,6 +95,17 @@
endif # SYSTEM_ZLIB
endif # PLATFORM
+ifeq ($(PLATFORM), bsd)
+ LDFLAGS += -Wl,--whole-archive
+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+ LDFLAGS += -Wl,--no-whole-archive
+# Work-around an dlsym(RTLD_DEFAULT) bug in at least FreeBSD & OpenBSD
+ LDFLAGS += -Wl,--export-dynamic
+ ifeq ($(SYSTEM_ZLIB),true)
+ OTHER_LDLIBS += -lz
+ endif
+endif #PLATFORM
+
ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
OTHER_LDLIBS += -ljli
@@ -153,7 +164,6 @@
ifndef LOCAL_RESOURCE_FILE
@$(ECHO) $(OBJDIR)/$(PROGRAM).res >> $@
endif # LOCAL_RESOURCE_FILE
- @$(ECHO) setargv.obj >> $@
@$(ECHO) Created $@
$(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
@@ -227,6 +237,11 @@
INFO_PLIST_FILE=
endif # MACOSX
+ ifeq ($(PLATFORM), bsd)
+ THREADLIBS = -pthread
+ OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
+ endif
+
#
# This rule only applies on unix. It supports quantify and its ilk.
#
@@ -281,8 +296,12 @@
ifeq ($(PLATFORM), solaris)
$(STRIP) -x $@
else
- # assume Linux
- $(STRIP) -g $@
+ ifeq ($(PLATFORM), linux)
+ $(STRIP) -g $@
+ else
+ # assume BSD
+ $(STRIP) -S $@
+ endif
endif
# implied else here is no stripping at all
endif
@@ -350,7 +369,9 @@
ifneq ($(PLATFORM), windows)
- HAVE_GETHRTIME=true
+ ifneq ($(PLATFORM), bsd)
+ HAVE_GETHRTIME=true
+ endif
endif #PLATFORM
ifeq ($(HAVE_GETHRTIME),true)
@@ -360,12 +381,10 @@
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
ifeq ($(PLATFORM), macosx)
OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin
- ifneq ($(SYSTEM_ZLIB), true)
- OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
- endif # SYSTEM_ZLIB
-else # PLATFORM !MACOSX
+endif # PLATFORM
+ifneq ($(SYSTEM_ZLIB), true)
OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
-endif
+endif # SYSTEM_ZLIB
OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
--- jdk/make/common/Release.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Release.gmk 2013-01-16 08:58:14.000000000 -0800
@@ -178,6 +178,12 @@
JA_DIRNAME=ja_JP.UTF-8
endif # linux
+ifeq ($(PLATFORM), bsd)
+ MANBASEDIRS=$(JDK_TOPDIR)/src/linux/doc $(IMPORTDOCDIR)
+ MAN1SUBDIR=man
+ JA_DIRNAME=ja_JP.UTF-8
+endif # linux
+
define copy-man-pages
$(MKDIR) -p $1/man/man1
for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \
@@ -399,10 +405,29 @@
sun/tools/jinfo \
sun/tools/jmap
+JFR_SRCDIRS_EXIST := $(shell \
+ if [ -d $(CLOSED_SHARE_SRC)/classes/com/oracle/jrockit/jfr ] ; then \
+ echo true; \
+ else \
+ echo false; \
+ fi)
+
+BUILD_JFR=
+ifndef OPENJDK
+ifndef JAVASE_EMBEDDED
+ifeq ($(JFR_SRCDIRS_EXIST), true)
+BUILD_JFR=true
+endif
+endif
+endif
+
# classes that go into jfr.jar
+JFR_CLASSES_DIRS=
+ifdef BUILD_JFR
JFR_CLASSES_DIRS= \
com/oracle/jrockit/jfr \
oracle/jrockit/jfr
+endif
# classes that go into jsse.jar
JSSE_CLASSES_DIRS = \
@@ -606,8 +631,7 @@
$(ECHO) "sun/tools/jstack/" >> $@
$(ECHO) "sun/tools/jinfo/" >> $@
$(ECHO) "sun/tools/jmap/" >> $@
-ifndef OPENJDK
-ifndef JAVASE_EMBEDDED
+ifdef BUILD_JFR
$(ECHO) "com/oracle/jrockit/jfr/" >> $@
$(ECHO) "com/oracle/jrockit/jfr/client/" >> $@
$(ECHO) "com/oracle/jrockit/jfr/management/" >> $@
@@ -618,7 +642,7 @@
$(ECHO) "oracle/jrockit/jfr/settings/" >> $@
$(ECHO) "oracle/jrockit/jfr/tools/" >> $@
endif
-endif
+
# File order list for rt.jar
@@ -645,8 +669,7 @@
# Create jfr.jar
JFR_JAR=
-ifndef OPENJDK
-ifndef JAVASE_EMBEDDED
+ifdef BUILD_JFR
JFR_JAR=$(ABS_TEMPDIR)/jfr-orig.jar
$(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE)
$(prep-target)
@@ -655,7 +678,6 @@
$(JFR_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
endif
-endif
# Create the rt.jar file list & non-class files list
@@ -983,6 +1005,12 @@
FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \
$(wildcard $(PLATFORM_SRC)/bin/java_md*)
+ifeq ($(OS_VENDOR), OpenBSD)
+ FILES_FROM_ARG=-I
+else
+ FILES_FROM_ARG=-T
+endif
+
# Standard jdk image
initial-image-jdk:: initial-image-jdk-setup \
initial-image-jdk-db \
@@ -1070,7 +1098,7 @@
@# So for Linux, make use of the -T option (like Solaris' -I option) of
@# obtaining the list of files from a file. MKS tar has no such option.
- ifneq (,$(findstring $(PLATFORM), linux macosx))
+ ifneq (,$(findstring $(PLATFORM), linux macosx bsd))
for d in $(SOURCE_DIRS); do \
$(RM) $(ABS_TEMPDIR)/src-files.list; \
($(CD) $$d && \
@@ -1083,7 +1111,7 @@
done ; \
) ; \
if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \
- ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \
+ ($(CD) $$d && $(TAR) cf - $(FILES_FROM_ARG) $(ABS_TEMPDIR)/src-files.list ) \
| ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
fi; \
done
--- jdk/make/common/Rules.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Rules.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -51,7 +51,7 @@
#
# All source tree areas for java/properties files (a few may be closed)
#
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
ifdef OPENJDK
ALL_CLASSES_SRC = $(call JavaSrcDirList,,classes)
else
@@ -212,7 +212,7 @@
$(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java
@$(add-java-file)
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
# TODO(cpc): need to document why this is necessary...
$(CLASSDESTDIR)/%.class: $(JDK_TOPDIR)/src/macosx/classes/%.java
@$(add-java-file)
--- jdk/make/common/shared/Compiler-gcc.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/shared/Compiler-gcc.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -72,6 +72,21 @@
endif
+ifeq ($(PLATFORM), bsd)
+
+ # Settings specific to BSD
+ CC = $(COMPILER_PATH)gcc
+ CPP = $(COMPILER_PATH)gcc -E
+ CXX = $(COMPILER_PATH)g++
+
+ # Option used to create a shared library
+ ifeq ($(OS_VENDOR), Apple)
+ SHARED_LIBRARY_FLAG = -dynamiclib
+ else
+ SHARED_LIBRARY_FLAG = -shared
+ endif
+endif
+
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris
--- jdk/make/common/shared/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800
+++ jdk/make/common/shared/Defs-bsd.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -0,0 +1,262 @@
+#
+# Copyright (c) 2005, 2011, 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. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Definitions for BSD.
+#
+
+# Default for COMPILER_WARNINGS_FATAL on BSD (C & C++ compiler warnings)
+ifndef COMPILER_WARNINGS_FATAL
+ COMPILER_WARNINGS_FATAL=false
+endif
+
+# BSD should use parallel compilation for best build times
+ifndef COMPILE_APPROACH
+ COMPILE_APPROACH = parallel
+endif
+
+# Indication that we are doing an incremental build.
+# This may trigger the creation of make depend files.
+ifndef INCREMENTAL_BUILD
+ INCREMENTAL_BUILD = false
+endif
+
+# FullPath just makes sure it never ends with a / and no duplicates
+define FullPath
+$(shell cd $1 2> $(DEV_NULL) && pwd)
+endef
+
+# OptFullPath: Absolute path name of a dir that might not initially exist.
+define OptFullPath
+$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
+endef
+
+ifdef ALT_X11_PATH
+ X11_PATH = $(ALT_X11_PATH)
+else
+ ifeq ($(OS_VENDOR), NetBSD)
+ X11_PATH = /usr/X11R7
+ else
+ ifeq ($(OS_VENDOR), FreeBSD)
+ X11_PATH = /usr/local
+ else
+ X11_PATH = /usr/X11R6
+ endif
+ endif
+endif
+
+ifdef ALT_PACKAGE_PATH
+ PACKAGE_PATH = $(ALT_PACKAGE_PATH)
+else
+ ifeq ($(OS_VENDOR), NetBSD)
+ PACKAGE_PATH = /usr/pkg
+ else
+ PACKAGE_PATH = /usr/local
+ endif
+endif
+
+# ALSA
+ifdef ALT_ALSA_LIB_PATH
+ ALSA_LIB_PATH = $(ALT_ALSA_LIB_PATH)
+else
+ ALSA_LIB_PATH = $(PACKAGE_PATH)/lib
+endif
+
+ifdef ALT_ALSA_HEADERS_PATH
+ ALSA_HEADERS_PATH = $(ALT_ALSA_HEADERS_PATH)
+else
+ ALSA_HEADERS_PATH = $(PACKAGE_PATH)/include
+endif
+
+# Location on system where jdk installs might be
+USRJDKINSTANCES_PATH = $(PACKAGE_PATH)
+
+# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
+ UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
+else
+ UNIXCOMMAND_PATH = /bin/
+endif
+
+# USRBIN_PATH: path to where the most common Unix commands are.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
+ USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
+else
+ USRBIN_PATH = /usr/bin/
+endif
+
+# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
+ UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
+else
+ UNIXCCS_PATH = /usr/ccs/bin/
+endif
+
+# SLASH_JAVA: location of all network accessable files
+ifdef ALT_SLASH_JAVA
+ SLASH_JAVA :=$(ALT_SLASH_JAVA)
+else
+ SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
+endif
+
+# JDK_DEVTOOLS_DIR: common path for all the java devtools
+ifdef ALT_JDK_DEVTOOLS_DIR
+ JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
+else
+ JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
+endif
+
+# COMPILER_PATH: path to where the compiler and tools are installed.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
+ COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
+else
+ COMPILER_PATH =/usr/bin/
+endif
+
+# OPENWIN_HOME: path to where the X11 environment is installed.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq ($(ALT_OPENWIN_HOME),)
+ OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME))
+else
+ OPENWIN_HOME =$(X11_PATH)
+endif
+
+# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
+ DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
+else
+ DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
+endif
+
+# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
+# _BOOTDIR2: Second choice
+ifndef ALT_BOOTDIR
+ _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
+ _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
+endif
+
+# Always build headless on BSD
+BUILD_HEADLESS = true
+LIBM=-lm
+
+_CUPS_HEADERS_PATH=$(PACKAGE_PATH)/include
+
+# Import JDK images allow for partial builds, components not built are
+# imported (or copied from) these import areas when needed.
+
+# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
+# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
+ifdef ALT_BUILD_JDK_IMPORT_PATH
+ BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
+else
+ BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
+endif
+BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
+
+# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
+ifdef ALT_JDK_IMPORT_PATH
+ JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
+else
+ JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
+endif
+JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
+
+# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
+ifdef ALT_HOTSPOT_IMPORT_PATH
+ HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
+else
+ HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
+endif
+HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
+
+# HOTSPOT_CLIENT_PATH: location of client jvm library file.
+ifeq ($(ARCH_DATA_MODEL), 32)
+ ifdef ALT_HOTSPOT_CLIENT_PATH
+ HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
+ else
+ HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
+ endif
+ HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
+endif
+
+# HOTSPOT_SERVER_PATH: location of server jvm library file.
+ifdef ALT_HOTSPOT_SERVER_PATH
+ HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
+else
+ HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
+endif
+HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
+
+# Special define for checking the binaries
+
+# Debug builds should downgrade warnings to just info
+MAPFILE_WARNING-DBG=INFO
+MAPFILE_WARNING-OPT=WARNING
+MAPFILE_WARNING-=WARNING
+MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
+
+# Macro to check it's input file for banned dependencies and verify the
+# binary built properly. Relies on process exit code.
+ifndef CROSS_COMPILE_ARCH
+ifeq ($(OS_VENDOR), OpenBSD)
+define binary_file_verification # binary_file
+( \
+ $(ECHO) "Checking for mapfile use in: $1" && \
+ if [ "`$(OBJDUMP) -T $1 | $(EGREP) '[0-9a-f]* g *DF \.text.*SUNWprivate'`" = "" ] ; then \
+ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
+ fi && \
+ $(ECHO) "Library loads for: $1" && \
+ $(LDD) $1 && \
+ $(ECHO) "RUNPATH for: $1" && \
+ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+) || true
+endef
+else
+define binary_file_verification # binary_file
+( \
+ $(ECHO) "Checking for mapfile use in: $1" && \
+ if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
+ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
+ fi && \
+ $(ECHO) "Library loads for: $1" && \
+ $(LDD) $1 && \
+ $(ECHO) "RUNPATH for: $1" && \
+ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+)
+endef
+endif
+else
+define binary_file_verification
+( \
+ $(ECHO) "Skipping binary file verification for cross-compile build" \
+)
+endef
+endif
+
--- jdk/make/common/shared/Defs-utils.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/shared/Defs-utils.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -74,6 +74,13 @@
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
endif
+ifeq ($(PLATFORM),bsd)
+ UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
+ UTILS_USR_BIN_PATH=$(USRBIN_PATH)
+ UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
+ UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
+endif
+
# Utilities
ifdef CROSS_COMPILE_ARCH
AR = $(COMPILER_PATH)ar
@@ -251,3 +258,35 @@
# Builtin shell command, no -e option needed
ECHO = echo
endif
+
+# BSD specific
+ifeq ($(PLATFORM),bsd)
+ BASENAME = $(UTILS_USR_BIN_PATH)basename
+ EGREP = $(UTILS_USR_BIN_PATH)egrep
+ EXPR = $(UTILS_COMMAND_PATH)expr
+ FMT = $(UTILS_USR_BIN_PATH)fmt
+ GREP = $(UTILS_USR_BIN_PATH)grep
+ GUNZIP = $(UTILS_USR_BIN_PATH)gunzip
+ ID = $(UTILS_USR_BIN_PATH)id
+ MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt
+ SED = $(UTILS_USR_BIN_PATH)sed
+ SORT = $(UTILS_USR_BIN_PATH)sort
+ TEST = $(UTILS_COMMAND_PATH)test
+ TOUCH = $(UTILS_USR_BIN_PATH)touch
+ TRUE = $(UTILS_USR_BIN_PATH)true
+ UNAME = $(UTILS_USR_BIN_PATH)uname
+ UNZIP = $(UTILS_DEVTOOL_PATH)unzip
+ # BSD OS_VENDOR specific
+ ifeq ($(OS_VENDOR), OpenBSD)
+ NAWK = $(UTILS_USR_BIN_PATH)awk
+ OBJDUMP = $(UTILS_USR_BIN_PATH)objdump
+ else
+ CPIO = $(UTILS_USR_BIN_PATH)cpio
+ TAR = $(UTILS_USR_BIN_PATH)tar
+ endif
+ ifeq ($(OS_VENDOR), NetBSD)
+ NAWK = $(UTILS_USR_BIN_PATH)awk
+ ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
+ UNZIP = $(UTILS_DEVTOOL_PATH)unzip
+ endif
+endif
--- jdk/make/common/shared/Defs-versions.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/shared/Defs-versions.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -44,6 +44,11 @@
override CC_VERSION = gcc
endif
+# BSD uses GNU compilers by default
+ifeq ($(PLATFORM), bsd)
+ override CC_VERSION = gcc
+endif
+
# Mac OS X uses LLVM by default
ifeq ($(PLATFORM), macosx)
override CC_VERSION = llvm
@@ -169,6 +174,13 @@
endif
endif
+# BSD specific
+ifeq ($(PLATFORM), macosx)
+ REQUIRED_COMPILER_NAME = GCC4
+ REQUIRED_COMPILER_VERSION = GCC4
+ REQUIRED_CC_VER = 4.2.1
+endif
+
# Mac specific
ifeq ($(PLATFORM), macosx)
REQUIRED_OS_NAME = Darwin
--- jdk/make/common/shared/Defs.gmk 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/common/shared/Defs.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -181,7 +181,7 @@
# platform and shared sources/headers. This is mainly useful for the
# Mac OS X build, which pulls its platform sources from the solaris and/or
# macosx trees, depending on the component.
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
define JavaSrcDirList
$(JAVA_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2)
endef
--- jdk/make/common/shared/Platform.gmk 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/common/shared/Platform.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -298,6 +298,85 @@
# How much RAM does this machine have:
endif
+ifeq ($(SYSTEM_UNAME), FreeBSD)
+ PLATFORM = bsd
+ OS_NAME = freebsd
+ OS_VENDOR = FreeBSD
+ REQUIRED_OS_VERSION = 6.0
+endif
+
+ifeq ($(SYSTEM_UNAME), NetBSD)
+ PLATFORM = bsd
+ OS_NAME = netbsd
+ OS_VENDOR = NetBSD
+ REQUIRED_OS_VERSION = 3.0
+endif
+
+ifeq ($(SYSTEM_UNAME), OpenBSD)
+ PLATFORM = bsd
+ OS_NAME = openbsd
+ OS_VENDOR = OpenBSD
+ REQUIRED_OS_VERSION = 4.9
+endif
+
+# Platform settings specific to BSD
+ifeq ($(PLATFORM), bsd)
+ OS_VERSION := $(shell uname -r)
+ # Arch and OS name/version
+ mach := $(shell uname -m)
+ archExpr = case "$(mach)" in \
+ i[3-9]86) \
+ echo i586 \
+ ;; \
+ sparc64) \
+ echo sparcv9 \
+ ;; \
+ sparc*) \
+ echo sparc \
+ ;; \
+ x86_64) \
+ echo amd64 \
+ ;; \
+ "Power Macintosh") \
+ echo ppc \
+ ;; \
+ *) \
+ echo $(mach) \
+ ;; \
+ esac
+ ARCH := $(shell $(archExpr) )
+ ARCH_FAMILY := $(ARCH)
+
+ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
+ ifneq (,$(findstring $(ARCH), i586 sparc ppc))
+ ARCH_DATA_MODEL=32
+ else
+ ARCH_DATA_MODEL=64
+ endif
+
+ # Need to maintain the jre/lib/i386 location for 32-bit Intel
+ ifeq ($(ARCH), i586)
+ LIBARCH = i386
+ else
+ LIBARCH = $(ARCH)
+ endif
+
+ # Value of Java os.arch property
+ ARCHPROP = $(LIBARCH)
+
+ # Suffix for file bundles used in previous release
+ BUNDLE_FILE_SUFFIX=.tar.gz
+ # Minimum disk space needed as determined by running 'du -sk' on
+ # a fully built workspace.
+ REQUIRED_FREE_SPACE=1500000
+ # How much RAM does this machine have:
+ ifeq ($(OS_VENDOR), OpenBSD)
+ MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' )
+ else
+ MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' )
+ endif
+endif
+
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
--- jdk/make/java/Makefile 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/java/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -53,7 +53,7 @@
endif
endif # PLATFORM
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
SUBDIRS += jexec
endif # PLATFORM
--- jdk/make/java/instrument/Makefile 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/java/instrument/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -104,12 +104,24 @@
# equivalent of strcasecmp is stricmp on Windows
CPPFLAGS_COMMON += -Dstrcasecmp=stricmp
else
-ifneq (,$(findstring $(PLATFORM), macosx))
- ifneq ($(ARCH), universal)
- LDFLAGS += -Wl,-all_load
+ifneq (,$(findstring $(PLATFORM), macosx bsd))
+ ifeq ($(OS_VENDOR), Apple)
+ ifneq ($(ARCH), universal)
+ LDFLAGS += -Wl,-all_load
+ endif
+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+ OTHER_LDLIBS += -liconv
+ else
+ LDFLAGS += -Wl,--whole-archive
+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+ LDFLAGS += -Wl,--no-whole-archive
+ ifneq ($(OS_NAME), netbsd)
+# Use CPPFLAGS instead of OTHER_INCLUDES to force this last
+ CPPFLAGS += -I$(PACKAGE_PATH)/include
+ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
+ endif
endif
- LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
- OTHER_LDLIBS += -liconv
+
ifeq ($(SYSTEM_ZLIB), true)
OTHER_LDLIBS += -lz
endif
--- jdk/make/java/java/FILES_java.gmk 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/java/java/FILES_java.gmk 2013-01-16 08:58:09.000000000 -0800
@@ -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
@@ -476,6 +476,7 @@
sun/misc/MessageUtils.java \
sun/misc/GC.java \
sun/misc/Service.java \
+ sun/misc/JavaAWTAccess.java \
sun/misc/JavaLangAccess.java \
sun/misc/JavaIOAccess.java \
sun/misc/JavaIOFileDescriptorAccess.java \
--- jdk/make/java/java/Makefile 2012-08-10 10:21:35.000000000 -0700
+++ jdk/make/java/java/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -175,9 +175,11 @@
#
ifneq ($(PLATFORM), windows)
ifneq ($(PLATFORM), macosx)
+ifneq ($(PLATFORM), bsd)
HAVE_ALTZONE=true
endif
endif
+endif
ifeq ($(HAVE_ALTZONE),true)
OTHER_CPPFLAGS += -DHAVE_ALTZONE
--- jdk/make/java/java/genlocales.gmk 2012-08-10 10:21:35.000000000 -0700
+++ jdk/make/java/java/genlocales.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -93,18 +93,66 @@
else
+ifeq ($(PLATFORM), bsd)
+
+$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
+ @$(RM) $@.tmp.euro $@.tmp.noneuro;
+ @$(prep-target)
+ @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.euro;
+ @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.euro;
+ @$(ECHO) $(NonEuro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.noneuro;
+ @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.noneuro;
+ NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
+ $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
+ $@.tmp.noneuro $< $@
+ @$(RM) $@.tmp.euro $@.tmp.noneuro;
+
+else
+
+ifeq ($(PLATFORM), bsd)
+
+$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
+ @$(RM) $@.tmp.euro $@.tmp.noneuro;
+ @$(prep-target)
+ @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.euro;
+ @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.euro;
+ @$(ECHO) $(NonEuro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.noneuro;
+ @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.noneuro;
+ NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
+ $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
+ $@.tmp.noneuro $< $@
+ @$(RM) $@.tmp.euro $@.tmp.noneuro;
+
+else
+
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
@$(RM) $@.tmp.euro $@.tmp.noneuro;
@$(prep-target)
- @$(ECHO) $(subst .properties,'\n',$(Euro_Resources_properties)) > $@.tmp.euro;
- @$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro;
- @$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro;
- @$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro;
+ @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.euro;
+ @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.euro;
+ @$(ECHO) $(NonEuro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.noneuro;
+ @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.noneuro;
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
$@.tmp.noneuro $< $@
@$(RM) $@.tmp.euro $@.tmp.noneuro;
endif
+
+endif
+
+endif
genlocales : $(LocaleDataMetaInfo_Dest)
--- jdk/make/java/jli/Makefile 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/jli/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -90,7 +90,8 @@
# add platform specific files
ifeq ($(PLATFORM), windows)
- FILES_c += java_md.c
+ FILES_c += java_md.c \
+ cmdtoargs.c
else # NIXES
FILES_c += java_md_common.c
ifeq ($(PLATFORM), macosx)
@@ -116,9 +117,9 @@
LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"'
endif # PLATFORM
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), macosx bsd))
OTHER_CPPFLAGS += $(LIBARCH_DEFINES) -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
-else # ! MACOSX
+else # ! MACOSX || BSD
OTHER_CPPFLAGS += $(LIBARCH_DEFINES)
endif #PLATFORM
@@ -131,7 +132,7 @@
# Note: it is important to keep this order, meaning -lc as the
# last library, otherwise it could cause compatibility issues
# by pulling in SUNW_private symbols from libc
- LDLIBS = -ldl -lc
+ LDLIBS = $(LIBDL) -lc
ifeq ($(USE_PTHREADS),true)
LDLIBS += -lpthread
endif # USE_PTHREADS
@@ -149,7 +150,11 @@
-export:JLI_ReportErrorMessage \
-export:JLI_ReportErrorMessageSys \
-export:JLI_ReportMessage \
- -export:JLI_ReportExceptionDescription
+ -export:JLI_ReportExceptionDescription \
+ -export:JLI_MemAlloc \
+ -export:JLI_CmdToArgs \
+ -export:JLI_GetStdArgc \
+ -export:JLI_GetStdArgs
endif # PLATFORM
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
--- jdk/make/java/jli/mapfile-vers 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/jli/mapfile-vers 2013-01-16 08:58:09.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2008, 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
@@ -35,9 +35,8 @@
JLI_ReportErrorMessageSys;
JLI_ReportMessage;
JLI_ReportExceptionDescription;
-# JNI_CreateJavaVM;
-# JNI_GetCreatedJavaVMs;
-# JNI_GetDefaultJavaVMInitArgs;
+ JLI_GetStdArgs;
+ JLI_GetStdArgc;
local:
*;
};
--- jdk/make/java/net/FILES_c.gmk 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/net/FILES_c.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -47,6 +47,10 @@
FILES_c += bsd_close.c
endif
+ifeq ($(OS_VENDOR), FreeBSD)
+ FILES_c += bsd_close.c
+endif
+
ifeq ($(PLATFORM), windows)
FILES_c += TwoStacksPlainSocketImpl.c
FILES_c += DualStackPlainSocketImpl.c
--- jdk/make/java/net/Makefile 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/net/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -74,6 +74,7 @@
FILES_export += java/net/DualStackPlainSocketImpl.java
FILES_export += java/net/TwoStacksPlainDatagramSocketImpl.java
FILES_export += java/net/DualStackPlainDatagramSocketImpl.java
+ FILES_export += sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java
else
FILES_export += java/net/PlainDatagramSocketImpl.java
endif
@@ -91,7 +92,7 @@
include $(BUILDDIR)/common/Library.gmk
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), macosx bsd))
ifdef DONT_ENABLE_IPV6
OTHER_CFLAGS += -DDONT_ENABLE_IPV6
endif
--- jdk/make/java/nio/Makefile 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/nio/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -260,7 +260,7 @@
sun/nio/fs/UnixConstants.java
endif # PLATFORM = linux
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_java += \
sun/nio/ch/AbstractPollSelectorImpl.java \
sun/nio/ch/BsdAsynchronousChannelProvider.java \
@@ -331,7 +331,7 @@
sun/nio/fs/UnixConstants.java
endif # PLATFORM = bsd, macosx
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_java += \
sun/nio/ch/KQueueSelectorProvider.java \
sun/nio/ch/KQueueSelectorImpl.java \
@@ -339,6 +339,9 @@
FILES_c += \
KQueueArrayWrapper.c
+endif # PLATFORM = bsd, macosx
+
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
vpath %.c $(call NativeSrcDirList,,native/sun/nio/fs)
vpath %.c $(call NativeSrcDirList,,native/sun/nio/ch)
@@ -381,7 +384,7 @@
ifeq ($(PLATFORM), linux)
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread
endif
ifeq ($(PLATFORM), solaris)
@@ -406,7 +409,7 @@
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_m = mapfile-bsd
endif
include $(BUILDDIR)/common/Mapfile-vers.gmk
--- jdk/make/java/nio/mapfile-bsd 2012-08-10 10:21:37.000000000 -0700
+++ jdk/make/java/nio/mapfile-bsd 2013-01-16 11:15:18.000000000 -0800
@@ -70,6 +70,7 @@
Java_sun_nio_ch_IOUtil_drain;
Java_sun_nio_ch_IOUtil_fdVal;
Java_sun_nio_ch_IOUtil_initIDs;
+ Java_sun_nio_ch_IOUtil_iovMax;
Java_sun_nio_ch_IOUtil_makePipe;
Java_sun_nio_ch_IOUtil_randomBytes;
Java_sun_nio_ch_IOUtil_setfdVal;
--- jdk/make/java/npt/Makefile 2012-08-10 10:21:37.000000000 -0700
+++ jdk/make/java/npt/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -74,6 +74,14 @@
OTHER_LDLIBS += -liconv
endif
+# Add location of iconv headers
+ifeq ($(PLATFORM), bsd)
+ ifneq ($(OS_NAME), netbsd)
+ CPPFLAGS += -I$(PACKAGE_PATH)/include
+ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
+ endif
+endif
+
#
# Add to ambient vpath so we pick up the library files
#
--- jdk/make/java/redist/fonts/Makefile 2012-08-10 10:21:37.000000000 -0700
+++ jdk/make/java/redist/fonts/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -42,7 +42,7 @@
$(LIBDIR)/fonts/LucidaSansRegular.ttf \
$(LIBDIR)/fonts/LucidaSansDemiBold.ttf \
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
# The oblique versions of the font are derived from the base versions
# and since 2D can do this derivation on the fly at run time there is no
@@ -82,7 +82,7 @@
$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$(install-file)
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
# The oblique fonts are only needed/wanted on Linux.
@@ -96,7 +96,7 @@
$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
$(install-file)
-endif # linux
+endif # linux || bsd
all build : $(INTERNAL_IMPORT_LIST)
--- jdk/make/javax/crypto/Defs-jce.gmk 2012-08-10 10:21:39.000000000 -0700
+++ jdk/make/javax/crypto/Defs-jce.gmk 2013-01-16 08:58:09.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 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
@@ -31,7 +31,7 @@
JCE_MANIFEST_FILE = $(TEMPDIR)/manifest.mf
$(JCE_MANIFEST_FILE): $(MAINMANIFEST)
$(prep-target)
- $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+ $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@
$(ECHO) "Extension-Name: javax.crypto" >> $@
--- jdk/make/javax/sound/Makefile 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/javax/sound/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -111,6 +111,21 @@
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/
endif # PLATFORM linux
+ifeq ($(PLATFORM), bsd)
+ifeq ($(OS_VENDOR), FreeBSD)
+ # ALSA handles directaudio, ports, and MIDI
+ SUBDIRS += jsoundalsa
+ EXTRA_SOUND_JNI_LIBS += jsoundalsa
+else
+ # build with empty MIDI i/o
+ INCLUDE_MIDI = TRUE
+ # build with empty ports
+ INCLUDE_PORTS = TRUE
+ # build with empty direct audio
+ INCLUDE_DAUDIO = TRUE
+endif
+endif # PLATFORM bsd
+
ifeq ($(PLATFORM), macosx)
CPPFLAGS += -DUSE_PORTS=TRUE \
-DUSE_DAUDIO=TRUE \
--- jdk/make/javax/sound/SoundDefs.gmk 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/javax/sound/SoundDefs.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -40,6 +40,10 @@
CPPFLAGS += -DX_PLATFORM=X_LINUX
endif # PLATFORM linux
+ifeq ($(PLATFORM), bsd)
+ CPPFLAGS += -DX_PLATFORM=X_BSD
+endif # PLATFORM bsd
+
ifeq ($(PLATFORM), macosx)
CPPFLAGS += -DX_PLATFORM=X_MACOSX
endif # PLATFORM macosx
--- jdk/make/javax/sound/jsoundalsa/Makefile 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/javax/sound/jsoundalsa/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -51,6 +51,7 @@
$(PORTFILES_c)
# platform dependent files
+ifeq ($(PLATFORM), linux)
FILES_c += \
PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
PLATFORM_API_LinuxOS_ALSA_PCM.c \
@@ -60,19 +61,37 @@
PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
PLATFORM_API_LinuxOS_ALSA_Ports.c
+MIDI_CPPFLAGS= \
+ -DUSE_PLATFORM_MIDI_OUT=TRUE \
+ -DUSE_PLATFORM_MIDI_IN=TRUE
+endif
+
+ifeq ($(PLATFORM), bsd)
+FILES_c += \
+ PLATFORM_API_BsdOS_ALSA_CommonUtils.c \
+ PLATFORM_API_BsdOS_ALSA_PCM.c \
+ PLATFORM_API_BsdOS_ALSA_PCMUtils.c \
+ PLATFORM_API_BsdOS_ALSA_MidiIn.c \
+ PLATFORM_API_BsdOS_ALSA_MidiOut.c \
+ PLATFORM_API_BsdOS_ALSA_MidiUtils.c \
+ PLATFORM_API_BsdOS_ALSA_Ports.c
+
+MIDI_CPPFLAGS=
+endif
+
FILES_export = \
$(DAUDIOFILES_export) \
$(MIDIFILES_export) \
$(PORTFILES_export)
-OTHER_LDLIBS += -lasound
+OTHER_LDLIBS += -L$(ALSA_LIB_PATH) -lasound
CPPFLAGS += \
-DUSE_DAUDIO=TRUE \
-DUSE_PORTS=TRUE \
- -DUSE_PLATFORM_MIDI_OUT=TRUE \
- -DUSE_PLATFORM_MIDI_IN=TRUE \
- -I$(SHARE_SRC)/native/com/sun/media/sound
+ $(MIDI_CPPFLAGS) \
+ -I$(SHARE_SRC)/native/com/sun/media/sound \
+ -I$(ALSA_HEADERS_PATH)
#
# Add to the ambient VPATH.
--- jdk/make/jpda/transport/socket/Makefile 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/jpda/transport/socket/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -38,6 +38,11 @@
include $(BUILDDIR)/common/Defs.gmk
+ifeq ($(PLATFORM), bsd))
+ LIBSOCKET =
+ OTHER_LDLIBS += -pthread
+endif
+
ifeq ($(PLATFORM), linux)
OTHER_LDLIBS += $(LIBNSL) $(LIBSOCKET) -lpthread
endif
--- jdk/make/sun/awt/Makefile 2012-08-10 10:21:49.000000000 -0700
+++ jdk/make/sun/awt/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -125,6 +125,13 @@
FILES_c += initIDs.c
+ifeq ($(PLATFORM), bsd)
+FILES_c = $(FILES_2D_c)
+FILES_c += awt_LoadLibrary.c
+OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
+OTHER_LDLIBS = $(JVMLIB) $(LIBM)
+endif
+
ifeq ($(PLATFORM), macosx)
FILES_c = $(FILES_2D_c)
FILES_c += awt_LoadLibrary.c
@@ -425,6 +432,17 @@
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS
endif # PLATFORM
+ifeq ($(PLATFORM), bsd)
+# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BSD
+
+FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/fontconfigs
+_FONTCONFIGS = \
+ fontconfig.properties
+
+FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
+
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BSD
+endif # PLATFORM
ifeq ($(PLATFORM), macosx)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
@@ -530,6 +548,9 @@
-I$(OPENWIN_HOME)/include/X11/extensions \
-I$(PLATFORM_SRC)/native/$(PKGDIR)/font
endif
+ifeq ($(PLATFORM), bsd)
+CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
+endif
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-I$(SHARE_SRC)/native/$(PKGDIR)/../font \
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \
@@ -551,7 +572,13 @@
-I$(PLATFORM_SRC)/native/$(PKGDIR) \
$(EVENT_MODEL)
-ifeq ($(PLATFORM), linux)
+# include these last so we don't pick up unintentional includes
+ifeq ($(PLATFORM), bsd)
+CPPFLAGS += -I$(OPENWIN_HOME)/include \
+ -I$(OPENWIN_HOME)/include/X11/extensions
+endif
+
+ifneq (,$(findstring $(PLATFORM), linux bsd))
LDFLAGS += -L$(OPENWIN_LIB)
endif
--- jdk/make/sun/awt/mawt.gmk 2012-08-10 10:21:49.000000000 -0700
+++ jdk/make/sun/awt/mawt.gmk 2013-01-16 08:58:15.000000000 -0800
@@ -169,7 +169,7 @@
OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
endif
-ifneq (,$(findstring $(PLATFORM), linux macosx))
+ifneq (,$(findstring $(PLATFORM), bsd linux macosx))
OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
# XXX what is this define below? Isn't it motif-related?
OTHER_CFLAGS += -DXMSTRINGDEFINES=1
@@ -198,6 +198,9 @@
ifndef HEADLESS
CPPFLAGS += -I$(OPENWIN_HOME)/include
LDFLAGS += -L$(OPENWIN_LIB)
+ifeq ($(OS_NAME), netbsd)
+LDFLAGS += -Wl,-R$(OPENWIN_LIB)
+endif
endif # !HEADLESS
@@ -240,6 +243,12 @@
$(wildcard /usr/include/X11/extensions))
endif
+ifeq ($(PLATFORM), bsd))
+ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
+ -I$(OPENWIN_HOME)/include \
+ -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
+
ifeq ($(PLATFORM), macosx))
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
-I$(OPENWIN_HOME)/include
--- jdk/make/sun/font/Makefile 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/font/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -91,7 +91,7 @@
endif # PLATFORM
# Turn off aliasing with GCC for ExtensionSubtables.cpp
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), bsd linux))
CXXFLAGS += $(CXXFLAGS_$(@F))
CXXFLAGS_ExtensionSubtables.o = -fno-strict-aliasing
endif
@@ -178,7 +178,7 @@
# Libraries to link, and other C flags.
#
-ifeq ($(PLATFORM), macosx))
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
OTHER_INCLUDES += -I$(X11_PATH)/include
OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX)
ifeq ($(OS_VENDOR),Apple)
--- jdk/make/sun/javazic/tzdata/VERSION 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/VERSION 2013-01-16 08:58:09.000000000 -0800
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2012c
+tzdata2012i
--- jdk/make/sun/javazic/tzdata/africa 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/africa 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)africa 8.35
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -261,7 +260,7 @@
# I received a mail from an airline which says that the daylight
# saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
# From Jesper Norgaard Welen (2007-08-15): [The following agree:]
-# http://www.nentjes.info/Bill/bill5.htm
+# http://www.nentjes.info/Bill/bill5.htm
# http://www.timeanddate.com/worldclock/city.html?n=53
# From Steffen Thorsen (2007-09-04): The official information...:
# http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm
@@ -315,18 +314,18 @@
# in September.
# From Steffen Thorsen (2009-08-11):
-# We have been able to confirm the August change with the Egyptian Cabinet
+# We have been able to confirm the August change with the Egyptian Cabinet
# Information and Decision Support Center:
# <a href="http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html">
# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
# </a>
-#
+#
# The Middle East News Agency
# <a href="http://www.mena.org.eg/index.aspx">
# http://www.mena.org.eg/index.aspx
# </a>
# also reports "Egypt starts winter time on August 21"
-# today in article numbered "71, 11/08/2009 12:25 GMT."
+# today in article numbered "71, 11/08/2009 12:25 GMT."
# Only the title above is available without a subscription to their service,
# and can be found by searching for "winter" in their search engine
# (at least today).
@@ -505,7 +504,7 @@
# From Steffen Thorsen (2008-06-25):
# Mauritius plans to observe DST from 2008-11-01 to 2009-03-31 on a trial
# basis....
-# It seems that Mauritius observed daylight saving time from 1982-10-10 to
+# It seems that Mauritius observed daylight saving time from 1982-10-10 to
# 1983-03-20 as well, but that was not successful....
# http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
@@ -529,12 +528,12 @@
# than previously announced (2008-11-01 to 2009-03-31). The new start
# date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
# given, but it is probably at either 2 or 3 wall clock time).
-#
-# A little strange though, since the article says that they moved the date
-# to align itself with Europe and USA which also change time on that date,
-# but that means they have not paid attention to what happened in
-# USA/Canada last year (DST ends first Sunday in November). I also wonder
-# why that they end on a Friday, instead of aligning with Europe which
+#
+# A little strange though, since the article says that they moved the date
+# to align itself with Europe and USA which also change time on that date,
+# but that means they have not paid attention to what happened in
+# USA/Canada last year (DST ends first Sunday in November). I also wonder
+# why that they end on a Friday, instead of aligning with Europe which
# changes two days later.
# From Alex Krivenyshev (2008-07-11):
@@ -593,7 +592,7 @@
# </a>
# From Arthur David Olson (2009-07-11):
-# The "mauritius-dst-will-not-repeat" wrapup includes this:
+# The "mauritius-dst-will-not-repeat" wrapup includes this:
# "The trial ended on March 29, 2009, when the clocks moved back by one hour
# at 2am (or 02:00) local time..."
@@ -687,8 +686,8 @@
# XXX--guess that it is only Morocco for now; guess only 2008 for now.
# From Steffen Thorsen (2008-08-27):
-# Morocco will change the clocks back on the midnight between August 31
-# and September 1. They originally planned to observe DST to near the end
+# Morocco will change the clocks back on the midnight between August 31
+# and September 1. They originally planned to observe DST to near the end
# of September:
#
# One article about it (in French):
@@ -822,6 +821,23 @@
# "...&agrave; partir du dernier dimance d'avril et non fins mars,
# comme annonc&eacute; pr&eacute;c&eacute;demment."
+# From Milamber Space Network (2012-07-17):
+# The official return to GMT is announced by the Moroccan government:
+# <a href="http://www.mmsp.gov.ma/fr/actualites.aspx?id=288">
+# http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French]
+# </a>
+#
+# Google translation, lightly edited:
+# Back to the standard time of the Kingdom (GMT)
+# Pursuant to Decree No. 2-12-126 issued on 26 Jumada (I) 1433 (April 18,
+# 2012) and in accordance with the order of Mr. President of the
+# Government No. 3-47-12 issued on 24 Sha'ban (11 July 2012), the Ministry
+# of Public Service and Administration Modernization announces the return
+# of the legal time of the Kingdom (GMT) from Friday, July 20, 2012 until
+# Monday, August 20, 2012. So the time will be delayed by 60 minutes from
+# 3:00 am Friday, July 20, 2012 and will again be advanced by 60 minutes
+# August 20, 2012 from 2:00 am.
+
# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Morocco 1939 only - Sep 12 0:00 1:00 S
@@ -849,6 +865,8 @@
Rule Morocco 2011 only - Jul 31 0 0 -
Rule Morocco 2012 max - Apr lastSun 2:00 1:00 S
Rule Morocco 2012 max - Sep lastSun 3:00 0 -
+Rule Morocco 2012 only - Jul 20 3:00 0 -
+Rule Morocco 2012 only - Aug 20 2:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
@@ -877,7 +895,7 @@
# Forecasting Riaan van Zyl explained that the far eastern parts of
# the country are close to 40 minutes earlier in sunrise than the rest
# of the country.
-#
+#
# From Paul Eggert (2007-03-31):
# Apparently the Caprivi Strip informally observes Botswana time, but
# we have no details. In the meantime people there can use Africa/Gaborone.
--- jdk/make/sun/javazic/tzdata/antarctica 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/antarctica 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)antarctica 8.10
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/asia 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/asia 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)asia 8.73
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -125,7 +124,7 @@
# From Alexander Krivenyshev (2012-02-10):
# According to News Armenia, on Feb 9, 2012,
# http://newsarmenia.ru/society/20120209/42609695.html
-#
+#
# The Armenia National Assembly adopted final reading of Amendments to the
# Law "On procedure of calculation time on the territory of the Republic of
# Armenia" according to which Armenia [is] abolishing Daylight Saving Time.
@@ -205,15 +204,15 @@
# </a>
# From A. N. M. Kamrus Saadat (2009-06-15):
-# Finally we've got the official mail regarding DST start time where DST start
-# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh
-# Telecommunication Regulatory Commission).
+# Finally we've got the official mail regarding DST start time where DST start
+# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh
+# Telecommunication Regulatory Commission).
#
# No DST end date has been announced yet.
# From Alexander Krivenyshev (2009-09-25):
-# Bangladesh won't go back to Standard Time from October 1, 2009,
-# instead it will continue DST measure till the cabinet makes a fresh decision.
+# Bangladesh won't go back to Standard Time from October 1, 2009,
+# instead it will continue DST measure till the cabinet makes a fresh decision.
#
# Following report by same newspaper-"The Daily Star Friday":
# "DST change awaits cabinet decision-Clock won't go back by 1-hr from Oct 1"
@@ -227,8 +226,8 @@
# From Steffen Thorsen (2009-10-13):
# IANS (Indo-Asian News Service) now reports:
-# Bangladesh has decided that the clock advanced by an hour to make
-# maximum use of daylight hours as an energy saving measure would
+# Bangladesh has decided that the clock advanced by an hour to make
+# maximum use of daylight hours as an energy saving measure would
# "continue for an indefinite period."
#
# One of many places where it is published:
@@ -256,7 +255,7 @@
# From Alexander Krivenyshev (2010-03-22):
# According to Bangladesh newspaper "The Daily Star,"
-# Cabinet cancels Daylight Saving Time
+# Cabinet cancels Daylight Saving Time
# <a href="http://www.thedailystar.net/newDesign/latest_news.php?nid=22817">
# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817
# </a>
@@ -384,11 +383,11 @@
# observing daylight saving time in 1986.
#
# From Thomas S. Mullaney (2008-02-11):
-# I think you're combining two subjects that need to treated
-# separately: daylight savings (which, you're correct, wasn't
-# implemented until the 1980s) and the unified time zone centered near
-# Beijing (which was implemented in 1949). Briefly, there was also a
-# "Lhasa Time" in Tibet and "Urumqi Time" in Xinjiang. The first was
+# I think you're combining two subjects that need to treated
+# separately: daylight savings (which, you're correct, wasn't
+# implemented until the 1980s) and the unified time zone centered near
+# Beijing (which was implemented in 1949). Briefly, there was also a
+# "Lhasa Time" in Tibet and "Urumqi Time" in Xinjiang. The first was
# ceased, and the second eventually recognized (again, in the 1980s).
#
# From Paul Eggert (2008-06-30):
@@ -525,7 +524,7 @@
# as of 2009-10-28:
# Year Period
# 1941 1 Apr to 30 Sep
-# 1942 Whole year
+# 1942 Whole year
# 1943 Whole year
# 1944 Whole year
# 1945 Whole year
@@ -616,16 +615,16 @@
# From Arthur David Olson (2010-04-07):
# Here's Google's translation of the table at the bottom of the "summert.htm" page:
# Decade Name Start and end date
-# Republic of China 34 years to 40 years (AD 1945-1951 years) Summer Time May 1 to September 30
-# 41 years of the Republic of China (AD 1952) Daylight Saving Time March 1 to October 31
-# Republic of China 42 years to 43 years (AD 1953-1954 years) Daylight Saving Time April 1 to October 31
-# In the 44 years to 45 years (AD 1955-1956 years) Daylight Saving Time April 1 to September 30
-# Republic of China 46 years to 48 years (AD 1957-1959) Summer Time April 1 to September 30
-# Republic of China 49 years to 50 years (AD 1960-1961) Summer Time June 1 to September 30
-# Republic of China 51 years to 62 years (AD 1962-1973 years) Stop Summer Time
-# Republic of China 63 years to 64 years (1974-1975 AD) Daylight Saving Time April 1 to September 30
-# Republic of China 65 years to 67 years (1976-1978 AD) Stop Daylight Saving Time
-# Republic of China 68 years (AD 1979) Daylight Saving Time July 1 to September 30
+# Republic of China 34 years to 40 years (AD 1945-1951 years) Summer Time May 1 to September 30
+# 41 years of the Republic of China (AD 1952) Daylight Saving Time March 1 to October 31
+# Republic of China 42 years to 43 years (AD 1953-1954 years) Daylight Saving Time April 1 to October 31
+# In the 44 years to 45 years (AD 1955-1956 years) Daylight Saving Time April 1 to September 30
+# Republic of China 46 years to 48 years (AD 1957-1959) Summer Time April 1 to September 30
+# Republic of China 49 years to 50 years (AD 1960-1961) Summer Time June 1 to September 30
+# Republic of China 51 years to 62 years (AD 1962-1973 years) Stop Summer Time
+# Republic of China 63 years to 64 years (1974-1975 AD) Daylight Saving Time April 1 to September 30
+# Republic of China 65 years to 67 years (1976-1978 AD) Stop Daylight Saving Time
+# Republic of China 68 years (AD 1979) Daylight Saving Time July 1 to September 30
# Republic of China since 69 years (AD 1980) Stop Daylight Saving Time
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -1194,15 +1193,15 @@
#
# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps
-# From Paul Eggert (2005-02-22):
+# From Paul Eggert (2012-10-26):
# I used Ephraim Silverberg's dst-israel.el program
# <ftp://ftp.cs.huji.ac.il/pub/tz/software/dst-israel.el> (2005-02-20)
# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4,
-# to generate the transitions in this list.
+# to generate the transitions from 2005 through 2012.
# (I replaced "lastFri" with "Fri>=26" by hand.)
-# The spring transitions below all correspond to the following Rule:
+# The spring transitions all correspond to the following Rule:
#
-# Rule Zion 2005 max - Mar Fri>=26 2:00 1:00 D
+# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D
#
# but older zic implementations (e.g., Solaris 8) do not support
# "Fri>=26" to mean April 1 in years like 2005, so for now we list the
@@ -1219,39 +1218,36 @@
Rule Zion 2010 only - Sep 12 2:00 0 S
Rule Zion 2011 only - Apr 1 2:00 1:00 D
Rule Zion 2011 only - Oct 2 2:00 0 S
-Rule Zion 2012 2015 - Mar Fri>=26 2:00 1:00 D
+Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D
Rule Zion 2012 only - Sep 23 2:00 0 S
-Rule Zion 2013 only - Sep 8 2:00 0 S
-Rule Zion 2014 only - Sep 28 2:00 0 S
-Rule Zion 2015 only - Sep 20 2:00 0 S
-Rule Zion 2016 only - Apr 1 2:00 1:00 D
-Rule Zion 2016 only - Oct 9 2:00 0 S
-Rule Zion 2017 2021 - Mar Fri>=26 2:00 1:00 D
-Rule Zion 2017 only - Sep 24 2:00 0 S
-Rule Zion 2018 only - Sep 16 2:00 0 S
-Rule Zion 2019 only - Oct 6 2:00 0 S
-Rule Zion 2020 only - Sep 27 2:00 0 S
-Rule Zion 2021 only - Sep 12 2:00 0 S
-Rule Zion 2022 only - Apr 1 2:00 1:00 D
-Rule Zion 2022 only - Oct 2 2:00 0 S
-Rule Zion 2023 2032 - Mar Fri>=26 2:00 1:00 D
-Rule Zion 2023 only - Sep 24 2:00 0 S
-Rule Zion 2024 only - Oct 6 2:00 0 S
-Rule Zion 2025 only - Sep 28 2:00 0 S
-Rule Zion 2026 only - Sep 20 2:00 0 S
-Rule Zion 2027 only - Oct 10 2:00 0 S
-Rule Zion 2028 only - Sep 24 2:00 0 S
-Rule Zion 2029 only - Sep 16 2:00 0 S
-Rule Zion 2030 only - Oct 6 2:00 0 S
-Rule Zion 2031 only - Sep 21 2:00 0 S
-Rule Zion 2032 only - Sep 12 2:00 0 S
-Rule Zion 2033 only - Apr 1 2:00 1:00 D
-Rule Zion 2033 only - Oct 2 2:00 0 S
-Rule Zion 2034 2037 - Mar Fri>=26 2:00 1:00 D
-Rule Zion 2034 only - Sep 17 2:00 0 S
-Rule Zion 2035 only - Oct 7 2:00 0 S
-Rule Zion 2036 only - Sep 28 2:00 0 S
-Rule Zion 2037 only - Sep 13 2:00 0 S
+
+# From Ephraim Silverberg (2012-10-18):
+
+# Yesterday, the Interior Ministry Committee, after more than a year
+# past, approved sending the proposed June 2011 changes to the Time
+# Decree Law back to the Knesset for second and third (final) votes
+# before the upcoming elections on Jan. 22, 2013. Hence, although the
+# changes are not yet law, they are expected to be so before February 2013.
+#
+# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March.
+# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the
+# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day
+# later (i.e. at 02:00 the first Monday after October 2).
+# [Rosh Hashana holidays are factored in until 2100.]
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D
+Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S
+Rule Zion 2027 only - Oct Mon>=3 2:00 0 S
+Rule Zion 2028 max - Oct Sun>=2 2:00 0 S
+# The following rules are commented out for now, as they break older
+# versions of zic that support only signed 32-bit timestamps, i.e.,
+# through 2038-01-19 03:14:07 UTC.
+#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S
+#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S
+#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S
+#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S
+#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Jerusalem 2:20:56 - LMT 1880
@@ -1386,6 +1382,16 @@
# From Arthur David Olson (2009-04-06):
# We still have Jordan switching to DST on Thursdays in 2000 and 2001.
+# From Steffen Thorsen (2012-10-25):
+# Yesterday the government in Jordan announced that they will not
+# switch back to standard time this winter, so the will stay on DST
+# until about the same time next year (at least).
+# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950
+#
+# From Paul Eggert (2012-10-25):
+# For now, assume this is just a one-year measure. If it becomes
+# permanent, we should move Jordan from EET to AST effective tomorrow.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Jordan 1973 only - Jun 6 0:00 1:00 S
Rule Jordan 1973 1975 - Oct 1 0:00 0 -
@@ -1414,7 +1420,8 @@
Rule Jordan 2003 only - Oct 24 0:00s 0 -
Rule Jordan 2004 only - Oct 15 0:00s 0 -
Rule Jordan 2005 only - Sep lastFri 0:00s 0 -
-Rule Jordan 2006 max - Oct lastFri 0:00s 0 -
+Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 -
+Rule Jordan 2013 max - Oct lastFri 0:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Amman 2:23:44 - LMT 1931
2:00 Jordan EE%sT
@@ -1859,15 +1866,15 @@
# shown 8 per cent higher consumption of electricity.
# From Alex Krivenyshev (2008-05-15):
-#
-# Here is an article that Pakistan plan to introduce Daylight Saving Time
+#
+# Here is an article that Pakistan plan to introduce Daylight Saving Time
# on June 1, 2008 for 3 months.
-#
-# "... The federal cabinet on Wednesday announced a new conservation plan to help
-# reduce load shedding by approving the closure of commercial centres at 9pm and
-# moving clocks forward by one hour for the next three months.
+#
+# "... The federal cabinet on Wednesday announced a new conservation plan to help
+# reduce load shedding by approving the closure of commercial centres at 9pm and
+# moving clocks forward by one hour for the next three months.
# ...."
-#
+#
# <a href="http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html">
# http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html
# </a>
@@ -1927,7 +1934,7 @@
# Government has decided to restore the previous time by moving the
# clocks backward by one hour from October 1. A formal announcement to
# this effect will be made after the Prime Minister grants approval in
-# this regard."
+# this regard."
# <a href="http://www.thenews.com.pk/updates.asp?id=87168">
# http://www.thenews.com.pk/updates.asp?id=87168
# </a>
@@ -2223,7 +2230,7 @@
# <a href="http://www.maannews.net/eng/ViewDetails.aspx?ID=306795">
# http://www.maannews.net/eng/ViewDetails.aspx?ID=306795
# </a>
-# the clocks were set back one hour at 2010-08-11 00:00:00 local time in
+# the clocks were set back one hour at 2010-08-11 00:00:00 local time in
# Gaza and the West Bank.
# Some more background info:
# <a href="http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html">
@@ -2262,7 +2269,7 @@
# The rules for Egypt are stolen from the `africa' file.
# From Steffen Thorsen (2011-09-30):
-# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30
# 00:00).
# So West Bank and Gaza now have the same time again.
#
@@ -2317,6 +2324,8 @@
# From Arthur David Olson (2011-09-20):
# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+# From Paul Eggert (2012-10-12):
+# 2012 transitions per http://www.timeanddate.com as of 2012-10-12.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
@@ -2327,7 +2336,7 @@
2:00 Palestine EE%sT 2011 Apr 2 12:01
2:00 1:00 EEST 2011 Aug 1
2:00 - EET 2012 Mar 30
- 2:00 1:00 EEST 2012 Sep 28
+ 2:00 1:00 EEST 2012 Sep 21 1:00
2:00 - EET
Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
@@ -2342,7 +2351,7 @@
2:00 - EET 2011 Aug 30
2:00 1:00 EEST 2011 Sep 30 3:00
2:00 - EET 2012 Mar 30
- 2:00 1:00 EEST 2012 Sep 28 3:00
+ 2:00 1:00 EEST 2012 Sep 21 1:00
2:00 - EET
# Paracel Is
@@ -2536,19 +2545,19 @@
# having it between Wednesday and Thursday (two workdays in Syria) since the
# weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
# it is implemented at midnight of the last workday before weekend...
-#
+#
# From Steffen Thorsen (2007-10-27):
# Jesper Norgaard Welen wrote:
-#
+#
# > "Winter local time in Syria will be observed at midnight of Thursday 1
# > November 2007, and the clock will be put back 1 hour."
-#
+#
# I found confirmation on this in this gov.sy-article (Arabic):
# http://wehda.alwehda.gov.sy/_print_veiw.asp?FileName=12521710520070926111247
-#
+#
# which using Google's translate tools says:
-# Council of Ministers also approved the commencement of work on
-# identifying the winter time as of Friday, 2/11/2007 where the 60th
+# Council of Ministers also approved the commencement of work on
+# identifying the winter time as of Friday, 2/11/2007 where the 60th
# minute delay at midnight Thursday 1/11/2007.
Rule Syria 2007 only - Nov Fri>=1 0:00 0 -
@@ -2614,8 +2623,8 @@
# </a>
# From Steffen Thorsen (2009-10-27):
-# The Syrian Arab News Network on 2009-09-29 reported that Syria will
-# revert back to winter (standard) time on midnight between Thursday
+# The Syrian Arab News Network on 2009-09-29 reported that Syria will
+# revert back to winter (standard) time on midnight between Thursday
# 2009-10-29 and Friday 2009-10-30:
# <a href="http://www.sana.sy/ara/2/2009/09/29/247012.htm">
# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
--- jdk/make/sun/javazic/tzdata/australasia 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/australasia 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)australasia 8.30
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -307,9 +306,9 @@
# </a>
# From Alexander Krivenyshev (2010-10-24):
-# According to Radio Fiji and Fiji Times online, Fiji will end DST 3
+# According to Radio Fiji and Fiji Times online, Fiji will end DST 3
# weeks earlier than expected - on March 6, 2011, not March 27, 2011...
-# Here is confirmation from Government of the Republic of the Fiji Islands,
+# Here is confirmation from Government of the Republic of the Fiji Islands,
# Ministry of Information (fiji.gov.fj) web site:
# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155">
# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155
@@ -320,15 +319,15 @@
# </a>
# From Steffen Thorsen (2011-10-03):
-# Now the dates have been confirmed, and at least our start date
+# Now the dates have been confirmed, and at least our start date
# assumption was correct (end date was one week wrong).
#
# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155">
# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
# </a>
# which says
-# Members of the public are reminded to change their time to one hour in
-# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to
+# Members of the public are reminded to change their time to one hour in
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to
# 2am on February 26 next year.
# From Ken Rylander (2011-10-24)
@@ -345,15 +344,23 @@
# The commencement of daylight saving will remain unchanged and start
# on the 23rd of October, 2011.
+# From the Fiji Government Online Portal (2012-08-21) via Steffen Thorsen:
+# The Minister for Labour, Industrial Relations and Employment Mr Jone Usamate
+# today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st
+# October 2012 and end at 3 am on Sunday 20th January 2013.
+# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
+#
+# From Paul Eggert (2012-08-31):
+# For now, guess a pattern of the penultimate Sundays in October and January.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
Rule Fiji 1999 2000 - Feb lastSun 3:00 0 -
Rule Fiji 2009 only - Nov 29 2:00 1:00 S
Rule Fiji 2010 only - Mar lastSun 3:00 0 -
-Rule Fiji 2010 only - Oct 24 2:00 1:00 S
+Rule Fiji 2010 max - Oct Sun>=18 2:00 1:00 S
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
-Rule Fiji 2011 only - Oct 23 2:00 1:00 S
-Rule Fiji 2012 only - Jan 22 3:00 0 -
+Rule Fiji 2012 max - Jan Sun>=18 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time
@@ -582,7 +589,7 @@
# From David Zuelke (2011-05-09):
# Subject: Samoa to move timezone from east to west of international date line
-#
+#
# <a href="http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963">
# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
# </a>
@@ -644,6 +651,23 @@
# Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012
# seasons, there is not yet any indication that this trend will continue on
# a regular basis. For now, we have explicitly listed the transitions below.
+#
+# From Nicky (2012-09-10):
+# Daylight Saving Time commences on Sunday 30th September 2012 and
+# ends on Sunday 7th of April 2013.
+#
+# Please find link below for more information.
+# http://www.mcil.gov.ws/mcil_publications.html
+#
+# That publication also includes dates for Summer of 2013/4 as well
+# which give the impression of a pattern in selecting dates for the
+# future, so for now, we will guess this will continue.
+
+# Western Samoa
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule WS 2012 max - Sep lastSun 3:00 1 D
+Rule WS 2012 max - Apr Sun>=1 4:00 0 -
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5
-11:26:56 - LMT 1911
-11:30 - SAMT 1950 # Samoa Time
@@ -651,8 +675,8 @@
-11:00 1:00 WSDT 2011 Apr 2 4:00
-11:00 - WST 2011 Sep 24 3:00
-11:00 1:00 WSDT 2011 Dec 30
- 13:00 1:00 WSDT 2012 Apr 1 4:00
- 13:00 - WST
+ 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00
+ 13:00 WS WS%sT
# Solomon Is
# excludes Bougainville, for which see Papua New Guinea
@@ -664,25 +688,25 @@
#
# From Gwillim Law (2011-12-29)
# A correspondent informed me that Tokelau, like Samoa, will be skipping
-# December 31 this year, thereby changing its time zone from UTC-10 to
-# UTC+14. When I tried to verify this statement, I found a confirming
-# article in Time magazine online
-# <a href="http://www.time.com/time/world/article/0,8599,2103243,00.html">
-# (http://www.time.com/time/world/article/0,8599,2103243,00.html).
-# </a>
+# December 31 this year ...
#
-# From Jonathan Leffler (2011-12-29)
-# Information from the BBC to the same effect:
-# <a href="http://www.bbc.co.uk/news/world-asia-16351377">
-# http://www.bbc.co.uk/news/world-asia-16351377
-# </a>
-#
-# Patch supplied by Tim Parenti (2011-12-29)
+# From Steffen Thorsen (2012-07-25)
+# ... we double checked by calling hotels and offices based in Tokelau asking
+# about the time there, and they all told a time that agrees with UTC+13....
+# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change
+# actually was to UTC-11 back then.
+#
+# From Paul Eggert (2012-07-25)
+# A Google Books snippet of Appendix to the Journals of the House of
+# Representatives of New Zealand, Session 1948,
+# <http://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau
+# was "11 hours slow on G.M.T." Go with Thorsen and assume Shanks & Pottenger
+# are off by an hour starting in 1901.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fakaofo -11:24:56 - LMT 1901
- -10:00 - TKT 2011 Dec 30 # Tokelau Time
- 14:00 - TKT
+ -11:00 - TKT 2011 Dec 30 # Tokelau Time
+ 13:00 - TKT
# Tonga
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -1363,22 +1387,22 @@
# See "southeast Australia" above for 2008 and later.
# From Steffen Thorsen (2009-04-28):
-# According to the official press release, South Australia's extended daylight
-# saving period will continue with the same rules as used during the 2008-2009
+# According to the official press release, South Australia's extended daylight
+# saving period will continue with the same rules as used during the 2008-2009
# summer (southern hemisphere).
-#
+#
# From
# <a href="http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf">
# http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf
# </a>
-# The extended daylight saving period that South Australia has been trialling
+# The extended daylight saving period that South Australia has been trialling
# for over the last year is now set to be ongoing.
-# Daylight saving will continue to start on the first Sunday in October each
+# Daylight saving will continue to start on the first Sunday in October each
# year and finish on the first Sunday in April the following year.
-# Industrial Relations Minister, Paul Caica, says this provides South Australia
-# with a consistent half hour time difference with NSW, Victoria, Tasmania and
+# Industrial Relations Minister, Paul Caica, says this provides South Australia
+# with a consistent half hour time difference with NSW, Victoria, Tasmania and
# the ACT for all 52 weeks of the year...
-#
+#
# We have a wrap-up here:
# <a href="http://www.timeanddate.com/news/time/south-australia-extends-dst.html">
# http://www.timeanddate.com/news/time/south-australia-extends-dst.html
--- jdk/make/sun/javazic/tzdata/backward 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/backward 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)backward 8.11
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/etcetera 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/etcetera 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)etcetera 8.3
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/europe 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/europe 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)europe 8.41
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -598,12 +597,12 @@
# According to Kremlin press service, Russian President Dmitry Medvedev
# signed a federal law "On calculation of time" on June 9, 2011.
# According to the law Russia is abolishing daylight saving time.
-#
-# Medvedev signed a law "On the Calculation of Time" (in russian):
+#
+# Medvedev signed a law "On the Calculation of Time" (in russian):
# <a href="http://bmockbe.ru/events/?ID=7583">
# http://bmockbe.ru/events/?ID=7583
# </a>
-#
+#
# Medvedev signed a law on the calculation of the time (in russian):
# <a href="http://www.regnum.ru/news/polit/1413906.html">
# http://www.regnum.ru/news/polit/1413906.html
@@ -1711,7 +1710,7 @@
# From Alexander Krivenyshev (2011-10-26)
# NO need to divide Moldova into two timezones at this point.
# As of today, Transnistria (Pridnestrovie)- Tiraspol reversed its own
-# decision to abolish DST this winter.
+# decision to abolish DST this winter.
# Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)-
# Tiraspol will go back to winter time on October 30, 2011.
# News from Moldova (in russian):
@@ -2601,11 +2600,11 @@
# http://www.alomaliye.com/bkk_2002_3769.htm
# From G&ouml;kdeniz Karada&#x011f; (2011-03-10):
-#
+#
# According to the articles linked below, Turkey will change into summer
# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
# This change is due to a nationwide exam on 27th.
-#
+#
# <a href="http://www.worldbulletin.net/?aType=haber&ArticleID=70872">
# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
# </a>
@@ -2722,7 +2721,7 @@
# time this year after all.
#
# From Udo Schwedt (2011-10-18):
-# As far as I understand, the recent change to the Ukranian time zone
+# As far as I understand, the recent change to the Ukranian time zone
# (Europe/Kiev) to introduce permanent daylight saving time (similar
# to Russia) was reverted today:
#
--- jdk/make/sun/javazic/tzdata/factory 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/factory 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)factory 8.2
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/iso3166.tab 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/iso3166.tab 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)iso3166.tab 8.11
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# ISO 3166 alpha-2 country codes
--- jdk/make/sun/javazic/tzdata/leapseconds 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/leapseconds 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)leapseconds 8.13
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -101,8 +100,8 @@
#
#
# A positive leap second will be introduced at the end of June 2012.
-# The sequence of dates of the UTC second markers will be:
-#
+# The sequence of dates of the UTC second markers will be:
+#
# 2012 June 30, 23h 59m 59s
# 2012 June 30, 23h 59m 60s
# 2012 July 1, 0h 0m 0s
@@ -119,6 +118,6 @@
#
#
# Daniel GAMBIS
-# Head
+# Head
# Earth Orientation Center of IERS
# Observatoire de Paris, France
--- jdk/make/sun/javazic/tzdata/northamerica 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/northamerica 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)northamerica 8.54
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -502,7 +501,7 @@
-8:00 US P%sT 1946
-8:00 - PST 1969
-8:00 US P%sT 1980 Apr 27 2:00
- -9:00 US Y%sT 1980 Oct 26 2:00
+ -9:00 US Y%sT 1980 Oct 26 2:00
-8:00 US P%sT 1983 Oct 30 2:00
-9:00 US Y%sT 1983 Nov 30
-9:00 US AK%sT
@@ -1867,7 +1866,7 @@
# Here is a summary of the three clock change events in Creston's history:
# 1. 1884 or 1885: adoption of Mountain Standard Time (GMT-7)
# Exact date unknown
-# 2. Oct 1916: switch to Pacific Standard Time (GMT-8)
+# 2. Oct 1916: switch to Pacific Standard Time (GMT-8)
# Exact date in October unknown; Sunday October 1 is a reasonable guess.
# 3. June 1918: switch to Pacific Daylight Time (GMT-7)
# Exact date in June unknown; Sunday June 2 is a reasonable guess.
@@ -2697,20 +2696,20 @@
# except that it switches at midnight standard time as usual.
#
# From Steffen Thorsen (2007-10-25):
-# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week
+# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week
# earlier - on the last Sunday of October, just like in 2006.
-#
+#
# He supplied these references:
-#
+#
# http://www.prensalatina.com.mx/article.asp?ID=%7B4CC32C1B-A9F7-42FB-8A07-8631AFC923AF%7D&language=ES
# http://actualidad.terra.es/sociedad/articulo/cuba_llama_ahorrar_energia_cambio_1957044.htm
-#
+#
# From Alex Kryvenishev (2007-10-25):
# Here is also article from Granma (Cuba):
-#
+#
# [Regira] el Horario Normal desde el [proximo] domingo 28 de octubre
# http://www.granma.cubaweb.cu/2007/10/24/nacional/artic07.html
-#
+#
# http://www.worldtimezone.com/dst_news/dst_news_cuba03.html
# From Arthur David Olson (2008-03-09):
@@ -2794,7 +2793,7 @@
# </a>
#
# From Steffen Thorsen (2011-10-30)
-# Cuba will end DST two weeks later this year. Instead of going back
+# Cuba will end DST two weeks later this year. Instead of going back
# tonight, it has been delayed to 2011-11-13 at 01:00.
#
# One source (Spanish)
@@ -2806,11 +2805,11 @@
# <a href="http://www.timeanddate.com/news/time/cuba-time-changes-2011.html">
# http://www.timeanddate.com/news/time/cuba-time-changes-2011.html
# </a>
-#
+#
# From Steffen Thorsen (2012-03-01)
-# According to Radio Reloj, Cuba will start DST on Midnight between March
+# According to Radio Reloj, Cuba will start DST on Midnight between March
# 31 and April 1.
-#
+#
# Radio Reloj has the following info (Spanish):
# <a href="http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril">
# http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril
@@ -2821,6 +2820,13 @@
# http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
# </a>
+# From Steffen Thorsen (2012-11-03):
+# Radio Reloj and many other sources report that Cuba is changing back
+# to standard time on 2012-11-04:
+# http://www.radioreloj.cu/index.php/noticias-radio-reloj/36-nacionales/9961-regira-horario-normal-en-cuba-desde-el-domingo-cuatro-de-noviembre
+# From Paul Eggert (2012-11-03):
+# For now, assume the future rule is first Sunday in November.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Cuba 1928 only - Jun 10 0:00 1:00 D
Rule Cuba 1928 only - Oct 10 0:00 0 S
@@ -2858,7 +2864,7 @@
Rule Cuba 2011 only - Mar Sun>=15 0:00s 1:00 D
Rule Cuba 2011 only - Nov 13 0:00s 0 S
Rule Cuba 2012 only - Apr 1 0:00s 1:00 D
-Rule Cuba 2012 max - Oct lastSun 0:00s 0 S
+Rule Cuba 2012 max - Nov Sun>=1 0:00s 0 S
Rule Cuba 2013 max - Mar Sun>=8 0:00s 1:00 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
--- jdk/make/sun/javazic/tzdata/pacificnew 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/pacificnew 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)pacificnew 8.2
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/solar87 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/solar87 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)solar87 8.2
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/solar88 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/solar88 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)solar88 8.2
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/solar89 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/solar89 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)solar89 8.2
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/southamerica 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/southamerica 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)southamerica 8.53
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -255,7 +254,7 @@
Rule Arg 2007 only - Dec 30 0:00 1:00 S
Rule Arg 2008 2009 - Mar Sun>=15 0:00 0 -
Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S
-
+
# From Mariano Absatz (2004-05-21):
# Today it was officially published that the Province of Mendoza is changing
# its timezone this winter... starting tomorrow night....
@@ -345,9 +344,9 @@
# confirms what Alex Krivenyshev has earlier sent to the tz
# emailing list about that San Luis plans to return to standard
# time much earlier than the rest of the country. It also
-# confirms that upon request the provinces San Juan and Mendoza
-# refused to follow San Luis in this change.
-#
+# confirms that upon request the provinces San Juan and Mendoza
+# refused to follow San Luis in this change.
+#
# The change is supposed to take place Monday the 21.st at 0:00
# hours. As far as I understand it if this goes ahead, we need
# a new timezone for San Luis (although there are also documented
@@ -409,7 +408,7 @@
# <a href="http://www.lanacion.com.ar/nota.asp?nota_id=1107912">
# http://www.lanacion.com.ar/nota.asp?nota_id=1107912
# </a>
-#
+#
# The press release says:
# (...) anunci<63> que el pr<70>ximo domingo a las 00:00 los puntanos deber<65>n
# atrasar una hora sus relojes.
@@ -823,8 +822,8 @@
#
# From Alexander Krivenyshev (2011-10-04):
# State Bahia will return to Daylight savings time this year after 8 years off.
-# The announcement was made by Governor Jaques Wagner in an interview to a
-# television station in Salvador.
+# The announcement was made by Governor Jaques Wagner in an interview to a
+# television station in Salvador.
# In Portuguese:
# <a href="http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html">
@@ -853,6 +852,15 @@
# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
# </a>
+# From Kelley Cook (2012-10-16):
+# The governor of state of Bahia in Brazil announced on Thursday that
+# due to public pressure, he is reversing the DST policy they implemented
+# last year and will not be going to Summer Time on October 21st....
+# http://www.correio24horas.com.br/r/artigo/apos-pressoes-wagner-suspende-horario-de-verao-na-bahia
+
+# From Rodrigo Severo (2012-10-16):
+# Tocantins state will have DST.
+# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
@@ -1072,7 +1080,8 @@
-3:00 Brazil BR%sT 1990 Sep 17
-3:00 - BRT 1995 Sep 14
-3:00 Brazil BR%sT 2003 Sep 24
- -3:00 - BRT
+ -3:00 - BRT 2012 Oct 21
+ -3:00 Brazil BR%sT
#
# Alagoas (AL), Sergipe (SE)
Zone America/Maceio -2:22:52 - LMT 1914
@@ -1091,7 +1100,8 @@
Zone America/Bahia -2:34:04 - LMT 1914
-3:00 Brazil BR%sT 2003 Sep 24
-3:00 - BRT 2011 Oct 16
- -3:00 Brazil BR%sT
+ -3:00 Brazil BR%sT 2012 Oct 21
+ -3:00 - BRT
#
# Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
# Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),
@@ -1183,7 +1193,7 @@
# Due to drought, Chile extends Daylight Time in three weeks. This
# is one-time change (Saturday 3/29 at 24:00 for America/Santiago
# and Saturday 3/29 at 22:00 for Pacific/Easter)
-# The Supreme Decree is located at
+# The Supreme Decree is located at
# <a href="http://www.shoa.cl/servicios/supremo316.pdf">
# http://www.shoa.cl/servicios/supremo316.pdf
# </a>
@@ -1194,7 +1204,7 @@
# From Jose Miguel Garrido (2008-03-05):
# ...
-# You could see the announces of the change on
+# You could see the announces of the change on
# <a href="http://www.shoa.cl/noticias/2008/04hora/hora.htm">
# http://www.shoa.cl/noticias/2008/04hora/hora.htm
# </a>.
--- jdk/make/sun/javazic/tzdata/systemv 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/systemv 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)systemv 8.2
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- jdk/make/sun/javazic/tzdata/zone.tab 2012-08-10 10:21:51.000000000 -0700
+++ jdk/make/sun/javazic/tzdata/zone.tab 2013-01-16 08:58:09.000000000 -0800
@@ -22,7 +22,6 @@
# questions.
#
# <pre>
-# @(#)zone.tab 8.55
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
--- jdk/make/sun/jawt/Makefile 2012-08-10 10:21:52.000000000 -0700
+++ jdk/make/sun/jawt/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -94,8 +94,7 @@
#
# Other extra flags needed for compiling.
#
-CPPFLAGS += -I$(OPENWIN_HOME)/include \
- -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
+CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-I$(SHARE_SRC)/native/$(PKGDIR)/image \
-I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
-I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \
@@ -109,6 +108,7 @@
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
+ -I$(OPENWIN_HOME)/include \
$(EVENT_MODEL)
#
@@ -122,7 +122,7 @@
endif
endif # PLATFORM
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
ifndef BUILD_HEADLESS_ONLY
OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
else
--- jdk/make/sun/rmi/rmi/Makefile 2012-08-10 10:21:53.000000000 -0700
+++ jdk/make/sun/rmi/rmi/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -97,6 +97,9 @@
BUILD_TARGETS += bin
endif
endif
+ifeq ($(PLATFORM), bsd)
+ BUILD_TARGETS += bin
+endif
build: $(BUILD_TARGETS)
--- jdk/make/sun/security/ec/Makefile 2012-08-10 10:21:53.000000000 -0700
+++ jdk/make/sun/security/ec/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -245,9 +245,9 @@
#
# Build sunec.jar.
#
-$(UNSIGNED_DIR)/sunec.jar: build
+$(UNSIGNED_DIR)/sunec.jar: build $(JCE_MANIFEST_FILE)
$(prep-target)
- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
--- jdk/make/sun/security/mscapi/Makefile 2012-08-10 10:21:54.000000000 -0700
+++ jdk/make/sun/security/mscapi/Makefile 2013-01-16 08:58:09.000000000 -0800
@@ -210,9 +210,9 @@
#
# Build sunmscapi.jar.
#
-$(UNSIGNED_DIR)/sunmscapi.jar: build
+$(UNSIGNED_DIR)/sunmscapi.jar: build $(JCE_MANIFEST_FILE)
$(prep-target)
- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
--- jdk/make/sun/security/pkcs11/Makefile 2012-08-10 10:21:55.000000000 -0700
+++ jdk/make/sun/security/pkcs11/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -224,9 +224,9 @@
#
# Build sunpkcs11.jar.
#
-$(UNSIGNED_DIR)/sunpkcs11.jar: build
+$(UNSIGNED_DIR)/sunpkcs11.jar: build $(JCE_MANIFEST_FILE)
$(prep-target)
- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
--- jdk/make/sun/splashscreen/Makefile 2012-08-10 10:21:55.000000000 -0700
+++ jdk/make/sun/splashscreen/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -83,15 +83,16 @@
-framework JavaNativeFoundation
else ifneq ($(PLATFORM), windows)
CFLAGS += -DWITH_X11
- ifeq ($(PLATFORM), macosx))
- OTHER_LDLIBS += -liconv
- CPPFLAGS += -I$(OPENWIN_HOME)/include \
- -I$(OPENWIN_HOME)/include/X11/extensions
- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -pthread
- else
- CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
+ ifeq ($(PLATFORM), bsd))
+ ifeq ($(OS_NAME), netbsd)
+ OTHER_LDLIBS += -Wl,-R$(OPENWIN_LIB)
+ else
+ CPPFLAGS += -I$(PACKAGE_PATH)/include
+ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
+ endif
endif
+ CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+ OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
else # PLATFORM
CFLAGS += -DWITH_WIN32
OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
--- jdk/make/sun/xawt/Makefile 2012-08-10 10:21:55.000000000 -0700
+++ jdk/make/sun/xawt/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -52,6 +52,9 @@
AUTO_JAVA_PRUNE = WrapperGenerator.java
LDFLAGS += -L$(OPENWIN_LIB)
+ifeq ($(OS_NAME), netbsd)
+LDFLAGS += -Wl,-R$(OPENWIN_LIB)
+endif
# For Xrender extension.
ifeq ($(PLATFORM), solaris)
@@ -63,6 +66,11 @@
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
endif
+ifeq ($(PLATFORM), bsd)
+LDFLAGS += -pthread
+dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+endif
+
ifeq ($(PLATFORM), macosx))
LDFLAGS += -pthread
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
@@ -110,8 +118,6 @@
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
endif
-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
-
CPPFLAGS += -DXAWT -DXAWT_HACK \
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
-I$(PLATFORM_SRC)/native/sun/awt \
@@ -138,6 +144,8 @@
-I$(SHARE_SRC)/native/sun/awt \
-I$(PLATFORM_SRC)/native/sun/awt
+CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
ifeq ($(PLATFORM), linux)
ifndef CROSS_COMPILE_ARCH
# Allows for builds on Debian GNU Linux, X11 is in a different place
@@ -173,6 +181,11 @@
endif
endif
+ifeq ($(PLATFORM), bsd)
+ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(OPENWIN_HOME)/include
+ CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
+
ifeq ($(PLATFORM), macosx)
CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
endif
--- jdk/make/tools/freetypecheck/Makefile 2012-08-10 10:22:31.000000000 -0700
+++ jdk/make/tools/freetypecheck/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -52,8 +52,15 @@
else
ifeq ($(PLATFORM), macosx)
FT_LD_OPTIONS += -lfreetype -lz
- else # linux
- FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
+ else
+ ifeq ($(PLATFORM), bsd)
+ ifeq ($(OS_NAME), netbsd)
+ FT_LD_OPTIONS += -Wl,-R$(FREETYPE_LIB_PATH)
+ endif
+ FT_LD_OPTIONS += -lfreetype -lz
+ else # linux
+ FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
+ endif
endif
endif
endif
--- jdk/make/tools/sharing/classlist.bsd 1969-12-31 16:00:00.000000000 -0800
+++ jdk/make/tools/sharing/classlist.bsd 2013-01-16 08:58:15.000000000 -0800
@@ -0,0 +1,2327 @@
+java/lang/Object
+java/lang/String
+java/io/Serializable
+java/lang/Comparable
+java/lang/CharSequence
+java/lang/Class
+java/lang/reflect/GenericDeclaration
+java/lang/reflect/Type
+java/lang/reflect/AnnotatedElement
+java/lang/Cloneable
+java/lang/ClassLoader
+java/lang/System
+java/lang/Throwable
+java/lang/Error
+java/lang/ThreadDeath
+java/lang/Exception
+java/lang/RuntimeException
+java/security/ProtectionDomain
+java/security/AccessControlContext
+java/lang/ClassNotFoundException
+java/lang/NoClassDefFoundError
+java/lang/LinkageError
+java/lang/ClassCastException
+java/lang/ArrayStoreException
+java/lang/VirtualMachineError
+java/lang/OutOfMemoryError
+java/lang/StackOverflowError
+java/lang/IllegalMonitorStateException
+java/lang/ref/Reference
+java/lang/ref/SoftReference
+java/lang/ref/WeakReference
+java/lang/ref/FinalReference
+java/lang/ref/PhantomReference
+java/lang/ref/Finalizer
+java/lang/Thread
+java/lang/Runnable
+java/lang/ThreadGroup
+java/lang/Thread$UncaughtExceptionHandler
+java/util/Properties
+java/util/Hashtable
+java/util/Map
+java/util/Dictionary
+java/lang/reflect/AccessibleObject
+java/lang/reflect/Field
+java/lang/reflect/Member
+java/lang/reflect/Method
+java/lang/reflect/Constructor
+sun/reflect/MagicAccessorImpl
+sun/reflect/MethodAccessorImpl
+sun/reflect/MethodAccessor
+sun/reflect/ConstructorAccessorImpl
+sun/reflect/ConstructorAccessor
+sun/reflect/DelegatingClassLoader
+sun/reflect/ConstantPool
+sun/reflect/UnsafeStaticFieldAccessorImpl
+sun/reflect/UnsafeFieldAccessorImpl
+sun/reflect/FieldAccessorImpl
+sun/reflect/FieldAccessor
+java/util/Vector
+java/util/List
+java/util/Collection
+java/lang/Iterable
+java/util/RandomAccess
+java/util/AbstractList
+java/util/AbstractCollection
+java/lang/StringBuffer
+java/lang/AbstractStringBuilder
+java/lang/Appendable
+java/lang/StackTraceElement
+java/nio/Buffer
+java/lang/Boolean
+java/lang/Character
+java/lang/Float
+java/lang/Number
+java/lang/Double
+java/lang/Byte
+java/lang/Short
+java/lang/Integer
+java/lang/Long
+java/lang/NullPointerException
+java/lang/ArithmeticException
+java/io/ObjectStreamField
+java/lang/String$CaseInsensitiveComparator
+java/util/Comparator
+java/lang/RuntimePermission
+java/security/BasicPermission
+java/security/Permission
+java/security/Guard
+sun/misc/SoftCache
+java/util/AbstractMap
+java/lang/ref/ReferenceQueue
+java/lang/ref/ReferenceQueue$Null
+java/lang/ref/ReferenceQueue$Lock
+java/util/HashMap
+java/lang/annotation/Annotation
+java/util/HashMap$Entry
+java/util/Map$Entry
+java/security/AccessController
+java/lang/reflect/ReflectPermission
+sun/reflect/ReflectionFactory$GetReflectionFactoryAction
+java/security/PrivilegedAction
+java/util/Stack
+sun/reflect/ReflectionFactory
+java/lang/ref/Reference$Lock
+java/lang/ref/Reference$ReferenceHandler
+java/lang/ref/Finalizer$FinalizerThread
+java/util/Enumeration
+java/util/Iterator
+java/util/Hashtable$Entry
+java/nio/charset/Charset
+sun/nio/cs/StandardCharsets
+sun/nio/cs/FastCharsetProvider
+java/nio/charset/spi/CharsetProvider
+sun/nio/cs/StandardCharsets$Aliases
+sun/util/PreHashedMap
+sun/nio/cs/StandardCharsets$Classes
+sun/nio/cs/StandardCharsets$Cache
+java/lang/ThreadLocal
+java/util/concurrent/atomic/AtomicInteger
+sun/misc/Unsafe
+java/lang/NoSuchMethodError
+java/lang/IncompatibleClassChangeError
+sun/reflect/Reflection
+java/util/Collections
+java/util/Collections$EmptySet
+java/util/AbstractSet
+java/util/Set
+java/util/Collections$EmptyList
+java/util/Collections$EmptyMap
+java/util/Collections$ReverseComparator
+java/util/Collections$SynchronizedMap
+java/lang/Class$3
+java/lang/reflect/Modifier
+java/lang/reflect/ReflectAccess
+sun/reflect/LangReflectAccess
+java/util/Arrays
+java/lang/Math
+sun/nio/cs/US_ASCII
+sun/nio/cs/HistoricallyNamedCharset
+sun/misc/VM
+java/lang/StringCoding
+java/lang/ThreadLocal$ThreadLocalMap
+java/lang/ThreadLocal$ThreadLocalMap$Entry
+java/lang/StringCoding$StringDecoder
+sun/nio/cs/US_ASCII$Decoder
+java/nio/charset/CharsetDecoder
+java/nio/charset/CodingErrorAction
+java/nio/ByteBuffer
+java/nio/HeapByteBuffer
+java/nio/Bits
+java/nio/ByteOrder
+java/nio/CharBuffer
+java/lang/Readable
+java/nio/HeapCharBuffer
+java/nio/charset/CoderResult
+java/nio/charset/CoderResult$1
+java/nio/charset/CoderResult$Cache
+java/nio/charset/CoderResult$2
+sun/misc/Version
+java/io/FileInputStream
+java/io/InputStream
+java/io/Closeable
+java/io/FileDescriptor
+java/io/FileOutputStream
+java/io/OutputStream
+java/io/Flushable
+java/io/BufferedInputStream
+java/io/FilterInputStream
+java/util/concurrent/atomic/AtomicReferenceFieldUpdater
+java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl
+sun/reflect/misc/ReflectUtil
+java/io/PrintStream
+java/io/FilterOutputStream
+java/io/BufferedOutputStream
+java/io/OutputStreamWriter
+java/io/Writer
+sun/nio/cs/StreamEncoder
+sun/security/action/GetPropertyAction
+sun/nio/cs/US_ASCII$Encoder
+java/nio/charset/CharsetEncoder
+sun/nio/cs/Surrogate$Parser
+sun/nio/cs/Surrogate
+java/io/BufferedWriter
+java/lang/Runtime
+java/io/File
+java/io/FileSystem
+java/io/UnixFileSystem
+java/io/ExpiringCache
+java/io/ExpiringCache$1
+java/util/LinkedHashMap
+java/util/LinkedHashMap$Entry
+java/lang/StringBuilder
+sun/misc/SharedSecrets
+java/lang/ClassLoader$3
+java/lang/StringCoding$StringEncoder
+java/io/ExpiringCache$Entry
+java/lang/ClassLoader$NativeLibrary
+java/lang/Terminator
+java/lang/Terminator$1
+sun/misc/SignalHandler
+sun/misc/Signal
+sun/misc/NativeSignalHandler
+java/io/Console
+java/io/Console$1
+sun/misc/JavaIOAccess
+java/lang/Shutdown
+java/util/ArrayList
+java/lang/Shutdown$Lock
+java/lang/ApplicationShutdownHooks
+java/util/IdentityHashMap
+sun/misc/OSEnvironment
+java/lang/System$2
+sun/misc/JavaLangAccess
+java/lang/Compiler
+java/lang/Compiler$1
+sun/misc/Launcher
+sun/misc/Launcher$Factory
+java/net/URLStreamHandlerFactory
+sun/misc/Launcher$ExtClassLoader
+java/net/URLClassLoader
+java/security/SecureClassLoader
+sun/security/util/Debug
+java/net/URLClassLoader$7
+sun/misc/JavaNetAccess
+java/util/StringTokenizer
+sun/misc/Launcher$ExtClassLoader$1
+java/security/PrivilegedExceptionAction
+sun/misc/MetaIndex
+java/io/BufferedReader
+java/io/Reader
+java/io/FileReader
+java/io/InputStreamReader
+sun/nio/cs/StreamDecoder
+java/lang/reflect/Array
+sun/net/www/ParseUtil
+java/util/BitSet
+java/io/ObjectStreamClass
+java/net/URL
+java/util/Locale
+java/util/concurrent/ConcurrentHashMap
+java/util/concurrent/ConcurrentMap
+java/util/concurrent/ConcurrentHashMap$Segment
+java/util/concurrent/locks/ReentrantLock
+java/util/concurrent/locks/Lock
+java/util/concurrent/locks/ReentrantLock$NonfairSync
+java/util/concurrent/locks/ReentrantLock$Sync
+java/util/concurrent/locks/AbstractQueuedSynchronizer
+java/util/concurrent/locks/AbstractOwnableSynchronizer
+java/util/concurrent/locks/AbstractQueuedSynchronizer$Node
+java/util/concurrent/ConcurrentHashMap$HashEntry
+java/lang/CharacterDataLatin1
+java/net/Parts
+sun/net/www/protocol/file/Handler
+java/net/URLStreamHandler
+java/lang/Class$1
+sun/reflect/ReflectionFactory$1
+sun/reflect/NativeConstructorAccessorImpl
+sun/reflect/DelegatingConstructorAccessorImpl
+java/util/HashSet
+sun/misc/URLClassPath
+sun/net/www/protocol/jar/Handler
+sun/misc/Launcher$AppClassLoader
+sun/misc/Launcher$AppClassLoader$1
+java/lang/SystemClassLoaderAction
+java/net/URLClassLoader$1
+sun/misc/URLClassPath$3
+sun/misc/URLClassPath$JarLoader
+sun/misc/URLClassPath$Loader
+java/security/PrivilegedActionException
+sun/misc/URLClassPath$FileLoader
+sun/misc/URLClassPath$FileLoader$1
+sun/misc/Resource
+sun/nio/ByteBuffered
+java/security/CodeSource
+java/security/Permissions
+java/security/PermissionCollection
+sun/net/www/protocol/file/FileURLConnection
+sun/net/www/URLConnection
+java/net/URLConnection
+java/net/UnknownContentHandler
+java/net/ContentHandler
+sun/net/www/MessageHeader
+java/io/FilePermission
+java/io/FilePermission$1
+sun/security/provider/PolicyFile
+java/security/Policy
+java/security/Policy$UnsupportedEmptyCollection
+java/io/FilePermissionCollection
+java/security/AllPermission
+java/security/UnresolvedPermission
+java/security/BasicPermissionCollection
+java/security/Principal
+java/security/cert/Certificate
+java/util/AbstractList$Itr
+java/util/IdentityHashMap$KeySet
+java/util/IdentityHashMap$KeyIterator
+java/util/IdentityHashMap$IdentityHashMapIterator
+java/io/DeleteOnExitHook
+java/util/LinkedHashSet
+java/util/HashMap$KeySet
+java/util/LinkedHashMap$KeyIterator
+java/util/LinkedHashMap$LinkedHashIterator
+java/awt/Frame
+java/awt/MenuContainer
+java/awt/Window
+javax/accessibility/Accessible
+java/awt/Container
+java/awt/Component
+java/awt/image/ImageObserver
+java/lang/InterruptedException
+java/awt/Label
+java/util/logging/Logger
+java/util/logging/Handler
+java/util/logging/Level
+java/util/logging/LogManager
+java/util/logging/LogManager$1
+java/beans/PropertyChangeSupport
+java/util/logging/LogManager$LogNode
+java/util/logging/LoggingPermission
+java/util/logging/LogManager$Cleaner
+java/util/logging/LogManager$RootLogger
+java/util/logging/LogManager$2
+java/util/Properties$LineReader
+java/util/Hashtable$Enumerator
+java/beans/PropertyChangeEvent
+java/util/EventObject
+java/awt/Component$AWTTreeLock
+sun/awt/NativeLibLoader
+sun/security/action/LoadLibraryAction
+java/awt/GraphicsEnvironment
+java/awt/GraphicsEnvironment$1
+java/lang/ProcessEnvironment
+java/lang/ProcessEnvironment$Variable
+java/lang/ProcessEnvironment$ExternalData
+java/lang/ProcessEnvironment$Value
+java/lang/ProcessEnvironment$StringEnvironment
+java/util/Collections$UnmodifiableMap
+java/awt/Toolkit
+java/awt/Toolkit$3
+sun/util/CoreResourceBundleControl
+java/util/ResourceBundle$Control
+java/util/Arrays$ArrayList
+java/util/Collections$UnmodifiableRandomAccessList
+java/util/Collections$UnmodifiableList
+java/util/Collections$UnmodifiableCollection
+java/util/ResourceBundle
+java/util/ResourceBundle$1
+java/util/ResourceBundle$RBClassLoader
+java/util/ResourceBundle$RBClassLoader$1
+java/util/ResourceBundle$CacheKey
+java/util/ResourceBundle$LoaderReference
+java/util/ResourceBundle$CacheKeyReference
+java/util/ResourceBundle$SingleFormatControl
+sun/awt/resources/awt
+java/util/ListResourceBundle
+java/awt/Toolkit$1
+java/io/FileNotFoundException
+java/io/IOException
+java/awt/event/KeyEvent
+java/awt/event/InputEvent
+java/awt/event/ComponentEvent
+java/awt/AWTEvent
+java/awt/event/NativeLibLoader
+java/util/WeakHashMap
+java/util/WeakHashMap$Entry
+java/awt/Component$DummyRequestFocusController
+sun/awt/RequestFocusController
+java/awt/LayoutManager
+java/awt/LightweightDispatcher
+java/awt/event/AWTEventListener
+java/util/EventListener
+java/awt/Dimension
+java/awt/geom/Dimension2D
+java/util/concurrent/atomic/AtomicBoolean
+java/awt/ComponentOrientation
+java/awt/Component$2
+java/lang/NoSuchMethodException
+sun/awt/AppContext
+sun/awt/AppContext$1
+sun/awt/AppContext$2
+sun/awt/MostRecentKeyValue
+java/awt/Cursor
+sun/awt/X11GraphicsEnvironment
+sun/java2d/SunGraphicsEnvironment
+sun/java2d/FontSupport
+sun/awt/DisplayChangedListener
+java/io/FilenameFilter
+sun/awt/X11GraphicsEnvironment$1
+sun/awt/SunToolkit
+sun/awt/WindowClosingSupport
+sun/awt/WindowClosingListener
+sun/awt/ComponentFactory
+sun/awt/InputMethodSupport
+java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
+java/util/concurrent/locks/Condition
+sun/awt/AWTAutoShutdown
+sun/awt/SunToolkit$6
+java/awt/Dialog$ModalExclusionType
+java/lang/Enum
+java/awt/Dialog
+java/awt/Dialog$ModalityType
+java/awt/ModalEventFilter
+java/awt/EventFilter
+sun/reflect/UnsafeFieldAccessorFactory
+sun/reflect/UnsafeQualifiedStaticObjectFieldAccessorImpl
+sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl
+sun/awt/SunDisplayChanger
+sun/java2d/SunGraphicsEnvironment$1
+java/io/StreamTokenizer
+sun/font/FontManager
+sun/font/FileFont
+sun/font/PhysicalFont
+sun/font/Font2D
+sun/font/CompositeFont
+java/util/HashMap$Values
+java/util/HashMap$ValueIterator
+java/util/HashMap$HashIterator
+java/awt/Font
+java/awt/geom/AffineTransform
+sun/font/AttributeValues
+sun/font/EAttribute
+java/text/AttributedCharacterIterator$Attribute
+java/lang/Class$4
+sun/reflect/NativeMethodAccessorImpl
+sun/reflect/DelegatingMethodAccessorImpl
+java/awt/font/TextAttribute
+java/lang/Integer$IntegerCache
+sun/font/TrueTypeFont
+java/awt/font/FontRenderContext
+java/awt/RenderingHints
+sun/awt/SunHints
+sun/awt/SunHints$Key
+java/awt/RenderingHints$Key
+sun/awt/SunHints$Value
+sun/awt/SunHints$LCDContrastKey
+sun/font/Type1Font
+java/awt/geom/Point2D$Float
+java/awt/geom/Point2D
+sun/font/StrikeMetrics
+java/awt/geom/Rectangle2D$Float
+java/awt/geom/Rectangle2D
+java/awt/geom/RectangularShape
+java/awt/Shape
+java/awt/geom/GeneralPath
+java/awt/geom/Path2D$Float
+java/awt/geom/Path2D
+sun/font/CharToGlyphMapper
+sun/font/PhysicalStrike
+sun/font/FontStrike
+sun/font/GlyphList
+sun/font/StrikeCache
+sun/java2d/Disposer
+sun/java2d/Disposer$1
+sun/font/StrikeCache$1
+sun/awt/motif/MFontConfiguration
+sun/awt/FontConfiguration
+sun/awt/FontDescriptor
+java/util/Scanner
+java/util/regex/Pattern
+java/util/regex/Pattern$Node
+java/util/regex/Pattern$LastNode
+java/util/regex/Pattern$GroupHead
+java/util/regex/Pattern$CharPropertyNames
+java/util/regex/Pattern$CharPropertyNames$1
+java/util/regex/Pattern$CharPropertyNames$CharPropertyFactory
+java/util/regex/Pattern$CharPropertyNames$2
+java/util/regex/Pattern$CharPropertyNames$5
+java/util/regex/Pattern$CharPropertyNames$3
+java/util/regex/Pattern$CharPropertyNames$6
+java/util/regex/Pattern$CharPropertyNames$CloneableProperty
+java/util/regex/Pattern$CharProperty
+java/util/regex/Pattern$CharPropertyNames$4
+java/util/regex/Pattern$CharPropertyNames$7
+java/util/regex/Pattern$CharPropertyNames$8
+java/util/regex/Pattern$CharPropertyNames$9
+java/util/regex/Pattern$CharPropertyNames$10
+java/util/regex/Pattern$CharPropertyNames$11
+java/util/regex/Pattern$CharPropertyNames$12
+java/util/regex/Pattern$CharPropertyNames$13
+java/util/regex/Pattern$CharPropertyNames$14
+java/util/regex/Pattern$CharPropertyNames$15
+java/util/regex/Pattern$CharPropertyNames$16
+java/util/regex/Pattern$CharPropertyNames$17
+java/util/regex/Pattern$CharPropertyNames$18
+java/util/regex/Pattern$CharPropertyNames$19
+java/util/regex/Pattern$CharPropertyNames$20
+java/util/regex/Pattern$CharPropertyNames$21
+java/util/regex/Pattern$Curly
+java/util/regex/Pattern$Slice
+java/util/regex/Pattern$Begin
+java/util/regex/Pattern$First
+java/util/regex/Pattern$Start
+java/util/regex/Pattern$TreeInfo
+java/util/regex/Pattern$All
+java/util/regex/Pattern$BitClass
+java/util/regex/Pattern$BmpCharProperty
+java/util/regex/Pattern$6
+java/util/regex/Pattern$CharProperty$1
+sun/nio/ch/FileChannelImpl
+java/nio/channels/FileChannel
+java/nio/channels/ByteChannel
+java/nio/channels/ReadableByteChannel
+java/nio/channels/Channel
+java/nio/channels/WritableByteChannel
+java/nio/channels/GatheringByteChannel
+java/nio/channels/ScatteringByteChannel
+java/nio/channels/spi/AbstractInterruptibleChannel
+java/nio/channels/InterruptibleChannel
+sun/nio/ch/Util
+sun/nio/ch/IOUtil
+sun/nio/ch/FileDispatcher
+sun/nio/ch/NativeDispatcher
+sun/nio/ch/Reflect
+java/nio/MappedByteBuffer
+sun/nio/ch/Reflect$1
+sun/nio/ch/NativeThreadSet
+java/nio/channels/Channels
+java/util/Scanner$1
+sun/misc/LRUCache
+java/util/regex/Matcher
+java/util/regex/MatchResult
+java/text/NumberFormat
+java/text/Format
+java/text/spi/NumberFormatProvider
+java/util/spi/LocaleServiceProvider
+sun/util/LocaleServiceProviderPool
+sun/util/LocaleServiceProviderPool$1
+java/util/ServiceLoader
+java/util/ServiceLoader$LazyIterator
+java/util/ServiceLoader$1
+java/util/HashMap$EntrySet
+java/util/LinkedHashMap$EntryIterator
+sun/misc/Launcher$1
+sun/misc/URLClassPath$2
+java/lang/ClassLoader$2
+sun/misc/URLClassPath$1
+java/net/URLClassLoader$3
+sun/misc/CompoundEnumeration
+sun/misc/URLClassPath$JarLoader$1
+sun/misc/FileURLMapper
+java/net/URLClassLoader$3$1
+sun/util/resources/LocaleData
+sun/util/resources/LocaleData$1
+sun/util/resources/LocaleData$LocaleDataResourceBundleControl
+sun/util/LocaleDataMetaInfo
+sun/text/resources/FormatData
+java/util/ResourceBundle$BundleReference
+sun/text/resources/FormatData_en
+sun/text/resources/FormatData_en_US
+java/text/DecimalFormatSymbols
+java/text/spi/DecimalFormatSymbolsProvider
+java/util/Currency
+java/util/Currency$1
+java/util/spi/CurrencyNameProvider
+sun/util/resources/CurrencyNames
+sun/util/resources/LocaleNamesBundle
+sun/util/resources/OpenListResourceBundle
+sun/util/resources/CurrencyNames_en_US
+java/text/DecimalFormat
+java/text/FieldPosition
+java/text/DigitList
+java/math/RoundingMode
+java/util/regex/Pattern$GroupTail
+java/util/regex/Pattern$Ctype
+java/util/regex/Pattern$Ques
+java/util/regex/Pattern$GroupCurly
+java/util/regex/Pattern$5
+java/util/regex/Pattern$Loop
+java/util/regex/Pattern$Prolog
+java/util/regex/Pattern$BranchConn
+java/util/regex/Pattern$Branch
+java/nio/channels/spi/AbstractInterruptibleChannel$1
+sun/nio/ch/Interruptible
+sun/nio/ch/NativeThread
+sun/nio/ch/DirectBuffer
+java/nio/DirectByteBuffer
+java/nio/DirectByteBuffer$Deallocator
+sun/misc/Cleaner
+sun/nio/ch/IOStatus
+java/util/regex/ASCII
+java/io/DataInputStream
+java/io/DataInput
+java/lang/Short$ShortCache
+java/util/HashMap$KeyIterator
+sun/font/CompositeFontDescriptor
+sun/font/Font2DHandle
+sun/font/FontFamily
+java/awt/GraphicsDevice
+sun/awt/X11GraphicsDevice
+sun/awt/X11GraphicsConfig
+java/awt/GraphicsConfiguration
+java/awt/ImageCapabilities
+sun/java2d/x11/X11SurfaceData
+sun/java2d/SurfaceData
+java/awt/Transparency
+sun/java2d/DisposerTarget
+sun/java2d/InvalidPipeException
+java/lang/IllegalStateException
+sun/java2d/NullSurfaceData
+sun/java2d/loops/SurfaceType
+sun/awt/image/PixelConverter
+sun/awt/image/PixelConverter$Xrgb
+sun/awt/image/PixelConverter$Argb
+sun/awt/image/PixelConverter$ArgbPre
+sun/awt/image/PixelConverter$Xbgr
+sun/awt/image/PixelConverter$Rgba
+sun/awt/image/PixelConverter$RgbaPre
+sun/awt/image/PixelConverter$Ushort565Rgb
+sun/awt/image/PixelConverter$Ushort555Rgb
+sun/awt/image/PixelConverter$Ushort555Rgbx
+sun/awt/image/PixelConverter$Ushort4444Argb
+sun/awt/image/PixelConverter$ByteGray
+sun/awt/image/PixelConverter$UshortGray
+sun/awt/image/PixelConverter$Rgbx
+sun/awt/image/PixelConverter$Bgrx
+sun/awt/image/PixelConverter$ArgbBm
+java/awt/image/ColorModel
+java/awt/image/DirectColorModel
+java/awt/image/PackedColorModel
+java/awt/color/ColorSpace
+java/awt/color/ICC_Profile
+java/awt/color/ICC_ProfileRGB
+java/awt/color/ICC_Profile$1
+java/awt/color/ICC_ColorSpace
+sun/java2d/pipe/NullPipe
+sun/java2d/pipe/PixelDrawPipe
+sun/java2d/pipe/PixelFillPipe
+sun/java2d/pipe/ShapeDrawPipe
+sun/java2d/pipe/TextPipe
+sun/java2d/pipe/DrawImagePipe
+java/awt/image/IndexColorModel
+sun/java2d/pipe/LoopPipe
+sun/java2d/pipe/OutlineTextRenderer
+sun/java2d/pipe/SolidTextRenderer
+sun/java2d/pipe/GlyphListLoopPipe
+sun/java2d/pipe/GlyphListPipe
+sun/java2d/pipe/AATextRenderer
+sun/java2d/pipe/LCDTextRenderer
+sun/java2d/pipe/AlphaColorPipe
+sun/java2d/pipe/CompositePipe
+sun/java2d/pipe/PixelToShapeConverter
+sun/java2d/pipe/TextRenderer
+sun/java2d/pipe/SpanClipRenderer
+sun/java2d/pipe/Region
+sun/java2d/pipe/RegionIterator
+sun/java2d/pipe/AlphaPaintPipe
+sun/java2d/pipe/SpanShapeRenderer$Composite
+sun/java2d/pipe/SpanShapeRenderer
+sun/java2d/pipe/GeneralCompositePipe
+sun/java2d/pipe/DrawImage
+sun/java2d/loops/RenderCache
+sun/java2d/loops/RenderCache$Entry
+sun/java2d/loops/XORComposite
+java/awt/Composite
+sun/font/X11TextRenderer
+sun/java2d/loops/GraphicsPrimitive
+sun/java2d/x11/X11PMBlitLoops
+sun/java2d/loops/Blit
+sun/java2d/loops/GraphicsPrimitiveMgr
+sun/java2d/loops/CompositeType
+sun/java2d/SunGraphics2D
+sun/awt/ConstrainableGraphics
+java/awt/Graphics2D
+java/awt/Graphics
+java/awt/Color
+java/awt/Paint
+java/awt/AlphaComposite
+sun/java2d/loops/BlitBg
+sun/java2d/loops/ScaledBlit
+sun/java2d/loops/FillRect
+sun/java2d/loops/FillSpans
+sun/java2d/loops/DrawLine
+sun/java2d/loops/DrawRect
+sun/java2d/loops/DrawPolygons
+sun/java2d/loops/DrawPath
+sun/java2d/loops/FillPath
+sun/java2d/loops/MaskBlit
+sun/java2d/loops/MaskFill
+sun/java2d/loops/DrawGlyphList
+sun/java2d/loops/DrawGlyphListAA
+sun/java2d/loops/DrawGlyphListLCD
+sun/java2d/loops/TransformHelper
+java/awt/BasicStroke
+java/awt/Stroke
+sun/misc/PerformanceLogger
+sun/misc/PerformanceLogger$TimeData
+sun/java2d/pipe/ValidatePipe
+sun/java2d/loops/CustomComponent
+sun/java2d/loops/GraphicsPrimitiveProxy
+sun/java2d/loops/GeneralRenderer
+sun/java2d/loops/GraphicsPrimitiveMgr$1
+sun/java2d/loops/GraphicsPrimitiveMgr$2
+sun/java2d/x11/X11PMBlitLoops$DelegateBlitLoop
+sun/java2d/x11/X11PMBlitBgLoops
+sun/java2d/x11/X11SurfaceData$LazyPipe
+sun/awt/X11GraphicsConfig$X11GCDisposerRecord
+sun/java2d/DisposerRecord
+java/awt/BorderLayout
+java/awt/LayoutManager2
+java/awt/Rectangle
+java/awt/Toolkit$2
+sun/awt/X11/XToolkit
+sun/awt/X11/XConstants
+sun/awt/UNIXToolkit
+java/util/TreeMap
+java/util/NavigableMap
+java/util/SortedMap
+sun/awt/X11/XlibWrapper
+sun/awt/X11/XUtilConstants
+sun/awt/X11/XProtocolConstants
+sun/awt/X11/XCursorFontConstants
+sun/awt/X11/XlibWrapper$1
+sun/awt/X11/XToolkit$4
+sun/awt/X11/XModifierKeymap
+sun/awt/X11/XWrapperBase
+sun/awt/X11/Native
+sun/awt/X11/Native$1
+java/awt/EventQueue
+java/util/EmptyStackException
+java/lang/reflect/InvocationTargetException
+java/awt/EventDispatchThread
+java/awt/event/PaintEvent
+java/awt/event/MouseEvent
+sun/awt/PeerEvent
+java/awt/event/InvocationEvent
+java/awt/ActiveEvent
+sun/awt/X11/XToolkit$1
+sun/awt/X11/XEventDispatcher
+sun/awt/SunToolkit$ModalityListenerList
+sun/awt/ModalityListener
+sun/awt/SunToolkit$1
+java/util/MissingResourceException
+java/awt/Queue
+sun/awt/PostEventQueue
+java/util/LinkedList
+java/util/Deque
+java/util/Queue
+java/util/AbstractSequentialList
+sun/awt/X11/AwtScreenData
+sun/awt/X11/XWM
+sun/awt/X11/MWMConstants
+sun/awt/X11/XAtom
+java/awt/Insets
+sun/awt/X11/XWM$1
+sun/awt/X11/XSetWindowAttributes
+sun/awt/X11/XErrorEvent
+sun/awt/X11/XNETProtocol
+sun/awt/X11/XStateProtocol
+sun/awt/X11/XLayerProtocol
+sun/awt/X11/XProtocol
+sun/awt/X11/WindowPropertyGetter
+sun/awt/X11/UnsafeXDisposerRecord
+sun/awt/X11/XPropertyCache
+sun/awt/X11/XWINProtocol
+sun/awt/X11/XAtomList
+sun/awt/X11/XToolkit$3
+sun/awt/X11/XAnyEvent
+java/awt/Window$WindowDisposerRecord
+java/awt/KeyboardFocusManager
+java/awt/KeyEventDispatcher
+java/awt/KeyEventPostProcessor
+java/awt/AWTKeyStroke
+java/awt/AWTKeyStroke$1
+java/awt/DefaultKeyboardFocusManager
+java/awt/DefaultFocusTraversalPolicy
+java/awt/ContainerOrderFocusTraversalPolicy
+java/awt/FocusTraversalPolicy
+java/util/Collections$UnmodifiableSet
+sun/awt/HeadlessToolkit
+sun/awt/X11/XKeyboardFocusManagerPeer
+java/awt/peer/KeyboardFocusManagerPeer
+sun/awt/X11/XKeyboardFocusManagerPeer$1
+sun/awt/X11/XFramePeer
+java/awt/peer/FramePeer
+java/awt/peer/WindowPeer
+java/awt/peer/ContainerPeer
+java/awt/peer/ComponentPeer
+sun/awt/X11/XDecoratedPeer
+sun/awt/X11/XWindowPeer
+sun/awt/X11/XPanelPeer
+java/awt/peer/PanelPeer
+sun/awt/X11/XCanvasPeer
+java/awt/peer/CanvasPeer
+sun/awt/X11/XComponentPeer
+java/awt/dnd/peer/DropTargetPeer
+sun/awt/X11/XWindow
+sun/awt/X11ComponentPeer
+sun/awt/X11/XBaseWindow
+sun/awt/X11/XCreateWindowParams
+java/lang/Long$LongCache
+sun/awt/X11/XBaseWindow$InitialiseState
+sun/awt/X11/XBaseWindow$StateLock
+sun/awt/X11/AwtGraphicsConfigData
+sun/awt/X11/XVisualInfo
+java/awt/SystemColor
+sun/awt/X11/MotifColorUtilities
+java/lang/StrictMath
+sun/awt/X11/XRepaintArea
+sun/awt/RepaintArea
+sun/awt/X11/XWindowAttributesData
+java/util/concurrent/locks/LockSupport
+sun/awt/X11/WindowDimensions
+java/awt/Point
+java/util/TreeMap$Entry
+sun/nio/cs/UTF_8
+sun/nio/cs/Unicode
+sun/nio/cs/UTF_8$Encoder
+sun/nio/cs/UTF_8$Decoder
+sun/nio/cs/Surrogate$Generator
+sun/awt/X11/XPropertyEvent
+sun/awt/X11/XDropTargetEventProcessor
+sun/awt/X11/XDragSourceContextPeer
+sun/awt/X11/XDragSourceProtocolListener
+sun/awt/dnd/SunDragSourceContextPeer
+java/awt/dnd/peer/DragSourceContextPeer
+sun/awt/X11/XAwtState
+sun/awt/X11/XBaseWindow$1
+sun/awt/X11/XRootWindow
+sun/nio/cs/ISO_8859_1
+sun/nio/cs/ISO_8859_1$Encoder
+sun/nio/cs/ISO_8859_1$Decoder
+sun/java2d/x11/X11SurfaceData$X11WindowSurfaceData
+sun/java2d/loops/RenderLoops
+sun/java2d/loops/GraphicsPrimitiveMgr$PrimitiveSpec
+sun/java2d/DefaultDisposerRecord
+sun/java2d/x11/X11Renderer
+sun/awt/X11/XGlobalCursorManager
+sun/awt/GlobalCursorManager
+java/awt/Cursor$CursorDisposer
+java/awt/AWTException
+java/awt/HeadlessException
+java/lang/UnsupportedOperationException
+sun/reflect/UnsafeLongFieldAccessorImpl
+sun/reflect/UnsafeIntegerFieldAccessorImpl
+sun/awt/X11/XClientMessageEvent
+sun/awt/X11/XIconInfo
+sun/awt/X11/XAWTIcon32_java_icon16_png
+sun/awt/X11/XAWTIcon32_java_icon24_png
+sun/awt/X11/XAWTIcon32_java_icon32_png
+sun/awt/X11/XAWTIcon32_java_icon48_png
+sun/awt/X11/XSizeHints
+sun/awt/X11/XContentWindow
+sun/awt/X11/XFocusProxyWindow
+sun/awt/X11/XWMHints
+java/util/LinkedList$ListItr
+java/util/ListIterator
+sun/awt/SunToolkit$2
+java/awt/image/BufferStrategy
+java/awt/dnd/DropTarget
+java/awt/dnd/DropTargetListener
+java/awt/event/ComponentListener
+java/awt/event/FocusListener
+java/awt/event/HierarchyListener
+java/awt/event/HierarchyBoundsListener
+java/awt/event/KeyListener
+java/awt/event/MouseListener
+java/awt/event/MouseMotionListener
+java/awt/event/MouseWheelListener
+java/awt/event/InputMethodListener
+java/awt/event/ContainerListener
+javax/accessibility/AccessibleContext
+sun/reflect/UnsafeObjectFieldAccessorImpl
+java/awt/peer/LightweightPeer
+sun/awt/X11/XLabelPeer
+java/awt/peer/LabelPeer
+sun/awt/X11/XMapEvent
+sun/awt/X11/XQueryTree
+sun/awt/X11/XConfigureEvent
+sun/awt/X11/PropMwmHints
+sun/awt/GlobalCursorManager$NativeUpdater
+javax/swing/JFrame
+javax/swing/WindowConstants
+javax/swing/RootPaneContainer
+javax/swing/TransferHandler$HasGetTransferHandler
+javax/swing/JLabel
+javax/swing/SwingConstants
+javax/swing/JComponent
+javax/swing/JComponent$1
+javax/swing/SwingUtilities
+javax/swing/JRootPane
+sun/security/action/GetBooleanAction
+javax/swing/event/EventListenerList
+javax/swing/JPanel
+java/awt/FlowLayout
+javax/swing/UIManager
+javax/swing/UIManager$LookAndFeelInfo
+sun/swing/SwingUtilities2
+sun/swing/SwingUtilities2$LSBCacheEntry
+javax/swing/UIManager$LAFState
+javax/swing/UIDefaults
+javax/swing/MultiUIDefaults
+javax/swing/UIManager$1
+javax/swing/plaf/metal/MetalLookAndFeel
+javax/swing/plaf/basic/BasicLookAndFeel
+javax/swing/LookAndFeel
+sun/swing/DefaultLookup
+javax/swing/plaf/metal/OceanTheme
+javax/swing/plaf/metal/DefaultMetalTheme
+javax/swing/plaf/metal/MetalTheme
+javax/swing/plaf/ColorUIResource
+javax/swing/plaf/UIResource
+sun/swing/PrintColorUIResource
+javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate
+javax/swing/plaf/FontUIResource
+sun/swing/SwingLazyValue
+javax/swing/UIDefaults$LazyValue
+javax/swing/UIDefaults$ActiveValue
+javax/swing/plaf/InsetsUIResource
+sun/swing/SwingUtilities2$2
+javax/swing/plaf/basic/BasicLookAndFeel$2
+javax/swing/plaf/DimensionUIResource
+javax/swing/UIDefaults$LazyInputMap
+java/lang/Character$CharacterCache
+javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue
+javax/swing/plaf/metal/MetalLookAndFeel$FontActiveValue
+java/awt/print/PrinterJob
+sun/swing/SwingUtilities2$AATextInfo
+sun/awt/X11/XAWTXSettings
+sun/awt/X11/XMSelectionListener
+sun/awt/XSettings
+sun/awt/X11/XMSelection
+sun/awt/X11/XMSelection$1
+javax/swing/plaf/metal/MetalLookAndFeel$AATextListener
+java/beans/PropertyChangeListener
+java/beans/PropertyChangeListenerProxy
+java/util/EventListenerProxy
+sun/awt/EventListenerAggregate
+javax/swing/UIDefaults$ProxyLazyValue
+javax/swing/plaf/metal/OceanTheme$1
+javax/swing/plaf/metal/OceanTheme$2
+javax/swing/plaf/metal/OceanTheme$3
+javax/swing/plaf/metal/OceanTheme$4
+javax/swing/plaf/metal/OceanTheme$5
+javax/swing/plaf/metal/OceanTheme$6
+javax/swing/RepaintManager
+javax/swing/RepaintManager$DisplayChangedHandler
+javax/swing/SwingPaintEventDispatcher
+sun/awt/PaintEventDispatcher
+javax/swing/UIManager$2
+java/awt/PopupMenu
+java/awt/Menu
+java/awt/MenuItem
+java/awt/MenuComponent
+java/io/ObjectOutputStream
+java/io/ObjectOutput
+java/io/DataOutput
+java/io/ObjectStreamConstants
+java/io/PrintWriter
+java/io/ObjectInputStream
+java/io/ObjectInput
+java/awt/Event
+java/awt/im/InputContext
+java/awt/event/MouseWheelEvent
+java/awt/BufferCapabilities
+sun/awt/CausedFocusEvent$Cause
+java/awt/PointerInfo
+java/awt/Component$BaselineResizeBehavior
+java/awt/FontMetrics
+java/awt/Image
+java/awt/image/ImageProducer
+java/awt/image/VolatileImage
+java/awt/im/InputMethodRequests
+java/awt/event/FocusEvent
+java/awt/event/InputMethodEvent
+java/awt/event/HierarchyEvent
+javax/accessibility/AccessibleStateSet
+com/sun/swing/internal/plaf/metal/resources/metal
+sun/util/ResourceBundleEnumeration
+com/sun/swing/internal/plaf/basic/resources/basic
+javax/swing/plaf/basic/BasicPanelUI
+javax/swing/plaf/PanelUI
+javax/swing/plaf/ComponentUI
+sun/reflect/misc/MethodUtil
+sun/reflect/misc/MethodUtil$1
+java/util/jar/JarFile
+java/util/zip/ZipFile
+java/util/zip/ZipConstants
+java/util/jar/JavaUtilJarAccessImpl
+sun/misc/JavaUtilJarAccess
+sun/misc/JarIndex
+java/util/zip/ZipEntry
+java/util/jar/JarFile$JarFileEntry
+java/util/jar/JarEntry
+sun/misc/URLClassPath$JarLoader$2
+sun/net/www/protocol/jar/JarURLConnection
+java/net/JarURLConnection
+sun/net/www/protocol/jar/JarFileFactory
+sun/net/www/protocol/jar/URLJarFile$URLJarFileCloseController
+java/net/HttpURLConnection
+sun/net/www/protocol/jar/URLJarFile
+sun/net/www/protocol/jar/URLJarFile$URLJarFileEntry
+sun/net/www/protocol/jar/JarURLConnection$JarURLInputStream
+java/util/zip/ZipFile$ZipFileInputStream
+java/security/AllPermissionCollection
+java/lang/IllegalAccessException
+javax/swing/JPasswordField
+javax/swing/JTextField
+javax/swing/text/JTextComponent
+javax/swing/Scrollable
+javax/swing/JLayeredPane
+javax/swing/JRootPane$1
+javax/swing/ArrayTable
+javax/swing/JInternalFrame
+javax/swing/JRootPane$RootLayout
+javax/swing/BufferStrategyPaintManager
+javax/swing/RepaintManager$PaintManager
+javax/swing/plaf/metal/MetalRootPaneUI
+javax/swing/plaf/basic/BasicRootPaneUI
+javax/swing/plaf/RootPaneUI
+javax/swing/plaf/basic/BasicRootPaneUI$RootPaneInputMap
+javax/swing/plaf/ComponentInputMapUIResource
+javax/swing/ComponentInputMap
+javax/swing/InputMap
+javax/swing/plaf/InputMapUIResource
+javax/swing/KeyStroke
+java/awt/VKCollection
+sun/reflect/UnsafeQualifiedStaticIntegerFieldAccessorImpl
+javax/swing/plaf/basic/LazyActionMap
+javax/swing/plaf/ActionMapUIResource
+javax/swing/ActionMap
+javax/swing/LayoutFocusTraversalPolicy
+javax/swing/SortingFocusTraversalPolicy
+javax/swing/InternalFrameFocusTraversalPolicy
+javax/swing/SwingContainerOrderFocusTraversalPolicy
+javax/swing/SwingDefaultFocusTraversalPolicy
+javax/swing/LayoutComparator
+javax/swing/plaf/metal/MetalLabelUI
+javax/swing/plaf/basic/BasicLabelUI
+javax/swing/plaf/LabelUI
+javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate$1
+javax/swing/plaf/basic/BasicHTML
+sun/awt/NullComponentPeer
+java/awt/event/WindowEvent
+java/awt/EventQueue$1
+java/awt/EventDispatchThread$1
+java/awt/Conditional
+java/awt/EventDispatchThread$HierarchyEventFilter
+java/awt/EventFilter$FilterAction
+sun/awt/dnd/SunDropTargetEvent
+java/awt/event/ActionEvent
+java/util/jar/Manifest
+java/io/ByteArrayInputStream
+java/util/jar/Attributes
+java/util/jar/Manifest$FastInputStream
+java/util/jar/Attributes$Name
+sun/misc/ASCIICaseInsensitiveComparator
+java/util/jar/JarVerifier
+java/io/ByteArrayOutputStream
+sun/misc/ExtensionDependency
+java/lang/Package
+sun/security/util/ManifestEntryVerifier
+java/security/Provider
+java/security/Provider$ServiceKey
+java/security/Provider$EngineDescription
+java/security/Security
+java/security/Security$1
+sun/misc/FloatingDecimal
+sun/misc/FloatingDecimal$1
+sun/security/provider/NativePRNG
+java/security/SecureRandomSpi
+sun/security/provider/NativePRNG$1
+sun/security/provider/NativePRNG$RandomIO
+sun/misc/BASE64Decoder
+sun/misc/CharacterDecoder
+sun/security/util/SignatureFileVerifier
+java/awt/event/KeyAdapter
+java/lang/NumberFormatException
+java/lang/IllegalArgumentException
+java/io/FileWriter
+java/net/Authenticator
+java/net/MalformedURLException
+javax/swing/text/Element
+javax/swing/text/Document
+javax/swing/text/PlainDocument
+javax/swing/text/AbstractDocument
+javax/swing/text/GapContent
+javax/swing/text/AbstractDocument$Content
+javax/swing/text/GapVector
+javax/swing/text/GapContent$MarkVector
+javax/swing/text/GapContent$MarkData
+javax/swing/text/StyleContext
+javax/swing/text/AbstractDocument$AttributeContext
+javax/swing/text/StyleConstants
+javax/swing/text/StyleConstants$CharacterConstants
+javax/swing/text/AttributeSet$CharacterAttribute
+javax/swing/text/StyleConstants$FontConstants
+javax/swing/text/AttributeSet$FontAttribute
+javax/swing/text/StyleConstants$ColorConstants
+javax/swing/text/AttributeSet$ColorAttribute
+javax/swing/text/StyleConstants$ParagraphConstants
+javax/swing/text/AttributeSet$ParagraphAttribute
+javax/swing/text/StyleContext$FontKey
+javax/swing/text/SimpleAttributeSet
+javax/swing/text/MutableAttributeSet
+javax/swing/text/AttributeSet
+javax/swing/text/SimpleAttributeSet$EmptyAttributeSet
+javax/swing/text/StyleContext$NamedStyle
+javax/swing/text/Style
+javax/swing/text/StyleContext$SmallAttributeSet
+javax/swing/text/AbstractDocument$BidiRootElement
+javax/swing/text/AbstractDocument$BranchElement
+javax/swing/text/AbstractDocument$AbstractElement
+javax/swing/tree/TreeNode
+javax/swing/text/AbstractDocument$1
+javax/swing/text/AbstractDocument$BidiElement
+javax/swing/text/AbstractDocument$LeafElement
+javax/swing/text/GapContent$StickyPosition
+javax/swing/text/Position
+javax/swing/text/StyleContext$KeyEnumeration
+javax/swing/text/GapContent$InsertUndo
+javax/swing/undo/AbstractUndoableEdit
+javax/swing/undo/UndoableEdit
+javax/swing/text/AbstractDocument$DefaultDocumentEvent
+javax/swing/event/DocumentEvent
+javax/swing/undo/CompoundEdit
+javax/swing/event/DocumentEvent$EventType
+javax/swing/text/Segment
+java/text/CharacterIterator
+javax/swing/text/Utilities
+javax/swing/text/SegmentCache
+javax/swing/text/SegmentCache$CachedSegment
+javax/swing/event/UndoableEditEvent
+javax/swing/text/AbstractDocument$ElementEdit
+javax/swing/event/DocumentEvent$ElementChange
+java/net/Socket
+java/net/InetAddress
+java/net/InetAddress$Cache
+java/net/InetAddress$Cache$Type
+java/net/InetAddressImplFactory
+java/net/Inet4AddressImpl
+java/net/InetAddressImpl
+java/net/InetAddress$1
+sun/net/spi/nameservice/NameService
+sun/net/util/IPAddressUtil
+java/util/RandomAccessSubList
+java/util/SubList
+java/util/SubList$1
+java/util/AbstractList$ListItr
+java/net/Inet4Address
+java/net/InetSocketAddress
+java/net/SocketAddress
+java/net/SocksSocketImpl
+java/net/SocksConsts
+java/net/PlainSocketImpl
+java/net/SocketImpl
+java/net/SocketOptions
+java/net/SocketException
+java/net/SocksSocketImpl$5
+java/net/ProxySelector
+sun/net/spi/DefaultProxySelector
+sun/net/spi/DefaultProxySelector$1
+sun/net/NetProperties
+sun/net/NetProperties$1
+sun/net/spi/DefaultProxySelector$NonProxyInfo
+java/net/Inet6Address
+java/net/URI
+java/net/URI$Parser
+java/net/Proxy
+java/net/Proxy$Type
+java/net/ConnectException
+javax/swing/JMenu
+javax/swing/MenuElement
+javax/swing/JMenuItem
+javax/swing/AbstractButton
+java/awt/ItemSelectable
+javax/swing/event/MenuListener
+javax/swing/JCheckBoxMenuItem
+javax/swing/Icon
+javax/swing/JButton
+java/awt/event/WindowListener
+java/net/URLClassLoader$2
+javax/swing/ImageIcon
+javax/swing/ImageIcon$1
+java/awt/MediaTracker
+sun/misc/SoftCache$ValueCell
+sun/awt/image/URLImageSource
+sun/awt/image/InputStreamImageSource
+sun/awt/image/ImageFetchable
+sun/awt/image/ToolkitImage
+java/awt/Image$1
+sun/awt/image/SurfaceManager$ImageAccessor
+sun/awt/image/SurfaceManager
+sun/awt/image/NativeLibLoader
+java/awt/ImageMediaEntry
+java/awt/MediaEntry
+sun/awt/image/ImageRepresentation
+java/awt/image/ImageConsumer
+sun/awt/image/ImageWatched
+sun/awt/image/ImageWatched$Link
+sun/awt/image/ImageWatched$WeakLink
+sun/awt/image/ImageConsumerQueue
+sun/awt/image/ImageFetcher
+sun/awt/image/FetcherInfo
+sun/awt/image/ImageFetcher$1
+sun/awt/image/GifImageDecoder
+sun/awt/image/ImageDecoder
+sun/awt/image/GifFrame
+java/awt/image/Raster
+java/awt/image/DataBufferByte
+java/awt/image/DataBuffer
+java/awt/image/PixelInterleavedSampleModel
+java/awt/image/ComponentSampleModel
+java/awt/image/SampleModel
+sun/awt/image/ByteInterleavedRaster
+sun/awt/image/ByteComponentRaster
+sun/awt/image/SunWritableRaster
+java/awt/image/WritableRaster
+java/awt/image/BufferedImage
+java/awt/image/WritableRenderedImage
+java/awt/image/RenderedImage
+sun/awt/image/IntegerComponentRaster
+sun/awt/image/BytePackedRaster
+java/awt/Canvas
+sun/font/FontDesignMetrics
+sun/font/FontStrikeDesc
+sun/font/CompositeStrike
+sun/font/FontStrikeDisposer
+sun/font/StrikeCache$SoftDisposerRef
+sun/font/StrikeCache$DisposableStrike
+sun/font/TrueTypeFont$TTDisposerRecord
+sun/font/TrueTypeFont$1
+java/io/RandomAccessFile
+java/nio/ByteBufferAsIntBufferB
+java/nio/IntBuffer
+sun/font/TrueTypeFont$DirectoryEntry
+java/nio/ByteBufferAsShortBufferB
+java/nio/ShortBuffer
+sun/nio/cs/UTF_16
+sun/nio/cs/UTF_16$Decoder
+sun/nio/cs/UnicodeDecoder
+sun/font/FileFontStrike
+sun/font/TrueTypeGlyphMapper
+sun/font/CMap
+sun/font/CMap$NullCMapClass
+sun/font/CMap$CMapFormat4
+java/nio/ByteBufferAsCharBufferB
+sun/font/FontDesignMetrics$KeyReference
+sun/awt/image/PNGImageDecoder
+sun/awt/image/PNGFilterInputStream
+java/util/zip/InflaterInputStream
+java/util/zip/Inflater
+sun/awt/EventQueueItem
+sun/awt/SunToolkit$3
+sun/awt/X11/XExposeEvent
+sun/reflect/UnsafeBooleanFieldAccessorImpl
+sun/awt/event/IgnorePaintEvent
+java/awt/image/DataBufferInt
+java/awt/image/SinglePixelPackedSampleModel
+sun/awt/image/IntegerInterleavedRaster
+sun/awt/image/OffScreenImage
+sun/awt/image/BufImgSurfaceData
+sun/java2d/opengl/GLXGraphicsConfig
+sun/java2d/opengl/OGLGraphicsConfig
+sun/java2d/x11/X11SurfaceData$X11PixmapSurfaceData
+sun/awt/image/WritableRasterNative
+sun/awt/image/DataBufferNative
+sun/java2d/SurfaceManagerFactory
+sun/java2d/opengl/GLXSurfaceData
+sun/java2d/opengl/OGLSurfaceData
+sun/font/CompositeGlyphMapper
+sun/java2d/loops/FontInfo
+java/util/Date
+sun/util/calendar/CalendarSystem
+sun/util/calendar/Gregorian
+sun/util/calendar/BaseCalendar
+sun/util/calendar/AbstractCalendar
+java/util/TimeZone
+java/lang/InheritableThreadLocal
+sun/util/calendar/ZoneInfo
+sun/util/calendar/ZoneInfoFile
+sun/util/calendar/ZoneInfoFile$1
+java/util/TimeZone$1
+sun/util/calendar/Gregorian$Date
+sun/util/calendar/BaseCalendar$Date
+sun/util/calendar/CalendarDate
+sun/util/calendar/CalendarUtils
+java/util/TimeZone$DisplayNames
+sun/util/TimeZoneNameUtility
+sun/util/resources/TimeZoneNames
+sun/util/resources/TimeZoneNamesBundle
+sun/util/resources/TimeZoneNames_en
+java/util/spi/TimeZoneNameProvider
+java/lang/ProcessBuilder
+java/lang/ProcessImpl
+java/lang/UNIXProcess
+java/lang/Process
+java/lang/UNIXProcess$1
+java/net/ServerSocket
+java/util/Random
+java/util/concurrent/atomic/AtomicLong
+java/lang/InternalError
+java/io/StringReader
+java/lang/SecurityException
+java/io/FilterReader
+java/lang/reflect/Proxy
+java/lang/reflect/InvocationHandler
+java/lang/NoSuchFieldException
+java/lang/InstantiationException
+java/lang/ArrayIndexOutOfBoundsException
+java/lang/IndexOutOfBoundsException
+javax/swing/JDialog
+sun/awt/X11/XClipboard
+sun/awt/datatransfer/SunClipboard
+java/awt/datatransfer/Clipboard
+java/awt/datatransfer/SystemFlavorMap
+java/awt/datatransfer/FlavorMap
+java/awt/datatransfer/FlavorTable
+java/awt/datatransfer/SystemFlavorMap$1
+sun/net/ProgressMonitor
+sun/net/DefaultProgressMeteringPolicy
+sun/net/ProgressMeteringPolicy
+java/awt/datatransfer/SystemFlavorMap$2
+java/awt/datatransfer/MimeType
+java/io/Externalizable
+java/awt/datatransfer/MimeTypeParameterList
+sun/awt/datatransfer/DataTransferer
+java/util/Collections$SynchronizedSet
+java/util/Collections$SynchronizedCollection
+java/awt/datatransfer/DataFlavor
+java/awt/datatransfer/DataFlavor$1
+sun/awt/datatransfer/DataTransferer$CharsetComparator
+sun/awt/datatransfer/DataTransferer$IndexedComparator
+sun/nio/cs/UTF_16LE
+sun/nio/cs/UTF_16BE
+sun/awt/datatransfer/DataTransferer$DataFlavorComparator
+java/rmi/Remote
+sun/awt/datatransfer/DataTransferer$1
+sun/awt/X11/XDataTransferer
+sun/awt/datatransfer/ToolkitThreadBlockedHandler
+javax/imageio/ImageTypeSpecifier
+sun/awt/X11/XSelection
+sun/security/action/GetIntegerAction
+sun/awt/X11/XSelection$IncrementalTransferHandler
+sun/awt/X11/XSelection$SelectionEventHandler
+java/awt/datatransfer/Transferable
+java/io/EOFException
+java/util/Vector$1
+java/util/zip/ZipFile$1
+java/util/zip/ZipFile$2
+java/util/jar/JarFile$1
+java/util/PropertyResourceBundle
+java/util/ResourceBundle$Control$1
+java/util/Hashtable$EntrySet
+java/lang/IllegalAccessError
+java/text/MessageFormat
+java/text/MessageFormat$Field
+java/text/Format$Field
+java/lang/CloneNotSupportedException
+sun/reflect/MethodAccessorGenerator
+sun/reflect/AccessorGenerator
+sun/reflect/ClassFileConstants
+java/lang/Void
+sun/reflect/ByteVectorFactory
+sun/reflect/ByteVectorImpl
+sun/reflect/ByteVector
+sun/reflect/ClassFileAssembler
+sun/reflect/UTF8
+sun/reflect/Label
+sun/reflect/Label$PatchInfo
+sun/reflect/MethodAccessorGenerator$1
+sun/reflect/ClassDefiner
+sun/reflect/ClassDefiner$1
+sun/reflect/BootstrapConstructorAccessorImpl
+java/awt/event/ActionListener
+javax/swing/Timer
+javax/swing/Timer$DoPostEvent
+javax/swing/TimerQueue
+javax/swing/TimerQueue$1
+javax/swing/ToolTipManager
+java/awt/event/MouseAdapter
+javax/swing/ToolTipManager$insideTimerAction
+javax/swing/ToolTipManager$outsideTimerAction
+javax/swing/ToolTipManager$stillInsideTimerAction
+sun/swing/UIAction
+javax/swing/Action
+javax/swing/ToolTipManager$MoveBeforeEnterListener
+java/awt/event/MouseMotionAdapter
+java/util/Hashtable$ValueCollection
+javax/swing/event/CaretListener
+javax/swing/JToolBar
+javax/swing/JSplitPane
+javax/swing/border/Border
+javax/swing/JToggleButton
+javax/swing/border/EmptyBorder
+javax/swing/border/AbstractBorder
+javax/swing/DefaultButtonModel
+javax/swing/ButtonModel
+javax/swing/AbstractButton$Handler
+javax/swing/event/ChangeListener
+java/awt/event/ItemListener
+javax/swing/plaf/metal/MetalButtonUI
+javax/swing/plaf/basic/BasicButtonUI
+javax/swing/plaf/ButtonUI
+javax/swing/plaf/metal/MetalBorders
+javax/swing/plaf/BorderUIResource$CompoundBorderUIResource
+javax/swing/border/CompoundBorder
+javax/swing/plaf/metal/MetalBorders$ButtonBorder
+javax/swing/plaf/basic/BasicBorders$MarginBorder
+javax/swing/plaf/basic/BasicButtonListener
+java/awt/AWTEventMulticaster
+java/awt/event/WindowFocusListener
+java/awt/event/WindowStateListener
+java/awt/event/AdjustmentListener
+java/awt/event/TextListener
+javax/swing/event/AncestorListener
+java/beans/VetoableChangeListener
+javax/swing/ButtonGroup
+javax/swing/JToggleButton$ToggleButtonModel
+javax/swing/plaf/metal/MetalToggleButtonUI
+javax/swing/plaf/basic/BasicToggleButtonUI
+javax/swing/plaf/metal/MetalBorders$ToggleButtonBorder
+java/awt/CardLayout
+javax/swing/Box
+javax/swing/plaf/metal/MetalBorders$TextFieldBorder
+javax/swing/plaf/metal/MetalBorders$Flush3DBorder
+javax/swing/BoxLayout
+javax/swing/JMenuBar
+javax/swing/DefaultSingleSelectionModel
+javax/swing/SingleSelectionModel
+javax/swing/plaf/basic/BasicMenuBarUI
+javax/swing/plaf/MenuBarUI
+javax/swing/plaf/basic/DefaultMenuLayout
+javax/swing/plaf/metal/MetalBorders$MenuBarBorder
+javax/swing/plaf/basic/BasicMenuBarUI$Handler
+javax/swing/KeyboardManager
+javax/swing/event/MenuEvent
+javax/swing/JMenu$MenuChangeListener
+javax/swing/JMenuItem$MenuItemFocusListener
+javax/swing/plaf/basic/BasicMenuUI
+javax/swing/plaf/basic/BasicMenuItemUI
+javax/swing/plaf/MenuItemUI
+javax/swing/plaf/metal/MetalBorders$MenuItemBorder
+javax/swing/plaf/metal/MetalIconFactory
+javax/swing/plaf/metal/MetalIconFactory$MenuArrowIcon
+javax/swing/plaf/basic/BasicMenuUI$Handler
+javax/swing/event/MenuKeyListener
+javax/swing/plaf/basic/BasicMenuItemUI$Handler
+javax/swing/event/MenuDragMouseListener
+javax/swing/event/MouseInputListener
+javax/swing/event/ChangeEvent
+java/awt/event/ContainerEvent
+javax/swing/plaf/metal/MetalIconFactory$MenuItemArrowIcon
+javax/swing/JPopupMenu
+javax/swing/plaf/basic/BasicPopupMenuUI
+javax/swing/plaf/PopupMenuUI
+javax/swing/plaf/basic/BasicLookAndFeel$AWTEventHelper
+java/awt/event/AWTEventListenerProxy
+java/awt/Toolkit$SelectiveAWTEventListener
+java/awt/Toolkit$ToolkitEventMulticaster
+javax/swing/plaf/basic/BasicLookAndFeel$1
+javax/swing/plaf/metal/MetalBorders$PopupMenuBorder
+javax/swing/plaf/basic/BasicPopupMenuUI$BasicPopupMenuListener
+javax/swing/event/PopupMenuListener
+javax/swing/plaf/basic/BasicPopupMenuUI$BasicMenuKeyListener
+javax/swing/plaf/basic/BasicPopupMenuUI$MouseGrabber
+javax/swing/MenuSelectionManager
+javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper
+javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper$1
+java/awt/event/FocusAdapter
+javax/swing/JMenu$WinListener
+java/awt/event/WindowAdapter
+javax/swing/JPopupMenu$Separator
+javax/swing/JSeparator
+javax/swing/plaf/metal/MetalPopupMenuSeparatorUI
+javax/swing/plaf/metal/MetalSeparatorUI
+javax/swing/plaf/basic/BasicSeparatorUI
+javax/swing/plaf/SeparatorUI
+javax/swing/JComboBox
+javax/swing/event/ListDataListener
+javax/swing/event/CaretEvent
+javax/swing/text/TabExpander
+javax/swing/JScrollBar
+java/awt/Adjustable
+javax/swing/event/MouseInputAdapter
+javax/swing/JScrollBar$ModelListener
+javax/swing/DefaultBoundedRangeModel
+javax/swing/BoundedRangeModel
+javax/swing/plaf/metal/MetalScrollBarUI
+javax/swing/plaf/basic/BasicScrollBarUI
+javax/swing/plaf/ScrollBarUI
+javax/swing/plaf/metal/MetalBumps
+javax/swing/plaf/metal/MetalScrollButton
+javax/swing/plaf/basic/BasicArrowButton
+javax/swing/plaf/basic/BasicScrollBarUI$TrackListener
+javax/swing/plaf/basic/BasicScrollBarUI$ArrowButtonListener
+javax/swing/plaf/basic/BasicScrollBarUI$ModelListener
+javax/swing/plaf/metal/MetalScrollBarUI$ScrollBarListener
+javax/swing/plaf/basic/BasicScrollBarUI$PropertyChangeHandler
+javax/swing/plaf/basic/BasicScrollBarUI$Handler
+javax/swing/plaf/basic/BasicScrollBarUI$ScrollListener
+javax/swing/CellRendererPane
+java/util/HashMap$EntryIterator
+javax/swing/border/MatteBorder
+sun/font/StandardGlyphVector
+java/awt/font/GlyphVector
+sun/font/StandardGlyphVector$GlyphStrike
+sun/font/CoreMetrics
+sun/font/FontLineMetrics
+java/awt/font/LineMetrics
+javax/swing/ComboBoxModel
+javax/swing/ListModel
+javax/swing/ListCellRenderer
+javax/swing/DefaultComboBoxModel
+javax/swing/MutableComboBoxModel
+javax/swing/AbstractListModel
+javax/swing/JComboBox$1
+javax/swing/AncestorNotifier
+javax/swing/plaf/metal/MetalComboBoxUI
+javax/swing/plaf/basic/BasicComboBoxUI
+javax/swing/plaf/ComboBoxUI
+javax/swing/plaf/metal/MetalComboBoxUI$MetalComboBoxLayoutManager
+javax/swing/plaf/basic/BasicComboBoxUI$ComboBoxLayoutManager
+javax/swing/plaf/basic/BasicComboPopup
+javax/swing/plaf/basic/ComboPopup
+javax/swing/plaf/basic/BasicComboPopup$EmptyListModelClass
+javax/swing/border/LineBorder
+javax/swing/plaf/basic/BasicComboPopup$1
+javax/swing/JList
+javax/swing/DropMode
+javax/swing/DefaultListSelectionModel
+javax/swing/ListSelectionModel
+javax/swing/plaf/basic/BasicListUI
+javax/swing/plaf/ListUI
+javax/swing/plaf/basic/BasicListUI$ListTransferHandler
+javax/swing/TransferHandler
+javax/swing/TransferHandler$TransferAction
+javax/swing/DefaultListCellRenderer$UIResource
+javax/swing/DefaultListCellRenderer
+javax/swing/TransferHandler$SwingDropTarget
+java/awt/dnd/DropTargetContext
+javax/swing/TransferHandler$DropHandler
+javax/swing/TransferHandler$TransferSupport
+javax/swing/plaf/basic/BasicListUI$Handler
+javax/swing/event/ListSelectionListener
+javax/swing/plaf/basic/DragRecognitionSupport$BeforeDrag
+javax/swing/plaf/basic/BasicComboPopup$Handler
+javax/swing/JScrollPane
+javax/swing/ScrollPaneConstants
+javax/swing/ScrollPaneLayout$UIResource
+javax/swing/ScrollPaneLayout
+javax/swing/JViewport
+javax/swing/ViewportLayout
+javax/swing/plaf/basic/BasicViewportUI
+javax/swing/plaf/ViewportUI
+javax/swing/JScrollPane$ScrollBar
+javax/swing/JViewport$ViewListener
+java/awt/event/ComponentAdapter
+javax/swing/plaf/metal/MetalScrollPaneUI
+javax/swing/plaf/basic/BasicScrollPaneUI
+javax/swing/plaf/ScrollPaneUI
+javax/swing/plaf/metal/MetalBorders$ScrollPaneBorder
+javax/swing/plaf/basic/BasicScrollPaneUI$Handler
+javax/swing/plaf/metal/MetalScrollPaneUI$1
+javax/swing/plaf/basic/BasicComboBoxRenderer$UIResource
+javax/swing/plaf/basic/BasicComboBoxRenderer
+javax/swing/plaf/metal/MetalComboBoxEditor$UIResource
+javax/swing/plaf/metal/MetalComboBoxEditor
+javax/swing/plaf/basic/BasicComboBoxEditor
+javax/swing/ComboBoxEditor
+javax/swing/plaf/basic/BasicComboBoxEditor$BorderlessTextField
+javax/swing/JTextField$NotifyAction
+javax/swing/text/TextAction
+javax/swing/AbstractAction
+javax/swing/text/JTextComponent$MutableCaretEvent
+javax/swing/plaf/metal/MetalTextFieldUI
+javax/swing/plaf/basic/BasicTextFieldUI
+javax/swing/plaf/basic/BasicTextUI
+javax/swing/text/ViewFactory
+javax/swing/plaf/TextUI
+javax/swing/plaf/basic/BasicTextUI$BasicCursor
+javax/swing/text/DefaultEditorKit
+javax/swing/text/EditorKit
+javax/swing/text/DefaultEditorKit$InsertContentAction
+javax/swing/text/DefaultEditorKit$DeletePrevCharAction
+javax/swing/text/DefaultEditorKit$DeleteNextCharAction
+javax/swing/text/DefaultEditorKit$ReadOnlyAction
+javax/swing/text/DefaultEditorKit$DeleteWordAction
+javax/swing/text/DefaultEditorKit$WritableAction
+javax/swing/text/DefaultEditorKit$CutAction
+javax/swing/text/DefaultEditorKit$CopyAction
+javax/swing/text/DefaultEditorKit$PasteAction
+javax/swing/text/DefaultEditorKit$VerticalPageAction
+javax/swing/text/DefaultEditorKit$PageAction
+javax/swing/text/DefaultEditorKit$InsertBreakAction
+javax/swing/text/DefaultEditorKit$BeepAction
+javax/swing/text/DefaultEditorKit$NextVisualPositionAction
+javax/swing/text/DefaultEditorKit$BeginWordAction
+javax/swing/text/DefaultEditorKit$EndWordAction
+javax/swing/text/DefaultEditorKit$PreviousWordAction
+javax/swing/text/DefaultEditorKit$NextWordAction
+javax/swing/text/DefaultEditorKit$BeginLineAction
+javax/swing/text/DefaultEditorKit$EndLineAction
+javax/swing/text/DefaultEditorKit$BeginParagraphAction
+javax/swing/text/DefaultEditorKit$EndParagraphAction
+javax/swing/text/DefaultEditorKit$BeginAction
+javax/swing/text/DefaultEditorKit$EndAction
+javax/swing/text/DefaultEditorKit$DefaultKeyTypedAction
+javax/swing/text/DefaultEditorKit$InsertTabAction
+javax/swing/text/DefaultEditorKit$SelectWordAction
+javax/swing/text/DefaultEditorKit$SelectLineAction
+javax/swing/text/DefaultEditorKit$SelectParagraphAction
+javax/swing/text/DefaultEditorKit$SelectAllAction
+javax/swing/text/DefaultEditorKit$UnselectAction
+javax/swing/text/DefaultEditorKit$ToggleComponentOrientationAction
+javax/swing/text/DefaultEditorKit$DumpModelAction
+javax/swing/plaf/basic/BasicTextUI$TextTransferHandler
+javax/swing/text/Position$Bias
+javax/swing/plaf/basic/BasicTextUI$RootView
+javax/swing/text/View
+javax/swing/plaf/basic/BasicTextUI$UpdateHandler
+javax/swing/event/DocumentListener
+javax/swing/plaf/basic/BasicTextUI$DragListener
+javax/swing/plaf/basic/BasicComboBoxEditor$UIResource
+javax/swing/plaf/basic/BasicTextUI$BasicCaret
+javax/swing/text/DefaultCaret
+javax/swing/text/Caret
+javax/swing/text/DefaultCaret$Handler
+java/awt/datatransfer/ClipboardOwner
+javax/swing/plaf/basic/BasicTextUI$BasicHighlighter
+javax/swing/text/DefaultHighlighter
+javax/swing/text/LayeredHighlighter
+javax/swing/text/Highlighter
+javax/swing/text/Highlighter$Highlight
+javax/swing/text/DefaultHighlighter$DefaultHighlightPainter
+javax/swing/text/LayeredHighlighter$LayerPainter
+javax/swing/text/Highlighter$HighlightPainter
+javax/swing/text/DefaultHighlighter$SafeDamager
+javax/swing/text/FieldView
+javax/swing/text/PlainView
+javax/swing/text/JTextComponent$DefaultKeymap
+javax/swing/text/Keymap
+javax/swing/text/JTextComponent$KeymapWrapper
+javax/swing/text/JTextComponent$KeymapActionMap
+javax/swing/plaf/basic/BasicTextUI$FocusAction
+javax/swing/plaf/basic/BasicTextUI$TextActionWrapper
+javax/swing/JTextArea
+javax/swing/JEditorPane
+javax/swing/JTextField$ScrollRepainter
+javax/swing/plaf/metal/MetalComboBoxEditor$1
+javax/swing/plaf/metal/MetalComboBoxEditor$EditorBorder
+javax/swing/plaf/metal/MetalComboBoxUI$MetalPropertyChangeListener
+javax/swing/plaf/basic/BasicComboBoxUI$PropertyChangeHandler
+javax/swing/plaf/basic/BasicComboBoxUI$Handler
+javax/swing/plaf/metal/MetalComboBoxButton
+javax/swing/plaf/metal/MetalComboBoxIcon
+javax/swing/plaf/metal/MetalComboBoxButton$1
+javax/swing/plaf/basic/BasicComboBoxUI$DefaultKeySelectionManager
+javax/swing/JComboBox$KeySelectionManager
+javax/swing/JToolBar$DefaultToolBarLayout
+javax/swing/plaf/metal/MetalToolBarUI
+javax/swing/plaf/basic/BasicToolBarUI
+javax/swing/plaf/ToolBarUI
+javax/swing/plaf/metal/MetalBorders$ToolBarBorder
+javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue$1
+javax/swing/plaf/metal/MetalBorders$RolloverButtonBorder
+javax/swing/plaf/metal/MetalBorders$RolloverMarginBorder
+javax/swing/plaf/basic/BasicBorders$RadioButtonBorder
+javax/swing/plaf/basic/BasicBorders$ButtonBorder
+javax/swing/plaf/basic/BasicBorders$RolloverMarginBorder
+javax/swing/plaf/metal/MetalToolBarUI$MetalDockingListener
+javax/swing/plaf/basic/BasicToolBarUI$DockingListener
+javax/swing/plaf/basic/BasicToolBarUI$Handler
+javax/swing/border/EtchedBorder
+javax/swing/JToolBar$Separator
+javax/swing/plaf/basic/BasicToolBarSeparatorUI
+java/applet/Applet
+java/awt/Panel
+com/sun/awt/AWTUtilities
+javax/swing/KeyboardManager$ComponentKeyStrokePair
+sun/awt/EmbeddedFrame
+sun/awt/im/InputMethodContext
+java/awt/im/spi/InputMethodContext
+sun/awt/im/InputContext
+sun/awt/im/InputMethodManager
+sun/awt/im/ExecutableInputMethodManager
+sun/awt/X11/XInputMethodDescriptor
+sun/awt/X11InputMethodDescriptor
+java/awt/im/spi/InputMethodDescriptor
+sun/awt/im/InputMethodLocator
+sun/awt/im/ExecutableInputMethodManager$2
+sun/misc/Service
+sun/misc/Service$LazyIterator
+java/util/TreeSet
+java/util/NavigableSet
+java/util/SortedSet
+javax/swing/SizeRequirements
+javax/swing/plaf/basic/BasicGraphicsUtils
+java/awt/event/AdjustmentEvent
+java/awt/MenuBar
+sun/awt/X11/XComponentPeer$2
+java/awt/SequencedEvent
+java/beans/PropertyVetoException
+java/awt/DefaultKeyboardFocusManager$TypeAheadMarker
+java/awt/KeyboardFocusManager$HeavyweightFocusRequest
+java/awt/KeyboardFocusManager$LightweightFocusRequest
+sun/awt/KeyboardFocusManagerPeerImpl
+sun/awt/SunToolkit$7
+java/awt/Window$1DisposeAction
+java/awt/LightweightDispatcher$2
+sun/awt/X11/XReparentEvent
+sun/awt/X11/XWindowAttributes
+sun/awt/X11/XFocusChangeEvent
+sun/awt/X11/XComponentPeer$1
+sun/awt/X11/XUnmapEvent
+java/io/StringWriter
+javax/swing/JWindow
+java/io/UnsupportedEncodingException
+java/net/UnknownHostException
+java/nio/channels/SocketChannel
+java/nio/channels/spi/AbstractSelectableChannel
+java/nio/channels/SelectableChannel
+java/net/SocketImplFactory
+javax/swing/UnsupportedLookAndFeelException
+java/lang/UnsatisfiedLinkError
+javax/swing/Box$Filler
+javax/swing/JComponent$2
+sun/net/www/MimeTable
+java/net/FileNameMap
+sun/net/www/MimeTable$1
+sun/net/www/MimeEntry
+java/net/URLConnection$1
+java/text/SimpleDateFormat
+java/text/DateFormat
+java/text/DateFormat$Field
+java/util/Calendar
+java/util/GregorianCalendar
+sun/util/resources/CalendarData
+sun/util/resources/CalendarData_en
+java/text/DateFormatSymbols
+java/text/spi/DateFormatSymbolsProvider
+java/text/DontCareFieldPosition
+java/text/DontCareFieldPosition$1
+java/text/Format$FieldDelegate
+javax/swing/plaf/BorderUIResource
+javax/swing/BorderFactory
+javax/swing/border/BevelBorder
+javax/swing/plaf/metal/MetalIconFactory$TreeFolderIcon
+javax/swing/plaf/metal/MetalIconFactory$FolderIcon16
+java/util/zip/ZipInputStream
+java/io/PushbackInputStream
+java/util/zip/CRC32
+java/util/zip/Checksum
+java/lang/Thread$State
+javax/swing/SwingUtilities$SharedOwnerFrame
+javax/swing/JTable
+javax/swing/event/TableModelListener
+javax/swing/event/TableColumnModelListener
+javax/swing/event/CellEditorListener
+javax/swing/event/RowSorterListener
+javax/swing/BufferStrategyPaintManager$BufferInfo
+java/awt/Component$BltSubRegionBufferStrategy
+sun/awt/SubRegionShowable
+java/awt/Component$BltBufferStrategy
+sun/awt/image/SunVolatileImage
+sun/awt/image/BufferedImageGraphicsConfig
+sun/print/PrinterGraphicsConfig
+sun/java2d/x11/X11VolatileSurfaceManager
+sun/awt/image/VolatileSurfaceManager
+java/awt/print/PrinterGraphics
+java/awt/PrintGraphics
+java/awt/GraphicsCallback$PaintCallback
+java/awt/GraphicsCallback
+sun/awt/SunGraphicsCallback
+javax/swing/JRadioButton
+java/lang/ClassFormatError
+javax/swing/JTabbedPane
+javax/swing/JTabbedPane$ModelListener
+javax/swing/plaf/metal/MetalTabbedPaneUI
+javax/swing/plaf/basic/BasicTabbedPaneUI
+javax/swing/plaf/TabbedPaneUI
+javax/swing/plaf/metal/MetalTabbedPaneUI$TabbedPaneLayout
+javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneLayout
+javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneScrollLayout
+javax/swing/plaf/basic/BasicTabbedPaneUI$Handler
+sun/swing/ImageIconUIResource
+javax/swing/GrayFilter
+java/awt/image/RGBImageFilter
+java/awt/image/ImageFilter
+java/awt/image/FilteredImageSource
+org/w3c/dom/Node
+org/xml/sax/SAXException
+javax/xml/parsers/ParserConfigurationException
+org/xml/sax/EntityResolver
+java/security/NoSuchAlgorithmException
+java/security/GeneralSecurityException
+java/util/zip/GZIPInputStream
+java/util/zip/DeflaterOutputStream
+org/xml/sax/InputSource
+javax/xml/parsers/DocumentBuilderFactory
+javax/xml/parsers/FactoryFinder
+javax/xml/parsers/SecuritySupport
+javax/xml/parsers/SecuritySupport$2
+javax/xml/parsers/SecuritySupport$5
+javax/xml/parsers/SecuritySupport$1
+javax/xml/parsers/SecuritySupport$4
+javax/xml/parsers/DocumentBuilder
+org/w3c/dom/Document
+org/xml/sax/helpers/DefaultHandler
+org/xml/sax/DTDHandler
+org/xml/sax/ContentHandler
+org/xml/sax/ErrorHandler
+org/xml/sax/SAXNotSupportedException
+org/xml/sax/Locator
+org/xml/sax/SAXNotRecognizedException
+org/xml/sax/SAXParseException
+org/w3c/dom/NodeList
+org/w3c/dom/events/EventTarget
+org/w3c/dom/traversal/DocumentTraversal
+org/w3c/dom/events/DocumentEvent
+org/w3c/dom/ranges/DocumentRange
+org/w3c/dom/Entity
+org/w3c/dom/Element
+org/w3c/dom/CharacterData
+org/w3c/dom/CDATASection
+org/w3c/dom/Text
+org/xml/sax/AttributeList
+org/w3c/dom/DOMException
+org/w3c/dom/Notation
+org/w3c/dom/DocumentType
+org/w3c/dom/Attr
+org/w3c/dom/EntityReference
+org/w3c/dom/ProcessingInstruction
+org/w3c/dom/Comment
+org/w3c/dom/DocumentFragment
+org/w3c/dom/events/Event
+org/w3c/dom/events/MutationEvent
+org/w3c/dom/traversal/TreeWalker
+org/w3c/dom/ranges/Range
+org/w3c/dom/traversal/NodeIterator
+org/w3c/dom/events/EventException
+org/w3c/dom/NamedNodeMap
+java/lang/StringIndexOutOfBoundsException
+java/awt/GridLayout
+javax/swing/plaf/metal/MetalRadioButtonUI
+javax/swing/plaf/basic/BasicRadioButtonUI
+javax/swing/plaf/basic/BasicBorders
+javax/swing/plaf/metal/MetalIconFactory$RadioButtonIcon
+java/awt/event/ItemEvent
+java/awt/CardLayout$Card
+javax/swing/JCheckBox
+javax/swing/event/ListSelectionEvent
+javax/swing/plaf/metal/MetalCheckBoxUI
+javax/swing/plaf/metal/MetalIconFactory$CheckBoxIcon
+java/lang/ExceptionInInitializerError
+com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI
+javax/swing/JProgressBar
+javax/swing/JProgressBar$ModelListener
+javax/swing/plaf/metal/MetalProgressBarUI
+javax/swing/plaf/basic/BasicProgressBarUI
+javax/swing/plaf/ProgressBarUI
+javax/swing/plaf/BorderUIResource$LineBorderUIResource
+javax/swing/plaf/basic/BasicProgressBarUI$Handler
+javax/swing/tree/TreeModel
+javax/swing/table/TableCellRenderer
+javax/swing/table/JTableHeader
+javax/swing/event/TreeExpansionListener
+javax/swing/table/AbstractTableModel
+javax/swing/table/TableModel
+javax/swing/table/DefaultTableCellRenderer
+javax/swing/JTree
+javax/swing/tree/TreeSelectionModel
+javax/swing/tree/DefaultTreeCellRenderer
+javax/swing/tree/TreeCellRenderer
+javax/swing/table/TableCellEditor
+javax/swing/CellEditor
+javax/swing/JToolTip
+javax/swing/table/TableColumn
+javax/swing/table/DefaultTableColumnModel
+javax/swing/table/TableColumnModel
+javax/swing/table/DefaultTableModel
+javax/swing/event/TableModelEvent
+sun/swing/table/DefaultTableCellHeaderRenderer
+javax/swing/plaf/basic/BasicTableHeaderUI
+javax/swing/plaf/TableHeaderUI
+javax/swing/plaf/basic/BasicTableHeaderUI$1
+javax/swing/plaf/basic/BasicTableHeaderUI$MouseInputHandler
+javax/swing/DefaultCellEditor
+javax/swing/tree/TreeCellEditor
+javax/swing/AbstractCellEditor
+javax/swing/plaf/basic/BasicTableUI
+javax/swing/plaf/TableUI
+javax/swing/plaf/basic/BasicTableUI$TableTransferHandler
+javax/swing/plaf/basic/BasicTableUI$Handler
+javax/swing/tree/DefaultTreeSelectionModel
+javax/swing/tree/TreePath
+javax/swing/plaf/metal/MetalTreeUI
+javax/swing/plaf/basic/BasicTreeUI
+javax/swing/plaf/TreeUI
+javax/swing/plaf/basic/BasicTreeUI$Actions
+javax/swing/plaf/basic/BasicTreeUI$TreeTransferHandler
+javax/swing/plaf/metal/MetalTreeUI$LineListener
+javax/swing/plaf/basic/BasicTreeUI$Handler
+javax/swing/event/TreeModelListener
+javax/swing/event/TreeSelectionListener
+javax/swing/event/SwingPropertyChangeSupport
+javax/swing/tree/VariableHeightLayoutCache
+javax/swing/tree/AbstractLayoutCache
+javax/swing/tree/RowMapper
+javax/swing/plaf/basic/BasicTreeUI$NodeDimensionsHandler
+javax/swing/tree/AbstractLayoutCache$NodeDimensions
+javax/swing/JTree$TreeModelHandler
+javax/swing/tree/VariableHeightLayoutCache$TreeStateNode
+javax/swing/tree/DefaultMutableTreeNode
+javax/swing/tree/MutableTreeNode
+javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration
+javax/swing/event/TableColumnModelEvent
+java/text/ParseException
+java/text/NumberFormat$Field
+javax/swing/event/UndoableEditListener
+javax/swing/filechooser/FileFilter
+javax/swing/tree/DefaultTreeModel
+javax/swing/tree/DefaultTreeCellEditor
+javax/swing/tree/DefaultTreeCellEditor$1
+javax/swing/tree/DefaultTreeCellEditor$DefaultTextField
+javax/swing/DefaultCellEditor$1
+javax/swing/DefaultCellEditor$EditorDelegate
+javax/swing/tree/DefaultTreeCellEditor$EditorContainer
+javax/swing/JTree$TreeSelectionRedirector
+javax/swing/event/TreeModelEvent
+javax/swing/plaf/metal/MetalSplitPaneUI
+javax/swing/plaf/basic/BasicSplitPaneUI
+javax/swing/plaf/SplitPaneUI
+javax/swing/plaf/basic/BasicSplitPaneDivider
+javax/swing/plaf/basic/BasicBorders$SplitPaneBorder
+javax/swing/plaf/metal/MetalSplitPaneDivider
+javax/swing/plaf/basic/BasicSplitPaneDivider$DividerLayout
+javax/swing/plaf/basic/BasicSplitPaneDivider$MouseHandler
+javax/swing/plaf/basic/BasicBorders$SplitPaneDividerBorder
+javax/swing/plaf/basic/BasicSplitPaneUI$BasicHorizontalLayoutManager
+javax/swing/plaf/basic/BasicSplitPaneUI$1
+javax/swing/plaf/basic/BasicSplitPaneUI$Handler
+javax/swing/plaf/metal/MetalSplitPaneDivider$1
+javax/swing/plaf/basic/BasicSplitPaneDivider$OneTouchActionHandler
+javax/swing/plaf/metal/MetalSplitPaneDivider$2
+javax/swing/border/TitledBorder
+javax/swing/plaf/basic/BasicTextAreaUI
+java/util/Collections$UnmodifiableCollection$1
+java/io/InterruptedIOException
+java/net/NoRouteToHostException
+java/net/BindException
+javax/swing/tree/PathPlaceHolder
+javax/swing/event/TreeSelectionEvent
+javax/swing/JList$3
+javax/swing/JList$ListSelectionHandler
+javax/swing/JSlider
+javax/swing/JSlider$ModelListener
+javax/swing/plaf/metal/MetalSliderUI
+javax/swing/plaf/basic/BasicSliderUI
+javax/swing/plaf/SliderUI
+javax/swing/plaf/basic/BasicSliderUI$Actions
+javax/swing/plaf/metal/MetalIconFactory$HorizontalSliderThumbIcon
+javax/swing/plaf/metal/MetalIconFactory$VerticalSliderThumbIcon
+javax/swing/plaf/basic/BasicSliderUI$TrackListener
+javax/swing/plaf/basic/BasicSliderUI$Handler
+javax/swing/plaf/basic/BasicSliderUI$ScrollListener
+javax/swing/plaf/metal/MetalSliderUI$MetalPropertyListener
+javax/swing/plaf/basic/BasicSliderUI$PropertyChangeHandler
+sun/java2d/HeadlessGraphicsEnvironment
+java/util/Hashtable$KeySet
+java/awt/FontFormatException
+sun/font/Type1Font$1
+java/nio/channels/FileChannel$MapMode
+sun/nio/ch/FileChannelImpl$Unmapper
+sun/nio/ch/Util$3
+java/nio/DirectByteBufferR
+java/nio/charset/Charset$3
+sun/nio/cs/AbstractCharsetProvider
+sun/nio/cs/SingleByteDecoder
+java/lang/CharacterData00
+javax/swing/DefaultListModel
+javax/swing/event/ListDataEvent
+javax/sound/sampled/DataLine
+javax/sound/sampled/Line
+javax/sound/sampled/Line$Info
+javax/sound/sampled/DataLine$Info
+javax/sound/sampled/Control$Type
+javax/sound/sampled/FloatControl$Type
+javax/sound/sampled/LineUnavailableException
+javax/sound/sampled/UnsupportedAudioFileException
+javax/swing/JRadioButtonMenuItem
+javax/swing/JMenuItem$AccessibleJMenuItem
+javax/swing/AbstractButton$AccessibleAbstractButton
+javax/accessibility/AccessibleAction
+javax/accessibility/AccessibleValue
+javax/accessibility/AccessibleText
+javax/accessibility/AccessibleExtendedComponent
+javax/accessibility/AccessibleComponent
+javax/swing/JComponent$AccessibleJComponent
+java/awt/Container$AccessibleAWTContainer
+java/awt/Component$AccessibleAWTComponent
+javax/accessibility/AccessibleRelationSet
+javax/accessibility/AccessibleState
+javax/accessibility/AccessibleBundle
+javax/swing/plaf/basic/BasicCheckBoxMenuItemUI
+javax/swing/plaf/metal/MetalIconFactory$CheckBoxMenuItemIcon
+javax/swing/JCheckBoxMenuItem$AccessibleJCheckBoxMenuItem
+javax/swing/plaf/basic/BasicRadioButtonMenuItemUI
+javax/swing/plaf/metal/MetalIconFactory$RadioButtonMenuItemIcon
+sun/awt/image/ImageDecoder$1
+javax/swing/JTabbedPane$Page
+java/net/DatagramSocket
+java/net/MulticastSocket
+java/net/DatagramPacket
+sun/net/InetAddressCachePolicy
+sun/net/InetAddressCachePolicy$1
+sun/net/InetAddressCachePolicy$2
+java/net/InetAddress$CacheEntry
+java/net/PlainDatagramSocketImpl
+java/net/DatagramSocketImpl
+java/net/NetworkInterface
+java/net/InterfaceAddress
+java/text/Collator
+java/text/spi/CollatorProvider
+sun/text/resources/CollationData
+sun/text/resources/CollationData_en
+sun/util/EmptyListResourceBundle
+java/text/RuleBasedCollator
+java/text/CollationRules
+java/text/RBCollationTables
+java/text/RBTableBuilder
+java/text/RBCollationTables$BuildAPI
+sun/text/IntHashtable
+sun/text/UCompactIntArray
+sun/text/normalizer/NormalizerImpl
+sun/text/normalizer/ICUData
+sun/text/normalizer/NormalizerDataReader
+sun/text/normalizer/ICUBinary$Authenticate
+sun/text/normalizer/ICUBinary
+sun/text/normalizer/NormalizerImpl$FCDTrieImpl
+sun/text/normalizer/Trie$DataManipulate
+sun/text/normalizer/NormalizerImpl$NormTrieImpl
+sun/text/normalizer/NormalizerImpl$AuxTrieImpl
+sun/text/normalizer/IntTrie
+sun/text/normalizer/Trie
+sun/text/normalizer/CharTrie
+sun/text/normalizer/CharTrie$FriendAgent
+sun/text/normalizer/UnicodeSet
+sun/text/normalizer/UnicodeMatcher
+sun/text/normalizer/NormalizerImpl$DecomposeArgs
+java/text/MergeCollation
+java/text/PatternEntry$Parser
+java/text/PatternEntry
+java/text/EntryPair
+sun/text/ComposedCharIter
+sun/text/normalizer/UTF16
+sun/net/www/protocol/http/Handler
+java/io/ObjectInputStream$BlockDataInputStream
+java/io/ObjectInputStream$PeekInputStream
+java/io/ObjectInputStream$HandleTable
+java/io/ObjectInputStream$ValidationList
+java/io/Bits
+java/io/ObjectStreamClass$Caches
+java/io/ObjectStreamClass$WeakClassKey
+java/io/ObjectStreamClass$EntryFuture
+java/io/ObjectStreamClass$2
+sun/reflect/SerializationConstructorAccessorImpl
+java/io/ObjectStreamClass$FieldReflectorKey
+java/io/ObjectStreamClass$FieldReflector
+java/io/ObjectStreamClass$1
+java/io/DataOutputStream
+java/io/ObjectStreamClass$MemberSignature
+java/io/ObjectStreamClass$3
+java/io/ObjectStreamClass$4
+java/io/ObjectStreamClass$5
+java/security/MessageDigest
+java/security/MessageDigestSpi
+sun/security/jca/GetInstance
+sun/security/jca/Providers
+sun/security/jca/ProviderList
+sun/security/jca/ProviderConfig
+sun/security/jca/ProviderList$3
+sun/security/jca/ProviderList$1
+sun/security/jca/ProviderList$2
+sun/security/jca/ProviderConfig$1
+sun/security/jca/ProviderConfig$3
+java/security/Provider$Service
+java/security/Provider$UString
+sun/security/provider/SHA
+sun/security/provider/DigestBase
+sun/security/jca/GetInstance$Instance
+java/security/MessageDigest$Delegate
+sun/security/provider/ByteArrayAccess
+java/io/ObjectStreamClass$ClassDataSlot
+sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl
+java/security/SignatureException
+java/security/InvalidKeyException
+java/security/KeyException
+java/security/Signature
+java/security/SignatureSpi
+java/io/ObjectOutputStream$BlockDataOutputStream
+sun/security/provider/DSAPublicKey
+java/security/interfaces/DSAPublicKey
+java/security/interfaces/DSAKey
+java/security/PublicKey
+java/security/Key
+sun/security/x509/X509Key
+java/io/ObjectOutputStream$HandleTable
+java/io/ObjectOutputStream$ReplaceTable
+sun/security/x509/AlgorithmId
+sun/security/util/DerEncoder
+sun/security/util/BitArray
+sun/security/util/DerOutputStream
+sun/security/util/DerValue
+java/math/BigInteger
+java/security/interfaces/DSAParams
+sun/security/util/DerInputStream
+sun/security/util/DerInputBuffer
+sun/security/util/ObjectIdentifier
+java/security/AlgorithmParameters
+java/security/AlgorithmParametersSpi
+sun/security/provider/DSAParameters
+sun/security/util/ByteArrayLexOrder
+sun/security/util/ByteArrayTagOrder
+sun/security/util/DerIndefLenConverter
+java/io/InvalidClassException
+java/io/ObjectStreamException
+java/io/ObjectInputStream$GetFieldImpl
+java/io/ObjectInputStream$GetField
+sun/security/jca/ServiceId
+sun/security/jca/ProviderList$ServiceList
+sun/security/jca/ProviderList$ServiceList$1
+java/security/Signature$Delegate
+java/security/interfaces/DSAPrivateKey
+java/security/PrivateKey
+sun/security/provider/DSA$SHA1withDSA
+sun/security/provider/DSA
+java/security/spec/DSAParameterSpec
+java/security/spec/AlgorithmParameterSpec
+java/math/MutableBigInteger
+java/math/SignedMutableBigInteger
+java/awt/EventQueue$1AWTInvocationLock
+java/awt/Component$FlipBufferStrategy
+java/awt/SentEvent
+sun/awt/X11/XDestroyWindowEvent
+sun/awt/X11/XDropTargetRegistry
+sun/awt/X11/XEmbeddedFramePeer
+sun/awt/X11/XDragAndDropProtocols
+sun/awt/X11/XDropTargetContextPeer
+sun/awt/dnd/SunDropTargetContextPeer
+java/awt/dnd/peer/DropTargetContextPeer
+sun/awt/X11/XDropTargetContextPeer$XDropTargetProtocolListenerImpl
+sun/awt/X11/XDropTargetProtocolListener
+sun/awt/X11/XDnDDragSourceProtocol
+sun/awt/X11/XDragSourceProtocol
+sun/awt/X11/MotifDnDDragSourceProtocol
+sun/awt/X11/XDnDDropTargetProtocol
+sun/awt/X11/XDropTargetProtocol
+sun/awt/X11/MotifDnDDropTargetProtocol
+sun/awt/X11/XDnDConstants
+sun/awt/X11/MotifDnDConstants
+javax/swing/JTable$2
+javax/swing/JTable$Resizable3
+javax/swing/JTable$Resizable2
+javax/swing/JTable$5
+javax/swing/event/AncestorEvent
+sun/font/FontDesignMetrics$MetricsKey
+java/awt/geom/Line2D$Float
+java/awt/geom/Line2D
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel
+javax/swing/plaf/synth/SynthLookAndFeel
+javax/swing/plaf/synth/DefaultSynthStyleFactory
+javax/swing/plaf/synth/SynthStyleFactory
+sun/swing/BakedArrayList
+javax/swing/plaf/synth/SynthLookAndFeel$Handler
+javax/swing/plaf/synth/SynthDefaultLookup
+com/sun/java/swing/plaf/gtk/GTKEngine
+com/sun/java/swing/plaf/gtk/GTKEngine$Settings
+com/sun/java/swing/plaf/gtk/GTKStyleFactory
+com/sun/java/swing/plaf/gtk/PangoFonts
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$WeakPCL
+javax/swing/plaf/synth/Region
+javax/swing/plaf/synth/SynthLookAndFeel$AATextListener
+com/sun/java/swing/plaf/gtk/GTKRegion
+com/sun/java/swing/plaf/gtk/GTKStyle
+com/sun/java/swing/plaf/gtk/GTKConstants
+javax/swing/plaf/synth/SynthStyle
+javax/swing/plaf/synth/SynthGraphicsUtils
+com/sun/java/swing/plaf/gtk/GTKGraphicsUtils
+com/sun/java/swing/plaf/gtk/GTKStyle$GTKStockIcon
+sun/swing/plaf/synth/SynthIcon
+com/sun/java/swing/plaf/gtk/GTKColorType
+javax/swing/plaf/synth/ColorType
+com/sun/java/swing/plaf/gtk/resources/gtk
+com/sun/swing/internal/plaf/synth/resources/synth
+com/sun/java/swing/plaf/gtk/GTKStyle$GTKLazyValue
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$1FontLazyValue
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$2
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$3
+javax/swing/plaf/synth/SynthPanelUI
+javax/swing/plaf/synth/SynthConstants
+javax/swing/plaf/synth/SynthContext
+javax/swing/plaf/synth/SynthBorder
+javax/swing/plaf/synth/SynthRootPaneUI
+javax/swing/plaf/synth/SynthLabelUI
+javax/swing/plaf/synth/SynthButtonUI
+javax/swing/plaf/synth/SynthToggleButtonUI
+javax/swing/plaf/basic/BasicBorders$FieldBorder
+javax/swing/plaf/synth/SynthMenuBarUI
+javax/swing/plaf/synth/SynthMenuUI
+javax/swing/plaf/synth/SynthUI
+com/sun/java/swing/plaf/gtk/GTKIconFactory
+com/sun/java/swing/plaf/gtk/GTKIconFactory$MenuArrowIcon
+com/sun/java/swing/plaf/gtk/GTKIconFactory$DelegatingIcon
+com/sun/java/swing/plaf/gtk/GTKConstants$ArrowType
+javax/swing/plaf/basic/BasicIconFactory
+javax/swing/plaf/basic/BasicIconFactory$MenuItemCheckIcon
+javax/swing/plaf/synth/SynthMenuItemUI
+javax/swing/plaf/synth/SynthPopupMenuUI
+javax/swing/plaf/synth/SynthSeparatorUI
+javax/swing/plaf/synth/SynthScrollBarUI
+javax/swing/plaf/synth/SynthArrowButton
+javax/swing/plaf/synth/SynthArrowButton$SynthArrowButtonUI
+javax/swing/plaf/synth/SynthComboBoxUI
+javax/swing/plaf/synth/SynthComboPopup
+javax/swing/plaf/synth/SynthListUI
+javax/swing/plaf/synth/SynthListUI$SynthListCellRenderer
+javax/swing/plaf/synth/SynthViewportUI
+javax/swing/plaf/synth/SynthScrollPaneUI
+javax/swing/plaf/synth/SynthScrollPaneUI$ViewportBorder
+javax/swing/plaf/synth/SynthComboBoxUI$SynthComboBoxRenderer
+javax/swing/plaf/synth/SynthComboBoxUI$SynthComboBoxEditor
+javax/swing/plaf/synth/SynthTextFieldUI
+javax/swing/plaf/synth/SynthToolBarUI
+javax/swing/plaf/synth/SynthToolBarUI$SynthToolBarLayoutManager
+com/sun/java/swing/plaf/gtk/GTKIconFactory$ToolBarHandleIcon
+com/sun/java/swing/plaf/gtk/GTKConstants$Orientation
+sun/awt/X11/XTranslateCoordinates
+com/sun/java/swing/plaf/gtk/GTKPainter
+javax/swing/plaf/synth/SynthPainter
+javax/swing/plaf/synth/SynthPainter$1
+com/sun/java/swing/plaf/gtk/GTKConstants$PositionType
+com/sun/java/swing/plaf/gtk/GTKConstants$ShadowType
+java/io/ObjectInputStream$HandleTable$HandleList
+sun/java2d/pipe/ShapeSpanIterator
+sun/java2d/pipe/SpanIterator
+sun/dc/path/PathConsumer
+sun/dc/pr/PathStroker
+sun/dc/pr/PathDasher
+java/awt/geom/LineIterator
+java/awt/geom/PathIterator
+sun/applet/Main
+sun/applet/AppletMessageHandler
+sun/applet/resources/MsgAppletViewer
+sun/applet/AppletSecurity
+sun/awt/AWTSecurityManager
+java/lang/SecurityManager
+java/security/DomainCombiner
+sun/applet/AppletSecurity$1
+java/lang/SecurityManager$1
+java/security/SecurityPermission
+java/util/PropertyPermission
+sun/applet/AppletViewer
+java/applet/AppletContext
+java/awt/print/Printable
+sun/security/util/SecurityConstants
+java/awt/AWTPermission
+java/net/NetPermission
+java/net/SocketPermission
+javax/security/auth/AuthPermission
+java/lang/Thread$1
+java/util/logging/LogManager$5
+sun/applet/StdAppletViewerFactory
+sun/applet/AppletViewerFactory
+sun/applet/AppletViewer$UserActionListener
+sun/applet/AppletViewerPanel
+sun/applet/AppletPanel
+java/applet/AppletStub
+sun/misc/MessageUtils
+sun/applet/AppletPanel$10
+java/security/Policy$1
+sun/security/provider/PolicyFile$1
+sun/security/provider/PolicyFile$3
+sun/security/util/PropertyExpander
+sun/security/provider/PolicyParser
+sun/security/util/PolicyUtil
+sun/security/provider/PolicyParser$GrantEntry
+sun/security/provider/PolicyParser$PermissionEntry
+sun/security/provider/PolicyFile$PolicyEntry
+sun/security/provider/PolicyFile$6
+sun/security/provider/PolicyFile$7
+java/net/SocketPermissionCollection
+java/util/PropertyPermissionCollection
+sun/applet/AppletPanel$9
+sun/applet/AppletClassLoader
+sun/applet/AppletThreadGroup
+sun/applet/AppContextCreator
+sun/applet/AppletPanel$1
+sun/awt/X11/XMenuBarPeer
+java/awt/peer/MenuBarPeer
+java/awt/peer/MenuComponentPeer
+sun/awt/X11/XBaseMenuWindow
+sun/awt/X11/XMenuPeer
+java/awt/peer/MenuPeer
+java/awt/peer/MenuItemPeer
+sun/awt/X11/XMenuItemPeer
+java/awt/MenuShortcut
+sun/awt/X11/XMenuWindow
+sun/awt/X11/XMenuItemPeer$TextMetrics
+sun/awt/AppContext$3
+sun/awt/X11/XMenuBarPeer$MappingData
+sun/awt/X11/XBaseMenuWindow$MappingData
+sun/applet/AppletViewer$1
+sun/applet/AppletViewer$1AppletEventListener
+sun/applet/AppletListener
+sun/applet/AppletEventMulticaster
+sun/misc/Queue
+sun/misc/QueueElement
+sun/applet/AppletEvent
+sun/applet/AppletClassLoader$1
+sun/awt/X11/XBaseMenuWindow$3
+java/awt/DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent
+sun/awt/CausedFocusEvent
+sun/awt/X11/XWindow$1
+java/net/URLClassLoader$4
+sun/applet/AppletClassLoader$2
+javax/swing/JApplet
+java/lang/ClassLoader$1
+sun/security/provider/PolicyFile$5
+java/security/PermissionsEnumerator
+java/util/Collections$1
+sun/applet/AppletPanel$11
+sun/applet/AppletPanel$8
+sun/applet/AppletPanel$2
+sun/applet/AppletPanel$3
+sun/applet/AppletPanel$6
+javax/swing/BufferStrategyPaintManager$1
+# f3ac8b467e7f8c49
--- jdk/src/macosx/classes/com/apple/laf/AquaPanelUI.java 2012-08-10 10:23:05.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaPanelUI.java 2013-01-16 00:07:00.000000000 -0800
@@ -32,20 +32,10 @@
import com.apple.laf.AquaUtils.RecyclableSingleton;
import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor;
-import java.awt.Graphics;
-
public class AquaPanelUI extends BasicPanelUI {
static RecyclableSingleton<AquaPanelUI> instance = new RecyclableSingletonFromDefaultConstructor<AquaPanelUI>(AquaPanelUI.class);
public static ComponentUI createUI(final JComponent c) {
return instance.get();
}
-
- @Override
- public final void update(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- AquaUtils.fillRect(g, c);
- }
- paint(g, c);
- }
}
--- jdk/src/macosx/classes/com/apple/laf/AquaRootPaneUI.java 2012-08-10 10:23:07.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaRootPaneUI.java 2013-01-16 00:07:00.000000000 -0800
@@ -319,12 +319,4 @@
updateComponentTreeUIActivation(element, active);
}
}
-
- @Override
- public final void update(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- AquaUtils.fillRect(g, c);
- }
- paint(g, c);
- }
}
--- jdk/src/macosx/classes/com/apple/laf/AquaToolBarUI.java 2012-08-10 10:23:07.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaToolBarUI.java 2013-01-16 00:07:00.000000000 -0800
@@ -73,7 +73,9 @@
g.translate(x, y);
if (c.isOpaque()) {
- AquaUtils.fillRect(g, c, c.getBackground(), 0, 0, w - 1, h - 1);
+ final Color background = c.getBackground();
+ g.setColor(background);
+ g.fillRect(0, 0, w - 1, h - 1);
}
final Color oldColor = g.getColor();
@@ -135,12 +137,4 @@
return true;
}
}
-
- @Override
- public final void update(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- AquaUtils.fillRect(g, c);
- }
- paint(g, c);
- }
}
--- jdk/src/macosx/classes/com/apple/laf/AquaUtils.java 2012-08-10 10:23:08.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaUtils.java 2013-01-16 00:07:00.000000000 -0800
@@ -28,19 +28,18 @@
import java.awt.*;
import java.awt.image.*;
import java.lang.ref.SoftReference;
+import java.lang.ref.WeakReference;
import java.lang.reflect.Method;
import java.security.PrivilegedAction;
import java.util.*;
import javax.swing.*;
import javax.swing.border.Border;
-import javax.swing.plaf.UIResource;
import sun.awt.AppContext;
import sun.lwawt.macosx.CImage;
import sun.lwawt.macosx.CImage.Creator;
-import sun.lwawt.macosx.CPlatformWindow;
import sun.swing.SwingUtilities2;
import com.apple.laf.AquaImageFactory.SlicedImageControl;
@@ -390,51 +389,4 @@
return false;
}
}
-
- protected static boolean isWindowTextured(final Component c) {
- if (!(c instanceof JComponent)) {
- return false;
- }
- final JRootPane pane = ((JComponent) c).getRootPane();
- if (pane == null) {
- return false;
- }
- Object prop = pane.getClientProperty(
- CPlatformWindow.WINDOW_BRUSH_METAL_LOOK);
- if (prop != null) {
- return Boolean.parseBoolean(prop.toString());
- }
- prop = pane.getClientProperty(CPlatformWindow.WINDOW_STYLE);
- return prop != null && "textured".equals(prop);
- }
-
- private static Color resetAlpha(final Color color) {
- return new Color(color.getRed(), color.getGreen(), color.getBlue(), 0);
- }
-
- protected static void fillRect(final Graphics g, final Component c) {
- fillRect(g, c, c.getBackground(), 0, 0, c.getWidth(), c.getHeight());
- }
-
- protected static void fillRect(final Graphics g, final Component c,
- final Color color, final int x, final int y,
- final int w, final int h) {
- if (!(g instanceof Graphics2D)) {
- return;
- }
- final Graphics2D cg = (Graphics2D) g.create();
- try {
- if (color instanceof UIResource && isWindowTextured(c)
- && color.equals(SystemColor.window)) {
- cg.setComposite(AlphaComposite.Src);
- cg.setColor(resetAlpha(color));
- } else {
- cg.setColor(color);
- }
- cg.fillRect(x, y, w, h);
- } finally {
- cg.dispose();
- }
- }
}
-
--- jdk/src/macosx/classes/com/apple/laf/ScreenMenuItem.java 2012-08-10 10:23:09.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/ScreenMenuItem.java 2013-01-16 08:58:09.000000000 -0800
@@ -34,7 +34,7 @@
import sun.lwawt.macosx.CMenuItem;
-class ScreenMenuItem extends MenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler {
+final class ScreenMenuItem extends MenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler {
ScreenMenuPropertyListener fListener;
JMenuItem fMenuItem;
@@ -96,21 +96,34 @@
fMenuItem.removeComponentListener(this);
}
- public void setAccelerator(final KeyStroke ks) {
- if (ks == null) {
- setShortcut(null);
+ static void syncLabelAndKS(MenuItem menuItem, String label, KeyStroke ks) {
+ final MenuComponentPeer peer = menuItem.getPeer();
+ if (!(peer instanceof CMenuItem)) {
+ //Is it possible?
return;
}
-
- final MenuComponentPeer peer = getPeer();
- if (peer instanceof CMenuItem) {
- final CMenuItem ourPeer = (CMenuItem)peer;
- ourPeer.setLabel(fMenuItem.getText(), ks.getKeyChar(), ks.getKeyCode(), ks.getModifiers());
+ final CMenuItem cmi = (CMenuItem) peer;
+ if (ks == null) {
+ cmi.setLabel(label);
} else {
- setShortcut(new MenuShortcut(ks.getKeyCode(), (ks.getModifiers() & InputEvent.SHIFT_MASK) != 0));
+ cmi.setLabel(label, ks.getKeyChar(), ks.getKeyCode(),
+ ks.getModifiers());
}
}
+ @Override
+ public synchronized void setLabel(final String label) {
+ syncLabelAndKS(this, label, fMenuItem.getAccelerator());
+ }
+
+ @Override
+ public void setAccelerator(final KeyStroke ks) {
+ // We call CMenuItem.setLabel(..,..,..) directly and does not initialize
+ // shortcut property. So shortcut property should not be used from the
+ // peers code directly or indirectly.
+ syncLabelAndKS(this, fMenuItem.getText(), ks);
+ }
+
public void actionPerformed(final ActionEvent e) {
fMenuItem.doClick(0); // This takes care of all the different events
}
--- jdk/src/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java 2012-08-10 10:23:09.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java 2013-01-16 08:58:09.000000000 -0800
@@ -36,7 +36,7 @@
import sun.lwawt.macosx.*;
-class ScreenMenuItemCheckbox extends CheckboxMenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler, ItemListener {
+final class ScreenMenuItemCheckbox extends CheckboxMenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler, ItemListener {
JMenuItem fMenuItem;
MenuContainer fParent;
@@ -110,19 +110,17 @@
super.removeNotify();
}
- public void setAccelerator(final KeyStroke ks) {
- if (ks == null) {
- setShortcut(null);
- return;
- }
+ @Override
+ public synchronized void setLabel(final String label) {
+ ScreenMenuItem.syncLabelAndKS(this, label, fMenuItem.getAccelerator());
+ }
- final MenuComponentPeer peer = getPeer();
- if (peer instanceof CMenuItem) {
- final CMenuItem ourPeer = (CMenuItem)peer;
- ourPeer.setLabel(fMenuItem.getText(), ks.getKeyChar(), ks.getKeyCode(), ks.getModifiers());
- } else {
- setShortcut(new MenuShortcut(ks.getKeyCode(), (ks.getModifiers() & InputEvent.SHIFT_MASK) != 0));
- }
+ @Override
+ public void setAccelerator(final KeyStroke ks) {
+ // We call CMenuItem.setLabel(..,..,..) directly and does not initialize
+ // shortcut property. So shortcut property should not be used from the
+ // peers code directly or indirectly.
+ ScreenMenuItem.syncLabelAndKS(this, fMenuItem.getText(), ks);
}
public void actionPerformed(final ActionEvent e) {
--- jdk/src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2013-01-16 08:58:09.000000000 -0800
@@ -31,8 +31,12 @@
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.ImageCapabilities;
+import java.awt.Rectangle;
import java.awt.Transparency;
import java.awt.color.ColorSpace;
import java.awt.image.BufferedImage;
@@ -44,6 +48,7 @@
import sun.awt.CGraphicsConfig;
import sun.awt.CGraphicsDevice;
+import sun.awt.TextureSizeConstraining;
import sun.awt.image.OffScreenImage;
import sun.awt.image.SunVolatileImage;
import sun.awt.image.SurfaceManager;
@@ -65,7 +70,7 @@
import sun.lwawt.macosx.CPlatformView;
public class CGLGraphicsConfig extends CGraphicsConfig
- implements OGLGraphicsConfig
+ implements OGLGraphicsConfig, TextureSizeConstraining
{
//private static final int kOpenGLSwapInterval = RuntimeOptions.getCurrentOptions().OpenGLSwapInterval;
private static final int kOpenGLSwapInterval = 0; // TODO
@@ -79,11 +84,14 @@
private OGLContext context;
private Object disposerReferent = new Object();
+ private final int cachedMaxTextureSize;
+
public static native int getDefaultPixFmt(int screennum);
private static native boolean initCGL();
private static native long getCGLConfigInfo(int screennum, int visualnum,
int swapInterval);
private static native int getOGLCapabilities(long configInfo);
+ private static native int _getMaxTextureSize();
static {
cglAvailable = initCGL();
@@ -103,6 +111,10 @@
// CGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new CGLGCDisposerRecord(pConfigInfo));
+
+ // 7200762: Workaround a deadlock by caching the value
+ // A fix for JDK 8 will remove the workaround
+ this.cachedMaxTextureSize = _getMaxTextureSize();
}
@Override
@@ -242,6 +254,8 @@
} finally {
rq.unlock();
}
+
+ updateTotalDisplayBounds();
}
@Override
@@ -478,4 +492,53 @@
public void removeDeviceEventListener(AccelDeviceEventListener l) {
AccelDeviceEventNotifier.removeListener(l);
}
+
+ private static final Rectangle totalDisplayBounds = new Rectangle();
+
+ private static void updateTotalDisplayBounds() {
+ synchronized (totalDisplayBounds) {
+ Rectangle virtualBounds = new Rectangle();
+ for (GraphicsDevice gd : GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) {
+ for (GraphicsConfiguration gc : gd.getConfigurations()) {
+ virtualBounds = virtualBounds.union(gc.getBounds());
+ }
+ }
+ totalDisplayBounds.setBounds(virtualBounds);
+ }
+ }
+
+
+ // 7160609: GL still fails to create a square texture of this size,
+ // so we use this value to cap the total display bounds.
+ private int getMaxTextureSize() {
+ return cachedMaxTextureSize;
+ }
+
+ @Override
+ public int getMaxTextureWidth() {
+ int width;
+
+ synchronized (totalDisplayBounds) {
+ if (totalDisplayBounds.width == 0) {
+ updateTotalDisplayBounds();
+ }
+ width = totalDisplayBounds.width;
+ }
+
+ return Math.min(width, getMaxTextureSize());
+ }
+
+ @Override
+ public int getMaxTextureHeight() {
+ int height;
+
+ synchronized (totalDisplayBounds) {
+ if (totalDisplayBounds.height == 0) {
+ updateTotalDisplayBounds();
+ }
+ height = totalDisplayBounds.height;
+ }
+
+ return Math.min(height, getMaxTextureSize());
+ }
}
--- jdk/src/macosx/classes/sun/java2d/opengl/CGLLayer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/java2d/opengl/CGLLayer.java 2013-01-16 00:07:01.000000000 -0800
@@ -68,12 +68,11 @@
}
public boolean isOpaque() {
- return !peer.isTranslucent();
+ return peer.isOpaque();
}
public int getTransparency() {
- return peer.isTranslucent() ? Transparency.TRANSLUCENT :
- Transparency.OPAQUE;
+ return (peer.isOpaque() ? Transparency.OPAQUE : Transparency.TRANSLUCENT);
}
public Object getDestination() {
--- jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java 2013-01-16 00:07:01.000000000 -0800
@@ -424,7 +424,8 @@
@Override
public final Graphics getGraphics() {
- final Graphics g = getOnscreenGraphics();
+ Graphics g = getWindowPeerOrSelf().isOpaque() ? getOnscreenGraphics()
+ : getOffscreenGraphics();
if (g != null) {
synchronized (getPeerTreeLock()){
applyConstrain(g);
@@ -442,7 +443,13 @@
final LWWindowPeer wp = getWindowPeerOrSelf();
return wp.getOnscreenGraphics(getForeground(), getBackground(),
getFont());
+ }
+
+ public final Graphics getOffscreenGraphics() {
+ final LWWindowPeer wp = getWindowPeerOrSelf();
+ return wp.getOffscreenGraphics(getForeground(), getBackground(),
+ getFont());
}
private void applyConstrain(final Graphics g) {
@@ -456,7 +463,7 @@
}
//TODO Move this method to SG2D?
- void SG2DConstraint(final SunGraphics2D sg2d, Region r) {
+ private void SG2DConstraint(final SunGraphics2D sg2d, Region r) {
sg2d.constrainX = sg2d.transX;
sg2d.constrainY = sg2d.transY;
@@ -703,7 +710,7 @@
// Obtain the metrics from the offscreen window where this peer is
// mostly drawn to.
// TODO: check for "use platform metrics" settings
- Graphics g = getWindowPeer().getGraphics();
+ Graphics g = getWindowPeer().getOffscreenGraphics();
try {
if (g != null) {
return g.getFontMetrics(f);
@@ -1004,33 +1011,14 @@
@Override
public final void applyShape(final Region shape) {
synchronized (getStateLock()) {
- if (region == shape || (region != null && region.equals(shape))) {
- return;
- }
- }
- applyShapeImpl(shape);
- }
-
- void applyShapeImpl(final Region shape) {
- synchronized (getStateLock()) {
- if (shape != null) {
- region = Region.WHOLE_REGION.getIntersection(shape);
- } else {
- region = null;
- }
+ region = shape;
}
repaintParent(getBounds());
}
protected final Region getRegion() {
synchronized (getStateLock()) {
- return isShaped() ? region : Region.getInstance(getSize());
- }
- }
-
- public boolean isShaped() {
- synchronized (getStateLock()) {
- return region != null;
+ return region == null ? Region.getInstance(getSize()) : region;
}
}
@@ -1398,6 +1386,11 @@
}
}
+ // Just a helper method, thus final
+ protected final void flushOffscreenGraphics() {
+ flushOffscreenGraphics(getSize());
+ }
+
protected static final void flushOnscreenGraphics(){
final OGLRenderQueue rq = OGLRenderQueue.getInstance();
rq.lock();
@@ -1408,6 +1401,36 @@
}
}
+ /*
+ * Flushes the given rectangle from the back buffer to the screen.
+ */
+ protected void flushOffscreenGraphics(Rectangle r) {
+ flushOffscreenGraphics(r.x, r.y, r.width, r.height);
+ }
+
+ private void flushOffscreenGraphics(int x, int y, int width, int height) {
+ Image bb = getWindowPeerOrSelf().getBackBuffer();
+ if (bb != null) {
+ // g is a screen Graphics from the delegate
+ final Graphics g = getOnscreenGraphics();
+
+ if (g != null && g instanceof Graphics2D) {
+ try {
+ Graphics2D g2d = (Graphics2D)g;
+ Point p = localToWindow(new Point(0, 0));
+ Composite composite = g2d.getComposite();
+ g2d.setComposite(AlphaComposite.Src);
+ g.drawImage(bb, x, y, x + width, y + height, p.x + x,
+ p.y + y, p.x + x + width, p.y + y + height,
+ null);
+ g2d.setComposite(composite);
+ } finally {
+ g.dispose();
+ }
+ }
+ }
+ }
+
/**
* Used by ContainerPeer to skip all the paint events during layout.
*
--- jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java 2013-01-16 00:07:01.000000000 -0800
@@ -58,6 +58,9 @@
private static void flushBuffers(final LWComponentPeer peer) {
if (peer != null) {
+ if (!peer.getWindowPeerOrSelf().isOpaque()) {
+ peer.flushOffscreenGraphics();
+ }
peer.flushOnscreenGraphics();
}
}
--- jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java 2013-01-16 00:07:01.000000000 -0800
@@ -129,6 +129,16 @@
}
@Override
+ public void setText(final String l) {
+ // Please note that we do not want to post an event
+ // if TextArea.setText() replaces an empty text by an empty text,
+ // that is, if component's text remains unchanged.
+ if (!l.isEmpty() || getTextComponent().getDocument().getLength() != 0) {
+ super.setText(l);
+ }
+ }
+
+ @Override
public void replaceRange(final String text, final int start,
final int end) {
synchronized (getDelegateLock()) {
--- jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java 2013-01-16 00:07:01.000000000 -0800
@@ -124,7 +124,7 @@
}
@Override
- public final void setText(final String l) {
+ public void setText(final String l) {
synchronized (getDelegateLock()) {
// JTextArea.setText() posts two different events (remove & insert).
// Since we make no differences between text events,
--- jdk/src/macosx/classes/sun/lwawt/LWToolkit.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWToolkit.java 2013-01-16 00:07:01.000000000 -0800
@@ -522,6 +522,12 @@
postEvent(targetToAppContext(event.getSource()), event);
}
+ // use peer's back buffer to implement non-opaque windows.
+ @Override
+ public boolean needUpdateWindow() {
+ return true;
+ }
+
@Override
public void grab(Window w) {
if (w.getPeer() != null) {
--- jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2013-01-16 08:58:09.000000000 -0800
@@ -37,7 +37,6 @@
import sun.java2d.*;
import sun.java2d.loops.Blit;
import sun.java2d.loops.CompositeType;
-import sun.java2d.pipe.Region;
import sun.util.logging.PlatformLogger;
public class LWWindowPeer
@@ -110,10 +109,6 @@
private volatile boolean skipNextFocusChange;
- private static final Color nonOpaqueBackground = new Color(0, 0, 0, 0);
-
- private volatile boolean textured;
-
/**
* Current modal blocker or null.
*
@@ -174,11 +169,6 @@
setAlwaysOnTop(getTarget().isAlwaysOnTop());
updateMinimumSize();
- final Shape shape = getTarget().getShape();
- if (shape != null) {
- applyShape(Region.getInstance(shape, null));
- }
-
final float opacity = getTarget().getOpacity();
if (opacity < 1.0f) {
setOpacity(opacity);
@@ -188,7 +178,7 @@
updateInsets(platformWindow.getInsets());
if (getSurfaceData() == null) {
- replaceSurfaceData(false);
+ replaceSurfaceData();
}
}
@@ -289,7 +279,7 @@
// "buffer", that's why numBuffers - 1
assert numBuffers > 1;
- replaceSurfaceData(numBuffers - 1, caps, false);
+ replaceSurfaceData(numBuffers - 1, caps);
} catch (InvalidPipeException z) {
throw new AWTException(z.toString());
}
@@ -355,6 +345,18 @@
h = MINIMUM_HEIGHT;
}
+ if (graphicsConfig instanceof TextureSizeConstraining) {
+ final int maxW = ((TextureSizeConstraining)graphicsConfig).getMaxTextureWidth();
+ final int maxH = ((TextureSizeConstraining)graphicsConfig).getMaxTextureHeight();
+
+ if (w > maxW) {
+ w = maxW;
+ }
+ if (h > maxH) {
+ h = maxH;
+ }
+ }
+
// Don't post ComponentMoved/Resized and Paint events
// until we've got a notification from the delegate
setBounds(x, y, w, h, op, false, false);
@@ -426,14 +428,33 @@
@Override
public void updateMinimumSize() {
- Dimension d = null;
+ final Dimension min;
if (getTarget().isMinimumSizeSet()) {
- d = getTarget().getMinimumSize();
+ min = getTarget().getMinimumSize();
+ min.width = Math.max(min.width, MINIMUM_WIDTH);
+ min.height = Math.max(min.height, MINIMUM_HEIGHT);
+ } else {
+ min = new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT);
}
- if (d == null) {
- d = new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT);
+
+ final int maxW, maxH;
+ if (graphicsConfig instanceof TextureSizeConstraining) {
+ maxW = ((TextureSizeConstraining)graphicsConfig).getMaxTextureWidth();
+ maxH = ((TextureSizeConstraining)graphicsConfig).getMaxTextureHeight();
+ } else {
+ maxW = maxH = Integer.MAX_VALUE;
+ }
+
+ final Dimension max;
+ if (getTarget().isMaximumSizeSet()) {
+ max = getTarget().getMaximumSize();
+ max.width = Math.min(max.width, maxW);
+ max.height = Math.min(max.height, maxH);
+ } else {
+ max = new Dimension(maxW, maxH);
}
- platformWindow.setMinimumSize(d.width, d.height);
+
+ platformWindow.setSizeConstraints(min.width, min.height, max.width, max.height);
}
@Override
@@ -451,44 +472,19 @@
public final void setOpaque(final boolean isOpaque) {
if (this.isOpaque != isOpaque) {
this.isOpaque = isOpaque;
- updateOpaque();
+ getPlatformWindow().setOpaque(isOpaque);
+ replaceSurfaceData();
+ repaintPeer();
}
}
- private void updateOpaque() {
- getPlatformWindow().setOpaque(!isTranslucent());
- replaceSurfaceData(false);
- repaintPeer();
+ public final boolean isOpaque() {
+ return isOpaque;
}
@Override
public void updateWindow() {
- }
-
- public final boolean isTextured() {
- return textured;
- }
-
- public final void setTextured(final boolean isTextured) {
- textured = isTextured;
- }
-
- public final boolean isTranslucent() {
- synchronized (getStateLock()) {
- /*
- * Textured window is a special case of translucent window.
- * The difference is only in nswindow background. So when we set
- * texture property our peer became fully translucent. It doesn't
- * fill background, create non opaque backbuffers and layer etc.
- */
- return !isOpaque || isShaped() || isTextured();
- }
- }
-
- @Override
- final void applyShapeImpl(final Region shape) {
- super.applyShapeImpl(shape);
- updateOpaque();
+ flushOffscreenGraphics();
}
@Override
@@ -643,20 +639,7 @@
getFont());
if (g != null) {
try {
- if (g instanceof Graphics2D) {
- ((Graphics2D) g).setComposite(AlphaComposite.Src);
- }
- if (isTranslucent()) {
- g.setColor(nonOpaqueBackground);
- g.fillRect(0, 0, w, h);
- }
- if (!isTextured()) {
- if (g instanceof SunGraphics2D) {
- SG2DConstraint((SunGraphics2D) g, getRegion());
- }
- g.setColor(getBackground());
- g.fillRect(0, 0, w, h);
- }
+ g.clearRect(0, 0, w, h);
} finally {
g.dispose();
}
@@ -963,6 +946,35 @@
});
}
+ /**
+ * This method returns a back buffer Graphics to render all the
+ * peers to. After the peer is painted, the back buffer contents
+ * should be flushed to the screen. All the target painting
+ * (Component.paint() method) should be done directly to the screen.
+ */
+ protected final Graphics getOffscreenGraphics(Color fg, Color bg, Font f) {
+ final Image bb = getBackBuffer();
+ if (bb == null) {
+ return null;
+ }
+ if (fg == null) {
+ fg = SystemColor.windowText;
+ }
+ if (bg == null) {
+ bg = SystemColor.window;
+ }
+ if (f == null) {
+ f = DEFAULT_FONT;
+ }
+ final Graphics2D g = (Graphics2D) bb.getGraphics();
+ if (g != null) {
+ g.setColor(fg);
+ g.setBackground(bg);
+ g.setFont(f);
+ }
+ return g;
+ }
+
/*
* May be called by delegate to provide SD to Java2D code.
*/
@@ -973,16 +985,11 @@
}
private void replaceSurfaceData() {
- replaceSurfaceData(true);
- }
-
- private void replaceSurfaceData(boolean blit) {
- replaceSurfaceData(backBufferCount, backBufferCaps, blit);
+ replaceSurfaceData(backBufferCount, backBufferCaps);
}
private void replaceSurfaceData(int newBackBufferCount,
- BufferCapabilities newBackBufferCaps,
- boolean blit) {
+ BufferCapabilities newBackBufferCaps) {
synchronized (surfaceDataLock) {
final SurfaceData oldData = getSurfaceData();
surfaceData = platformWindow.replaceSurfaceData();
@@ -995,10 +1002,7 @@
if (getSurfaceData() != null && oldData != getSurfaceData()) {
clearBackground(size.width, size.height);
}
-
- if (blit) {
- blitSurfaceData(oldData, getSurfaceData());
- }
+ blitSurfaceData(oldData, getSurfaceData());
if (oldData != null && oldData != getSurfaceData()) {
// TODO: drop oldData for D3D/WGL pipelines
@@ -1013,18 +1017,11 @@
Graphics g = backBuffer.getGraphics();
try {
Rectangle r = getBounds();
+ g.setColor(getBackground());
if (g instanceof Graphics2D) {
((Graphics2D) g).setComposite(AlphaComposite.Src);
}
- g.setColor(nonOpaqueBackground);
g.fillRect(0, 0, r.width, r.height);
- if (g instanceof SunGraphics2D) {
- SG2DConstraint((SunGraphics2D) g, getRegion());
- }
- if (!isTextured()) {
- g.setColor(getBackground());
- g.fillRect(0, 0, r.width, r.height);
- }
if (oldBB != null) {
// Draw the old back buffer to the new one
g.drawImage(oldBB, 0, 0, null);
@@ -1048,7 +1045,7 @@
CompositeType.Src,
dst.getSurfaceType());
if (blit != null) {
- blit.Blit(src, dst, AlphaComposite.Src,
+ blit.Blit(src, dst, ((Graphics2D) getGraphics()).getComposite(),
getRegion(), 0, 0, 0, 0, size.width, size.height);
}
}
--- jdk/src/macosx/classes/sun/lwawt/PlatformWindow.java 2012-08-10 10:23:12.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/PlatformWindow.java 2013-01-16 08:58:09.000000000 -0800
@@ -131,7 +131,10 @@
public void setResizable(boolean resizable);
- public void setMinimumSize(int width, int height);
+ /**
+ * Applies the minimum and maximum size to the platform window.
+ */
+ public void setSizeConstraints(int minW, int minH, int maxW, int maxH);
/**
* Transforms the given Graphics object according to the native
--- jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java 2012-08-10 10:23:12.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java 2013-01-16 08:58:09.000000000 -0800
@@ -38,7 +38,7 @@
private long fNativeDropTransfer = 0;
private long fNativeDataAvailable = 0;
private Object fNativeData = null;
- private boolean insideTarget = false;
+ private boolean insideTarget = true;
Object awtLockAccess = new Object();
--- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java 2012-08-10 10:23:13.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java 2013-01-16 08:58:09.000000000 -0800
@@ -117,7 +117,7 @@
Rectangle r = peer.getBounds();
Image im = null;
if (!r.isEmpty()) {
- int transparency = peer.isTranslucent() ? Transparency.TRANSLUCENT : Transparency.OPAQUE;
+ int transparency = (peer.isOpaque() ? Transparency.OPAQUE : Transparency.TRANSLUCENT);
im = peer.getGraphicsConfiguration().createCompatibleImage(r.width, r.height, transparency);
}
return im;
@@ -180,7 +180,7 @@
public void setResizable(boolean resizable) {}
@Override
- public void setMinimumSize(int width, int height) {}
+ public void setSizeConstraints(int minW, int minH, int maxW, int maxH) {}
@Override
public Graphics transformGraphics(Graphics g) {
--- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java 2012-08-10 10:23:13.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java 2013-01-16 00:07:01.000000000 -0800
@@ -64,7 +64,7 @@
}
public boolean isOpaque() {
- return !peer.isTranslucent();
+ return peer.isOpaque();
}
/*
--- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2012-08-10 10:23:13.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2013-01-16 08:58:09.000000000 -0800
@@ -299,7 +299,7 @@
// If the target is a dialog, popup or tooltip we want it to ignore the brushed metal look.
if (isPopup) {
- styleBits = SET(styleBits, TEXTURED, false);
+ styleBits = SET(styleBits, TEXTURED, true);
// Popups in applets don't activate applet's process
styleBits = SET(styleBits, NONACTIVATING, true);
}
@@ -373,8 +373,6 @@
}
}
- peer.setTextured(IS(TEXTURED, styleBits));
-
return styleBits;
}
@@ -672,20 +670,15 @@
// Re-apply the size constraints and the size to ensure the space
// occupied by the grow box is counted properly
- setMinimumSize(1, 1); // the method ignores its arguments
+ peer.updateMinimumSize();
Rectangle bounds = peer.getBounds();
setBounds(bounds.x, bounds.y, bounds.width, bounds.height);
}
@Override
- public void setMinimumSize(int width, int height) {
- //TODO width, height should be used
- //NOTE: setResizable() calls setMinimumSize(1,1) relaying on the logic below
- final long nsWindowPtr = getNSWindowPtr();
- final Dimension min = target.getMinimumSize();
- final Dimension max = target.getMaximumSize();
- nativeSetNSWindowMinMax(nsWindowPtr, min.getWidth(), min.getHeight(), max.getWidth(), max.getHeight());
+ public void setSizeConstraints(int minW, int minH, int maxW, int maxH) {
+ nativeSetNSWindowMinMax(getNSWindowPtr(), minW, minH, maxW, maxH);
}
@Override
@@ -742,19 +735,10 @@
@Override
public void setOpaque(boolean isOpaque) {
CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque);
- if (!isOpaque && !peer.isTextured()) {
+ if (!isOpaque) {
long clearColor = CWrapper.NSColor.clearColor();
CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), clearColor);
}
-
- //This is a temporary workaround. Looks like after 7124236 will be fixed
- //the correct place for invalidateShadow() is CGLayer.drawInCGLContext.
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- invalidateShadow();
- }
- });
}
@Override
@@ -824,10 +808,6 @@
}
- public final void invalidateShadow(){
- nativeRevalidateNSWindowShadow(getNSWindowPtr());
- }
-
// ----------------------------------------------------------------------
// UTILITY METHODS
// ----------------------------------------------------------------------
--- jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2012-08-10 10:23:14.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2013-01-16 08:58:09.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -42,6 +42,7 @@
import sun.awt.*;
import sun.lwawt.*;
import sun.lwawt.LWWindowPeer.PeerType;
+import sun.security.action.GetBooleanAction;
class NamedCursor extends Cursor {
@@ -90,14 +91,6 @@
}
}
- static String getSystemProperty(final String name, final String deflt) {
- return AccessController.doPrivileged (new PrivilegedAction<String>() {
- public String run() {
- return System.getProperty(name, deflt);
- }
- });
- }
-
public LWCToolkit() {
SunToolkit.setDataTransfererClassName("sun.lwawt.macosx.CDataTransferer");
@@ -709,8 +702,8 @@
*/
public synchronized static boolean getSunAwtDisableCALayers() {
if (sunAwtDisableCALayers == null) {
- sunAwtDisableCALayers =
- getBooleanSystemProperty("sun.awt.disableCALayers");
+ sunAwtDisableCALayers = AccessController.doPrivileged(
+ new GetBooleanAction("sun.awt.disableCALayers"));
}
return sunAwtDisableCALayers.booleanValue();
}
@@ -759,11 +752,6 @@
}
@Override
- public boolean isWindowShapingSupported() {
- return true;
- }
-
- @Override
public boolean isWindowTranslucencySupported() {
return true;
}
@@ -773,10 +761,6 @@
return true;
}
- public boolean isSwingBackbufferTranslucencySupported() {
- return true;
- }
-
@Override
public boolean enableInputMethodsForTextComponent() {
return true;
--- jdk/src/macosx/native/sun/awt/AWTEvent.h 2012-08-10 10:23:21.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/AWTEvent.h 2013-01-16 08:58:09.000000000 -0800
@@ -33,5 +33,7 @@
void DeliverJavaMouseEvent(JNIEnv *env, NSEvent *event, jobject peer);
void SendAdditionalJavaEvents(JNIEnv *env, NSEvent *nsEvent, jobject peer);
jint GetJavaMouseModifiers(NSInteger button, NSUInteger modifierFlags);
+jint NsKeyModifiersToJavaModifiers(NSUInteger nsFlags, BOOL isExtMods);
+NSUInteger JavaModifiersToNsKeyModifiers(jint javaModifiers, BOOL isExtMods);
#endif /* __AWTEVENT_H */
--- jdk/src/macosx/native/sun/awt/AWTEvent.m 2012-08-10 10:23:21.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/AWTEvent.m 2013-01-16 08:58:09.000000000 -0800
@@ -244,6 +244,7 @@
//NSUInteger cgsRightMask;
unsigned short leftKeyCode;
unsigned short rightKeyCode;
+ jint javaExtMask;
jint javaMask;
jint javaKey;
}
@@ -254,6 +255,7 @@
0,
0,
0, // no Java equivalent
+ 0, // no Java equivalent
java_awt_event_KeyEvent_VK_CAPS_LOCK
},
{
@@ -263,6 +265,7 @@
56,
60,
java_awt_event_InputEvent_SHIFT_DOWN_MASK,
+ java_awt_event_InputEvent_SHIFT_MASK,
java_awt_event_KeyEvent_VK_SHIFT
},
{
@@ -272,6 +275,7 @@
59,
62,
java_awt_event_InputEvent_CTRL_DOWN_MASK,
+ java_awt_event_InputEvent_CTRL_MASK,
java_awt_event_KeyEvent_VK_CONTROL
},
{
@@ -281,6 +285,7 @@
58,
61,
java_awt_event_InputEvent_ALT_DOWN_MASK,
+ java_awt_event_InputEvent_ALT_MASK,
java_awt_event_KeyEvent_VK_ALT
},
{
@@ -290,6 +295,7 @@
55,
54,
java_awt_event_InputEvent_META_DOWN_MASK,
+ java_awt_event_InputEvent_META_MASK,
java_awt_event_KeyEvent_VK_META
},
// NSNumericPadKeyMask
@@ -298,10 +304,11 @@
0,
0,
0, // no Java equivalent
+ 0, // no Java equivalent
java_awt_event_KeyEvent_VK_HELP
},
// NSFunctionKeyMask
- {0, 0, 0, 0, 0}
+ {0, 0, 0, 0, 0, 0}
};
/*
@@ -491,15 +498,14 @@
/*
* This returns the java modifiers for a key NSEvent.
*/
-static jint
-NsKeyModifiersToJavaModifiers(NSUInteger nsFlags)
+jint NsKeyModifiersToJavaModifiers(NSUInteger nsFlags, BOOL isExtMods)
{
jint javaModifiers = 0;
const struct _nsKeyToJavaModifier* cur;
for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
if ((cur->nsMask & nsFlags) != 0) {
- javaModifiers |= cur->javaMask;
+ javaModifiers |= isExtMods? cur->javaExtMask : cur->javaMask;
}
}
@@ -507,6 +513,33 @@
}
/*
+ * This returns the NSEvent flags for java key modifiers.
+ */
+NSUInteger JavaModifiersToNsKeyModifiers(jint javaModifiers, BOOL isExtMods)
+{
+ NSUInteger nsFlags = 0;
+ const struct _nsKeyToJavaModifier* cur;
+
+ for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
+ jint mask = isExtMods? cur->javaExtMask : cur->javaMask;
+ if ((mask & javaModifiers) != 0) {
+ nsFlags |= cur->nsMask;
+ }
+ }
+
+ // special case
+ jint mask = isExtMods? java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK :
+ java_awt_event_InputEvent_ALT_GRAPH_MASK;
+
+ if ((mask & javaModifiers) != 0) {
+ nsFlags |= NSAlternateKeyMask;
+ }
+
+ return nsFlags;
+}
+
+
+/*
* Returns the correct java character for a key event. Most unicode
* characters don't require any fussing, but a few seem to need adjusting,
* see nsCharToJavaChar.
@@ -517,7 +550,7 @@
unichar returnValue = java_awt_event_KeyEvent_CHAR_UNDEFINED;
NSString *chars = nil;
unichar testChar = 0, testDeadChar = 0;
- jint javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags]);
+ jint javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags], TRUE);
switch ([event type]) {
case NSFlagsChanged:
@@ -657,7 +690,7 @@
testChar = [chars characterAtIndex:0];
}
- javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags]);
+ javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags], TRUE);
if (javaModifiers == 0) {
// TODO: dead key chars
// testDeadChar = GetDeadKeyCharacter(event);
@@ -692,7 +725,7 @@
jint GetJavaMouseModifiers(NSInteger button, NSUInteger modifierFlags)
{
// Mousing needs the key modifiers
- jint modifiers = NsKeyModifiersToJavaModifiers(modifierFlags);
+ jint modifiers = NsKeyModifiersToJavaModifiers(modifierFlags, TRUE);
/*
@@ -788,7 +821,7 @@
jint javaKeyCode, javaKeyLocation;
BOOL postsTyped = NO;
unichar testChar, testDeadChar = 0;
- jint javaModifiers = NsKeyModifiersToJavaModifiers([nsEvent modifierFlags]);
+ jint javaModifiers = NsKeyModifiersToJavaModifiers([nsEvent modifierFlags], TRUE);
if (javaModifiers == 0) {
testDeadChar = [nsEvent deadKeyCharacter];
@@ -984,7 +1017,7 @@
JNF_COCOA_ENTER(env);
- jmodifiers = NsKeyModifiersToJavaModifiers(modifierFlags);
+ jmodifiers = NsKeyModifiersToJavaModifiers(modifierFlags, TRUE);
JNF_COCOA_EXIT(env);
--- jdk/src/macosx/native/sun/awt/AWTWindow.m 2012-08-10 10:23:21.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/AWTWindow.m 2013-01-16 00:07:01.000000000 -0800
@@ -1017,17 +1017,14 @@
(JNIEnv *env, jclass clazz, jlong windowPtr)
{
JNF_COCOA_ENTER(env);
+AWT_ASSERT_NOT_APPKIT_THREAD;
NSWindow *nsWindow = OBJC(windowPtr);
- if ([NSThread isMainThread]) {
+ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
+ AWT_ASSERT_APPKIT_THREAD;
+
[nsWindow invalidateShadow];
- } else {
- [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
- AWT_ASSERT_APPKIT_THREAD;
-
- [nsWindow invalidateShadow];
- }];
- }
+ }];
JNF_COCOA_EXIT(env);
}
--- jdk/src/macosx/native/sun/awt/CDragSource.m 2012-08-10 10:23:22.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/CDragSource.m 2013-01-16 08:58:09.000000000 -0800
@@ -460,7 +460,7 @@
}
// Convert fModifiers (extModifiers) to NS:
- NSUInteger modifiers = [DnDUtilities mapJavaExtModifiersToNSKeyModifiers:fModifiers];
+ NSUInteger modifiers = JavaModifiersToNsKeyModifiers(fModifiers, TRUE);
// Just a dummy value ...
NSInteger eventNumber = 0;
@@ -658,7 +658,7 @@
}
// b) drag actions (key modifiers) have changed:
- jint modifiers = [DnDUtilities currentJavaExtKeyModifiers];
+ jint modifiers = NsKeyModifiersToJavaModifiers([NSEvent modifierFlags], YES);
if (fDragKeyModifiers != modifiers) {
NSDragOperation currentOp = [DnDUtilities nsDragOperationForModifiers:[NSEvent modifierFlags]];
NSDragOperation allowedOp = [DnDUtilities mapJavaDragOperationToNS:fSourceActions] & currentOp;
--- jdk/src/macosx/native/sun/awt/CMenuItem.m 2012-08-10 10:23:22.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/CMenuItem.m 2013-01-16 08:58:09.000000000 -0800
@@ -70,6 +70,18 @@
JNIEnv *env = [ThreadUtilities getJNIEnv];
JNF_COCOA_ENTER(env);
+ // If we are called as a result of user pressing a shorcut, do nothing,
+ // because AWTView has already sent corresponding key event to the Java
+ // layer from performKeyEquivalent
+ NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
+ if ([currEvent type] == NSKeyDown) {
+ NSString *menuKey = [sender keyEquivalent];
+ NSString *eventKey = [currEvent charactersIgnoringModifiers];
+ if ([menuKey isEqualToString:eventKey]) {
+ return;
+ }
+ }
+
if (fIsCheckbox) {
static JNF_CLASS_CACHE(jc_CCheckboxMenuItem, "sun/lwawt/macosx/CCheckboxMenuItem");
static JNF_MEMBER_CACHE(jm_ckHandleAction, jc_CCheckboxMenuItem, "handleAction", "(Z)V");
@@ -83,14 +95,8 @@
static JNF_CLASS_CACHE(jc_CMenuItem, "sun/lwawt/macosx/CMenuItem");
static JNF_MEMBER_CACHE(jm_handleAction, jc_CMenuItem, "handleAction", "(JI)V"); // AWT_THREADING Safe (event)
- NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
NSUInteger modifiers = [currEvent modifierFlags];
- jint javaModifiers = 0;
-
- if ((modifiers & NSCommandKeyMask) != 0) javaModifiers |= java_awt_Event_META_MASK;
- if ((modifiers & NSShiftKeyMask) != 0) javaModifiers |= java_awt_Event_SHIFT_MASK;
- if ((modifiers & NSControlKeyMask) != 0) javaModifiers |= java_awt_Event_CTRL_MASK;
- if ((modifiers & NSAlternateKeyMask) != 0) javaModifiers |= java_awt_Event_ALT_MASK;
+ jint javaModifiers = NsKeyModifiersToJavaModifiers(modifiers, NO);
JNFCallVoidMethod(env, fPeer, jm_handleAction, UTC(currEvent), javaModifiers); // AWT_THREADING Safe (event)
}
@@ -117,10 +123,7 @@
modifiers &= ~java_awt_event_KeyEvent_SHIFT_MASK;
}
- if ((modifiers & java_awt_event_KeyEvent_SHIFT_MASK) != 0) modifierMask |= NSShiftKeyMask;
- if ((modifiers & java_awt_event_KeyEvent_CTRL_MASK) != 0) modifierMask |= NSControlKeyMask;
- if ((modifiers & java_awt_event_KeyEvent_ALT_MASK) != 0) modifierMask |= NSAlternateKeyMask;
- if ((modifiers & java_awt_event_KeyEvent_META_MASK) != 0) modifierMask |= NSCommandKeyMask;
+ modifierMask = JavaModifiersToNsKeyModifiers(modifiers, NO);
}
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
--- jdk/src/macosx/native/sun/awt/DnDUtilities.h 2012-08-10 10:23:22.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/DnDUtilities.h 2013-01-16 08:58:10.000000000 -0800
@@ -42,7 +42,6 @@
+ (jint)narrowJavaDropActions:(jint)actions;
// Mouse and key modifiers mapping:
-+ (NSUInteger)mapJavaExtModifiersToNSKeyModifiers:(jint)modifiers;
+ (NSUInteger)mapJavaExtModifiersToNSMouseDownButtons:(jint)modifiers;
+ (NSUInteger)mapJavaExtModifiersToNSMouseUpButtons:(jint)modifiers;
@@ -50,9 +49,6 @@
+ (jint)extractJavaExtKeyModifiersFromJavaExtModifiers:(jint)modifiers;
+ (jint)extractJavaExtMouseModifiersFromJavaExtModifiers:(jint)modifiers;
-// Get the current keyboard modifier keys as java modifiers (for operationChanged)
-+ (jint)currentJavaExtKeyModifiers;
-
// Getting the state of the current Drag
+ (NSDragOperation)nsDragOperationForModifiers:(NSUInteger)modifiers;
+ (jint) javaKeyModifiersForNSDragOperation:(NSDragOperation)dragOp;
--- jdk/src/macosx/native/sun/awt/DnDUtilities.m 2012-08-10 10:23:22.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/DnDUtilities.m 2013-01-16 08:58:10.000000000 -0800
@@ -161,28 +161,6 @@
}
// Mouse and key modifiers mapping:
-+ (NSUInteger)mapJavaExtModifiersToNSKeyModifiers:(jint)modifiers
-{
- NSUInteger result = 0;
-
- if ((modifiers & java_awt_event_InputEvent_SHIFT_DOWN_MASK) != 0)
- result |= NSShiftKeyMask;
-
- if ((modifiers & java_awt_event_InputEvent_CTRL_DOWN_MASK) != 0)
- result |= NSControlKeyMask;
-
- if ((modifiers & java_awt_event_InputEvent_META_DOWN_MASK) != 0)
- result |= NSCommandKeyMask;
-
- if ((modifiers & java_awt_event_InputEvent_ALT_DOWN_MASK) != 0)
- result |= NSAlternateKeyMask;
-
- if ((modifiers & java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK) != 0)
- result |= NSAlternateKeyMask;
-
- return result;
-}
-
+ (NSUInteger)mapJavaExtModifiersToNSMouseDownButtons:(jint)modifiers
{
NSUInteger result = NSLeftMouseDown;
@@ -245,32 +223,6 @@
return modifiers & mask;
}
-
-+ (jint)currentJavaExtKeyModifiers
-{
- NSUInteger modifiers = [NSEvent modifierFlags];
- jint jmodifiers = 0;
-
- if(modifiers & NSShiftKeyMask) {
- jmodifiers |= java_awt_event_InputEvent_SHIFT_DOWN_MASK;
- }
-
- if(modifiers & NSControlKeyMask) {
- jmodifiers |= java_awt_event_InputEvent_CTRL_DOWN_MASK;
- }
-
- if(modifiers & NSAlternateKeyMask) {
- jmodifiers |= java_awt_event_InputEvent_ALT_DOWN_MASK;
- }
-
- if(modifiers & NSCommandKeyMask) {
- jmodifiers |= java_awt_event_InputEvent_META_DOWN_MASK;
- }
-
- return jmodifiers;
-}
-
-
+ (NSDragOperation) nsDragOperationForModifiers:(NSUInteger)modifiers {
// Java first
--- jdk/src/macosx/native/sun/awt/ImageSurfaceData.h 2012-08-10 10:23:22.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/ImageSurfaceData.h 2013-01-16 08:58:10.000000000 -0800
@@ -41,7 +41,7 @@
// If there is an image present, this is a no-op
void makeSureImageIsCreated(ImageSDOps* isdo);
-struct _ContextInfo
+typedef struct _ContextInfo
{
BOOL useWindowContextReference;
BOOL canUseJavaPixelsAsContext;
@@ -50,10 +50,9 @@
size_t bytesPerRow;
CGImageAlphaInfo alphaInfo;
CGColorSpaceRef colorSpace;
-}
-typedef ContextInfo;
+} ContextInfo;
-struct _ImageInfo
+typedef struct _ImageInfo
{
size_t bitsPerComponent;
size_t bitsPerPixel;
@@ -61,8 +60,7 @@
size_t bytesPerRow;
CGImageAlphaInfo alphaInfo;
CGColorSpaceRef colorSpace;
-}
-typedef ImageInfo;
+} ImageInfo;
struct _ImageSDOps
{
--- jdk/src/macosx/native/sun/awt/ImageSurfaceData.m 2012-08-10 10:23:22.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/ImageSurfaceData.m 2013-01-16 08:58:10.000000000 -0800
@@ -53,10 +53,6 @@
// for vImage framework headers
#include <Accelerate/Accelerate.h>
-
-// private Quartz routines needed here
-CG_EXTERN void CGContextSetCTM(CGContextRef ref, CGAffineTransform tx);
-
static ContextInfo sDefaultContextInfo[sun_java2d_OSXOffScreenSurfaceData_TYPE_3BYTE_RGB+1] =
{
{YES, YES, 8, 4, 0, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, NULL}, // TYPE_CUSTOM // special case
@@ -942,7 +938,6 @@
// intitalize the context to match the Java coordinate system
// BG, since the context is created above, we can just concat
- //CGContextSetCTM(qsdo->cgRef, CGAffineTransformMake(1, 0, 0, -1, 0, isdo->height));
CGContextConcatCTM(qsdo->cgRef, CGAffineTransformMake(1, 0, 0, -1, 0, isdo->height));
CGContextSaveGState(qsdo->cgRef); // this will make sure we don't go pass device context settings
@@ -1114,7 +1109,9 @@
if (qsdo->cgRef != NULL)
{
CGContextSaveGState(qsdo->cgRef);
- CGContextSetCTM(qsdo->cgRef, CGAffineTransformMake(1, 0, 0, 1, 0, 0));
+ CGAffineTransform currCTM = CGContextGetCTM(qsdo->cgRef);
+ CGAffineTransform inverse = CGAffineTransformInvert(currCTM);
+ CGContextConcatCTM(qsdo->cgRef, inverse);
CGContextSetBlendMode(qsdo->cgRef, kCGBlendModeCopy);
CGContextSetAlpha(qsdo->cgRef, 1.0f);
CGContextDrawImage(qsdo->cgRef, CGRectMake(0, 0, width, height), javaImg);
--- jdk/src/macosx/native/sun/awt/QuartzRenderer.m 2012-08-10 10:23:24.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/QuartzRenderer.m 2013-01-16 08:58:10.000000000 -0800
@@ -50,9 +50,6 @@
// same value as defined in Sun's own code
#define XOR_ALPHA_CUTOFF 128
-// private Quartz routines needed here
-CG_EXTERN void CGContextSetCTM(CGContextRef ref, CGAffineTransform tx);
-
static CGFloat gRoundRectCtrlpts[10][12] =
{
@@ -536,7 +533,7 @@
makeSureImageIsCreated(isdo);
- CGAffineTransform ctm = CGContextGetCTM(cgRef);
+ CGContextSaveGState(cgRef);
CGContextConcatCTM(cgRef, CGAffineTransformMake(a, b, c, d, tx, ty));
jint alphaInfo = isdo->contextInfo.alphaInfo & kCGBitmapAlphaInfoMask;
@@ -551,7 +548,7 @@
CGImageRelease(subImg);
}
- CGContextSetCTM(cgRef, ctm);
+ CGContextRestoreGState(cgRef);
UnlockImage(env, isdo);
}
--- jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m 2012-08-10 10:23:24.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m 2013-01-16 08:58:10.000000000 -0800
@@ -40,9 +40,6 @@
#import <AppKit/AppKit.h>
#import "ThreadUtilities.h"
-// private Quartz routines needed here
-CG_EXTERN void CGContextSetCTM(CGContextRef ref, CGAffineTransform tx);
-
//#define DEBUG
#if defined DEBUG
#define PRINT(msg) {fprintf(stderr, "%s\n", msg);}
@@ -50,9 +47,6 @@
#define PRINT(msg) {}
#endif
-// from CGAffineTransformPrivate.h
-extern CGPoint CGPointApplyInverseAffineTransform(CGPoint point, CGAffineTransform t);
-
#define kOffset (0.5f)
BOOL gAdjustForJavaDrawing;
@@ -608,7 +602,8 @@
// We need to flip both y coefficeints to flip the offset point into the java coordinate system.
ctm.b = -ctm.b; ctm.d = -ctm.d; ctm.tx = 0.0f; ctm.ty = 0.0f;
CGPoint offsets = {kOffset, kOffset};
- offsets = CGPointApplyInverseAffineTransform(offsets, ctm);
+ CGAffineTransform inverse = CGAffineTransformInvert(ctm);
+ offsets = CGPointApplyAffineTransform(offsets, inverse);
qsdo->graphicsStateInfo.offsetX = offsets.x;
qsdo->graphicsStateInfo.offsetY = offsets.y;
}
--- jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m 2012-08-10 10:23:24.000000000 -0700
+++ jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m 2013-01-16 08:58:10.000000000 -0800
@@ -445,3 +445,20 @@
return cglinfo->context->caps;
}
}
+
+JNIEXPORT jint JNICALL
+Java_sun_java2d_opengl_CGLGraphicsConfig__1getMaxTextureSize
+ (JNIEnv *env, jclass cglgc)
+{
+ J2dTraceLn(J2D_TRACE_INFO, "CGLGraphicsConfig__1getMaxTextureSize");
+
+ __block int max = 0;
+
+ [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
+ [sharedContext makeCurrentContext];
+ j2d_glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max);
+ }];
+
+ return (jint)max;
+}
+
--- jdk/src/share/bin/java.c 2012-08-10 10:23:29.000000000 -0700
+++ jdk/src/share/bin/java.c 2013-01-16 08:58:15.000000000 -0800
@@ -104,7 +104,6 @@
static jboolean InitializeJVM(JavaVM **pvm, JNIEnv **penv,
InvocationFunctions *ifn);
static jstring NewPlatformString(JNIEnv *env, char *s);
-static jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc);
static jclass LoadMainClass(JNIEnv *env, int mode, char *name);
static void TranslateApplicationArgs(int jargc, const char **jargv, int *pargc, char ***pargv);
@@ -160,7 +159,7 @@
* Running Java code in primordial thread caused many problems. We will
* create a new thread to invoke JVM. See 6316197 for more information.
*/
-static jlong threadStackSize = 0; /* stack size of the new thread */
+static jlong threadStackSize = 0; /* stack size of the new thread */
static jlong maxHeapSize = 0; /* max heap size */
static jlong initialHeapSize = 0; /* inital heap size */
@@ -202,6 +201,14 @@
InitLauncher(javaw);
DumpState();
+ if (JLI_IsTraceLauncher()) {
+ int i;
+ printf("Command line args:\n");
+ for (i = 0; i < argc ; i++) {
+ printf("argv[%d] = %s\n", i, argv[i]);
+ }
+ AddOption("-Dsun.java.launcher.diag=true", NULL);
+ }
/*
* Make sure the specified version of the JRE is running.
@@ -222,15 +229,6 @@
*/
SelectVersion(argc, argv, &main_class);
- if (JLI_IsTraceLauncher()) {
- int i;
- printf("Command line args:\n");
- for (i = 0; i < argc ; i++) {
- printf("argv[%d] = %s\n", i, argv[i]);
- }
- AddOption("-Dsun.java.launcher.diag=true", NULL);
- }
-
CreateExecutionEnvironment(&argc, &argv,
jrepath, sizeof(jrepath),
jvmpath, sizeof(jvmpath),
@@ -435,8 +433,8 @@
"([Ljava/lang/String;)V");
CHECK_EXCEPTION_NULL_LEAVE(mainID);
- /* Build argument array */
- mainArgs = NewPlatformStringArray(env, argv, argc);
+ /* Build platform specific argument array */
+ mainArgs = CreateApplicationArgs(env, argv, argc);
CHECK_EXCEPTION_NULL_LEAVE(mainArgs);
/* Invoke main method. */
@@ -1113,8 +1111,9 @@
static jclass helperClass = NULL;
-static jclass
-GetLauncherHelperClass(JNIEnv *env) {
+jclass
+GetLauncherHelperClass(JNIEnv *env)
+{
if (helperClass == NULL) {
NULL_CHECK0(helperClass = FindBootStrapClass(env,
"sun/launcher/LauncherHelper"));
@@ -1158,7 +1157,7 @@
* Returns a new array of Java string objects for the specified
* array of platform strings.
*/
-static jobjectArray
+jobjectArray
NewPlatformStringArray(JNIEnv *env, char **strv, int strc)
{
jarray cls;
@@ -1203,7 +1202,7 @@
end = CounterGet();
printf("%ld micro seconds to load main class\n",
(long)(jint)Counter2Micros(end-start));
- printf("----_JAVA_LAUNCHER_DEBUG----\n");
+ printf("----%s----\n", JLDEBUG_ENV_ENTRY);
}
return (jclass)result;
--- jdk/src/share/bin/java.h 2012-08-10 10:23:29.000000000 -0700
+++ jdk/src/share/bin/java.h 2013-01-16 08:58:10.000000000 -0800
@@ -219,6 +219,10 @@
const char *name));
jclass FindBootStrapClass(JNIEnv *env, const char *classname);
+jobjectArray CreateApplicationArgs(JNIEnv *env, char **strv, int argc);
+jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc);
+jclass GetLauncherHelperClass(JNIEnv *env);
+
int JNICALL JavaMain(void * args); /* entry point */
enum LaunchMode { // cf. sun.launcher.LauncherHelper
--- jdk/src/share/bin/jli_util.c 2012-08-10 10:23:29.000000000 -0700
+++ jdk/src/share/bin/jli_util.c 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, 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
@@ -102,9 +102,9 @@
void
JLI_SetTraceLauncher()
{
- if (getenv("_JAVA_LAUNCHER_DEBUG") != 0) {
+ if (getenv(JLDEBUG_ENV_ENTRY) != 0) {
_launcher_debug = JNI_TRUE;
- JLI_TraceLauncher("----_JAVA_LAUNCHER_DEBUG----\n");
+ JLI_TraceLauncher("----%s----\n", JLDEBUG_ENV_ENTRY);
}
}
--- jdk/src/share/bin/jli_util.h 2012-08-10 10:23:29.000000000 -0700
+++ jdk/src/share/bin/jli_util.h 2013-01-16 08:58:10.000000000 -0800
@@ -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
@@ -27,7 +27,10 @@
#define _JLI_UTIL_H
#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
#include <jni.h>
+#define JLDEBUG_ENV_ENTRY "_JAVA_LAUNCHER_DEBUG"
void *JLI_MemAlloc(size_t size);
void *JLI_MemRealloc(void *ptr, size_t size);
@@ -35,6 +38,14 @@
void JLI_MemFree(void *ptr);
int JLI_StrCCmp(const char *s1, const char* s2);
+typedef struct {
+ char *arg;
+ jboolean has_wildcard;
+} StdArg;
+
+StdArg *JLI_GetStdArgs();
+int JLI_GetStdArgc();
+
#define JLI_StrLen(p1) strlen((p1))
#define JLI_StrChr(p1, p2) strchr((p1), (p2))
#define JLI_StrRChr(p1, p2) strrchr((p1), (p2))
@@ -56,8 +67,10 @@
#define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
#define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
#define JLI_Snprintf _snprintf
+void JLI_CmdToArgs(char *cmdline);
#else
#include <unistd.h>
+#include <strings.h>
#define JLI_StrCaseCmp(p1, p2) strcasecmp((p1), (p2))
#define JLI_StrNCaseCmp(p1, p2, p3) strncasecmp((p1), (p2), (p3))
#define JLI_Snprintf snprintf
--- jdk/src/share/bin/main.c 2012-08-10 10:23:29.000000000 -0700
+++ jdk/src/share/bin/main.c 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2010, 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
@@ -87,22 +87,41 @@
const jboolean const_javaw = JNI_TRUE;
__initenv = _environ;
- margc = __argc;
- margv = __argv;
-
#else /* JAVAW */
int
-main(int argc, char ** argv)
+main(int argc, char **argv)
{
int margc;
char** margv;
const jboolean const_javaw = JNI_FALSE;
-
+#endif /* JAVAW */
+#ifdef _WIN32
+ {
+ int i = 0;
+ if (getenv(JLDEBUG_ENV_ENTRY) != NULL) {
+ printf("Windows original main args:\n");
+ for (i = 0 ; i < __argc ; i++) {
+ printf("wwwd_args[%d] = %s\n", i, __argv[i]);
+ }
+ }
+ }
+ JLI_CmdToArgs(GetCommandLine());
+ margc = JLI_GetStdArgc();
+ // add one more to mark the end
+ margv = (char **)JLI_MemAlloc((margc + 1) * (sizeof(char *)));
+ {
+ int i = 0;
+ StdArg *stdargs = JLI_GetStdArgs();
+ for (i = 0 ; i < margc ; i++) {
+ margv[i] = stdargs[i].arg;
+ }
+ margv[i] = NULL;
+ }
+#else /* *NIXES */
margc = argc;
margv = argv;
-#endif /* JAVAW */
-
+#endif /* WIN32 */
return JLI_Launch(margc, margv,
sizeof(const_jargs) / sizeof(char *), const_jargs,
sizeof(const_appclasspath) / sizeof(char *), const_appclasspath,
--- jdk/src/share/bin/wildcard.c 2012-08-10 10:23:30.000000000 -0700
+++ jdk/src/share/bin/wildcard.c 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, 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
@@ -129,11 +129,11 @@
HANDLE handle;
char *firstFile; /* Stupid FindFirstFile...FindNextFile */
};
-
+// since this is used repeatedly we keep it here.
+static WIN32_FIND_DATA find_data;
static WildcardIterator
WildcardIterator_for(const char *wildcard)
{
- WIN32_FIND_DATA find_data;
WildcardIterator it = NEW_(WildcardIterator);
HANDLE handle = FindFirstFile(wildcard, &find_data);
if (handle == INVALID_HANDLE_VALUE)
@@ -146,7 +146,6 @@
static char *
WildcardIterator_next(WildcardIterator it)
{
- WIN32_FIND_DATA find_data;
if (it->firstFile != NULL) {
char *firstFile = it->firstFile;
it->firstFile = NULL;
@@ -412,7 +411,7 @@
FileList_expandWildcards(fl);
expanded = FileList_join(fl, PATH_SEPARATOR);
FileList_free(fl);
- if (getenv("_JAVA_LAUNCHER_DEBUG") != 0)
+ if (getenv(JLDEBUG_ENV_ENTRY) != 0)
printf("Expanded wildcards:\n"
" before: \"%s\"\n"
" after : \"%s\"\n",
--- jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-08-10 10:23:31.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/TypeResolver.java 2013-01-16 00:07:02.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2006, 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
@@ -45,9 +45,6 @@
* @author Sergey Malenkov
*/
public final class TypeResolver {
-
- private static final WeakCache<Type, Map<Type, Type>> CACHE = new WeakCache<>();
-
/**
* Replaces the given {@code type} in an inherited method
* with the actual type it has in the given {@code inClass}.
@@ -152,55 +149,12 @@
* @param formal the type where occurrences of the variables
* in {@code actual} will be replaced by the corresponding bound values
* @return a resolved type
+ *
+ * @see #TypeResolver(Type)
+ * @see #resolve(Type)
*/
public static Type resolve(Type actual, Type formal) {
- if (formal instanceof Class) {
- return formal;
- }
- if (formal instanceof GenericArrayType) {
- Type comp = ((GenericArrayType) formal).getGenericComponentType();
- comp = resolve(actual, comp);
- return (comp instanceof Class)
- ? Array.newInstance((Class<?>) comp, 0).getClass()
- : GenericArrayTypeImpl.make(comp);
- }
- if (formal instanceof ParameterizedType) {
- ParameterizedType fpt = (ParameterizedType) formal;
- Type[] actuals = resolve(actual, fpt.getActualTypeArguments());
- return ParameterizedTypeImpl.make(
- (Class<?>) fpt.getRawType(), actuals, fpt.getOwnerType());
- }
- if (formal instanceof WildcardType) {
- WildcardType fwt = (WildcardType) formal;
- Type[] upper = resolve(actual, fwt.getUpperBounds());
- Type[] lower = resolve(actual, fwt.getLowerBounds());
- return new WildcardTypeImpl(upper, lower);
- }
- if (formal instanceof TypeVariable) {
- Map<Type, Type> map;
- synchronized (CACHE) {
- map = CACHE.get(actual);
- if (map == null) {
- map = new HashMap<>();
- prepare(map, actual);
- CACHE.put(actual, map);
- }
- }
- Type result = map.get(formal);
- if (result == null || result.equals(formal)) {
- return formal;
- }
- result = fixGenericArray(result);
- // A variable can be bound to another variable that is itself bound
- // to something. For example, given:
- // class Super<T> {...}
- // class Mid<X> extends Super<T> {...}
- // class Sub extends Mid<String>
- // the variable T is bound to X, which is in turn bound to String.
- // So if we have to resolve T, we need the tail recursion here.
- return resolve(actual, result);
- }
- throw new IllegalArgumentException("Bad Type kind: " + formal.getClass());
+ return getTypeResolver(actual).resolve(formal);
}
/**
@@ -210,14 +164,12 @@
* @param actual the type that supplies bindings for type variables
* @param formals the array of types to resolve
* @return an array of resolved types
+ *
+ * @see #TypeResolver(Type)
+ * @see #resolve(Type[])
*/
public static Type[] resolve(Type actual, Type[] formals) {
- int length = formals.length;
- Type[] actuals = new Type[length];
- for (int i = 0; i < length; i++) {
- actuals[i] = resolve(actual, formals[i]);
- }
- return actuals;
+ return getTypeResolver(actual).resolve(formals);
}
/**
@@ -276,6 +228,32 @@
return classes;
}
+ public static TypeResolver getTypeResolver(Type type) {
+ synchronized (CACHE) {
+ TypeResolver resolver = CACHE.get(type);
+ if (resolver == null) {
+ resolver = new TypeResolver(type);
+ CACHE.put(type, resolver);
+ }
+ return resolver;
+ }
+ }
+
+ private static final WeakCache<Type, TypeResolver> CACHE = new WeakCache<>();
+
+ private final Map<TypeVariable<?>, Type> map = new HashMap<>();
+
+ /**
+ * Constructs the type resolver for the given actual type.
+ *
+ * @param actual the type that supplies bindings for type variables
+ *
+ * @see #prepare(Type)
+ */
+ private TypeResolver(Type actual) {
+ prepare(actual);
+ }
+
/**
* Fills the map from type parameters
* to types as seen by the given {@code type}.
@@ -287,10 +265,9 @@
* to a {@link ParameterizedType ParameterizedType} with no parameters,
* or it represents the erasure of a {@link ParameterizedType ParameterizedType}.
*
- * @param map the mappings of all type variables
* @param type the next type in the hierarchy
*/
- private static void prepare(Map<Type, Type> map, Type type) {
+ private void prepare(Type type) {
Class<?> raw = (Class<?>)((type instanceof Class<?>)
? type
: ((ParameterizedType)type).getRawType());
@@ -303,25 +280,91 @@
assert formals.length == actuals.length;
for (int i = 0; i < formals.length; i++) {
- map.put(formals[i], actuals[i]);
+ this.map.put(formals[i], actuals[i]);
}
Type gSuperclass = raw.getGenericSuperclass();
if (gSuperclass != null) {
- prepare(map, gSuperclass);
+ prepare(gSuperclass);
}
for (Type gInterface : raw.getGenericInterfaces()) {
- prepare(map, gInterface);
+ prepare(gInterface);
}
// If type is the raw version of a parameterized class, we type-erase
// all of its type variables, including inherited ones.
if (type instanceof Class<?> && formals.length > 0) {
- for (Map.Entry<Type, Type> entry : map.entrySet()) {
+ for (Map.Entry<TypeVariable<?>, Type> entry : this.map.entrySet()) {
entry.setValue(erase(entry.getValue()));
}
}
}
/**
+ * Replaces the given {@code formal} type
+ * with the type it stand for in this type resolver.
+ *
+ * @param formal the array of types to resolve
+ * @return a resolved type
+ */
+ private Type resolve(Type formal) {
+ if (formal instanceof Class) {
+ return formal;
+ }
+ if (formal instanceof GenericArrayType) {
+ Type comp = ((GenericArrayType)formal).getGenericComponentType();
+ comp = resolve(comp);
+ return (comp instanceof Class)
+ ? Array.newInstance((Class<?>)comp, 0).getClass()
+ : GenericArrayTypeImpl.make(comp);
+ }
+ if (formal instanceof ParameterizedType) {
+ ParameterizedType fpt = (ParameterizedType)formal;
+ Type[] actuals = resolve(fpt.getActualTypeArguments());
+ return ParameterizedTypeImpl.make(
+ (Class<?>)fpt.getRawType(), actuals, fpt.getOwnerType());
+ }
+ if (formal instanceof WildcardType) {
+ WildcardType fwt = (WildcardType)formal;
+ Type[] upper = resolve(fwt.getUpperBounds());
+ Type[] lower = resolve(fwt.getLowerBounds());
+ return new WildcardTypeImpl(upper, lower);
+ }
+ if (!(formal instanceof TypeVariable)) {
+ throw new IllegalArgumentException("Bad Type kind: " + formal.getClass());
+ }
+ Type actual = this.map.get((TypeVariable) formal);
+ if (actual == null || actual.equals(formal)) {
+ return formal;
+ }
+ actual = fixGenericArray(actual);
+ return resolve(actual);
+ // A variable can be bound to another variable that is itself bound
+ // to something. For example, given:
+ // class Super<T> {...}
+ // class Mid<X> extends Super<T> {...}
+ // class Sub extends Mid<String>
+ // the variable T is bound to X, which is in turn bound to String.
+ // So if we have to resolve T, we need the tail recursion here.
+ }
+
+ /**
+ * Replaces all formal types in the given array
+ * with the types they stand for in this type resolver.
+ *
+ * @param formals the array of types to resolve
+ * @return an array of resolved types
+ *
+ * @see #resolve(Type)
+ */
+ private Type[] resolve(Type[] formals) {
+ int length = formals.length;
+ Type[] actuals = new Type[length];
+ for (int i = 0; i < length; i++) {
+ actuals[i] = resolve(formals[i]);
+ }
+ return actuals;
+ }
+
+ /**
* Replaces a {@link GenericArrayType GenericArrayType}
* with plain array class where it is possible.
* Bug <a href="http://bugs.sun.com/view_bug.do?bug_id=5041784">5041784</a>
--- jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2012-08-10 10:23:31.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -37,6 +37,9 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
@@ -46,6 +49,8 @@
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
+import sun.misc.SharedSecrets;
+
/**
* The main class to parse JavaBeans XML archive.
*
@@ -56,11 +61,10 @@
* @see ElementHandler
*/
public final class DocumentHandler extends DefaultHandler {
- private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<String, Class<? extends ElementHandler>>();
-
- private final Map<String, Object> environment = new HashMap<String, Object>();
-
- private final List<Object> objects = new ArrayList<Object>();
+ private final AccessControlContext acc = AccessController.getContext();
+ private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<>();
+ private final Map<String, Object> environment = new HashMap<>();
+ private final List<Object> objects = new ArrayList<>();
private Reference<ClassLoader> loader;
private ExceptionListener listener;
@@ -351,23 +355,32 @@
*
* @param input the input source to parse
*/
- public void parse(InputSource input) {
- try {
- SAXParserFactory.newInstance().newSAXParser().parse(input, this);
- }
- catch (ParserConfigurationException exception) {
- handleException(exception);
- }
- catch (SAXException wrapper) {
- Exception exception = wrapper.getException();
- if (exception == null) {
- exception = wrapper;
+ public void parse(final InputSource input) {
+ if ((this.acc == null) && (null != System.getSecurityManager())) {
+ throw new SecurityException("AccessControlContext is not set");
+ }
+ AccessControlContext stack = AccessController.getContext();
+ SharedSecrets.getJavaSecurityAccess().doIntersectionPrivilege(new PrivilegedAction<Void>() {
+ public Void run() {
+ try {
+ SAXParserFactory.newInstance().newSAXParser().parse(input, DocumentHandler.this);
+ }
+ catch (ParserConfigurationException exception) {
+ handleException(exception);
+ }
+ catch (SAXException wrapper) {
+ Exception exception = wrapper.getException();
+ if (exception == null) {
+ exception = wrapper;
+ }
+ handleException(exception);
+ }
+ catch (IOException exception) {
+ handleException(exception);
+ }
+ return null;
}
- handleException(exception);
- }
- catch (IOException exception) {
- handleException(exception);
- }
+ }, stack, this.acc);
}
/**
--- jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java 2012-08-10 10:23:32.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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,8 @@
import java.lang.reflect.Method;
+import sun.reflect.misc.MethodUtil;
+
/**
* This class is intended to handle &lt;method&gt; element.
* It describes invocation of the method.
@@ -101,7 +103,7 @@
if (method.isVarArgs()) {
args = getArguments(args, method.getParameterTypes());
}
- Object value = method.invoke(bean, args);
+ Object value = MethodUtil.invoke(method, bean, args);
return method.getReturnType().equals(void.class)
? ValueObjectImpl.VOID
: ValueObjectImpl.create(value);
--- jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java 2012-08-10 10:23:32.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -35,6 +35,8 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import sun.reflect.misc.MethodUtil;
+
/**
* This class is intended to handle &lt;property&gt; element.
* This element simplifies access to the properties.
@@ -168,11 +170,11 @@
private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException {
Class<?> type = bean.getClass();
if (index == null) {
- return findGetter(type, name).invoke(bean);
+ return MethodUtil.invoke(findGetter(type, name), bean, new Object[] {});
} else if (type.isArray() && (name == null)) {
return Array.get(bean, index);
} else {
- return findGetter(type, name, int.class).invoke(bean, index);
+ return MethodUtil.invoke(findGetter(type, name, int.class), bean, new Object[] {index});
}
}
@@ -197,11 +199,11 @@
: null;
if (index == null) {
- findSetter(type, name, param).invoke(bean, value);
+ MethodUtil.invoke(findSetter(type, name, param), bean, new Object[] {value});
} else if (type.isArray() && (name == null)) {
Array.set(bean, index, value);
} else {
- findSetter(type, name, int.class, param).invoke(bean, index, value);
+ MethodUtil.invoke(findSetter(type, name, int.class, param), bean, new Object[] {index, value});
}
}
--- jdk/src/share/classes/com/sun/beans/editors/BooleanEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/BooleanEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,76 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "boolean" type.
+ */
+
+import java.beans.*;
+
+public class BooleanEditor extends PropertyEditorSupport {
+
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value.toString()
+ : "null";
+ }
+
+ public String getAsText() {
+ Object value = getValue();
+ return (value instanceof Boolean)
+ ? getValidName((Boolean) value)
+ : null;
+ }
+
+ public void setAsText(String text) throws java.lang.IllegalArgumentException {
+ if (text == null) {
+ setValue(null);
+ } else if (isValidName(true, text)) {
+ setValue(Boolean.TRUE);
+ } else if (isValidName(false, text)) {
+ setValue(Boolean.FALSE);
+ } else {
+ throw new java.lang.IllegalArgumentException(text);
+ }
+ }
+
+ public String[] getTags() {
+ return new String[] {getValidName(true), getValidName(false)};
+ }
+
+ // the following method should be localized (4890258)
+
+ private String getValidName(boolean value) {
+ return value ? "True" : "False";
+ }
+
+ private boolean isValidName(boolean value, String name) {
+ return getValidName(value).equalsIgnoreCase(name);
+ }
+}
--- jdk/src/share/classes/com/sun/beans/editors/ByteEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/ByteEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "byte" type.
+ *
+ */
+
+import java.beans.*;
+
+public class ByteEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? "((byte)" + value + ")"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Byte.decode(text));
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/ColorEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/ColorEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,214 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+import java.awt.*;
+import java.beans.*;
+
+public class ColorEditor extends Panel implements PropertyEditor {
+ private static final long serialVersionUID = 1781257185164716054L;
+
+ public ColorEditor() {
+ setLayout(null);
+
+ ourWidth = hPad;
+
+ // Create a sample color block bordered in black
+ Panel p = new Panel();
+ p.setLayout(null);
+ p.setBackground(Color.black);
+ sample = new Canvas();
+ p.add(sample);
+ sample.reshape(2, 2, sampleWidth, sampleHeight);
+ add(p);
+ p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4);
+ ourWidth += sampleWidth + 4 + hPad;
+
+ text = new TextField("", 14);
+ add(text);
+ text.reshape(ourWidth,0,100,30);
+ ourWidth += 100 + hPad;
+
+ choser = new Choice();
+ int active = 0;
+ for (int i = 0; i < colorNames.length; i++) {
+ choser.addItem(colorNames[i]);
+ }
+ add(choser);
+ choser.reshape(ourWidth,0,100,30);
+ ourWidth += 100 + hPad;
+
+ resize(ourWidth,40);
+ }
+
+ public void setValue(Object o) {
+ Color c = (Color)o;
+ changeColor(c);
+ }
+
+ public Dimension preferredSize() {
+ return new Dimension(ourWidth, 40);
+ }
+
+ public boolean keyUp(Event e, int key) {
+ if (e.target == text) {
+ try {
+ setAsText(text.getText());
+ } catch (IllegalArgumentException ex) {
+ // Quietly ignore.
+ }
+ }
+ return (false);
+ }
+
+ public void setAsText(String s) throws java.lang.IllegalArgumentException {
+ if (s == null) {
+ changeColor(null);
+ return;
+ }
+ int c1 = s.indexOf(',');
+ int c2 = s.indexOf(',', c1+1);
+ if (c1 < 0 || c2 < 0) {
+ // Invalid string.
+ throw new IllegalArgumentException(s);
+ }
+ try {
+ int r = Integer.parseInt(s.substring(0,c1));
+ int g = Integer.parseInt(s.substring(c1+1, c2));
+ int b = Integer.parseInt(s.substring(c2+1));
+ Color c = new Color(r,g,b);
+ changeColor(c);
+ } catch (Exception ex) {
+ throw new IllegalArgumentException(s);
+ }
+
+ }
+
+ public boolean action(Event e, Object arg) {
+ if (e.target == choser) {
+ changeColor(colors[choser.getSelectedIndex()]);
+ }
+ return false;
+ }
+
+ public String getJavaInitializationString() {
+ return (this.color != null)
+ ? "new java.awt.Color(" + this.color.getRGB() + ",true)"
+ : "null";
+ }
+
+
+ private void changeColor(Color c) {
+
+ if (c == null) {
+ this.color = null;
+ this.text.setText("");
+ return;
+ }
+
+ color = c;
+
+ text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue());
+
+ int active = 0;
+ for (int i = 0; i < colorNames.length; i++) {
+ if (color.equals(colors[i])) {
+ active = i;
+ }
+ }
+ choser.select(active);
+
+ sample.setBackground(color);
+ sample.repaint();
+
+ support.firePropertyChange("", null, null);
+ }
+
+ public Object getValue() {
+ return color;
+ }
+
+ public boolean isPaintable() {
+ return true;
+ }
+
+ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
+ Color oldColor = gfx.getColor();
+ gfx.setColor(Color.black);
+ gfx.drawRect(box.x, box.y, box.width-3, box.height-3);
+ gfx.setColor(color);
+ gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4);
+ gfx.setColor(oldColor);
+ }
+
+ public String getAsText() {
+ return (this.color != null)
+ ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
+ : null;
+ }
+
+ public String[] getTags() {
+ return null;
+ }
+
+ public java.awt.Component getCustomEditor() {
+ return this;
+ }
+
+ public boolean supportsCustomEditor() {
+ return true;
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener l) {
+ support.addPropertyChangeListener(l);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener l) {
+ support.removePropertyChangeListener(l);
+ }
+
+
+ private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray",
+ "black", "red", "pink", "orange",
+ "yellow", "green", "magenta", "cyan",
+ "blue"};
+ private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
+ Color.black, Color.red, Color.pink, Color.orange,
+ Color.yellow, Color.green, Color.magenta, Color.cyan,
+ Color.blue};
+
+ private Canvas sample;
+ private int sampleHeight = 20;
+ private int sampleWidth = 40;
+ private int hPad = 5;
+ private int ourWidth;
+
+ private Color color;
+ private TextField text;
+ private Choice choser;
+
+ private PropertyChangeSupport support = new PropertyChangeSupport(this);
+}
--- jdk/src/share/classes/com/sun/beans/editors/DoubleEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/DoubleEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "double" type.
+ *
+ */
+
+import java.beans.*;
+
+public class DoubleEditor extends NumberEditor {
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Double.valueOf(text));
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,143 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.beans.editors;
+
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyEditor;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Property editor for java.lang.Enum subclasses.
+ *
+ * @see PropertyEditor
+ *
+ * @since 1.7
+ *
+ * @author Sergey A. Malenkov
+ */
+public class EnumEditor implements PropertyEditor {
+ private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
+
+ private final Class type;
+ private final String[] tags;
+
+ private Object value;
+
+ public EnumEditor( Class type ) {
+ Object[] values = type.getEnumConstants();
+ if ( values == null ) {
+ throw new IllegalArgumentException( "Unsupported " + type );
+ }
+ this.type = type;
+ this.tags = new String[values.length];
+ for ( int i = 0; i < values.length; i++ ) {
+ this.tags[i] = ( ( Enum )values[i] ).name();
+ }
+ }
+
+ public Object getValue() {
+ return this.value;
+ }
+
+ public void setValue( Object value ) {
+ if ( ( value != null ) && !this.type.isInstance( value ) ) {
+ throw new IllegalArgumentException( "Unsupported value: " + value );
+ }
+ Object oldValue;
+ PropertyChangeListener[] listeners;
+ synchronized ( this.listeners ) {
+ oldValue = this.value;
+ this.value = value;
+
+ if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) {
+ return; // do not fire event if value is not changed
+ }
+ int size = this.listeners.size();
+ if ( size == 0 ) {
+ return; // do not fire event if there are no any listener
+ }
+ listeners = this.listeners.toArray( new PropertyChangeListener[size] );
+ }
+ PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value );
+ for ( PropertyChangeListener listener : listeners ) {
+ listener.propertyChange( event );
+ }
+ }
+
+ public String getAsText() {
+ return ( this.value != null )
+ ? ( ( Enum )this.value ).name()
+ : null;
+ }
+
+ public void setAsText( String text ) {
+ setValue( ( text != null )
+ ? Enum.valueOf( this.type, text )
+ : null );
+ }
+
+ public String[] getTags() {
+ return this.tags.clone();
+ }
+
+ public String getJavaInitializationString() {
+ String name = getAsText();
+ return ( name != null )
+ ? this.type.getName() + '.' + name
+ : "null";
+ }
+
+ public boolean isPaintable() {
+ return false;
+ }
+
+ public void paintValue( Graphics gfx, Rectangle box ) {
+ }
+
+ public boolean supportsCustomEditor() {
+ return false;
+ }
+
+ public Component getCustomEditor() {
+ return null;
+ }
+
+ public void addPropertyChangeListener( PropertyChangeListener listener ) {
+ synchronized ( this.listeners ) {
+ this.listeners.add( listener );
+ }
+ }
+
+ public void removePropertyChangeListener( PropertyChangeListener listener ) {
+ synchronized ( this.listeners ) {
+ this.listeners.remove( listener );
+ }
+ }
+}
--- jdk/src/share/classes/com/sun/beans/editors/FloatEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/FloatEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "float" type.
+ *
+ */
+
+import java.beans.*;
+
+public class FloatEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value + "F"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Float.valueOf(text));
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/FontEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/FontEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,219 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+import java.awt.*;
+import java.beans.*;
+
+public class FontEditor extends Panel implements java.beans.PropertyEditor {
+ private static final long serialVersionUID = 6732704486002715933L;
+
+ public FontEditor() {
+ setLayout(null);
+
+ toolkit = Toolkit.getDefaultToolkit();
+ fonts = toolkit.getFontList();
+
+ familyChoser = new Choice();
+ for (int i = 0; i < fonts.length; i++) {
+ familyChoser.addItem(fonts[i]);
+ }
+ add(familyChoser);
+ familyChoser.reshape(20, 5, 100, 30);
+
+ styleChoser = new Choice();
+ for (int i = 0; i < styleNames.length; i++) {
+ styleChoser.addItem(styleNames[i]);
+ }
+ add(styleChoser);
+ styleChoser.reshape(145, 5, 70, 30);
+
+ sizeChoser = new Choice();
+ for (int i = 0; i < pointSizes.length; i++) {
+ sizeChoser.addItem("" + pointSizes[i]);
+ }
+ add(sizeChoser);
+ sizeChoser.reshape(220, 5, 70, 30);
+
+ resize(300,40);
+ }
+
+
+ public Dimension preferredSize() {
+ return new Dimension(300, 40);
+ }
+
+ public void setValue(Object o) {
+ font = (Font) o;
+ if (this.font == null)
+ return;
+
+ changeFont(font);
+ // Update the current GUI choices.
+ for (int i = 0; i < fonts.length; i++) {
+ if (fonts[i].equals(font.getFamily())) {
+ familyChoser.select(i);
+ break;
+ }
+ }
+ for (int i = 0; i < styleNames.length; i++) {
+ if (font.getStyle() == styles[i]) {
+ styleChoser.select(i);
+ break;
+ }
+ }
+ for (int i = 0; i < pointSizes.length; i++) {
+ if (font.getSize() <= pointSizes[i]) {
+ sizeChoser.select(i);
+ break;
+ }
+ }
+ }
+
+ private void changeFont(Font f) {
+ font = f;
+ if (sample != null) {
+ remove(sample);
+ }
+ sample = new Label(sampleText);
+ sample.setFont(font);
+ add(sample);
+ Component p = getParent();
+ if (p != null) {
+ p.invalidate();
+ p.layout();
+ }
+ invalidate();
+ layout();
+ repaint();
+ support.firePropertyChange("", null, null);
+ }
+
+ public Object getValue() {
+ return (font);
+ }
+
+ public String getJavaInitializationString() {
+ if (this.font == null)
+ return "null";
+
+ return "new java.awt.Font(\"" + font.getName() + "\", " +
+ font.getStyle() + ", " + font.getSize() + ")";
+ }
+
+ public boolean action(Event e, Object arg) {
+ String family = familyChoser.getSelectedItem();
+ int style = styles[styleChoser.getSelectedIndex()];
+ int size = pointSizes[sizeChoser.getSelectedIndex()];
+ try {
+ Font f = new Font(family, style, size);
+ changeFont(f);
+ } catch (Exception ex) {
+ System.err.println("Couldn't create font " + family + "-" +
+ styleNames[style] + "-" + size);
+ }
+ return (false);
+ }
+
+
+ public boolean isPaintable() {
+ return true;
+ }
+
+ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
+ // Silent noop.
+ Font oldFont = gfx.getFont();
+ gfx.setFont(font);
+ FontMetrics fm = gfx.getFontMetrics();
+ int vpad = (box.height - fm.getAscent())/2;
+ gfx.drawString(sampleText, 0, box.height-vpad);
+ gfx.setFont(oldFont);
+ }
+
+ public String getAsText() {
+ if (this.font == null) {
+ return null;
+ }
+ StringBuilder sb = new StringBuilder();
+ sb.append(this.font.getName());
+ sb.append(' ');
+
+ boolean b = this.font.isBold();
+ if (b) {
+ sb.append("BOLD");
+ }
+ boolean i = this.font.isItalic();
+ if (i) {
+ sb.append("ITALIC");
+ }
+ if (b || i) {
+ sb.append(' ');
+ }
+ sb.append(this.font.getSize());
+ return sb.toString();
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Font.decode(text));
+ }
+
+ public String[] getTags() {
+ return null;
+ }
+
+ public java.awt.Component getCustomEditor() {
+ return this;
+ }
+
+ public boolean supportsCustomEditor() {
+ return true;
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener l) {
+ support.addPropertyChangeListener(l);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener l) {
+ support.removePropertyChangeListener(l);
+ }
+
+ private Font font;
+ private Toolkit toolkit;
+ private String sampleText = "Abcde...";
+
+ private Label sample;
+ private Choice familyChoser;
+ private Choice styleChoser;
+ private Choice sizeChoser;
+
+ private String fonts[];
+ private String[] styleNames = { "plain", "bold", "italic" };
+ private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC };
+ private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 };
+
+ private PropertyChangeSupport support = new PropertyChangeSupport(this);
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/IntegerEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/IntegerEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "int" type.
+ *
+ */
+
+import java.beans.*;
+
+public class IntegerEditor extends NumberEditor {
+
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Integer.decode(text));
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/LongEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/LongEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "long" type.
+ *
+ */
+
+import java.beans.*;
+
+public class LongEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value + "L"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Long.decode(text));
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/NumberEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/NumberEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,44 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Abstract Property editor for a java builtin number types.
+ *
+ */
+
+import java.beans.*;
+
+abstract public class NumberEditor extends PropertyEditorSupport {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value.toString()
+ : "null";
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/ShortEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/ShortEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "short" type.
+ *
+ */
+
+import java.beans.*;
+
+public class ShortEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? "((short)" + value + ")"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Short.decode(text));
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/editors/StringEditor.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/editors/StringEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,74 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package com.sun.beans.editors;
+
+import java.beans.*;
+
+public class StringEditor extends PropertyEditorSupport {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ if (value == null)
+ return "null";
+
+ String str = value.toString();
+ int length = str.length();
+ StringBuilder sb = new StringBuilder(length + 2);
+ sb.append('"');
+ for (int i = 0; i < length; i++) {
+ char ch = str.charAt(i);
+ switch (ch) {
+ case '\b': sb.append("\\b"); break;
+ case '\t': sb.append("\\t"); break;
+ case '\n': sb.append("\\n"); break;
+ case '\f': sb.append("\\f"); break;
+ case '\r': sb.append("\\r"); break;
+ case '\"': sb.append("\\\""); break;
+ case '\\': sb.append("\\\\"); break;
+ default:
+ if ((ch < ' ') || (ch > '~')) {
+ sb.append("\\u");
+ String hex = Integer.toHexString((int) ch);
+ for (int len = hex.length(); len < 4; len++) {
+ sb.append('0');
+ }
+ sb.append(hex);
+ } else {
+ sb.append(ch);
+ }
+ break;
+ }
+ }
+ sb.append('"');
+ return sb.toString();
+ }
+
+ public void setAsText(String text) {
+ setValue(text);
+ }
+
+}
--- jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java 2012-08-10 10:23:32.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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,6 +42,7 @@
extends InstanceFinder<BeanInfo> {
private static final String DEFAULT = "sun.beans.infos";
+ private static final String DEFAULT_NEW = "com.sun.beans.infos";
public BeanInfoFinder() {
super(BeanInfo.class, true, "BeanInfo", DEFAULT);
@@ -53,10 +54,13 @@
@Override
protected BeanInfo instantiate(Class<?> type, String prefix, String name) {
+ if (DEFAULT.equals(prefix)) {
+ prefix = DEFAULT_NEW;
+ }
// this optimization will only use the BeanInfo search path
// if is has changed from the original
// or trying to get the ComponentBeanInfo
- BeanInfo info = !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name)
+ BeanInfo info = !DEFAULT_NEW.equals(prefix) || "ComponentBeanInfo".equals(name)
? super.instantiate(type, prefix, name)
: null;
--- jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java 2012-08-10 10:23:33.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2008, 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
@@ -24,6 +24,8 @@
*/
package com.sun.beans.finder;
+import static sun.reflect.misc.ReflectUtil.checkPackageAccess;
+
/**
* This is utility class that provides {@code static} methods
* to find a class with the specified name using the specified class loader.
@@ -54,6 +56,7 @@
* @see Thread#getContextClassLoader()
*/
public static Class<?> findClass(String name) throws ClassNotFoundException {
+ checkPackageAccess(name);
try {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
@@ -94,6 +97,7 @@
* @see Class#forName(String,boolean,ClassLoader)
*/
public static Class<?> findClass(String name, ClassLoader loader) throws ClassNotFoundException {
+ checkPackageAccess(name);
if (loader != null) {
try {
return Class.forName(name, false, loader);
--- jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java 2012-08-10 10:23:33.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -29,6 +29,8 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
+import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
+
/**
* This utility class provides {@code static} methods
* to find a public constructor with specified parameter types
@@ -61,7 +63,7 @@
if (Modifier.isAbstract(type.getModifiers())) {
throw new NoSuchMethodException("Abstract class cannot be instantiated");
}
- if (!Modifier.isPublic(type.getModifiers())) {
+ if (!Modifier.isPublic(type.getModifiers()) || !isPackageAccessible(type)) {
throw new NoSuchMethodException("Class is not accessible");
}
PrimitiveWrapperMap.replacePrimitivesWithWrappers(args);
--- jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java 2012-08-10 10:23:33.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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,6 +27,8 @@
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
+import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
+
/**
* This utility class provides {@code static} methods
* to find a public field with specified name
@@ -56,7 +58,8 @@
if (!Modifier.isPublic(field.getModifiers())) {
throw new NoSuchFieldException("Field '" + name + "' is not public");
}
- if (!Modifier.isPublic(field.getDeclaringClass().getModifiers())) {
+ type = field.getDeclaringClass();
+ if (!Modifier.isPublic(type.getModifiers()) || !isPackageAccessible(type)) {
throw new NoSuchFieldException("Field '" + name + "' is not accessible");
}
return field;
--- jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java 2012-08-10 10:23:33.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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,8 @@
import java.lang.reflect.Type;
import java.util.Arrays;
+import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
+
/**
* This utility class provides {@code static} methods
* to find a public method with specified name and parameter types
@@ -120,7 +122,7 @@
*/
public static Method findAccessibleMethod(Method method) throws NoSuchMethodException {
Class<?> type = method.getDeclaringClass();
- if (Modifier.isPublic(type.getModifiers())) {
+ if (Modifier.isPublic(type.getModifiers()) && isPackageAccessible(type)) {
return method;
}
if (Modifier.isStatic(method.getModifiers())) {
@@ -164,10 +166,8 @@
return findAccessibleMethod(m);
}
Type[] gpts = m.getGenericParameterTypes();
- if (params.length == gpts.length) {
- if (Arrays.equals(params, TypeResolver.erase(TypeResolver.resolve(pt, gpts)))) {
- return findAccessibleMethod(m);
- }
+ if (Arrays.equals(params, TypeResolver.erase(TypeResolver.resolve(pt, gpts)))) {
+ return findAccessibleMethod(m);
}
}
}
--- jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java 2012-08-10 10:23:33.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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,14 +28,14 @@
import java.beans.PropertyEditor;
-import sun.beans.editors.BooleanEditor;
-import sun.beans.editors.ByteEditor;
-import sun.beans.editors.DoubleEditor;
-import sun.beans.editors.EnumEditor;
-import sun.beans.editors.FloatEditor;
-import sun.beans.editors.IntegerEditor;
-import sun.beans.editors.LongEditor;
-import sun.beans.editors.ShortEditor;
+import com.sun.beans.editors.BooleanEditor;
+import com.sun.beans.editors.ByteEditor;
+import com.sun.beans.editors.DoubleEditor;
+import com.sun.beans.editors.EnumEditor;
+import com.sun.beans.editors.FloatEditor;
+import com.sun.beans.editors.IntegerEditor;
+import com.sun.beans.editors.LongEditor;
+import com.sun.beans.editors.ShortEditor;
/**
* This is utility class that provides functionality
@@ -48,10 +48,13 @@
public final class PropertyEditorFinder
extends InstanceFinder<PropertyEditor> {
+ private static final String DEFAULT = "sun.beans.editors";
+ private static final String DEFAULT_NEW = "com.sun.beans.editors";
+
private final WeakCache<Class<?>, Class<?>> registry;
public PropertyEditorFinder() {
- super(PropertyEditor.class, false, "Editor", "sun.beans.editors");
+ super(PropertyEditor.class, false, "Editor", DEFAULT);
this.registry = new WeakCache<Class<?>, Class<?>>();
this.registry.put(Byte.TYPE, ByteEditor.class);
@@ -84,4 +87,9 @@
}
return editor;
}
+
+ @Override
+ protected PropertyEditor instantiate(Class<?> type, String prefix, String name) {
+ return super.instantiate(type, DEFAULT.equals(prefix) ? DEFAULT_NEW : prefix, name);
+ }
}
--- jdk/src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,62 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.infos;
+
+import java.beans.*;
+
+/**
+ * BeanInfo descriptor for a standard AWT component.
+ */
+
+public class ComponentBeanInfo extends SimpleBeanInfo {
+ private static final Class beanClass = java.awt.Component.class;
+
+ public PropertyDescriptor[] getPropertyDescriptors() {
+ try {
+ PropertyDescriptor
+ name = new PropertyDescriptor("name", beanClass),
+ background = new PropertyDescriptor("background", beanClass),
+ foreground = new PropertyDescriptor("foreground", beanClass),
+ font = new PropertyDescriptor("font", beanClass),
+ enabled = new PropertyDescriptor("enabled", beanClass),
+ visible = new PropertyDescriptor("visible", beanClass),
+ focusable = new PropertyDescriptor("focusable", beanClass);
+
+ enabled.setExpert(true);
+ visible.setHidden(true);
+
+ background.setBound(true);
+ foreground.setBound(true);
+ font.setBound(true);
+ focusable.setBound(true);
+
+ PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable };
+ return rv;
+ } catch (IntrospectionException e) {
+ throw new Error(e.toString());
+ }
+ }
+}
--- jdk/src/share/classes/com/sun/crypto/provider/AESCrypt.java 2012-08-10 10:23:33.000000000 -0700
+++ jdk/src/share/classes/com/sun/crypto/provider/AESCrypt.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -37,6 +37,7 @@
package com.sun.crypto.provider;
import java.security.InvalidKeyException;
+import java.util.Arrays;
/**
* Rijndael --pronounced Reindaal-- is a symmetric cipher with a 128-bit
@@ -54,7 +55,12 @@
private Object[] sessionK = null;
private int[] K = null;
- /** (ROUNDS-1) * 4 */
+ /** Cipher encryption/decryption key */
+ // skip re-generating Session and Sub keys if the cipher key is
+ // the same
+ private byte[] lastKey = null;
+
+ /** ROUNDS * 4 */
private int limit = 0;
AESCrypt() {
@@ -82,41 +88,45 @@
key.length + " bytes");
}
- // generate session key and reset sub key.
- sessionK = makeKey(key);
- setSubKey(decrypting);
+ if (!Arrays.equals(key, lastKey)) {
+ // re-generate session key 'sessionK' when cipher key changes
+ makeSessionKey(key);
+ lastKey = key.clone(); // save cipher key
+ }
+
+ // set sub key to the corresponding session Key
+ this.K = (int[]) sessionK[(decrypting? 1:0)];
}
- private void setSubKey(boolean decrypting) {
- int[][] Kd = (int[][]) sessionK[decrypting ? 1 : 0];
- int rounds = Kd.length;
- this.K = new int[rounds*4];
- for(int i=0; i<rounds; i++) {
+ /**
+ * Expand an int[(ROUNDS+1)][4] into int[(ROUNDS+1)*4].
+ * For decryption round keys, need to rotate right by 4 ints.
+ * @param kr The round keys for encryption or decryption.
+ * @param decrypting True if 'kr' is for decryption and false otherwise.
+ */
+ private static final int[] expandToSubKey(int[][] kr, boolean decrypting) {
+ int total = kr.length;
+ int[] expK = new int[total*4];
+ if (decrypting) {
+ // decrypting, rotate right by 4 ints
+ // i.e. i==0
for(int j=0; j<4; j++) {
- K[i*4 + j] = Kd[i][j];
+ expK[j] = kr[total-1][j];
}
- }
-
- if (decrypting) {
- int j0 = K[K.length-4];
- int j1 = K[K.length-3];
- int j2 = K[K.length-2];
- int j3 = K[K.length-1];
-
- for (int i=this.K.length-1; i>3; i--) {
- this.K[i] = this.K[i-4];
+ for(int i=1; i<total; i++) {
+ for(int j=0; j<4; j++) {
+ expK[i*4 + j] = kr[i-1][j];
+ }
+ }
+ } else {
+ // encrypting, straight expansion
+ for(int i=0; i<total; i++) {
+ for(int j=0; j<4; j++) {
+ expK[i*4 + j] = kr[i][j];
+ }
}
- K[0] = j0;
- K[1] = j1;
- K[2] = j2;
- K[3] = j3;
}
-
- ROUNDS_12 = (rounds>=13);
- ROUNDS_14 = (rounds==15);
-
- rounds--;
- limit=rounds*4;
+ return expK;
}
private static int[]
@@ -566,10 +576,10 @@
/**
* Expand a user-supplied key material into a session key.
*
- * @param key The 128/192/256-bit user-key to use.
+ * @param k The 128/192/256-bit cipher key to use.
* @exception InvalidKeyException If the key is invalid.
*/
- private static Object[] makeKey(byte[] k) throws InvalidKeyException {
+ private void makeSessionKey(byte[] k) throws InvalidKeyException {
if (k == null) {
throw new InvalidKeyException("Empty key");
}
@@ -639,10 +649,18 @@
U4[ tt & 0xFF];
}
}
- // assemble the encryption (Ke) and decryption (Kd) round keys into
- // one sessionKey object
- Object[] result = new Object[] {Ke, Kd};
- return result;
+
+ // assemble the encryption (Ke) and decryption (Kd) round keys
+ // and expand them into arrays of ints.
+ int[] expandedKe = expandToSubKey(Ke, false); // decrypting==false
+ int[] expandedKd = expandToSubKey(Kd, true); // decrypting==true
+
+ ROUNDS_12 = (ROUNDS>=12);
+ ROUNDS_14 = (ROUNDS==14);
+ limit = ROUNDS*4;
+
+ // store the expanded sub keys into 'sessionK'
+ sessionK = new Object[] { expandedKe, expandedKd };
}
--- jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java 2012-08-10 10:24:01.000000000 -0700
+++ jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java 2013-01-16 08:58:10.000000000 -0800
@@ -30,6 +30,8 @@
import java.awt.Event;
import java.awt.KeyEventPostProcessor;
import java.awt.Window;
+import java.awt.Toolkit;
+import sun.awt.SunToolkit;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
@@ -125,7 +127,19 @@
}
JMenu menu = mbar != null ? mbar.getMenu(0) : null;
- if (menu != null) {
+ // It might happen that the altRelease event is processed
+ // with a reasonable delay since it has been generated.
+ // Here we check the last deactivation time of the containing
+ // window. If this time appears to be greater than the altRelease
+ // event time the event is skipped to avoid unexpected menu
+ // activation. See 7121442.
+ boolean skip = false;
+ Toolkit tk = Toolkit.getDefaultToolkit();
+ if (tk instanceof SunToolkit) {
+ skip = ev.getWhen() <= ((SunToolkit)tk).getWindowDeactivationTime(winAncestor);
+ }
+
+ if (menu != null && !skip) {
MenuElement[] path = new MenuElement[2];
path[0] = mbar;
path[1] = menu;
--- jdk/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java 2012-08-10 10:24:20.000000000 -0700
+++ jdk/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java 2013-01-16 08:58:10.000000000 -0800
@@ -68,9 +68,9 @@
this.notifBuffer = notifBuffer;
this.connectionId = connectionId;
connectionTimeout = EnvHelp.getServerConnectionTimeout(env);
- checkNotificationEmission = EnvHelp.computeBooleanFromString(
- env,
- "jmx.remote.x.check.notification.emission",false);
+
+ String stringBoolean = (String) env.get("jmx.remote.x.check.notification.emission");
+ checkNotificationEmission = EnvHelp.computeBooleanFromString( stringBoolean );
notificationAccessController =
EnvHelp.getNotificationAccessController(env);
}
--- jdk/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java 2012-08-10 10:24:20.000000000 -0700
+++ jdk/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java 2013-01-16 08:58:10.000000000 -0800
@@ -665,97 +665,57 @@
* Computes a boolean value from a string value retrieved from a
* property in the given map.
*
- * @param env the environment map.
- * @param prop the name of the property in the environment map whose
- * returned string value must be converted into a boolean value.
- * @param systemProperty if true, consult a system property of the
- * same name if there is no entry in the environment map.
+ * @param stringBoolean the string value that must be converted
+ * into a boolean value.
*
* @return
* <ul>
- * <li>{@code false} if {@code env.get(prop)} is {@code null}</li>
+ * <li>{@code false} if {@code stringBoolean} is {@code null}</li>
* <li>{@code false} if
- * {@code ((String)env.get(prop)).equalsIgnoreCase("false")}
+ * {@code stringBoolean.equalsIgnoreCase("false")}
* is {@code true}</li>
* <li>{@code true} if
- * {@code ((String)env.get(prop)).equalsIgnoreCase("true")}
+ * {@code stringBoolean.equalsIgnoreCase("true")}
* is {@code true}</li>
* </ul>
*
- * @throws IllegalArgumentException if {@code env} is {@code null} or
- * {@code env.get(prop)} is not {@code null} and
+ * @throws IllegalArgumentException if
* {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and
* {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are
* {@code false}.
- * @throws ClassCastException if {@code env.get(prop)} cannot be cast
- * to {@code String}.
*/
- public static boolean computeBooleanFromString(
- Map<String, ?> env, String prop, boolean systemProperty) {
-
- if (env == null)
- throw new IllegalArgumentException("env map cannot be null");
-
+ public static boolean computeBooleanFromString(String stringBoolean) {
// returns a default value of 'false' if no property is found...
- return computeBooleanFromString(env,prop,systemProperty,false);
+ return computeBooleanFromString(stringBoolean,false);
}
/**
* Computes a boolean value from a string value retrieved from a
* property in the given map.
*
- * @param env the environment map.
- * @param prop the name of the property in the environment map whose
- * returned string value must be converted into a boolean value.
- * @param systemProperty if true, consult a system property of the
- * same name if there is no entry in the environment map.
+ * @param stringBoolean the string value that must be converted
+ * into a boolean value.
* @param defaultValue a default value to return in case no property
* was defined.
*
* @return
* <ul>
- * <li>{@code defaultValue} if {@code env.get(prop)} is {@code null}
- * and {@code systemProperty} is {@code false}</li>
- * <li>{@code defaultValue} if {@code env.get(prop)} is {@code null}
- * and {@code systemProperty} is {@code true} and
- * {@code System.getProperty(prop)} is {@code null}</li>
- * <li>{@code false} if {@code env.get(prop)} is {@code null}
- * and {@code systemProperty} is {@code true} and
- * {@code System.getProperty(prop).equalsIgnoreCase("false")}
- * is {@code true}</li>
- * <li>{@code true} if {@code env.get(prop)} is {@code null}
- * and {@code systemProperty} is {@code true} and
- * {@code System.getProperty(prop).equalsIgnoreCase("true")}
- * is {@code true}</li>
+ * <li>{@code defaultValue} if {@code stringBoolean}
+ * is {@code null}</li>
* <li>{@code false} if
- * {@code ((String)env.get(prop)).equalsIgnoreCase("false")}
+ * {@code stringBoolean.equalsIgnoreCase("false")}
* is {@code true}</li>
* <li>{@code true} if
- * {@code ((String)env.get(prop)).equalsIgnoreCase("true")}
+ * {@code stringBoolean.equalsIgnoreCase("true")}
* is {@code true}</li>
* </ul>
*
- * @throws IllegalArgumentException if {@code env} is {@code null} or
- * {@code env.get(prop)} is not {@code null} and
+ * @throws IllegalArgumentException if
* {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and
* {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are
* {@code false}.
- * @throws ClassCastException if {@code env.get(prop)} cannot be cast
- * to {@code String}.
*/
- public static boolean computeBooleanFromString(
- Map<String, ?> env, String prop,
- boolean systemProperty, boolean defaultValue) {
-
- if (env == null)
- throw new IllegalArgumentException("env map cannot be null");
-
- String stringBoolean = (String) env.get(prop);
- if (stringBoolean == null && systemProperty) {
- stringBoolean =
- AccessController.doPrivileged(new GetPropertyAction(prop));
- }
-
+ public static boolean computeBooleanFromString( String stringBoolean, boolean defaultValue) {
if (stringBoolean == null)
return defaultValue;
else if (stringBoolean.equalsIgnoreCase("true"))
@@ -763,8 +723,8 @@
else if (stringBoolean.equalsIgnoreCase("false"))
return false;
else
- throw new IllegalArgumentException(prop +
- " must be \"true\" or \"false\" instead of \"" +
+ throw new IllegalArgumentException(
+ "Property value must be \"true\" or \"false\" instead of \"" +
stringBoolean + "\"");
}
--- jdk/src/share/classes/com/sun/jndi/ldap/Connection.java 2012-08-10 10:24:27.000000000 -0700
+++ jdk/src/share/classes/com/sun/jndi/ldap/Connection.java 2013-01-16 00:07:03.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -685,11 +685,9 @@
ldr = ldr.next;
}
}
+ parent.processConnectionClosure();
}
}
- if (nparent) {
- parent.processConnectionClosure();
- }
}
--- jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java 2012-08-10 10:24:27.000000000 -0700
+++ jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java 2013-01-16 00:07:03.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -487,16 +487,14 @@
*/
void processConnectionClosure() {
// Notify listeners
- synchronized (unsolicited) {
- if (unsolicited.size() > 0) {
- String msg;
- if (conn != null) {
- msg = conn.host + ":" + conn.port + " connection closed";
- } else {
- msg = "Connection closed";
- }
- notifyUnsolicited(new CommunicationException(msg));
+ if (unsolicited.size() > 0) {
+ String msg;
+ if (conn != null) {
+ msg = conn.host + ":" + conn.port + " connection closed";
+ } else {
+ msg = "Connection closed";
}
+ notifyUnsolicited(new CommunicationException(msg));
}
// Remove from pool
--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java 2012-08-10 10:25:05.000000000 -0700
+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java 2013-01-16 08:58:10.000000000 -0800
@@ -154,7 +154,7 @@
}
}
for (Node el=config.getFirstChild();el!=null;el=el.getNextSibling()) {
- if (!(el instanceof Element)) {
+ if (el.getNodeType() != Node.ELEMENT_NODE) {
continue;
}
String tag=el.getLocalName();
--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java 2012-08-10 10:25:07.000000000 -0700
+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java 2013-01-16 08:58:10.000000000 -0800
@@ -202,7 +202,7 @@
try {
NameSpaceSymbTable ns=new NameSpaceSymbTable();
int nodeLevel=NODE_BEFORE_DOCUMENT_ELEMENT;
- if (rootNode instanceof Element) {
+ if (rootNode != null && rootNode.getNodeType() == Node.ELEMENT_NODE) {
//Fills the nssymbtable with the definitions of the parent of the root subnode
getParentNameSpaces((Element)rootNode,ns);
nodeLevel=NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT;
@@ -332,7 +332,7 @@
return;
sibling=parentNode.getNextSibling();
parentNode=parentNode.getParentNode();
- if (!(parentNode instanceof Element)) {
+ if (parentNode !=null && parentNode.getNodeType() != Node.ELEMENT_NODE) {
documentLevel=NODE_AFTER_DOCUMENT_ELEMENT;
parentNode=null;
}
@@ -388,7 +388,7 @@
return;
boolean currentNodeIsVisible = false;
NameSpaceSymbTable ns=new NameSpaceSymbTable();
- if (currentNode instanceof Element)
+ if (currentNode != null && currentNode.getNodeType() == Node.ELEMENT_NODE)
getParentNameSpaces((Element)currentNode,ns);
Node sibling=null;
Node parentNode=null;
@@ -509,7 +509,7 @@
return;
sibling=parentNode.getNextSibling();
parentNode=parentNode.getParentNode();
- if (!(parentNode instanceof Element)) {
+ if (parentNode != null && parentNode.getNodeType() != Node.ELEMENT_NODE) {
parentNode=null;
documentLevel=NODE_AFTER_DOCUMENT_ELEMENT;
}
@@ -591,18 +591,14 @@
final void getParentNameSpaces(Element el,NameSpaceSymbTable ns) {
List parents=new ArrayList(10);
Node n1=el.getParentNode();
- if (!(n1 instanceof Element)) {
+ if (n1 == null || n1.getNodeType() != Node.ELEMENT_NODE) {
return;
}
//Obtain all the parents of the elemnt
- Element parent=(Element) n1;
- while (parent!=null) {
- parents.add(parent);
- Node n=parent.getParentNode();
- if (!(n instanceof Element )) {
- break;
- }
- parent=(Element)n;
+ Node parent = n1;
+ while (parent!=null && parent.getNodeType() == Node.ELEMENT_NODE) {
+ parents.add((Element)parent);
+ parent = parent.getParentNode();
}
//Visit them in reverse order.
ListIterator it=parents.listIterator(parents.size());
--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java 2012-08-10 10:25:08.000000000 -0700
+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java 2013-01-16 08:58:10.000000000 -0800
@@ -1445,7 +1445,7 @@
// The de-serialiser returns a fragment whose children we need to
// take on.
- if (sourceParent instanceof Document) {
+ if (sourceParent != null && sourceParent.getNodeType() == Node.DOCUMENT_NODE) {
// If this is a content decryption, this may have problems
--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java 2012-08-10 10:25:22.000000000 -0700
+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java 2013-01-16 08:58:10.000000000 -0800
@@ -283,7 +283,7 @@
Element e=null;
while (it.hasNext()) {
Node currentNode=(Node)it.next();
- if (currentNode instanceof Element) {
+ if (currentNode != null && currentNode.getNodeType() == Node.ELEMENT_NODE) {
e=(Element)currentNode;
break;
}
@@ -292,14 +292,14 @@
List parents=new ArrayList(10);
//Obtain all the parents of the elemnt
- do {
+ while (e != null) {
parents.add(e);
Node n=e.getParentNode();
- if (!(n instanceof Element )) {
+ if (n == null || n.getNodeType() != Node.ELEMENT_NODE) {
break;
}
e=(Element)n;
- } while (e!=null);
+ }
//Visit them in reverse order.
ListIterator it2=parents.listIterator(parents.size()-1);
Element ele=null;
--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java 2012-08-10 10:25:34.000000000 -0700
+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java 2013-01-16 08:58:10.000000000 -0800
@@ -223,7 +223,7 @@
} while (sibling==null && parentNode!=null) {
sibling=parentNode.getNextSibling();
parentNode=parentNode.getParentNode();
- if (!(parentNode instanceof Element)) {
+ if (parentNode != null && parentNode.getNodeType() != Node.ELEMENT_NODE) {
parentNode=null;
}
}
--- jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java 2012-08-10 10:25:37.000000000 -0700
+++ jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java 2013-01-16 08:58:10.000000000 -0800
@@ -146,7 +146,11 @@
*/
public RhinoScriptEngine() {
if (System.getSecurityManager() != null) {
- accCtxt = AccessController.getContext();
+ try {
+ AccessController.checkPermission(new AllPermission());
+ } catch (AccessControlException ace) {
+ accCtxt = AccessController.getContext();
+ }
}
Context cx = enterContext();
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties 2013-01-16 00:07:04.000000000 -0800
@@ -71,9 +71,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser help
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Open selected directory
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Preview
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser-Hilfe
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Ausgew\u00E4hltes Verzeichnis \u00F6ffnen
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Vorschau
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Ayuda del Selector de Archivos
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Abrir directorio seleccionado
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Vista Previa
ColorChooser.ok.textAndMnemonic=Aceptar
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Aide du s\u00E9lecteur de fichiers
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Ouvre le r\u00E9pertoire s\u00E9lectionn\u00E9
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Aper\u00E7u
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Guida FileChooser
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Apre la directory selezionata
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Anteprima
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser\u306E\u30D8\u30EB\u30D7\u3067\u3059
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u9078\u629E\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u958B\u304D\u307E\u3059
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\u30D7\u30EC\u30D3\u30E5\u30FC
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uB514\uB809\uD1A0\uB9AC \uC5F4\uAE30
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\uBBF8\uB9AC\uBCF4\uAE30
ColorChooser.ok.textAndMnemonic=\uD655\uC778
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Ajuda do FileChooser
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Abrir diret\u00F3rio selecionado
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Visualizar
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Hj\u00E4lp - Filv\u00E4ljare
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u00D6ppna vald katalog
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Granska
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \u5E2E\u52A9
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u6253\u5F00\u9009\u62E9\u7684\u76EE\u5F55
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\u9884\u89C8
ColorChooser.ok.textAndMnemonic=\u786E\u5B9A
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties 2013-01-16 00:07:04.000000000 -0800
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=\u300C\u6A94\u6848\u9078\u64C7\u5668\u300D\u8AAA\u660E
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u958B\u555F\u9078\u53D6\u7684\u76EE\u9304
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\u9810\u89BD
ColorChooser.ok.textAndMnemonic=\u78BA\u5B9A
--- jdk/src/share/classes/java/awt/AWTEvent.java 2012-08-10 10:25:54.000000000 -0700
+++ jdk/src/share/classes/java/awt/AWTEvent.java 2013-01-16 08:58:10.000000000 -0800
@@ -35,8 +35,6 @@
import java.security.AccessControlContext;
import java.security.AccessController;
-import java.io.ObjectInputStream;
-import java.io.IOException;
/**
* The root event class for all AWT events.
@@ -262,9 +260,11 @@
public void setPosted(AWTEvent ev) {
ev.isPosted = true;
}
+
public void setSystemGenerated(AWTEvent ev) {
ev.isSystemGenerated = true;
}
+
public boolean isSystemGenerated(AWTEvent ev) {
return ev.isSystemGenerated;
}
@@ -272,6 +272,15 @@
public AccessControlContext getAccessControlContext(AWTEvent ev) {
return ev.getAccessControlContext();
}
+
+ public byte[] getBData(AWTEvent ev) {
+ return ev.bdata;
+ }
+
+ public void setBData(AWTEvent ev, byte[] bdata) {
+ ev.bdata = bdata;
+ }
+
});
}
--- jdk/src/share/classes/java/awt/CheckboxMenuItem.java 2012-08-10 10:25:54.000000000 -0700
+++ jdk/src/share/classes/java/awt/CheckboxMenuItem.java 2013-01-16 08:58:10.000000000 -0800
@@ -31,6 +31,7 @@
import java.io.ObjectInputStream;
import java.io.IOException;
import javax.accessibility.*;
+import sun.awt.AWTAccessor;
/**
@@ -68,6 +69,13 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+
+ AWTAccessor.setCheckboxMenuItemAccessor(
+ new AWTAccessor.CheckboxMenuItemAccessor() {
+ public boolean getState(CheckboxMenuItem cmi) {
+ return cmi.state;
+ }
+ });
}
/**
--- jdk/src/share/classes/java/awt/Cursor.java 2012-08-10 10:25:55.000000000 -0700
+++ jdk/src/share/classes/java/awt/Cursor.java 2013-01-16 08:58:10.000000000 -0800
@@ -24,10 +24,6 @@
*/
package java.awt;
-import java.awt.AWTException;
-import java.awt.Point;
-import java.awt.Toolkit;
-
import java.io.File;
import java.io.FileInputStream;
@@ -39,6 +35,7 @@
import java.security.AccessController;
import sun.util.logging.PlatformLogger;
+import sun.awt.AWTAccessor;
/**
* A class to encapsulate the bitmap representation of the mouse cursor.
@@ -199,6 +196,21 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+
+ AWTAccessor.setCursorAccessor(
+ new AWTAccessor.CursorAccessor() {
+ public long getPData(Cursor cursor) {
+ return cursor.pData;
+ }
+
+ public void setPData(Cursor cursor, long pData) {
+ cursor.pData = pData;
+ }
+
+ public int getType(Cursor cursor) {
+ return cursor.type;
+ }
+ });
}
/**
--- jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java 2012-08-10 10:25:55.000000000 -0700
+++ jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java 2013-01-16 08:58:10.000000000 -0800
@@ -39,6 +39,7 @@
import sun.awt.AppContext;
import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
import sun.awt.CausedFocusEvent;
/**
@@ -75,6 +76,15 @@
typeAheadMarkers = new LinkedList();
private boolean consumeNextKeyTyped;
+ static {
+ AWTAccessor.setDefaultKeyboardFocusManagerAccessor(
+ new AWTAccessor.DefaultKeyboardFocusManagerAccessor() {
+ public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e) {
+ dkfm.consumeNextKeyTyped(e);
+ }
+ });
+ }
+
private static class TypeAheadMarker {
long after;
Component untilFocused;
--- jdk/src/share/classes/java/awt/EventDispatchThread.java 2012-08-10 10:25:55.000000000 -0700
+++ jdk/src/share/classes/java/awt/EventDispatchThread.java 2013-01-16 08:58:10.000000000 -0800
@@ -67,8 +67,7 @@
private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
private EventQueue theQueue;
- private boolean doDispatch = true;
- private volatile boolean shutdown = false;
+ private volatile boolean doDispatch = true;
private static final int ANY_EVENT = -1;
@@ -86,11 +85,6 @@
doDispatch = false;
}
- public void interrupt() {
- shutdown = true;
- super.interrupt();
- }
-
public void run() {
while (true) {
try {
@@ -100,7 +94,12 @@
}
});
} finally {
- if(getEventQueue().detachDispatchThread(this, shutdown)) {
+ // 7189350: doDispatch is reset from stopDispatching(),
+ // on InterruptedException, or ThreadDeath. Either way,
+ // this indicates that we must force shutting down.
+ if (getEventQueue().detachDispatchThread(this,
+ !doDispatch || isInterrupted()))
+ {
break;
}
}
@@ -158,8 +157,7 @@
void pumpEventsForFilter(int id, Conditional cond, EventFilter filter) {
addEventFilter(filter);
doDispatch = true;
- shutdown |= isInterrupted();
- while (doDispatch && !shutdown && cond.evaluate()) {
+ while (doDispatch && !isInterrupted() && cond.evaluate()) {
pumpOneEventForFilters(id);
}
removeEventFilter(filter);
@@ -247,12 +245,12 @@
}
}
catch (ThreadDeath death) {
- shutdown = true;
+ doDispatch = false;
throw death;
}
catch (InterruptedException interruptedException) {
- shutdown = true; // AppContext.dispose() interrupts all
- // Threads in the AppContext
+ doDispatch = false; // AppContext.dispose() interrupts all
+ // Threads in the AppContext
}
catch (Throwable e) {
processException(e);
--- jdk/src/share/classes/java/awt/EventQueue.java 2012-08-10 10:25:55.000000000 -0700
+++ jdk/src/share/classes/java/awt/EventQueue.java 2013-01-16 08:58:10.000000000 -0800
@@ -52,7 +52,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.security.AccessControlContext;
-import java.security.ProtectionDomain;
import sun.misc.SharedSecrets;
import sun.misc.JavaSecurityAccess;
@@ -188,6 +187,17 @@
public boolean isDispatchThreadImpl(EventQueue eventQueue) {
return eventQueue.isDispatchThreadImpl();
}
+ public void removeSourceEvents(EventQueue eventQueue,
+ Object source,
+ boolean removeAllEvents) {
+ eventQueue.removeSourceEvents(source, removeAllEvents);
+ }
+ public boolean noEvents(EventQueue eventQueue) {
+ return eventQueue.noEvents();
+ }
+ public void wakeup(EventQueue eventQueue, boolean isShutdown) {
+ eventQueue.wakeup(isShutdown);
+ }
});
}
--- jdk/src/share/classes/java/awt/KeyboardFocusManager.java 2012-08-10 10:25:56.000000000 -0700
+++ jdk/src/share/classes/java/awt/KeyboardFocusManager.java 2013-01-16 08:58:10.000000000 -0800
@@ -56,7 +56,6 @@
import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
-import sun.awt.HeadlessToolkit;
import sun.awt.SunToolkit;
import sun.awt.CausedFocusEvent;
import sun.awt.KeyboardFocusManagerPeerProvider;
@@ -148,6 +147,9 @@
public KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx) {
return KeyboardFocusManager.getCurrentKeyboardFocusManager(ctx);
}
+ public Container getCurrentFocusCycleRoot() {
+ return KeyboardFocusManager.currentFocusCycleRoot;
+ }
}
);
}
--- jdk/src/share/classes/java/awt/Menu.java 2012-08-10 10:25:56.000000000 -0700
+++ jdk/src/share/classes/java/awt/Menu.java 2013-01-16 08:58:10.000000000 -0800
@@ -31,6 +31,7 @@
import java.awt.peer.MenuPeer;
import java.awt.event.KeyEvent;
import javax.accessibility.*;
+import sun.awt.AWTAccessor;
/**
* A <code>Menu</code> object is a pull-down menu component
@@ -62,6 +63,13 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+
+ AWTAccessor.setMenuAccessor(
+ new AWTAccessor.MenuAccessor() {
+ public Vector getItems(Menu menu) {
+ return menu.items;
+ }
+ });
}
/**
--- jdk/src/share/classes/java/awt/MenuBar.java 2012-08-10 10:25:56.000000000 -0700
+++ jdk/src/share/classes/java/awt/MenuBar.java 2013-01-16 08:58:10.000000000 -0800
@@ -28,6 +28,7 @@
import java.io.ObjectInputStream;
import java.util.Vector;
import java.util.Enumeration;
+import sun.awt.AWTAccessor;
import java.awt.peer.MenuBarPeer;
import java.awt.event.KeyEvent;
import javax.accessibility.*;
@@ -74,6 +75,16 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+ AWTAccessor.setMenuBarAccessor(
+ new AWTAccessor.MenuBarAccessor() {
+ public Menu getHelpMenu(MenuBar menuBar) {
+ return menuBar.helpMenu;
+ }
+
+ public Vector getMenus(MenuBar menuBar) {
+ return menuBar.menus;
+ }
+ });
}
/**
--- jdk/src/share/classes/java/awt/MenuComponent.java 2012-08-10 10:25:56.000000000 -0700
+++ jdk/src/share/classes/java/awt/MenuComponent.java 2013-01-16 08:58:10.000000000 -0800
@@ -29,7 +29,6 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import sun.awt.AppContext;
-import sun.awt.SunToolkit;
import sun.awt.AWTAccessor;
import javax.accessibility.*;
@@ -143,6 +142,9 @@
public MenuContainer getParent(MenuComponent menuComp) {
return menuComp.parent;
}
+ public Font getFont_NoClientCode(MenuComponent menuComp) {
+ return menuComp.getFont_NoClientCode();
+ }
});
}
--- jdk/src/share/classes/java/awt/MenuItem.java 2012-08-10 10:25:56.000000000 -0700
+++ jdk/src/share/classes/java/awt/MenuItem.java 2013-01-16 08:58:10.000000000 -0800
@@ -31,7 +31,7 @@
import java.io.ObjectInputStream;
import java.io.IOException;
import javax.accessibility.*;
-
+import sun.awt.AWTAccessor;
/**
* All items in a menu must belong to the class
@@ -76,6 +76,29 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+
+ AWTAccessor.setMenuItemAccessor(
+ new AWTAccessor.MenuItemAccessor() {
+ public boolean isEnabled(MenuItem item) {
+ return item.enabled;
+ }
+
+ public String getLabel(MenuItem item) {
+ return item.label;
+ }
+
+ public MenuShortcut getShortcut(MenuItem item) {
+ return item.shortcut;
+ }
+
+ public String getActionCommandImpl(MenuItem item) {
+ return item.getActionCommandImpl();
+ }
+
+ public boolean isItemEnabled(MenuItem item) {
+ return item.isItemEnabled();
+ }
+ });
}
/**
--- jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java 2012-08-10 10:25:57.000000000 -0700
+++ jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java 2013-01-16 08:58:10.000000000 -0800
@@ -24,6 +24,8 @@
*/
package java.awt;
+import sun.awt.AWTAccessor;
+
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.peer.ScrollPanePeer;
@@ -156,6 +158,13 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+ AWTAccessor.setScrollPaneAdjustableAccessor(
+ new AWTAccessor.ScrollPaneAdjustableAccessor() {
+ public void setTypedValue(final ScrollPaneAdjustable adj,
+ final int v, final int type) {
+ adj.setTypedValue(v, type);
+ }
+ });
}
/**
--- jdk/src/share/classes/java/awt/SequencedEvent.java 2012-08-10 10:25:57.000000000 -0700
+++ jdk/src/share/classes/java/awt/SequencedEvent.java 2013-01-16 08:58:10.000000000 -0800
@@ -26,6 +26,7 @@
package java.awt;
import java.util.LinkedList;
+import sun.awt.AWTAccessor;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
@@ -54,6 +55,17 @@
private AppContext appContext;
private boolean disposed;
+ static {
+ AWTAccessor.setSequencedEventAccessor(new AWTAccessor.SequencedEventAccessor() {
+ public AWTEvent getNested(AWTEvent sequencedEvent) {
+ return ((SequencedEvent)sequencedEvent).nested;
+ }
+ public boolean isSequencedEvent(AWTEvent event) {
+ return event instanceof SequencedEvent;
+ }
+ });
+ }
+
/**
* Constructs a new SequencedEvent which will dispatch the specified
* nested event.
--- jdk/src/share/classes/java/awt/SystemTray.java 2012-08-10 10:25:57.000000000 -0700
+++ jdk/src/share/classes/java/awt/SystemTray.java 2013-01-16 08:58:10.000000000 -0800
@@ -33,6 +33,7 @@
import sun.awt.SunToolkit;
import sun.awt.HeadlessToolkit;
import sun.security.util.SecurityConstants;
+import sun.awt.AWTAccessor;
/**
* The <code>SystemTray</code> class represents the system tray for a
@@ -127,6 +128,18 @@
private static final TrayIcon[] EMPTY_TRAY_ARRAY = new TrayIcon[0];
+ static {
+ AWTAccessor.setSystemTrayAccessor(
+ new AWTAccessor.SystemTrayAccessor() {
+ public void firePropertyChange(SystemTray tray,
+ String propertyName,
+ Object oldValue,
+ Object newValue) {
+ tray.firePropertyChange(propertyName, oldValue, newValue);
+ }
+ });
+ }
+
/**
* Private <code>SystemTray</code> constructor.
*
--- jdk/src/share/classes/java/awt/TextComponent.java 2012-08-10 10:25:57.000000000 -0700
+++ jdk/src/share/classes/java/awt/TextComponent.java 2013-01-16 00:07:05.000000000 -0800
@@ -233,14 +233,9 @@
* @see java.awt.TextComponent#getText
*/
public synchronized void setText(String t) {
- boolean skipTextEvent = (text == null || text.isEmpty())
- && (t == null || t.isEmpty());
text = (t != null) ? t : "";
TextComponentPeer peer = (TextComponentPeer)this.peer;
- // Please note that we do not want to post an event
- // if TextArea.setText() or TextField.setText() replaces an empty text
- // by an empty text, that is, if component's text remains unchanged.
- if (peer != null && !skipTextEvent) {
+ if (peer != null) {
peer.setText(text);
}
}
--- jdk/src/share/classes/java/awt/TrayIcon.java 2012-08-10 10:25:58.000000000 -0700
+++ jdk/src/share/classes/java/awt/TrayIcon.java 2013-01-16 08:58:10.000000000 -0800
@@ -25,19 +25,11 @@
package java.awt;
-import java.awt.Point;
-import java.awt.Toolkit;
-import java.awt.GraphicsEnvironment;
import java.awt.event.*;
-import java.awt.AWTEvent;
-import java.awt.AWTEventMulticaster;
-import java.awt.EventQueue;
-import java.awt.PopupMenu;
-import java.awt.Image;
-import java.util.EventListener;
import java.awt.peer.TrayIconPeer;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
import sun.awt.HeadlessToolkit;
import java.util.EventObject;
import java.security.AccessControlContext;
@@ -129,6 +121,16 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+
+ AWTAccessor.setTrayIconAccessor(
+ new AWTAccessor.TrayIconAccessor() {
+ public void addNotify(TrayIcon trayIcon) throws AWTException {
+ trayIcon.addNotify();
+ }
+ public void removeNotify(TrayIcon trayIcon) {
+ trayIcon.removeNotify();
+ }
+ });
}
private TrayIcon()
--- jdk/src/share/classes/java/awt/event/KeyEvent.java 2012-08-10 10:26:01.000000000 -0700
+++ jdk/src/share/classes/java/awt/event/KeyEvent.java 2013-01-16 08:58:10.000000000 -0800
@@ -25,12 +25,12 @@
package java.awt.event;
-import java.awt.Event;
import java.awt.Component;
import java.awt.GraphicsEnvironment;
import java.awt.Toolkit;
import java.io.IOException;
import java.io.ObjectInputStream;
+import sun.awt.AWTAccessor;
/**
* An event which indicates that a keystroke occurred in a component.
@@ -914,6 +914,23 @@
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
+
+ AWTAccessor.setKeyEventAccessor(
+ new AWTAccessor.KeyEventAccessor() {
+ public void setRawCode(KeyEvent ev, long rawCode) {
+ ev.rawCode = rawCode;
+ }
+
+ public void setPrimaryLevelUnicode(KeyEvent ev,
+ long primaryLevelUnicode) {
+ ev.primaryLevelUnicode = primaryLevelUnicode;
+ }
+
+ public void setExtendedKeyCode(KeyEvent ev,
+ long extendedKeyCode) {
+ ev.extendedKeyCode = extendedKeyCode;
+ }
+ });
}
/**
--- jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java 2012-08-10 10:26:08.000000000 -0700
+++ jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java 2013-01-16 08:58:10.000000000 -0800
@@ -181,21 +181,20 @@
// the Indexed readMethod was explicitly set to null.
return null;
}
- String nextMethodName = Introspector.GET_PREFIX + getBaseName();
if (indexedReadMethodName == null) {
Class type = getIndexedPropertyType0();
if (type == boolean.class || type == null) {
indexedReadMethodName = Introspector.IS_PREFIX + getBaseName();
} else {
- indexedReadMethodName = nextMethodName;
+ indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
}
}
Class[] args = { int.class };
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
- if ((indexedReadMethod == null) && !indexedReadMethodName.equals(nextMethodName)) {
+ if (indexedReadMethod == null) {
// no "is" method, so look for a "get" method.
- indexedReadMethodName = nextMethodName;
+ indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
}
setIndexedReadMethod0(indexedReadMethod);
@@ -495,6 +494,16 @@
indexedReadMethodName = old.indexedReadMethodName;
}
+ void updateGenericsFor(Class<?> type) {
+ super.updateGenericsFor(type);
+ try {
+ setIndexedPropertyType(findIndexedPropertyType(getIndexedReadMethod0(), getIndexedWriteMethod0()));
+ }
+ catch (IntrospectionException exception) {
+ setIndexedPropertyType(null);
+ }
+ }
+
/**
* Returns a hash code value for the object.
* See {@link java.lang.Object#hashCode} for a complete description.
--- jdk/src/share/classes/java/beans/Introspector.java 2012-08-10 10:26:08.000000000 -0700
+++ jdk/src/share/classes/java/beans/Introspector.java 2013-01-16 08:58:10.000000000 -0800
@@ -25,7 +25,6 @@
package java.beans;
-import com.sun.beans.TypeResolver;
import com.sun.beans.WeakCache;
import com.sun.beans.finder.ClassFinder;
@@ -35,7 +34,6 @@
import java.lang.ref.SoftReference;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
import java.util.Map;
import java.util.ArrayList;
@@ -574,26 +572,25 @@
// replace existing property descriptor
// only if we have types to resolve
// in the context of this.beanClass
- try {
- String name = pd.getName();
- Method read = pd.getReadMethod();
- Method write = pd.getWriteMethod();
- boolean cls = true;
- if (read != null) cls = cls && read.getGenericReturnType() instanceof Class;
- if (write != null) cls = cls && write.getGenericParameterTypes()[0] instanceof Class;
- if (pd instanceof IndexedPropertyDescriptor) {
- IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor)pd;
- Method readI = ipd.getIndexedReadMethod();
- Method writeI = ipd.getIndexedWriteMethod();
- if (readI != null) cls = cls && readI.getGenericReturnType() instanceof Class;
- if (writeI != null) cls = cls && writeI.getGenericParameterTypes()[1] instanceof Class;
- if (!cls) {
- pd = new IndexedPropertyDescriptor(this.beanClass, name, read, write, readI, writeI);
- }
- } else if (!cls) {
- pd = new PropertyDescriptor(this.beanClass, name, read, write);
+ Method read = pd.getReadMethod();
+ Method write = pd.getWriteMethod();
+ boolean cls = true;
+ if (read != null) cls = cls && read.getGenericReturnType() instanceof Class;
+ if (write != null) cls = cls && write.getGenericParameterTypes()[0] instanceof Class;
+ if (pd instanceof IndexedPropertyDescriptor) {
+ IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd;
+ Method readI = ipd.getIndexedReadMethod();
+ Method writeI = ipd.getIndexedWriteMethod();
+ if (readI != null) cls = cls && readI.getGenericReturnType() instanceof Class;
+ if (writeI != null) cls = cls && writeI.getGenericParameterTypes()[1] instanceof Class;
+ if (!cls) {
+ pd = new IndexedPropertyDescriptor((IndexedPropertyDescriptor) pd);
+ pd.updateGenericsFor(this.beanClass);
}
- } catch ( IntrospectionException e ) {
+ }
+ else if (!cls) {
+ pd = new PropertyDescriptor(pd);
+ pd.updateGenericsFor(this.beanClass);
}
}
list.add(pd);
@@ -953,61 +950,44 @@
continue;
}
- if (name.startsWith(ADD_PREFIX)) {
- Class<?> returnType = method.getReturnType();
- if (returnType == void.class) {
- Type[] parameterTypes = method.getGenericParameterTypes();
- if (parameterTypes.length == 1) {
- Class<?> type = TypeResolver.erase(TypeResolver.resolveInClass(beanClass, parameterTypes[0]));
- if (Introspector.isSubclass(type, eventListenerType)) {
- String listenerName = name.substring(3);
- if (listenerName.length() > 0 &&
- type.getName().endsWith(listenerName)) {
- if (adds == null) {
- adds = new HashMap();
- }
- adds.put(listenerName, method);
- }
- }
+ Class argTypes[] = FeatureDescriptor.getParameterTypes(beanClass, method);
+ Class resultType = FeatureDescriptor.getReturnType(beanClass, method);
+
+ if (name.startsWith(ADD_PREFIX) && argTypes.length == 1 &&
+ resultType == Void.TYPE &&
+ Introspector.isSubclass(argTypes[0], eventListenerType)) {
+ String listenerName = name.substring(3);
+ if (listenerName.length() > 0 &&
+ argTypes[0].getName().endsWith(listenerName)) {
+ if (adds == null) {
+ adds = new HashMap();
}
+ adds.put(listenerName, method);
}
}
- else if (name.startsWith(REMOVE_PREFIX)) {
- Class<?> returnType = method.getReturnType();
- if (returnType == void.class) {
- Type[] parameterTypes = method.getGenericParameterTypes();
- if (parameterTypes.length == 1) {
- Class<?> type = TypeResolver.erase(TypeResolver.resolveInClass(beanClass, parameterTypes[0]));
- if (Introspector.isSubclass(type, eventListenerType)) {
- String listenerName = name.substring(6);
- if (listenerName.length() > 0 &&
- type.getName().endsWith(listenerName)) {
- if (removes == null) {
- removes = new HashMap();
- }
- removes.put(listenerName, method);
- }
- }
+ else if (name.startsWith(REMOVE_PREFIX) && argTypes.length == 1 &&
+ resultType == Void.TYPE &&
+ Introspector.isSubclass(argTypes[0], eventListenerType)) {
+ String listenerName = name.substring(6);
+ if (listenerName.length() > 0 &&
+ argTypes[0].getName().endsWith(listenerName)) {
+ if (removes == null) {
+ removes = new HashMap();
}
+ removes.put(listenerName, method);
}
}
- else if (name.startsWith(GET_PREFIX)) {
- Class<?>[] parameterTypes = method.getParameterTypes();
- if (parameterTypes.length == 0) {
- Class<?> returnType = FeatureDescriptor.getReturnType(beanClass, method);
- if (returnType.isArray()) {
- Class<?> type = returnType.getComponentType();
- if (Introspector.isSubclass(type, eventListenerType)) {
- String listenerName = name.substring(3, name.length() - 1);
- if (listenerName.length() > 0 &&
- type.getName().endsWith(listenerName)) {
- if (gets == null) {
- gets = new HashMap();
- }
- gets.put(listenerName, method);
- }
- }
+ else if (name.startsWith(GET_PREFIX) && argTypes.length == 0 &&
+ resultType.isArray() &&
+ Introspector.isSubclass(resultType.getComponentType(),
+ eventListenerType)) {
+ String listenerName = name.substring(3, name.length() - 1);
+ if (listenerName.length() > 0 &&
+ resultType.getComponentType().getName().endsWith(listenerName)) {
+ if (gets == null) {
+ gets = new HashMap();
}
+ gets.put(listenerName, method);
}
}
}
@@ -1259,11 +1239,11 @@
private boolean isEventHandler(Method m) {
// We assume that a method is an event handler if it has a single
// argument, whose type inherit from java.util.Event.
- Type argTypes[] = m.getGenericParameterTypes();
+ Class argTypes[] = FeatureDescriptor.getParameterTypes(beanClass, m);
if (argTypes.length != 1) {
return false;
}
- return isSubclass(TypeResolver.erase(TypeResolver.resolveInClass(beanClass, argTypes[0])), EventObject.class);
+ return isSubclass(argTypes[0], EventObject.class);
}
/*
@@ -1315,25 +1295,24 @@
}
// make sure method signature matches.
- if (method.getName().equals(methodName)) {
- Type[] params = method.getGenericParameterTypes();
- if (params.length == argCount) {
- if (args != null) {
- boolean different = false;
- if (argCount > 0) {
- for (int j = 0; j < argCount; j++) {
- if (TypeResolver.erase(TypeResolver.resolveInClass(start, params[j])) != args[j]) {
- different = true;
- continue;
- }
- }
- if (different) {
+ Class params[] = FeatureDescriptor.getParameterTypes(start, method);
+ if (method.getName().equals(methodName) &&
+ params.length == argCount) {
+ if (args != null) {
+ boolean different = false;
+ if (argCount > 0) {
+ for (int j = 0; j < argCount; j++) {
+ if (params[j] != args[j]) {
+ different = true;
continue;
}
}
+ if (different) {
+ continue;
+ }
}
- return method;
}
+ return method;
}
}
}
@@ -1460,7 +1439,7 @@
private PropertyDescriptor[] properties;
private int defaultProperty;
private MethodDescriptor[] methods;
- private final Reference<BeanInfo> targetBeanInfoRef;
+ private Reference<BeanInfo> targetBeanInfoRef;
public GenericBeanInfo(BeanDescriptor beanDescriptor,
EventSetDescriptor[] events, int defaultEvent,
@@ -1472,7 +1451,9 @@
this.properties = properties;
this.defaultProperty = defaultProperty;
this.methods = methods;
- this.targetBeanInfoRef = new SoftReference<BeanInfo>(targetBeanInfo);
+ this.targetBeanInfoRef = (targetBeanInfo != null)
+ ? new SoftReference<>(targetBeanInfo)
+ : null;
}
/**
@@ -1539,10 +1520,25 @@
}
public java.awt.Image getIcon(int iconKind) {
- BeanInfo targetBeanInfo = this.targetBeanInfoRef.get();
+ BeanInfo targetBeanInfo = getTargetBeanInfo();
if (targetBeanInfo != null) {
return targetBeanInfo.getIcon(iconKind);
}
return super.getIcon(iconKind);
}
+
+ private BeanInfo getTargetBeanInfo() {
+ if (this.targetBeanInfoRef == null) {
+ return null;
+ }
+ BeanInfo targetBeanInfo = this.targetBeanInfoRef.get();
+ if (targetBeanInfo == null) {
+ targetBeanInfo = ThreadGroupContext.getContext().getBeanInfoFinder()
+ .find(this.beanDescriptor.getBeanClass());
+ if (targetBeanInfo != null) {
+ this.targetBeanInfoRef = new SoftReference<>(targetBeanInfo);
+ }
+ }
+ return targetBeanInfo;
+ }
}
--- jdk/src/share/classes/java/beans/PropertyDescriptor.java 2012-08-10 10:26:08.000000000 -0700
+++ jdk/src/share/classes/java/beans/PropertyDescriptor.java 2013-01-16 08:58:10.000000000 -0800
@@ -210,13 +210,12 @@
// The read method was explicitly set to null.
return null;
}
- String nextMethodName = Introspector.GET_PREFIX + getBaseName();
if (readMethodName == null) {
Class type = getPropertyType0();
if (type == boolean.class || type == null) {
readMethodName = Introspector.IS_PREFIX + getBaseName();
} else {
- readMethodName = nextMethodName;
+ readMethodName = Introspector.GET_PREFIX + getBaseName();
}
}
@@ -226,8 +225,8 @@
// methods. If an "is" method exists, this is the official
// reader method so look for this one first.
readMethod = Introspector.findMethod(cls, readMethodName, 0);
- if ((readMethod == null) && !readMethodName.equals(nextMethodName)) {
- readMethodName = nextMethodName;
+ if (readMethod == null) {
+ readMethodName = Introspector.GET_PREFIX + getBaseName();
readMethod = Introspector.findMethod(cls, readMethodName, 0);
}
try {
@@ -630,6 +629,16 @@
constrained = old.constrained;
}
+ void updateGenericsFor(Class<?> type) {
+ setClass0(type);
+ try {
+ setPropertyType(findPropertyType(getReadMethod0(), getWriteMethod0()));
+ }
+ catch (IntrospectionException exception) {
+ setPropertyType(null);
+ }
+ }
+
/**
* Returns the property type that corresponds to the read and write method.
* The type precedence is given to the readMethod.
--- jdk/src/share/classes/java/beans/XMLDecoder.java 2012-08-10 10:26:09.000000000 -0700
+++ jdk/src/share/classes/java/beans/XMLDecoder.java 2013-01-16 08:58:10.000000000 -0800
@@ -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
@@ -29,6 +29,9 @@
import java.io.Closeable;
import java.io.InputStream;
import java.io.IOException;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import org.xml.sax.InputSource;
import org.xml.sax.helpers.DefaultHandler;
@@ -61,6 +64,7 @@
* @author Philip Milne
*/
public class XMLDecoder implements AutoCloseable {
+ private final AccessControlContext acc = AccessController.getContext();
private final DocumentHandler handler = new DocumentHandler();
private final InputSource input;
private Object owner;
@@ -189,7 +193,15 @@
return false;
}
if (this.array == null) {
- this.handler.parse(this.input);
+ if ((this.acc == null) && (null != System.getSecurityManager())) {
+ throw new SecurityException("AccessControlContext is not set");
+ }
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
+ XMLDecoder.this.handler.parse(XMLDecoder.this.input);
+ return null;
+ }
+ }, this.acc);
this.array = this.handler.getObjects();
}
return true;
--- jdk/src/share/classes/java/beans/XMLEncoder.java 2012-08-10 10:26:09.000000000 -0700
+++ jdk/src/share/classes/java/beans/XMLEncoder.java 2013-01-16 08:58:10.000000000 -0800
@@ -631,7 +631,12 @@
}
if (d.name != null) {
- outputXML(isArgument ? "object" : "void", " idref=" + quote(d.name), value);
+ if (isArgument) {
+ writeln("<object idref=" + quote(d.name) + "/>");
+ }
+ else {
+ outputXML("void", " idref=" + quote(d.name), value);
+ }
}
else if (d.exp != null) {
outputStatement(d.exp, outer, isArgument);
@@ -710,12 +715,14 @@
}
else {
d.refs = 2;
- getValueData(target).refs++;
- List<Statement> statements = statementList(target);
- if (!statements.contains(exp)) {
- statements.add(exp);
+ if (d.name == null) {
+ getValueData(target).refs++;
+ List<Statement> statements = statementList(target);
+ if (!statements.contains(exp)) {
+ statements.add(exp);
+ }
+ outputValue(target, outer, false);
}
- outputValue(target, outer, false);
if (expression) {
outputValue(value, outer, isArgument);
}
--- jdk/src/share/classes/java/io/FilePermission.java 2012-08-10 10:26:11.000000000 -0700
+++ jdk/src/share/classes/java/io/FilePermission.java 2013-01-16 08:58:10.000000000 -0800
@@ -418,7 +418,7 @@
*/
public int hashCode() {
- return this.cpath.hashCode();
+ return 0;
}
/**
--- jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-08-10 10:26:57.000000000 -0700
+++ jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -25,7 +25,6 @@
package java.lang.invoke;
-import sun.invoke.util.VerifyType;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
@@ -35,6 +34,7 @@
import java.util.List;
import sun.invoke.empty.Empty;
import sun.invoke.util.ValueConversions;
+import sun.invoke.util.VerifyType;
import sun.invoke.util.Wrapper;
import sun.misc.Unsafe;
import static java.lang.invoke.MethodHandleStatics.*;
@@ -1258,4 +1258,169 @@
return THROW_EXCEPTION;
}
static <T extends Throwable> Empty throwException(T t) throws T { throw t; }
+
+ /**
+ * Create an alias for the method handle which, when called,
+ * appears to be called from the same class loader and protection domain
+ * as hostClass.
+ * This is an expensive no-op unless the method which is called
+ * is sensitive to its caller. A small number of system methods
+ * are in this category, including Class.forName and Method.invoke.
+ */
+ static
+ MethodHandle bindCaller(MethodHandle mh, Class<?> hostClass) {
+ return BindCaller.bindCaller(mh, hostClass);
+ }
+
+ // Put the whole mess into its own nested class.
+ // That way we can lazily load the code and set up the constants.
+ private static class BindCaller {
+ static
+ MethodHandle bindCaller(MethodHandle mh, Class<?> hostClass) {
+ // Do not use this function to inject calls into system classes.
+ if (hostClass == null) {
+ hostClass = C_Trampoline;
+ } else if (hostClass.isArray() ||
+ hostClass.isPrimitive() ||
+ hostClass.getName().startsWith("java.") ||
+ hostClass.getName().startsWith("sun.")) {
+ throw new InternalError(); // does not happen, and should not anyway
+ }
+ // For simplicity, convert mh to a varargs-like method.
+ MethodHandle vamh = prepareForInvoker(mh);
+ // Cache the result of makeInjectedInvoker once per argument class.
+ MethodHandle bccInvoker = CV_makeInjectedInvoker.get(hostClass);
+ return restoreToType(bccInvoker.bindTo(vamh), mh.type());
+ }
+
+ // This class ("Trampoline") is known to be inside a dead-end class loader.
+ // Inject all doubtful calls into this class.
+ private static Class<?> C_Trampoline;
+ static {
+ Class<?> tramp = null;
+ try {
+ final int FRAME_COUNT_ARG = 1; // [0] Reflection [1] Trampoline
+ java.lang.reflect.Method gcc = sun.reflect.Reflection.class.getMethod("getCallerClass", int.class);
+ tramp = (Class<?>) sun.reflect.misc.MethodUtil.invoke(gcc, null, new Object[]{ FRAME_COUNT_ARG });
+ if (tramp.getClassLoader() == BindCaller.class.getClassLoader())
+ throw new RuntimeException(tramp.getName()+" class loader");
+ } catch (Throwable ex) {
+ throw new InternalError(ex.toString());
+ }
+ C_Trampoline = tramp;
+ }
+
+ private static final Unsafe UNSAFE = Unsafe.getUnsafe();
+
+ private static MethodHandle makeInjectedInvoker(Class<?> hostClass) {
+ Class<?> bcc = UNSAFE.defineAnonymousClass(hostClass, T_BYTES, null);
+ if (hostClass.getClassLoader() != bcc.getClassLoader())
+ throw new InternalError(hostClass.getName()+" (CL)");
+ try {
+ if (hostClass.getProtectionDomain() != bcc.getProtectionDomain())
+ throw new InternalError(hostClass.getName()+" (PD)");
+ } catch (SecurityException ex) {
+ // Self-check was blocked by security manager. This is OK.
+ // In fact the whole try body could be turned into an assertion.
+ }
+ try {
+ MethodHandle init = IMPL_LOOKUP.findStatic(bcc, "init", MethodType.methodType(void.class));
+ init.invokeExact(); // force initialization of the class
+ } catch (Throwable ex) {
+ throw uncaughtException(ex);
+ }
+ MethodHandle bccInvoker;
+ try {
+ MethodType invokerMT = MethodType.methodType(Object.class, MethodHandle.class, Object[].class);
+ bccInvoker = IMPL_LOOKUP.findStatic(bcc, "invoke_V", invokerMT);
+ } catch (ReflectiveOperationException ex) {
+ throw uncaughtException(ex);
+ }
+ // Test the invoker, to ensure that it really injects into the right place.
+ try {
+ MethodHandle vamh = prepareForInvoker(MH_checkCallerClass);
+ Object ok = bccInvoker.invokeExact(vamh, new Object[]{hostClass, bcc});
+ } catch (Throwable ex) {
+ throw new InternalError(ex.toString());
+ }
+ return bccInvoker;
+ }
+ private static ClassValue<MethodHandle> CV_makeInjectedInvoker = new ClassValue<MethodHandle>() {
+ @Override protected MethodHandle computeValue(Class<?> hostClass) {
+ return makeInjectedInvoker(hostClass);
+ }
+ };
+
+ // Adapt mh so that it can be called directly from an injected invoker:
+ private static MethodHandle prepareForInvoker(MethodHandle mh) {
+ mh = mh.asFixedArity();
+ MethodType mt = mh.type();
+ int arity = mt.parameterCount();
+ MethodHandle vamh = mh.asType(mt.generic());
+ vamh = vamh.asSpreader(Object[].class, arity);
+ return vamh;
+ }
+
+ // Undo the adapter effect of prepareForInvoker:
+ private static MethodHandle restoreToType(MethodHandle vamh, MethodType type) {
+ return vamh.asCollector(Object[].class, type.parameterCount()).asType(type);
+ }
+
+ private static final MethodHandle MH_checkCallerClass;
+ static {
+ final Class<?> THIS_CLASS = BindCaller.class;
+ assert(checkCallerClass(THIS_CLASS, THIS_CLASS));
+ try {
+ MH_checkCallerClass = IMPL_LOOKUP
+ .findStatic(THIS_CLASS, "checkCallerClass",
+ MethodType.methodType(boolean.class, Class.class, Class.class));
+ assert((boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS));
+ } catch (Throwable ex) {
+ throw new InternalError(ex.toString());
+ }
+ }
+
+ private static boolean checkCallerClass(Class<?> expected, Class<?> expected2) {
+ final int FRAME_COUNT_ARG = 2; // [0] Reflection [1] BindCaller [2] Expected
+ Class<?> actual = sun.reflect.Reflection.getCallerClass(FRAME_COUNT_ARG);
+ if (actual != expected && actual != expected2)
+ throw new InternalError("found "+actual.getName()+", expected "+expected.getName()
+ +(expected == expected2 ? "" : ", or else "+expected2.getName()));
+ return true;
+ }
+
+ private static final byte[] T_BYTES;
+ static {
+ final Object[] values = {null};
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
+ try {
+ Class<T> tClass = T.class;
+ String tName = tClass.getName();
+ String tResource = tName.substring(tName.lastIndexOf('.')+1)+".class";
+ java.net.URLConnection uconn = tClass.getResource(tResource).openConnection();
+ int len = uconn.getContentLength();
+ byte[] bytes = new byte[len];
+ try (java.io.InputStream str = uconn.getInputStream()) {
+ int nr = str.read(bytes);
+ if (nr != len) throw new java.io.IOException(tResource);
+ }
+ values[0] = bytes;
+ } catch (java.io.IOException ex) {
+ throw new InternalError(ex.toString());
+ }
+ return null;
+ }
+ });
+ T_BYTES = (byte[]) values[0];
+ }
+
+ // The following class is used as a template for Unsafe.defineAnonymousClass:
+ private static class T {
+ static void init() { } // side effect: initializes this class
+ static Object invoke_V(MethodHandle vamh, Object[] args) throws Throwable {
+ return vamh.invokeExact(args);
+ }
+ }
+ }
}
--- jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2012-08-10 10:26:57.000000000 -0700
+++ jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -401,4 +401,101 @@
assert(!HAVE_RICOCHET_FRAMES) : "this code should not be executed if `-XX:+UseRicochetFrames is enabled";
return true;
}
+
+ /**
+ * Is this method a caller-sensitive method?
+ * I.e., does it call Reflection.getCallerClass or a similer method
+ * to ask about the identity of its caller?
+ */
+ // FIXME: Replace this pattern match by an annotation @sun.reflect.CallerSensitive.
+ static boolean isCallerSensitive(MemberName mem) {
+ assert(mem.isInvocable());
+ Class<?> defc = mem.getDeclaringClass();
+ switch (mem.getName()) {
+ case "doPrivileged":
+ return defc == java.security.AccessController.class;
+ case "getUnsafe":
+ return defc == sun.misc.Unsafe.class;
+ case "lookup":
+ return defc == java.lang.invoke.MethodHandles.class;
+ case "invoke":
+ return defc == java.lang.reflect.Method.class;
+ case "get":
+ case "getBoolean":
+ case "getByte":
+ case "getChar":
+ case "getShort":
+ case "getInt":
+ case "getLong":
+ case "getFloat":
+ case "getDouble":
+ case "set":
+ case "setBoolean":
+ case "setByte":
+ case "setChar":
+ case "setShort":
+ case "setInt":
+ case "setLong":
+ case "setFloat":
+ case "setDouble":
+ return defc == java.lang.reflect.Field.class;
+ case "newInstance":
+ if (defc == java.lang.reflect.Constructor.class) return true;
+ if (defc == java.lang.Class.class) return true;
+ break;
+ case "forName":
+ case "getClassLoader":
+ case "getClasses":
+ case "getFields":
+ case "getMethods":
+ case "getConstructors":
+ case "getDeclaredClasses":
+ case "getDeclaredFields":
+ case "getDeclaredMethods":
+ case "getDeclaredConstructors":
+ case "getField":
+ case "getMethod":
+ case "getConstructor":
+ case "getDeclaredField":
+ case "getDeclaredMethod":
+ case "getDeclaredConstructor":
+ return defc == java.lang.Class.class;
+ case "getConnection":
+ case "getDriver":
+ case "getDrivers":
+ case "deregisterDriver":
+ return defc == java.sql.DriverManager.class;
+ case "newUpdater":
+ if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true;
+ if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true;
+ if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class) return true;
+ break;
+ case "getContextClassLoader":
+ return defc == java.lang.Thread.class;
+ case "getPackage":
+ case "getPackages":
+ return defc == java.lang.Package.class;
+ case "getParent":
+ case "getSystemClassLoader":
+ return defc == java.lang.ClassLoader.class;
+ case "load":
+ case "loadLibrary":
+ if (defc == java.lang.Runtime.class) return true;
+ if (defc == java.lang.System.class) return true;
+ break;
+ case "getCallerClass":
+ if (defc == sun.reflect.Reflection.class) return true;
+ if (defc == java.lang.System.class) return true;
+ break;
+ case "getCallerClassLoader":
+ return defc == java.lang.ClassLoader.class;
+ case "getProxyClass":
+ case "newProxyInstance":
+ return defc == java.lang.reflect.Proxy.class;
+ case "getBundle":
+ case "clearCache":
+ return defc == java.util.ResourceBundle.class;
+ }
+ return false;
+ }
}
--- jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java 2012-08-10 10:26:57.000000000 -0700
+++ jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -107,7 +107,7 @@
/*non-public*/ static RuntimeException newIllegalArgumentException(String message, Object obj, Object obj2) {
return new IllegalArgumentException(message(message, obj, obj2));
}
- /*non-public*/ static Error uncaughtException(Exception ex) {
+ /*non-public*/ static Error uncaughtException(Throwable ex) {
Error err = new InternalError("uncaught exception");
err.initCause(ex);
return err;
--- jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2012-08-10 10:26:57.000000000 -0700
+++ jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -589,7 +589,9 @@
private
MethodHandle accessStatic(Class<?> refc, MemberName method) throws IllegalAccessException {
checkMethod(refc, method, true);
- return MethodHandleImpl.findMethod(method, false, lookupClassOrNull());
+ MethodHandle mh = MethodHandleImpl.findMethod(method, false, lookupClassOrNull());
+ mh = maybeBindCaller(method, mh);
+ return mh;
}
private
MethodHandle resolveStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
@@ -647,6 +649,7 @@
private MethodHandle accessVirtual(Class<?> refc, MemberName method) throws IllegalAccessException {
checkMethod(refc, method, false);
MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull());
+ mh = maybeBindCaller(method, mh);
return restrictProtectedReceiver(method, mh);
}
@@ -687,6 +690,7 @@
checkAccess(refc, ctor);
MethodHandle rawMH = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull());
MethodHandle allocMH = MethodHandleImpl.makeAllocator(rawMH);
+ assert(!MethodHandleNatives.isCallerSensitive(ctor)); // maybeBindCaller not relevant here
return fixVarargs(allocMH, rawMH);
}
private MethodHandle resolveConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException {
@@ -755,6 +759,7 @@
Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException {
checkMethod(refc, method, false);
MethodHandle mh = MethodHandleImpl.findMethod(method, false, specialCaller);
+ mh = maybeBindCaller(method, mh);
return restrictReceiver(method, mh, specialCaller);
}
private MethodHandle resolveSpecial(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
@@ -922,6 +927,8 @@
checkSecurityManager(refc, method); // stack walk magic: do not refactor
checkMethod(refc, method, false);
MethodHandle dmh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull());
+ MethodHandle bcmh = maybeBindCaller(method, dmh);
+ if (bcmh != dmh) return fixVarargs(bcmh.bindTo(receiver), dmh);
MethodHandle bmh = MethodHandleImpl.bindReceiver(dmh, receiver);
if (bmh == null)
throw method.makeAccessException("no access", this);
@@ -956,6 +963,7 @@
return MethodHandleImpl.findMethod(method, true, /*no lookupClass*/ null);
checkMethod(method.getDeclaringClass(), method, method.isStatic());
MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull());
+ mh = maybeBindCaller(method, mh);
return restrictProtectedReceiver(method, mh);
}
@@ -987,6 +995,7 @@
// ignore m.isAccessible: this is a new kind of access
checkMethod(m.getDeclaringClass(), method, false);
MethodHandle mh = MethodHandleImpl.findMethod(method, false, lookupClassOrNull());
+ mh = maybeBindCaller(method, mh);
return restrictReceiver(method, mh, specialCaller);
}
@@ -1021,6 +1030,7 @@
checkAccess(c.getDeclaringClass(), ctor);
rawCtor = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull());
}
+ assert(!MethodHandleNatives.isCallerSensitive(ctor)); // maybeBindCaller not relevant here
MethodHandle allocator = MethodHandleImpl.makeAllocator(rawCtor);
return fixVarargs(allocator, rawCtor);
}
@@ -1232,6 +1242,16 @@
MethodHandle narrowMH = MethodHandleImpl.convertArguments(mh, narrowType, rawType, 0);
return fixVarargs(narrowMH, mh);
}
+ private MethodHandle maybeBindCaller(MemberName method, MethodHandle mh) throws IllegalAccessException {
+ if (allowedModes == TRUSTED || !MethodHandleNatives.isCallerSensitive(method))
+ return mh;
+ Class<?> hostClass = lookupClass;
+ if ((allowedModes & PRIVATE) == 0) // caller must use full-power lookup
+ hostClass = null;
+ MethodHandle cbmh = MethodHandleImpl.bindCaller(mh, hostClass);
+ cbmh = fixVarargs(cbmh, mh); // in JDK 7 version, varargs happens earlier and must be repaired
+ return cbmh;
+ }
MethodHandle makeAccessor(Class<?> refc, MemberName field,
boolean trusted, boolean isSetter,
--- jdk/src/share/classes/java/net/InMemoryCookieStore.java 2012-08-10 10:27:01.000000000 -0700
+++ jdk/src/share/classes/java/net/InMemoryCookieStore.java 2013-01-16 00:07:06.000000000 -0800
@@ -91,10 +91,8 @@
if (cookie.getDomain() != null) {
addIndex(domainIndex, cookie.getDomain(), cookie);
}
- if (uri != null) {
- // add it to uri index, too
- addIndex(uriIndex, getEffectiveURI(uri), cookie);
- }
+ // add it to uri index, too
+ addIndex(uriIndex, getEffectiveURI(uri), cookie);
}
} finally {
lock.unlock();
--- jdk/src/share/classes/java/net/URL.java 2012-08-10 10:27:02.000000000 -0700
+++ jdk/src/share/classes/java/net/URL.java 2013-01-16 08:58:10.000000000 -0800
@@ -28,6 +28,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.Hashtable;
import java.util.StringTokenizer;
import sun.security.util.SecurityConstants;
@@ -1116,6 +1118,22 @@
static Hashtable handlers = new Hashtable();
private static Object streamHandlerLock = new Object();
+ // special case the gopher protocol, disabled by default
+ private static final String GOPHER = "gopher";
+ private static final String ENABLE_GOPHER_PROP = "jdk.net.registerGopherProtocol";
+ private static final boolean enableGopher = AccessController.doPrivileged(
+ new PrivilegedAction<Boolean>() {
+ @Override
+ public Boolean run() {
+ String prop = System.getProperty(ENABLE_GOPHER_PROP);
+ return prop == null ? false :
+ (prop.equalsIgnoreCase("false") ? false : true);
+ }
+ });
+
+ // package name of the JDK implementation protocol handlers
+ private static final String JDK_PACKAGE_PREFIX = "sun.net.www.protocol";
+
/**
* Returns the Stream Handler.
* @param protocol the protocol to use
@@ -1147,7 +1165,7 @@
// REMIND: decide whether to allow the "null" class prefix
// or not.
- packagePrefixList += "sun.net.www.protocol";
+ packagePrefixList += JDK_PACKAGE_PREFIX;
StringTokenizer packagePrefixIter =
new StringTokenizer(packagePrefixList, "|");
@@ -1157,6 +1175,14 @@
String packagePrefix =
packagePrefixIter.nextToken().trim();
+
+ // do not try to instantiate the JDK gopher handler
+ // unless the system property had been explicitly set
+ if (protocol.equalsIgnoreCase(GOPHER) &&
+ packagePrefix.equals(JDK_PACKAGE_PREFIX) &&
+ !enableGopher) {
+ continue;
+ }
try {
String clsName = packagePrefix + "." + protocol +
".Handler";
--- jdk/src/share/classes/java/security/AccessController.java 2012-08-10 10:27:09.000000000 -0700
+++ jdk/src/share/classes/java/security/AccessController.java 2013-01-16 08:58:10.000000000 -0800
@@ -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
@@ -290,11 +290,11 @@
*/
public static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action) {
- DomainCombiner dc = null;
AccessControlContext acc = getStackAccessControlContext();
- if (acc == null || (dc = acc.getAssignedCombiner()) == null) {
+ if (acc == null) {
return AccessController.doPrivileged(action);
}
+ DomainCombiner dc = acc.getAssignedCombiner();
return AccessController.doPrivileged(action, preserveCombiner(dc));
}
@@ -386,11 +386,11 @@
public static <T> T doPrivilegedWithCombiner
(PrivilegedExceptionAction<T> action) throws PrivilegedActionException {
- DomainCombiner dc = null;
AccessControlContext acc = getStackAccessControlContext();
- if (acc == null || (dc = acc.getAssignedCombiner()) == null) {
+ if (acc == null) {
return AccessController.doPrivileged(action);
}
+ DomainCombiner dc = acc.getAssignedCombiner();
return AccessController.doPrivileged(action, preserveCombiner(dc));
}
@@ -417,7 +417,12 @@
// perform 'combine' on the caller of doPrivileged,
// even if the caller is from the bootclasspath
ProtectionDomain[] pds = new ProtectionDomain[] {callerPd};
- return new AccessControlContext(combiner.combine(pds, null), combiner);
+ if (combiner == null) {
+ return new AccessControlContext(pds);
+ } else {
+ return new AccessControlContext(combiner.combine(pds, null),
+ combiner);
+ }
}
--- jdk/src/share/classes/java/util/ServiceLoader.java 2012-08-10 10:27:19.000000000 -0700
+++ jdk/src/share/classes/java/util/ServiceLoader.java 2013-01-16 08:58:10.000000000 -0800
@@ -358,14 +358,21 @@
}
String cn = nextName;
nextName = null;
+ Class<?> c = null;
try {
- S p = service.cast(Class.forName(cn, true, loader)
- .newInstance());
- providers.put(cn, p);
- return p;
+ c = Class.forName(cn, false, loader);
} catch (ClassNotFoundException x) {
fail(service,
"Provider " + cn + " not found");
+ }
+ if (!service.isAssignableFrom(c)) {
+ fail(service,
+ "Provider " + cn + " not a subtype");
+ }
+ try {
+ S p = service.cast(c.newInstance());
+ providers.put(cn, p);
+ return p;
} catch (Throwable x) {
fail(service,
"Provider " + cn + " could not be instantiated: " + x,
--- jdk/src/share/classes/java/util/TimeZone.java 2012-08-10 10:27:19.000000000 -0700
+++ jdk/src/share/classes/java/util/TimeZone.java 2013-01-16 08:58:15.000000000 -0800
@@ -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
@@ -43,7 +43,8 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.concurrent.ConcurrentHashMap;
-import sun.awt.AppContext;
+import sun.misc.SharedSecrets;
+import sun.misc.JavaAWTAccess;
import sun.security.action.GetPropertyAction;
import sun.util.TimeZoneNameUtility;
import sun.util.calendar.ZoneInfo;
@@ -161,6 +162,16 @@
private static final int ONE_HOUR = 60*ONE_MINUTE;
private static final int ONE_DAY = 24*ONE_HOUR;
+ /*
+ * Provides access implementation-private methods without using reflection
+ *
+ * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't
+ * been loaded. If so, it implies that AWTSecurityManager is not our
+ * SecurityManager and we can use a local static variable.
+ * This works around a build time issue.
+ */
+ private static JavaAWTAccess javaAWTAccess;
+
// Proclaim serialization compatibility with JDK 1.1
static final long serialVersionUID = 3581463369166924961L;
@@ -720,13 +731,19 @@
* used or if the AppContext doesn't have the default TimeZone.
*/
private synchronized static TimeZone getDefaultInAppContext() {
- if (!hasSetInAppContext) {
- return null;
- }
-
- AppContext ac = AppContext.getAppContext();
- if (ac != null && !ac.isDisposed()) {
- return (TimeZone) ac.get(TimeZone.class);
+ javaAWTAccess = SharedSecrets.getJavaAWTAccess();
+ if (javaAWTAccess == null) {
+ return mainAppContextDefault;
+ } else {
+ if (!javaAWTAccess.isDisposed()) {
+ TimeZone tz = (TimeZone)
+ javaAWTAccess.get(TimeZone.class);
+ if (tz == null && javaAWTAccess.isMainAppContext()) {
+ return mainAppContextDefault;
+ } else {
+ return tz;
+ }
+ }
}
return null;
}
@@ -738,17 +755,15 @@
* AppContext otherwise.
*/
private synchronized static void setDefaultInAppContext(TimeZone tz) {
- if (!hasSetInAppContext && tz == null) {
- return;
- }
-
- AppContext ac = AppContext.getAppContext();
- if (ac != null && !ac.isDisposed()) {
- if (tz != null) {
- ac.put(TimeZone.class, tz);
- hasSetInAppContext = true;
- } else {
- ac.remove(TimeZone.class);
+ javaAWTAccess = SharedSecrets.getJavaAWTAccess();
+ if (javaAWTAccess == null) {
+ mainAppContextDefault = tz;
+ } else {
+ if (!javaAWTAccess.isDisposed()) {
+ javaAWTAccess.put(TimeZone.class, tz);
+ if (javaAWTAccess.isMainAppContext()) {
+ mainAppContextDefault = null;
+ }
}
}
}
@@ -804,8 +819,8 @@
static final String GMT_ID = "GMT";
private static final int GMT_ID_LENGTH = 3;
- // true if the default TimeZone has been set in any AppContext
- private static boolean hasSetInAppContext;
+ // a static TimeZone we can reference if no AppContext is in place
+ private static TimeZone mainAppContextDefault;
/**
* Parses a custom time zone identifier and returns a corresponding zone.
@@ -890,15 +905,13 @@
}
int gmtOffset = (hours * 60 + num) * 60 * 1000;
+ zi = ZoneInfoFile.getCustomTimeZone(id, negative ? -gmtOffset : gmtOffset);
if (gmtOffset == 0) {
- zi = ZoneInfoFile.getZoneInfo(GMT_ID);
if (negative) {
zi.setID("GMT-00:00");
} else {
zi.setID("GMT+00:00");
}
- } else {
- zi = ZoneInfoFile.getCustomTimeZone(id, negative ? -gmtOffset : gmtOffset);
}
return zi;
}
--- jdk/src/share/classes/java/util/concurrent/Executors.java 2012-08-10 10:27:20.000000000 -0700
+++ jdk/src/share/classes/java/util/concurrent/Executors.java 2013-01-16 08:58:10.000000000 -0800
@@ -530,18 +530,17 @@
return AccessController.doPrivileged(
new PrivilegedExceptionAction<T>() {
public T run() throws Exception {
- ClassLoader savedcl = null;
Thread t = Thread.currentThread();
- try {
- ClassLoader cl = t.getContextClassLoader();
- if (ccl != cl) {
- t.setContextClassLoader(ccl);
- savedcl = cl;
- }
+ ClassLoader cl = t.getContextClassLoader();
+ if (ccl == cl) {
return task.call();
- } finally {
- if (savedcl != null)
- t.setContextClassLoader(savedcl);
+ } else {
+ t.setContextClassLoader(ccl);
+ try {
+ return task.call();
+ } finally {
+ t.setContextClassLoader(cl);
+ }
}
}
}, acc);
--- jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java 2012-08-10 10:27:20.000000000 -0700
+++ jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java 2013-01-16 00:07:07.000000000 -0800
@@ -35,8 +35,7 @@
package java.util.concurrent;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.*;
import java.util.*;
/**
@@ -111,7 +110,7 @@
* java.util.PriorityQueue operations within a lock, as was done
* in a previous version of this class. To maintain
* interoperability, a plain PriorityQueue is still used during
- * serialization, which maintains compatibility at the expense of
+ * serialization, which maintains compatibility at the espense of
* transiently doubling overhead.
*/
@@ -308,13 +307,14 @@
/**
* Mechanics for poll(). Call only while holding lock.
*/
- private E dequeue() {
+ private E extract() {
+ E result;
int n = size - 1;
if (n < 0)
- return null;
+ result = null;
else {
Object[] array = queue;
- E result = (E) array[0];
+ result = (E) array[0];
E x = (E) array[n];
array[n] = null;
Comparator<? super E> cmp = comparator;
@@ -323,8 +323,8 @@
else
siftDownUsingComparator(0, x, array, n, cmp);
size = n;
- return result;
}
+ return result;
}
/**
@@ -381,43 +381,39 @@
*/
private static <T> void siftDownComparable(int k, T x, Object[] array,
int n) {
- if (n > 0) {
- Comparable<? super T> key = (Comparable<? super T>)x;
- int half = n >>> 1; // loop while a non-leaf
- while (k < half) {
- int child = (k << 1) + 1; // assume left child is least
- Object c = array[child];
- int right = child + 1;
- if (right < n &&
- ((Comparable<? super T>) c).compareTo((T) array[right]) > 0)
- c = array[child = right];
- if (key.compareTo((T) c) <= 0)
- break;
- array[k] = c;
- k = child;
- }
- array[k] = key;
+ Comparable<? super T> key = (Comparable<? super T>)x;
+ int half = n >>> 1; // loop while a non-leaf
+ while (k < half) {
+ int child = (k << 1) + 1; // assume left child is least
+ Object c = array[child];
+ int right = child + 1;
+ if (right < n &&
+ ((Comparable<? super T>) c).compareTo((T) array[right]) > 0)
+ c = array[child = right];
+ if (key.compareTo((T) c) <= 0)
+ break;
+ array[k] = c;
+ k = child;
}
+ array[k] = key;
}
private static <T> void siftDownUsingComparator(int k, T x, Object[] array,
int n,
Comparator<? super T> cmp) {
- if (n > 0) {
- int half = n >>> 1;
- while (k < half) {
- int child = (k << 1) + 1;
- Object c = array[child];
- int right = child + 1;
- if (right < n && cmp.compare((T) c, (T) array[right]) > 0)
- c = array[child = right];
- if (cmp.compare(x, (T) c) <= 0)
- break;
- array[k] = c;
- k = child;
- }
- array[k] = x;
+ int half = n >>> 1;
+ while (k < half) {
+ int child = (k << 1) + 1;
+ Object c = array[child];
+ int right = child + 1;
+ if (right < n && cmp.compare((T) c, (T) array[right]) > 0)
+ c = array[child = right];
+ if (cmp.compare(x, (T) c) <= 0)
+ break;
+ array[k] = c;
+ k = child;
}
+ array[k] = x;
}
/**
@@ -523,11 +519,13 @@
public E poll() {
final ReentrantLock lock = this.lock;
lock.lock();
+ E result;
try {
- return dequeue();
+ result = extract();
} finally {
lock.unlock();
}
+ return result;
}
public E take() throws InterruptedException {
@@ -535,7 +533,7 @@
lock.lockInterruptibly();
E result;
try {
- while ( (result = dequeue()) == null)
+ while ( (result = extract()) == null)
notEmpty.await();
} finally {
lock.unlock();
@@ -549,7 +547,7 @@
lock.lockInterruptibly();
E result;
try {
- while ( (result = dequeue()) == null && nanos > 0)
+ while ( (result = extract()) == null && nanos > 0)
nanos = notEmpty.awaitNanos(nanos);
} finally {
lock.unlock();
@@ -560,11 +558,13 @@
public E peek() {
final ReentrantLock lock = this.lock;
lock.lock();
+ E result;
try {
- return (size == 0) ? null : (E) queue[0];
+ result = size > 0 ? (E) queue[0] : null;
} finally {
lock.unlock();
}
+ return result;
}
/**
@@ -648,28 +648,32 @@
* @return {@code true} if this queue changed as a result of the call
*/
public boolean remove(Object o) {
+ boolean removed = false;
final ReentrantLock lock = this.lock;
lock.lock();
try {
int i = indexOf(o);
- if (i == -1)
- return false;
- removeAt(i);
- return true;
+ if (i != -1) {
+ removeAt(i);
+ removed = true;
+ }
} finally {
lock.unlock();
}
+ return removed;
}
+
/**
* Identity-based version for use in Itr.remove
*/
- void removeEQ(Object o) {
+ private void removeEQ(Object o) {
final ReentrantLock lock = this.lock;
lock.lock();
try {
Object[] array = queue;
- for (int i = 0, n = size; i < n; i++) {
+ int n = size;
+ for (int i = 0; i < n; i++) {
if (o == array[i]) {
removeAt(i);
break;
@@ -689,13 +693,15 @@
* @return {@code true} if this queue contains the specified element
*/
public boolean contains(Object o) {
+ int index;
final ReentrantLock lock = this.lock;
lock.lock();
try {
- return indexOf(o) != -1;
+ index = indexOf(o);
} finally {
lock.unlock();
}
+ return index != -1;
}
/**
@@ -721,6 +727,7 @@
}
}
+
public String toString() {
final ReentrantLock lock = this.lock;
lock.lock();
@@ -731,7 +738,7 @@
StringBuilder sb = new StringBuilder();
sb.append('[');
for (int i = 0; i < n; ++i) {
- Object e = queue[i];
+ E e = (E)queue[i];
sb.append(e == this ? "(this Collection)" : e);
if (i != n - 1)
sb.append(',').append(' ');
@@ -749,7 +756,23 @@
* @throws IllegalArgumentException {@inheritDoc}
*/
public int drainTo(Collection<? super E> c) {
- return drainTo(c, Integer.MAX_VALUE);
+ if (c == null)
+ throw new NullPointerException();
+ if (c == this)
+ throw new IllegalArgumentException();
+ final ReentrantLock lock = this.lock;
+ lock.lock();
+ try {
+ int n = 0;
+ E e;
+ while ( (e = extract()) != null) {
+ c.add(e);
+ ++n;
+ }
+ return n;
+ } finally {
+ lock.unlock();
+ }
}
/**
@@ -768,10 +791,11 @@
final ReentrantLock lock = this.lock;
lock.lock();
try {
- int n = Math.min(size, maxElements);
- for (int i = 0; i < n; i++) {
- c.add((E) queue[0]); // In this order, in case add() throws.
- dequeue();
+ int n = 0;
+ E e;
+ while (n < maxElements && (e = extract()) != null) {
+ c.add(e);
+ ++n;
}
return n;
} finally {
@@ -819,7 +843,8 @@
* The following code can be used to dump the queue into a newly
* allocated array of {@code String}:
*
- * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+ * <pre>
+ * String[] y = x.toArray(new String[0]);</pre>
*
* Note that {@code toArray(new Object[0])} is identical in function to
* {@code toArray()}.
@@ -872,7 +897,7 @@
*/
final class Itr implements Iterator<E> {
final Object[] array; // Array of all elements
- int cursor; // index of next element to return
+ int cursor; // index of next element to return;
int lastRet; // index of last element, or -1 if no such
Itr(Object[] array) {
@@ -900,18 +925,17 @@
}
/**
- * Saves this queue to a stream (that is, serializes it).
- *
- * For compatibility with previous version of this class, elements
- * are first copied to a java.util.PriorityQueue, which is then
- * serialized.
+ * Saves the state to a stream (that is, serializes it). For
+ * compatibility with previous version of this class,
+ * elements are first copied to a java.util.PriorityQueue,
+ * which is then serialized.
*/
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
lock.lock();
try {
- // avoid zero capacity argument
- q = new PriorityQueue<E>(Math.max(size, 1), comparator);
+ int n = size; // avoid zero capacity argument
+ q = new PriorityQueue<E>(n == 0 ? 1 : n, comparator);
q.addAll(this);
s.defaultWriteObject();
} finally {
@@ -921,7 +945,10 @@
}
/**
- * Reconstitutes this queue from a stream (that is, deserializes it).
+ * Reconstitutes the {@code PriorityBlockingQueue} instance from a stream
+ * (that is, deserializes it).
+ *
+ * @param s the stream
*/
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
--- jdk/src/share/classes/java/util/logging/FileHandler.java 2012-08-10 10:27:22.000000000 -0700
+++ jdk/src/share/classes/java/util/logging/FileHandler.java 2013-01-16 08:58:10.000000000 -0800
@@ -220,7 +220,7 @@
* @exception NullPointerException if pattern property is an empty String.
*/
public FileHandler() throws IOException, SecurityException {
- checkAccess();
+ checkPermission();
configure();
openFiles();
}
@@ -246,7 +246,7 @@
if (pattern.length() < 1 ) {
throw new IllegalArgumentException();
}
- checkAccess();
+ checkPermission();
configure();
this.pattern = pattern;
this.limit = 0;
@@ -278,7 +278,7 @@
if (pattern.length() < 1 ) {
throw new IllegalArgumentException();
}
- checkAccess();
+ checkPermission();
configure();
this.pattern = pattern;
this.limit = 0;
@@ -315,7 +315,7 @@
if (limit < 0 || count < 1 || pattern.length() < 1) {
throw new IllegalArgumentException();
}
- checkAccess();
+ checkPermission();
configure();
this.pattern = pattern;
this.limit = limit;
@@ -354,7 +354,7 @@
if (limit < 0 || count < 1 || pattern.length() < 1) {
throw new IllegalArgumentException();
}
- checkAccess();
+ checkPermission();
configure();
this.pattern = pattern;
this.limit = limit;
@@ -367,7 +367,7 @@
// configured instance variables.
private void openFiles() throws IOException {
LogManager manager = LogManager.getLogManager();
- manager.checkAccess();
+ manager.checkPermission();
if (count < 1) {
throw new IllegalArgumentException("file count = " + count);
}
--- jdk/src/share/classes/java/util/logging/Handler.java 2012-08-10 10:27:22.000000000 -0700
+++ jdk/src/share/classes/java/util/logging/Handler.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, 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
@@ -111,7 +111,7 @@
* the caller does not have <tt>LoggingPermission("control")</tt>.
*/
public void setFormatter(Formatter newFormatter) throws SecurityException {
- checkAccess();
+ checkPermission();
// Check for a null pointer:
newFormatter.getClass();
formatter = newFormatter;
@@ -140,7 +140,7 @@
*/
public void setEncoding(String encoding)
throws SecurityException, java.io.UnsupportedEncodingException {
- checkAccess();
+ checkPermission();
if (encoding != null) {
try {
if(!java.nio.charset.Charset.isSupported(encoding)) {
@@ -175,7 +175,7 @@
* the caller does not have <tt>LoggingPermission("control")</tt>.
*/
public void setFilter(Filter newFilter) throws SecurityException {
- checkAccess();
+ checkPermission();
filter = newFilter;
}
@@ -199,7 +199,7 @@
* the caller does not have <tt>LoggingPermission("control")</tt>.
*/
public void setErrorManager(ErrorManager em) {
- checkAccess();
+ checkPermission();
if (em == null) {
throw new NullPointerException();
}
@@ -213,7 +213,7 @@
* the caller does not have <tt>LoggingPermission("control")</tt>.
*/
public ErrorManager getErrorManager() {
- checkAccess();
+ checkPermission();
return errorManager;
}
@@ -253,7 +253,7 @@
if (newLevel == null) {
throw new NullPointerException();
}
- checkAccess();
+ checkPermission();
logLevel = newLevel;
}
@@ -296,9 +296,9 @@
// If "sealed" is true, we check that the caller has
// appropriate security privileges to update Handler
// state and if not throw a SecurityException.
- void checkAccess() throws SecurityException {
+ void checkPermission() throws SecurityException {
if (sealed) {
- manager.checkAccess();
+ manager.checkPermission();
}
}
}
--- jdk/src/share/classes/java/util/logging/LogManager.java 2012-08-10 10:27:22.000000000 -0700
+++ jdk/src/share/classes/java/util/logging/LogManager.java 2013-01-16 08:58:10.000000000 -0800
@@ -314,7 +314,7 @@
if (l == null) {
throw new NullPointerException();
}
- checkAccess();
+ checkPermission();
changes.addPropertyChangeListener(l);
}
@@ -333,7 +333,7 @@
* the caller does not have LoggingPermission("control").
*/
public void removePropertyChangeListener(PropertyChangeListener l) throws SecurityException {
- checkAccess();
+ checkPermission();
changes.removePropertyChangeListener(l);
}
@@ -772,7 +772,7 @@
* @exception IOException if there are IO problems reading the configuration.
*/
public void readConfiguration() throws IOException, SecurityException {
- checkAccess();
+ checkPermission();
// if a configuration class is specified, load it and use it.
String cname = System.getProperty("java.util.logging.config.class");
@@ -830,7 +830,7 @@
*/
public void reset() throws SecurityException {
- checkAccess();
+ checkPermission();
synchronized (this) {
props = new Properties();
// Since we are doing a reset we no longer want to initialize
@@ -915,7 +915,7 @@
* @exception IOException if there are problems reading from the stream.
*/
public void readConfiguration(InputStream ins) throws IOException, SecurityException {
- checkAccess();
+ checkPermission();
reset();
// Load the properties
@@ -1077,7 +1077,13 @@
}
- private Permission ourPermission = new LoggingPermission("control", null);
+ private final Permission controlPermission = new LoggingPermission("control", null);
+
+ void checkPermission() {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null)
+ sm.checkPermission(controlPermission);
+ }
/**
* Check that the current context is trusted to modify the logging
@@ -1090,11 +1096,7 @@
* the caller does not have LoggingPermission("control").
*/
public void checkAccess() throws SecurityException {
- SecurityManager sm = System.getSecurityManager();
- if (sm == null) {
- return;
- }
- sm.checkPermission(ourPermission);
+ checkPermission();
}
// Nested class to represent a node in our tree of named loggers.
--- jdk/src/share/classes/java/util/logging/Logger.java 2012-08-10 10:27:22.000000000 -0700
+++ jdk/src/share/classes/java/util/logging/Logger.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2011, 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
@@ -273,13 +273,13 @@
this.manager = manager;
}
- private void checkAccess() throws SecurityException {
+ private void checkPermission() throws SecurityException {
if (!anonymous) {
if (manager == null) {
// Complete initialization of the global Logger.
manager = LogManager.getLogManager();
}
- manager.checkAccess();
+ manager.checkPermission();
}
}
@@ -482,7 +482,7 @@
* the caller does not have LoggingPermission("control").
*/
public void setFilter(Filter newFilter) throws SecurityException {
- checkAccess();
+ checkPermission();
filter = newFilter;
}
@@ -1168,7 +1168,7 @@
* the caller does not have LoggingPermission("control").
*/
public void setLevel(Level newLevel) throws SecurityException {
- checkAccess();
+ checkPermission();
synchronized (treeLock) {
levelObject = newLevel;
updateEffectiveLevel();
@@ -1223,7 +1223,7 @@
public void addHandler(Handler handler) throws SecurityException {
// Check for null handler
handler.getClass();
- checkAccess();
+ checkPermission();
handlers.add(handler);
}
@@ -1237,7 +1237,7 @@
* the caller does not have LoggingPermission("control").
*/
public void removeHandler(Handler handler) throws SecurityException {
- checkAccess();
+ checkPermission();
if (handler == null) {
return;
}
@@ -1265,7 +1265,7 @@
* the caller does not have LoggingPermission("control").
*/
public void setUseParentHandlers(boolean useParentHandlers) {
- checkAccess();
+ checkPermission();
this.useParentHandlers = useParentHandlers;
}
@@ -1405,7 +1405,7 @@
if (parent == null) {
throw new NullPointerException();
}
- manager.checkAccess();
+ manager.checkPermission();
doSetParent(parent);
}
--- jdk/src/share/classes/java/util/logging/MemoryHandler.java 2012-08-10 10:27:22.000000000 -0700
+++ jdk/src/share/classes/java/util/logging/MemoryHandler.java 2013-01-16 08:58:10.000000000 -0800
@@ -238,7 +238,7 @@
throw new NullPointerException();
}
LogManager manager = LogManager.getLogManager();
- checkAccess();
+ checkPermission();
pushLevel = newLevel;
}
--- jdk/src/share/classes/java/util/logging/StreamHandler.java 2012-08-10 10:27:22.000000000 -0700
+++ jdk/src/share/classes/java/util/logging/StreamHandler.java 2013-01-16 08:58:10.000000000 -0800
@@ -249,7 +249,7 @@
}
private synchronized void flushAndClose() throws SecurityException {
- checkAccess();
+ checkPermission();
if (writer != null) {
try {
if (!doneHeader) {
--- jdk/src/share/classes/javax/crypto/CryptoPermissions.java 2012-08-10 10:27:27.000000000 -0700
+++ jdk/src/share/classes/javax/crypto/CryptoPermissions.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2007, 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
@@ -30,10 +30,16 @@
import java.util.Hashtable;
import java.util.Vector;
import java.util.NoSuchElementException;
+import java.util.concurrent.ConcurrentHashMap;
import java.io.Serializable;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
+import java.io.ObjectStreamField;
+import java.io.ObjectInputStream;
+import java.io.ObjectInputStream.GetField;
+import java.io.ObjectOutputStream;
+import java.io.ObjectOutputStream.PutField;
import java.io.IOException;
/**
@@ -61,15 +67,24 @@
private static final long serialVersionUID = 4946547168093391015L;
- // This class is similar to java.security.Permissions
- private Hashtable perms;
+ /**
+ * @serialField perms java.util.Hashtable
+ */
+ private static final ObjectStreamField[] serialPersistentFields = {
+ new ObjectStreamField("perms", Hashtable.class),
+ };
+
+ // Switched from Hashtable to ConcurrentHashMap to improve scalability.
+ // To maintain serialization compatibility, this field is made transient
+ // and custom readObject/writeObject methods are used.
+ private transient ConcurrentHashMap<String,PermissionCollection> perms;
/**
* Creates a new CryptoPermissions object containing
* no CryptoPermissionCollections.
*/
CryptoPermissions() {
- perms = new Hashtable(7);
+ perms = new ConcurrentHashMap<>(7);
}
/**
@@ -132,9 +147,7 @@
getPermissionCollection(cryptoPerm);
pc.add(cryptoPerm);
String alg = cryptoPerm.getAlgorithm();
- if (!perms.containsKey(alg)) {
- perms.put(alg, pc);
- }
+ perms.putIfAbsent(alg, pc);
}
/**
@@ -382,20 +395,17 @@
PermissionCollection getPermissionCollection(String alg) {
// If this CryptoPermissions includes CryptoAllPermission,
// we should return CryptoAllPermission.
- if (perms.containsKey(CryptoAllPermission.ALG_NAME)) {
- return
- (PermissionCollection)(perms.get(CryptoAllPermission.ALG_NAME));
- }
-
- PermissionCollection pc = (PermissionCollection)perms.get(alg);
-
- // If there isn't a PermissionCollection for
- // the given algorithm,we should return the
- // PermissionCollection for the wildcard
- // if there is one.
+ PermissionCollection pc = perms.get(CryptoAllPermission.ALG_NAME);
if (pc == null) {
- pc = (PermissionCollection)perms.get(
- CryptoPermission.ALG_NAME_WILDCARD);
+ pc = perms.get(alg);
+
+ // If there isn't a PermissionCollection for
+ // the given algorithm,we should return the
+ // PermissionCollection for the wildcard
+ // if there is one.
+ if (pc == null) {
+ pc = perms.get(CryptoPermission.ALG_NAME_WILDCARD);
+ }
}
return pc;
}
@@ -421,6 +431,28 @@
}
return pc;
}
+
+ private void readObject(ObjectInputStream s)
+ throws IOException, ClassNotFoundException {
+ ObjectInputStream.GetField fields = s.readFields();
+ @SuppressWarnings("unchecked")
+ Hashtable<String,PermissionCollection> permTable =
+ (Hashtable<String,PermissionCollection>)
+ (fields.get("perms", null));
+ if (permTable != null) {
+ perms = new ConcurrentHashMap<>(permTable);
+ } else {
+ perms = new ConcurrentHashMap<>();
+ }
+ }
+
+ private void writeObject(ObjectOutputStream s) throws IOException {
+ Hashtable<String,PermissionCollection> permTable =
+ new Hashtable<>(perms);
+ ObjectOutputStream.PutField fields = s.putFields();
+ fields.put("perms", permTable);
+ s.writeFields();
+ }
}
final class PermissionsEnumerator implements Enumeration {
@@ -463,7 +495,6 @@
} else {
throw new NoSuchElementException("PermissionsEnumerator");
}
-
}
private Enumeration getNextEnumWithMore() {
--- jdk/src/share/classes/javax/crypto/JceSecurityManager.java 2012-08-10 10:27:28.000000000 -0700
+++ jdk/src/share/classes/javax/crypto/JceSecurityManager.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2007, 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
@@ -29,6 +29,8 @@
import java.net.*;
import java.util.*;
import java.util.jar.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
/**
* The JCE security manager.
@@ -51,7 +53,10 @@
private static final CryptoPermissions exemptPolicy;
private static final CryptoAllPermission allPerm;
private static final Vector TrustedCallersCache = new Vector(2);
- private static final Map exemptCache = new HashMap();
+ private static final ConcurrentMap<URL,CryptoPermissions> exemptCache =
+ new ConcurrentHashMap<>();
+ private static final CryptoPermissions CACHE_NULL_MARK =
+ new CryptoPermissions();
// singleton instance
static final JceSecurityManager INSTANCE;
@@ -116,17 +121,19 @@
return defaultPerm;
}
- CryptoPermissions appPerms;
- synchronized (this.getClass()) {
- if (exemptCache.containsKey(callerCodeBase)) {
- appPerms = (CryptoPermissions)exemptCache.get(callerCodeBase);
- } else {
- appPerms = getAppPermissions(callerCodeBase);
- exemptCache.put(callerCodeBase, appPerms);
+ CryptoPermissions appPerms = exemptCache.get(callerCodeBase);
+ if (appPerms == null) {
+ // no match found in cache
+ synchronized (this.getClass()) {
+ appPerms = exemptCache.get(callerCodeBase);
+ if (appPerms == null) {
+ appPerms = getAppPermissions(callerCodeBase);
+ exemptCache.putIfAbsent(callerCodeBase,
+ (appPerms == null? CACHE_NULL_MARK:appPerms));
+ }
}
}
-
- if (appPerms == null) {
+ if (appPerms == null || appPerms == CACHE_NULL_MARK) {
return defaultPerm;
}
--- jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java 2012-08-10 10:27:37.000000000 -0700
+++ jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java 2013-01-16 08:58:10.000000000 -0800
@@ -1245,13 +1245,12 @@
return s.substring(1, s.length() - 1);
}
final String className = s.substring(1, slash);
+
final Constructor<?> constr;
try {
+ ReflectUtil.checkPackageAccess(className);
final ClassLoader contextClassLoader =
Thread.currentThread().getContextClassLoader();
- if (contextClassLoader == null) {
- ReflectUtil.checkPackageAccess(className);
- }
final Class<?> c =
Class.forName(className, false, contextClassLoader);
constr = c.getConstructor(new Class<?>[] {String.class});
--- jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-08-10 10:27:41.000000000 -0700
+++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -39,11 +39,17 @@
import java.rmi.MarshalledObject;
import java.rmi.UnmarshalException;
import java.rmi.server.Unreferenced;
+
import java.security.AccessControlContext;
import java.security.AccessController;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
+import java.security.ProtectionDomain;
+
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
@@ -60,6 +66,7 @@
import javax.management.MBeanException;
import javax.management.MBeanInfo;
import javax.management.MBeanRegistrationException;
+import javax.management.MBeanPermission;
import javax.management.MBeanServer;
import javax.management.NotCompliantMBeanException;
import javax.management.NotificationFilter;
@@ -143,6 +150,7 @@
this.mbeanServer = rmiServer.getMBeanServer();
final ClassLoader dcl = defaultClassLoader;
+
this.classLoaderWithRepository =
AccessController.doPrivileged(
new PrivilegedAction<ClassLoaderWithRepository>() {
@@ -151,13 +159,40 @@
mbeanServer.getClassLoaderRepository(),
dcl);
}
+ },
+
+ withPermissions( new MBeanPermission("*", "getClassLoaderRepository"),
+ new RuntimePermission("createClassLoader"))
+ );
+
+
+ this.defaultContextClassLoader =
+ AccessController.doPrivileged(
+ new PrivilegedAction<ClassLoader>() {
+ @Override
+ public ClassLoader run() {
+ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(),
+ dcl);
+ }
});
+
serverCommunicatorAdmin = new
RMIServerCommunicatorAdmin(EnvHelp.getServerConnectionTimeout(env));
this.env = env;
}
+ private static AccessControlContext withPermissions(Permission ... perms){
+ Permissions col = new Permissions();
+
+ for (Permission thePerm : perms ) {
+ col.add(thePerm);
+ }
+
+ final ProtectionDomain pd = new ProtectionDomain(null, col);
+ return new AccessControlContext( new ProtectionDomain[] { pd });
+ }
+
private synchronized ServerNotifForwarder getServerNotifFwd() {
// Lazily created when first use. Mainly when
// addNotificationListener is first called.
@@ -507,7 +542,7 @@
"connectionId=" + connectionId
+" unwrapping query with defaultClassLoader.");
- queryValue = unwrap(query, defaultClassLoader, QueryExp.class);
+ queryValue = unwrap(query, defaultContextClassLoader, QueryExp.class);
try {
final Object params[] = new Object[] { name, queryValue };
@@ -542,7 +577,7 @@
"connectionId=" + connectionId
+" unwrapping query with defaultClassLoader.");
- queryValue = unwrap(query, defaultClassLoader, QueryExp.class);
+ queryValue = unwrap(query, defaultContextClassLoader, QueryExp.class);
try {
final Object params[] = new Object[] { name, queryValue };
@@ -1330,7 +1365,9 @@
public ClassLoader run() throws InstanceNotFoundException {
return mbeanServer.getClassLoader(name);
}
- });
+ },
+ withPermissions(new MBeanPermission("*", "getClassLoader"))
+ );
} catch (PrivilegedActionException pe) {
throw (InstanceNotFoundException) extractException(pe);
}
@@ -1345,7 +1382,9 @@
public Object run() throws InstanceNotFoundException {
return mbeanServer.getClassLoaderFor(name);
}
- });
+ },
+ withPermissions(new MBeanPermission("*", "getClassLoaderFor"))
+ );
} catch (PrivilegedActionException pe) {
throw (InstanceNotFoundException) extractException(pe);
}
@@ -1572,7 +1611,8 @@
ClassLoader orderCL = AccessController.doPrivileged(
new PrivilegedExceptionAction<ClassLoader>() {
public ClassLoader run() throws Exception {
- return new OrderClassLoaders(cl1, cl2);
+ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(),
+ new OrderClassLoaders(cl1, cl2));
}
}
);
@@ -1664,6 +1704,8 @@
private final ClassLoader defaultClassLoader;
+ private final ClassLoader defaultContextClassLoader;
+
private final ClassLoaderWithRepository classLoaderWithRepository;
private boolean terminated = false;
@@ -1746,4 +1788,43 @@
private static final ClassLogger logger =
new ClassLogger("javax.management.remote.rmi", "RMIConnectionImpl");
+
+ private static final class CombinedClassLoader extends ClassLoader {
+
+ private final static class ClassLoaderWrapper extends ClassLoader {
+ ClassLoaderWrapper(ClassLoader cl) {
+ super(cl);
+ }
+
+ @Override
+ protected Class<?> loadClass(String name, boolean resolve)
+ throws ClassNotFoundException {
+ return super.loadClass(name, resolve);
+ }
+ };
+
+ final ClassLoaderWrapper defaultCL;
+
+ private CombinedClassLoader(ClassLoader parent, ClassLoader defaultCL) {
+ super(parent);
+ this.defaultCL = new ClassLoaderWrapper(defaultCL);
+ }
+
+ @Override
+ protected Class<?> loadClass(String name, boolean resolve)
+ throws ClassNotFoundException {
+ try {
+ super.loadClass(name, resolve);
+ } catch(Exception e) {
+ for(Throwable t = e; t != null; t = t.getCause()) {
+ if(t instanceof SecurityException) {
+ throw t==e?(SecurityException)t:new SecurityException(t.getMessage(), e);
+ }
+ }
+ }
+ final Class<?> cl = defaultCL.loadClass(name, resolve);
+ return cl;
+ }
+
+ }
}
--- jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2012-08-10 10:27:41.000000000 -0700
+++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2013-01-16 08:58:10.000000000 -0800
@@ -277,9 +277,9 @@
// Check for secure RMIServer stub if the corresponding
// client-side environment property is set to "true".
//
- boolean checkStub = EnvHelp.computeBooleanFromString(
- usemap,
- "jmx.remote.x.check.stub",false);
+ String stringBoolean = (String) usemap.get("jmx.remote.x.check.stub");
+ boolean checkStub = EnvHelp.computeBooleanFromString(stringBoolean);
+
if (checkStub) checkStub(stub, rmiServerImplStubClass);
// Connect IIOP Stub if needed.
--- jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java 2012-08-10 10:27:41.000000000 -0700
+++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java 2013-01-16 08:58:10.000000000 -0800
@@ -412,9 +412,8 @@
if (tracing)
logger.trace("start", "Using external directory: " + jndiUrl);
- final boolean rebind = EnvHelp.computeBooleanFromString(
- attributes,
- JNDI_REBIND_ATTRIBUTE,false);
+ String stringBoolean = (String) attributes.get(JNDI_REBIND_ATTRIBUTE);
+ final boolean rebind = EnvHelp.computeBooleanFromString( stringBoolean );
if (tracing)
logger.trace("start", JNDI_REBIND_ATTRIBUTE + "=" + rebind);
--- jdk/src/share/classes/javax/swing/AncestorNotifier.java 2012-08-10 10:27:55.000000000 -0700
+++ jdk/src/share/classes/javax/swing/AncestorNotifier.java 2013-01-16 08:58:10.000000000 -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
@@ -44,7 +44,7 @@
class AncestorNotifier implements ComponentListener, PropertyChangeListener, Serializable
{
- Component firstInvisibleAncestor;
+ transient Component firstInvisibleAncestor;
EventListenerList listenerList = new EventListenerList();
JComponent root;
--- jdk/src/share/classes/javax/swing/ClientPropertyKey.java 2012-08-10 10:27:55.000000000 -0700
+++ jdk/src/share/classes/javax/swing/ClientPropertyKey.java 2013-01-16 08:58:10.000000000 -0800
@@ -25,6 +25,8 @@
package javax.swing;
+import sun.awt.AWTAccessor;
+
/**
* An enumeration for keys used as client properties within the Swing
* implementation.
@@ -86,6 +88,15 @@
*/
private final boolean reportValueNotSerializable;
+ static {
+ AWTAccessor.setClientPropertyKeyAccessor(
+ new AWTAccessor.ClientPropertyKeyAccessor() {
+ public Object getJComponent_TRANSFER_HANDLER() {
+ return JComponent_TRANSFER_HANDLER;
+ }
+ });
+ }
+
/**
* Constructs a key with the {@code reportValueNotSerializable} property
* set to {@code false}.
--- jdk/src/share/classes/javax/swing/JComponent.java 2012-08-10 10:27:56.000000000 -0700
+++ jdk/src/share/classes/javax/swing/JComponent.java 2013-01-16 00:07:09.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, 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
@@ -2636,16 +2636,17 @@
* attribute: visualUpdate true
*/
public void setVisible(boolean aFlag) {
- if (aFlag != isVisible()) {
+ if(aFlag != isVisible()) {
super.setVisible(aFlag);
- if (aFlag) {
- Container parent = getParent();
- if (parent != null) {
- Rectangle r = getBounds();
- parent.repaint(r.x, r.y, r.width, r.height);
- }
- revalidate();
+ Container parent = getParent();
+ if(parent != null) {
+ Rectangle r = getBounds();
+ parent.repaint(r.x,r.y,r.width,r.height);
}
+ // Some (all should) LayoutManagers do not consider components
+ // that are not visible. As such we need to revalidate when the
+ // visible bit changes.
+ revalidate();
}
}
@@ -5563,22 +5564,4 @@
",preferredSize=" + preferredSizeString;
}
- /**
- * {@inheritDoc}
- */
- @Override
- @Deprecated
- public void hide() {
- boolean showing = isShowing();
- super.hide();
- if (showing) {
- Container parent = getParent();
- if (parent != null) {
- Rectangle r = getBounds();
- parent.repaint(r.x, r.y, r.width, r.height);
- }
- revalidate();
- }
- }
-
}
--- jdk/src/share/classes/javax/swing/JViewport.java 2012-08-10 10:27:59.000000000 -0700
+++ jdk/src/share/classes/javax/swing/JViewport.java 2013-01-16 00:07:09.000000000 -0800
@@ -1586,18 +1586,10 @@
int bdx = blitToX - blitFromX;
int bdy = blitToY - blitFromY;
- Composite oldComposite = null;
// Shift the scrolled region
- if (g instanceof Graphics2D) {
- Graphics2D g2d = (Graphics2D) g;
- oldComposite = g2d.getComposite();
- g2d.setComposite(AlphaComposite.Src);
- }
rm.copyArea(this, g, blitFromX, blitFromY, blitW, blitH, bdx, bdy,
false);
- if (oldComposite != null) {
- ((Graphics2D) g).setComposite(oldComposite);
- }
+
// Paint the newly exposed region.
int x = view.getX();
int y = view.getY();
--- jdk/src/share/classes/javax/swing/RepaintManager.java 2012-08-10 10:28:00.000000000 -0700
+++ jdk/src/share/classes/javax/swing/RepaintManager.java 2013-01-16 00:07:09.000000000 -0800
@@ -119,11 +119,6 @@
// Whether or not a VolatileImage should be used for double-buffered painting
static boolean volatileImageBufferEnabled = true;
/**
- * Type of VolatileImage which should be used for double-buffered
- * painting.
- */
- private static final int volatileBufferType;
- /**
* Value of the system property awt.nativeDoubleBuffering.
*/
private static boolean nativeDoubleBuffering;
@@ -209,13 +204,6 @@
((SunGraphicsEnvironment)ge).addDisplayChangedListener(
new DisplayChangedHandler());
}
- Toolkit tk = Toolkit.getDefaultToolkit();
- if ((tk instanceof SunToolkit)
- && ((SunToolkit) tk).isSwingBackbufferTranslucencySupported()) {
- volatileBufferType = Transparency.TRANSLUCENT;
- } else {
- volatileBufferType = Transparency.OPAQUE;
- }
}
/**
@@ -997,8 +985,7 @@
if (image != null) {
image.flush();
}
- image = config.createCompatibleVolatileImage(width, height,
- volatileBufferType);
+ image = config.createCompatibleVolatileImage(width, height);
volatileMap.put(config, image);
}
return image;
@@ -1492,26 +1479,9 @@
for(y=clipY, maxy = clipY + clipH; y < maxy ; y += bh) {
osg.translate(-x, -y);
osg.setClip(x,y,bw,bh);
- if (volatileBufferType != Transparency.OPAQUE
- && osg instanceof Graphics2D) {
- final Graphics2D g2d = (Graphics2D) osg;
- final Color oldBg = g2d.getBackground();
- g2d.setBackground(c.getBackground());
- g2d.clearRect(x, y, bw, bh);
- g2d.setBackground(oldBg);
- }
c.paintToOffscreen(osg, x, y, bw, bh, maxx, maxy);
g.setClip(x, y, bw, bh);
- if (volatileBufferType != Transparency.OPAQUE
- && g instanceof Graphics2D) {
- final Graphics2D g2d = (Graphics2D) g;
- final Composite oldComposite = g2d.getComposite();
- g2d.setComposite(AlphaComposite.Src);
- g2d.drawImage(image, x, y, c);
- g2d.setComposite(oldComposite);
- } else {
- g.drawImage(image, x, y, c);
- }
+ g.drawImage(image, x, y, c);
osg.translate(x, y);
}
}
--- jdk/src/share/classes/javax/swing/text/DefaultCaret.java 2012-08-10 10:28:13.000000000 -0700
+++ jdk/src/share/classes/javax/swing/text/DefaultCaret.java 2013-01-16 00:07:10.000000000 -0800
@@ -403,10 +403,6 @@
* @see MouseListener#mouseClicked
*/
public void mouseClicked(MouseEvent e) {
- if (getComponent() == null) {
- return;
- }
-
int nclicks = SwingUtilities2.getAdjustedClickCount(getComponent(), e);
if (! e.isConsumed()) {
--- jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2012-08-10 10:28:13.000000000 -0700
+++ jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2013-01-16 08:58:10.000000000 -0800
@@ -24,6 +24,8 @@
*/
package javax.swing.text;
+import sun.reflect.misc.ConstructorUtil;
+
import java.io.Serializable;
import java.lang.reflect.*;
import java.text.ParseException;
@@ -245,7 +247,7 @@
Constructor cons;
try {
- cons = vc.getConstructor(new Class[] { String.class });
+ cons = ConstructorUtil.getConstructor(vc, new Class[]{String.class});
} catch (NoSuchMethodException nsme) {
cons = null;
--- jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-08-10 10:28:23.000000000 -0700
+++ jdk/src/share/classes/sun/awt/AWTAccessor.java 2013-01-16 08:58:10.000000000 -0800
@@ -27,17 +27,18 @@
import java.awt.*;
import java.awt.KeyboardFocusManager;
+import java.awt.DefaultKeyboardFocusManager;
import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
import java.awt.geom.Point2D;
-import java.awt.image.BufferedImage;
import sun.misc.Unsafe;
import java.awt.peer.ComponentPeer;
-import java.security.AccessController;
import java.security.AccessControlContext;
import java.io.File;
+import java.util.Vector;
/**
* The AWTAccessor utility class.
@@ -317,7 +318,7 @@
void setTrayIconWindow(Window w, boolean isTrayIconWindow);
}
- /*
+ /**
* An accessor for the AWTEvent class.
*/
public interface AWTEventAccessor {
@@ -337,12 +338,20 @@
*/
boolean isSystemGenerated(AWTEvent ev);
-
- /*
+ /**
* Returns the acc this event was constructed with.
*/
AccessControlContext getAccessControlContext(AWTEvent ev);
+ /**
+ * Returns binary data associated with this event;
+ */
+ byte[] getBData(AWTEvent ev);
+
+ /**
+ * Associates binary data with this event;
+ */
+ void setBData(AWTEvent ev, byte[] bdata);
}
public interface InputEventAccessor {
@@ -370,11 +379,11 @@
Rectangle getMaximizedBounds(Frame frame);
}
- /*
+ /**
* An interface of accessor for the java.awt.KeyboardFocusManager class.
*/
public interface KeyboardFocusManagerAccessor {
- /*
+ /**
* Indicates whether the native implementation should
* proceed with a pending focus request for the heavyweight.
*/
@@ -384,7 +393,7 @@
boolean focusedWindowChangeAllowed,
long time,
CausedFocusEvent.Cause cause);
- /*
+ /**
* Delivers focus for the lightweight descendant of the heavyweight
* synchronously.
*/
@@ -393,23 +402,28 @@
boolean temporary,
boolean focusedWindowChangeAllowed,
long time);
- /*
+ /**
* Removes the last focus request for the heavyweight from the queue.
*/
void removeLastFocusRequest(Component heavyweight);
- /*
+ /**
* Sets the most recent focus owner in the window.
*/
void setMostRecentFocusOwner(Window window, Component component);
- /*
+ /**
* Returns current KFM of the specified AppContext.
*/
KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx);
+
+ /**
+ * Return the current focus cycle root
+ */
+ Container getCurrentFocusCycleRoot();
}
- /*
+ /**
* An accessor for the MenuComponent class.
*/
public interface MenuComponentAccessor {
@@ -427,20 +441,42 @@
* Returns the menu container of the menu component
*/
MenuContainer getParent(MenuComponent menuComp);
+
+ /**
+ * Gets the font used for this menu component.
+ */
+ Font getFont_NoClientCode(MenuComponent menuComp);
}
- /*
+ /**
* An accessor for the EventQueue class
*/
public interface EventQueueAccessor {
- /*
+ /**
* Gets the event dispatch thread.
*/
Thread getDispatchThread(EventQueue eventQueue);
- /*
+
+ /**
* Checks if the current thread is EDT for the given EQ.
*/
public boolean isDispatchThreadImpl(EventQueue eventQueue);
+
+ /**
+ * Removes any pending events for the specified source object.
+ */
+ void removeSourceEvents(EventQueue eventQueue, Object source, boolean removeAllEvents);
+
+ /**
+ * Returns whether an event is pending on any of the separate Queues.
+ */
+ boolean noEvents(EventQueue eventQueue);
+
+ /**
+ * Called from PostEventQueue.postEvent to notify that a new event
+ * appeared.
+ */
+ void wakeup(EventQueue eventQueue, boolean isShutdown);
}
/*
@@ -478,6 +514,174 @@
boolean isMultipleMode(FileDialog fileDialog);
}
+ /**
+ * An accessor for the ScrollPaneAdjustable class.
+ */
+ public interface ScrollPaneAdjustableAccessor {
+ /**
+ * Sets the value of this scrollbar to the specified value.
+ */
+ void setTypedValue(final ScrollPaneAdjustable adj, final int v,
+ final int type);
+ }
+
+ /**
+ * An accessor for the CheckboxMenuItem class
+ */
+ public interface CheckboxMenuItemAccessor {
+ /**
+ * Returns whether menu item is checked
+ */
+ boolean getState(CheckboxMenuItem cmi);
+ }
+
+ /**
+ * An accessor for the Cursor class
+ */
+ public interface CursorAccessor {
+ /**
+ * Returns pData of the Cursor class
+ */
+ long getPData(Cursor cursor);
+
+ /**
+ * Sets pData to the Cursor class
+ */
+ void setPData(Cursor cursor, long pData);
+
+ /**
+ * Return type of the Cursor class
+ */
+ int getType(Cursor cursor);
+ }
+
+ /**
+ * An accessor for the MenuBar class
+ */
+ public interface MenuBarAccessor {
+ /**
+ * Returns help menu
+ */
+ Menu getHelpMenu(MenuBar menuBar);
+
+ /**
+ * Returns menus
+ */
+ Vector getMenus(MenuBar menuBar);
+ }
+
+ /**
+ * An accessor for the MenuItem class
+ */
+ public interface MenuItemAccessor {
+ /**
+ * Returns whether menu item is enabled
+ */
+ boolean isEnabled(MenuItem item);
+
+ /**
+ * Gets the command name of the action event that is fired
+ * by this menu item.
+ */
+ String getActionCommandImpl(MenuItem item);
+
+ /**
+ * Returns true if the item and all its ancestors are
+ * enabled, false otherwise
+ */
+ boolean isItemEnabled(MenuItem item);
+
+ /**
+ * Returns label
+ */
+ String getLabel(MenuItem item);
+
+ /**
+ * Returns shortcut
+ */
+ MenuShortcut getShortcut(MenuItem item);
+ }
+
+ /**
+ * An accessor for the Menu class
+ */
+ public interface MenuAccessor {
+ /**
+ * Returns vector of the items that are part of the Menu
+ */
+ Vector getItems(Menu menu);
+ }
+
+ /**
+ * An accessor for the KeyEvent class
+ */
+ public interface KeyEventAccessor {
+ /**
+ * Sets rawCode field for KeyEvent
+ */
+ void setRawCode(KeyEvent ev, long rawCode);
+
+ /**
+ * Sets primaryLevelUnicode field for KeyEvent
+ */
+ void setPrimaryLevelUnicode(KeyEvent ev, long primaryLevelUnicode);
+
+ /**
+ * Sets extendedKeyCode field for KeyEvent
+ */
+ void setExtendedKeyCode(KeyEvent ev, long extendedKeyCode);
+ }
+
+ /**
+ * An accessor for the ClientPropertyKey class
+ */
+ public interface ClientPropertyKeyAccessor {
+ /**
+ * Retrieves JComponent_TRANSFER_HANDLER enum object
+ */
+ Object getJComponent_TRANSFER_HANDLER();
+ }
+
+ /**
+ * An accessor for the SystemTray class
+ */
+ public interface SystemTrayAccessor {
+ /**
+ * Support for reporting bound property changes for Object properties.
+ */
+ void firePropertyChange(SystemTray tray, String propertyName, Object oldValue, Object newValue);
+ }
+
+ /**
+ * An accessor for the TrayIcon class
+ */
+ public interface TrayIconAccessor {
+ void addNotify(TrayIcon trayIcon) throws AWTException;
+ void removeNotify(TrayIcon trayIcon);
+ }
+
+ /**
+ * An accessor for the DefaultKeyboardFocusManager class
+ */
+ public interface DefaultKeyboardFocusManagerAccessor {
+ public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e);
+ }
+
+ /*
+ * An accessor for the SequencedEventAccessor class
+ */
+ public interface SequencedEventAccessor {
+ /*
+ * Returns the nested event.
+ */
+ AWTEvent getNested(AWTEvent sequencedEvent);
+
+ /*
+ * Returns true if the event is an instances of SequencedEvent.
+ */
+ boolean isSequencedEvent(AWTEvent event);
+ }
+
/*
* Accessor instances are initialized in the static initializers of
* corresponding AWT classes by using setters defined below.
@@ -493,6 +697,18 @@
private static EventQueueAccessor eventQueueAccessor;
private static PopupMenuAccessor popupMenuAccessor;
private static FileDialogAccessor fileDialogAccessor;
+ private static ScrollPaneAdjustableAccessor scrollPaneAdjustableAccessor;
+ private static CheckboxMenuItemAccessor checkboxMenuItemAccessor;
+ private static CursorAccessor cursorAccessor;
+ private static MenuBarAccessor menuBarAccessor;
+ private static MenuItemAccessor menuItemAccessor;
+ private static MenuAccessor menuAccessor;
+ private static KeyEventAccessor keyEventAccessor;
+ private static ClientPropertyKeyAccessor clientPropertyKeyAccessor;
+ private static SystemTrayAccessor systemTrayAccessor;
+ private static TrayIconAccessor trayIconAccessor;
+ private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
+ private static SequencedEventAccessor sequencedEventAccessor;
/*
* Set an accessor object for the java.awt.Component class.
@@ -683,4 +899,208 @@
return fileDialogAccessor;
}
+ /**
+ * Set an accessor object for the java.awt.ScrollPaneAdjustable class.
+ */
+ public static void setScrollPaneAdjustableAccessor(ScrollPaneAdjustableAccessor adj) {
+ scrollPaneAdjustableAccessor = adj;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.ScrollPaneAdjustable
+ * class.
+ */
+ public static ScrollPaneAdjustableAccessor getScrollPaneAdjustableAccessor() {
+ if (scrollPaneAdjustableAccessor == null) {
+ unsafe.ensureClassInitialized(ScrollPaneAdjustable.class);
+ }
+ return scrollPaneAdjustableAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.CheckboxMenuItem class.
+ */
+ public static void setCheckboxMenuItemAccessor(CheckboxMenuItemAccessor cmia) {
+ checkboxMenuItemAccessor = cmia;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.CheckboxMenuItem class.
+ */
+ public static CheckboxMenuItemAccessor getCheckboxMenuItemAccessor() {
+ if (checkboxMenuItemAccessor == null) {
+ unsafe.ensureClassInitialized(CheckboxMenuItemAccessor.class);
+ }
+ return checkboxMenuItemAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.Cursor class.
+ */
+ public static void setCursorAccessor(CursorAccessor ca) {
+ cursorAccessor = ca;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.Cursor class.
+ */
+ public static CursorAccessor getCursorAccessor() {
+ if (cursorAccessor == null) {
+ unsafe.ensureClassInitialized(CursorAccessor.class);
+ }
+ return cursorAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.MenuBar class.
+ */
+ public static void setMenuBarAccessor(MenuBarAccessor mba) {
+ menuBarAccessor = mba;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.MenuBar class.
+ */
+ public static MenuBarAccessor getMenuBarAccessor() {
+ if (menuBarAccessor == null) {
+ unsafe.ensureClassInitialized(MenuBarAccessor.class);
+ }
+ return menuBarAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.MenuItem class.
+ */
+ public static void setMenuItemAccessor(MenuItemAccessor mia) {
+ menuItemAccessor = mia;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.MenuItem class.
+ */
+ public static MenuItemAccessor getMenuItemAccessor() {
+ if (menuItemAccessor == null) {
+ unsafe.ensureClassInitialized(MenuItemAccessor.class);
+ }
+ return menuItemAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.Menu class.
+ */
+ public static void setMenuAccessor(MenuAccessor ma) {
+ menuAccessor = ma;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.Menu class.
+ */
+ public static MenuAccessor getMenuAccessor() {
+ if (menuAccessor == null) {
+ unsafe.ensureClassInitialized(MenuAccessor.class);
+ }
+ return menuAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.event.KeyEvent class.
+ */
+ public static void setKeyEventAccessor(KeyEventAccessor kea) {
+ keyEventAccessor = kea;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.event.KeyEvent class.
+ */
+ public static KeyEventAccessor getKeyEventAccessor() {
+ if (keyEventAccessor == null) {
+ unsafe.ensureClassInitialized(KeyEventAccessor.class);
+ }
+ return keyEventAccessor;
+ }
+
+ /**
+ * Set an accessor object for the javax.swing.ClientPropertyKey class.
+ */
+ public static void setClientPropertyKeyAccessor(ClientPropertyKeyAccessor cpka) {
+ clientPropertyKeyAccessor = cpka;
+ }
+
+ /**
+ * Retrieve the accessor object for the javax.swing.ClientPropertyKey class.
+ */
+ public static ClientPropertyKeyAccessor getClientPropertyKeyAccessor() {
+ if (clientPropertyKeyAccessor == null) {
+ unsafe.ensureClassInitialized(ClientPropertyKeyAccessor.class);
+ }
+ return clientPropertyKeyAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.SystemTray class.
+ */
+ public static void setSystemTrayAccessor(SystemTrayAccessor sta) {
+ systemTrayAccessor = sta;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.SystemTray class.
+ */
+ public static SystemTrayAccessor getSystemTrayAccessor() {
+ if (systemTrayAccessor == null) {
+ unsafe.ensureClassInitialized(SystemTrayAccessor.class);
+ }
+ return systemTrayAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.TrayIcon class.
+ */
+ public static void setTrayIconAccessor(TrayIconAccessor tia) {
+ trayIconAccessor = tia;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.TrayIcon class.
+ */
+ public static TrayIconAccessor getTrayIconAccessor() {
+ if (trayIconAccessor == null) {
+ unsafe.ensureClassInitialized(TrayIconAccessor.class);
+ }
+ return trayIconAccessor;
+ }
+
+ /**
+ * Set an accessor object for the java.awt.DefaultKeyboardFocusManager class.
+ */
+ public static void setDefaultKeyboardFocusManagerAccessor(DefaultKeyboardFocusManagerAccessor dkfma) {
+ defaultKeyboardFocusManagerAccessor = dkfma;
+ }
+
+ /**
+ * Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class.
+ */
+ public static DefaultKeyboardFocusManagerAccessor getDefaultKeyboardFocusManagerAccessor() {
+ if (defaultKeyboardFocusManagerAccessor == null) {
+ unsafe.ensureClassInitialized(DefaultKeyboardFocusManagerAccessor.class);
+ }
+ return defaultKeyboardFocusManagerAccessor;
+ }
+
+ /*
+ * Set an accessor object for the java.awt.SequencedEvent class.
+ */
+ public static void setSequencedEventAccessor(SequencedEventAccessor sea) {
+ sequencedEventAccessor = sea;
+ }
+
+ /*
+ * Get the accessor object for the java.awt.SequencedEvent class.
+ */
+ public static SequencedEventAccessor getSequencedEventAccessor() {
+ // The class is not public. So we can't ensure it's initialized.
+ // Null returned value means it's not initialized
+ // (so not a single instance of the event has been created).
+ return sequencedEventAccessor;
+ }
}
--- jdk/src/share/classes/sun/awt/AppContext.java 2012-08-10 10:28:23.000000000 -0700
+++ jdk/src/share/classes/sun/awt/AppContext.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -787,6 +787,27 @@
}
return changeSupport.getPropertyChangeListeners(propertyName);
}
+
+ // Set up JavaAWTAccess in SharedSecrets
+ static {
+ sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() {
+ public Object get(Object key) {
+ return getAppContext().get(key);
+ }
+ public void put(Object key, Object value) {
+ getAppContext().put(key, value);
+ }
+ public void remove(Object key) {
+ getAppContext().remove(key);
+ }
+ public boolean isDisposed() {
+ return getAppContext().isDisposed();
+ }
+ public boolean isMainAppContext() {
+ return (numAppContexts == 1);
+ }
+ });
+ }
}
final class MostRecentKeyValue {
--- jdk/src/share/classes/sun/awt/EmbeddedFrame.java 2012-08-10 10:28:23.000000000 -0700
+++ jdk/src/share/classes/sun/awt/EmbeddedFrame.java 2013-01-16 08:58:10.000000000 -0800
@@ -29,12 +29,6 @@
import java.awt.event.*;
import java.awt.image.*;
import java.awt.peer.*;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Field;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
import java.util.Set;
@@ -63,8 +57,6 @@
implements KeyEventDispatcher, PropertyChangeListener {
private boolean isCursorAllowed = true;
- private static Field fieldPeer;
- private static Field currentCycleRoot;
private boolean supportsXEmbed = false;
private KeyboardFocusManager appletKFM;
// JDK 1.1 compatibility
@@ -208,39 +200,8 @@
*/
public boolean dispatchKeyEvent(KeyEvent e) {
- // We can't guarantee that this is called on the same AppContext as EmbeddedFrame
- // belongs to. That's why we can't use public methods to find current focus cycle
- // root. Instead, we access KFM's private field directly.
- if (currentCycleRoot == null) {
- currentCycleRoot = (Field)AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- try {
- Field unaccessibleRoot = KeyboardFocusManager.class.
- getDeclaredField("currentFocusCycleRoot");
- if (unaccessibleRoot != null) {
- unaccessibleRoot.setAccessible(true);
- }
- return unaccessibleRoot;
- } catch (NoSuchFieldException e1) {
- assert false;
- } catch (SecurityException e2) {
- assert false;
- }
- return null;
- }
- });
- }
-
- Container currentRoot = null;
- if (currentCycleRoot != null) {
- try {
- // The field is static, so we can pass null to Field.get() as the argument.
- currentRoot = (Container)currentCycleRoot.get(null);
- } catch (IllegalAccessException e3) {
- // This is impossible: currentCycleRoot would be null if setAccessible failed.
- assert false;
- }
- }
+ Container currentRoot = AWTAccessor.getKeyboardFocusManagerAccessor()
+ .getCurrentFocusCycleRoot();
// if we are not in EmbeddedFrame's cycle, we should not try to leave.
if (this != currentRoot) {
@@ -381,32 +342,8 @@
}
protected void setPeer(final ComponentPeer p){
- if (fieldPeer == null) {
- fieldPeer = (Field)AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- try {
- Field lnkPeer = Component.class.getDeclaredField("peer");
- if (lnkPeer != null) {
- lnkPeer.setAccessible(true);
- }
- return lnkPeer;
- } catch (NoSuchFieldException e) {
- assert false;
- } catch (SecurityException e) {
- assert false;
- }
- return null;
- }//run
- });
- }
- try{
- if (fieldPeer !=null){
- fieldPeer.set(EmbeddedFrame.this, p);
- }
- } catch (IllegalAccessException e) {
- assert false;
- }
- }; //setPeer method ends
+ AWTAccessor.getComponentAccessor().setPeer(EmbeddedFrame.this, p);
+ };
/**
* Synthesize native message to activate or deactivate EmbeddedFrame window
--- jdk/src/share/classes/sun/awt/FontConfiguration.java 2012-08-10 10:28:23.000000000 -0700
+++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2013-01-16 08:58:15.000000000 -0800
@@ -1146,7 +1146,7 @@
*/
HashMap<String, Boolean> existsMap;
public boolean needToSearchForFile(String fileName) {
- if (!FontUtilities.isLinux) {
+ if (!FontUtilities.isLinux || FontUtilities.isBSD) {
return false;
} else if (existsMap == null) {
existsMap = new HashMap<String, Boolean>();
--- jdk/src/share/classes/sun/awt/OSInfo.java 2012-08-10 10:28:24.000000000 -0700
+++ jdk/src/share/classes/sun/awt/OSInfo.java 2013-01-16 08:58:15.000000000 -0800
@@ -39,6 +39,7 @@
WINDOWS,
LINUX,
SOLARIS,
+ BSD,
MACOSX,
UNKNOWN
}
@@ -101,6 +102,10 @@
return SOLARIS;
}
+ if (osName.contains("BSD")) {
+ return BSD;
+ }
+
if (osName.contains("OS X")) {
return MACOSX;
}
--- jdk/src/share/classes/sun/awt/SunToolkit.java 2012-08-10 10:28:24.000000000 -0700
+++ jdk/src/share/classes/sun/awt/SunToolkit.java 2013-01-16 08:58:10.000000000 -0800
@@ -51,14 +51,8 @@
import sun.awt.image.*;
import sun.security.action.GetPropertyAction;
import sun.security.action.GetBooleanAction;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
public abstract class SunToolkit extends Toolkit
implements WindowClosingSupport, WindowClosingListener,
@@ -80,7 +74,6 @@
*/
public static final int GRAB_EVENT_MASK = 0x80000000;
- private static Method wakeupMethod;
/* The key to put()/get() the PostEventQueue into/from the AppContext.
*/
private static final String POST_EVENT_QUEUE_KEY = "PostEventQueue";
@@ -294,52 +287,8 @@
return appContext;
}
- public static Field getField(final Class klass, final String fieldName) {
- return AccessController.doPrivileged(new PrivilegedAction<Field>() {
- public Field run() {
- try {
- Field field = klass.getDeclaredField(fieldName);
- assert (field != null);
- field.setAccessible(true);
- return field;
- } catch (SecurityException e) {
- assert false;
- } catch (NoSuchFieldException e) {
- assert false;
- }
- return null;
- }//run
- });
- }
-
static void wakeupEventQueue(EventQueue q, boolean isShutdown){
- if (wakeupMethod == null){
- wakeupMethod = (Method)AccessController.doPrivileged(new PrivilegedAction(){
- public Object run(){
- try {
- Method method = EventQueue.class.getDeclaredMethod("wakeup",new Class [] {Boolean.TYPE} );
- if (method != null) {
- method.setAccessible(true);
- }
- return method;
- } catch (NoSuchMethodException e) {
- assert false;
- } catch (SecurityException e) {
- assert false;
- }
- return null;
- }//run
- });
- }
- try{
- if (wakeupMethod != null){
- wakeupMethod.invoke(q, new Object[]{Boolean.valueOf(isShutdown)});
- }
- } catch (InvocationTargetException e){
- assert false;
- } catch (IllegalAccessException e) {
- assert false;
- }
+ AWTAccessor.getEventQueueAccessor().wakeup(q, isShutdown);
}
/*
@@ -513,6 +462,19 @@
if (event == null) {
throw new NullPointerException();
}
+
+ AWTAccessor.SequencedEventAccessor sea = AWTAccessor.getSequencedEventAccessor();
+ if (sea != null && sea.isSequencedEvent(event)) {
+ AWTEvent nested = sea.getNested(event);
+ if (nested.getID() == WindowEvent.WINDOW_LOST_FOCUS &&
+ nested instanceof TimedWindowEvent)
+ {
+ TimedWindowEvent twe = (TimedWindowEvent)nested;
+ ((SunToolkit)Toolkit.getDefaultToolkit()).
+ setWindowDeactivationTime((Window)twe.getSource(), twe.getWhen());
+ }
+ }
+
// All events posted via this method are system-generated.
// Placing the following call here reduces considerably the
// number of places throughout the toolkit that would
@@ -556,15 +518,19 @@
// Don't call flushPendingEvents() recursively
if (!isFlushingPendingEvents) {
isFlushingPendingEvents = true;
- AppContext appContext = AppContext.getAppContext();
- PostEventQueue postEventQueue =
- (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY);
- if (postEventQueue != null) {
- postEventQueue.flush();
+ try {
+ AppContext appContext = AppContext.getAppContext();
+ PostEventQueue postEventQueue =
+ (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY);
+ if (postEventQueue != null) {
+ postEventQueue.flush();
+ }
+ }
+ finally {
+ isFlushingPendingEvents = false;
}
}
} finally {
- isFlushingPendingEvents = false;
flushLock.unlock();
}
}
@@ -1455,22 +1421,6 @@
|| comp instanceof Window);
}
- public static Method getMethod(final Class clz, final String methodName, final Class[] params) {
- Method res = null;
- try {
- res = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() {
- public Method run() throws Exception {
- Method m = clz.getDeclaredMethod(methodName, params);
- m.setAccessible(true);
- return m;
- }
- });
- } catch (PrivilegedActionException ex) {
- ex.printStackTrace();
- }
- return res;
- }
-
public static class OperationTimedOut extends RuntimeException {
public OperationTimedOut(String msg) {
super(msg);
@@ -1613,21 +1563,9 @@
private boolean queueEmpty = false;
private final Object waitLock = "Wait Lock";
- static Method eqNoEvents;
-
private boolean isEQEmpty() {
EventQueue queue = getSystemEventQueueImpl();
- synchronized(SunToolkit.class) {
- if (eqNoEvents == null) {
- eqNoEvents = getMethod(java.awt.EventQueue.class, "noEvents", null);
- }
- }
- try {
- return (Boolean)eqNoEvents.invoke(queue);
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
+ return AWTAccessor.getEventQueueAccessor().noEvents(queue);
}
/**
@@ -1882,20 +1820,14 @@
* consumeNextKeyTyped() method is not currently used,
* however Swing could use it in the future.
*/
- private static Method consumeNextKeyTypedMethod = null;
public static synchronized void consumeNextKeyTyped(KeyEvent keyEvent) {
- if (consumeNextKeyTypedMethod == null) {
- consumeNextKeyTypedMethod = getMethod(DefaultKeyboardFocusManager.class,
- "consumeNextKeyTyped",
- new Class[] {KeyEvent.class});
- }
try {
- consumeNextKeyTypedMethod.invoke(KeyboardFocusManager.getCurrentKeyboardFocusManager(),
- keyEvent);
- } catch (IllegalAccessException iae) {
- iae.printStackTrace();
- } catch (InvocationTargetException ite) {
- ite.printStackTrace();
+ AWTAccessor.getDefaultKeyboardFocusManagerAccessor().consumeNextKeyTyped(
+ (DefaultKeyboardFocusManager)KeyboardFocusManager.
+ getCurrentKeyboardFocusManager(),
+ keyEvent);
+ } catch (ClassCastException cce) {
+ cce.printStackTrace();
}
}
@@ -1915,25 +1847,6 @@
return (Window)comp;
}
- /**
- * Returns the value of the system property indicated by the specified key.
- */
- public static String getSystemProperty(final String key) {
- return (String)AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return System.getProperty(key);
- }
- });
- }
-
- /**
- * Returns the boolean value of the system property indicated by the specified key.
- */
- protected static Boolean getBooleanSystemProperty(String key) {
- return Boolean.valueOf(AccessController.
- doPrivileged(new GetBooleanAction(key)));
- }
-
private static Boolean sunAwtDisableMixing = null;
/**
@@ -1942,7 +1855,8 @@
*/
public synchronized static boolean getSunAwtDisableMixing() {
if (sunAwtDisableMixing == null) {
- sunAwtDisableMixing = getBooleanSystemProperty("sun.awt.disableMixing");
+ sunAwtDisableMixing = AccessController.doPrivileged(
+ new GetBooleanAction("sun.awt.disableMixing"));
}
return sunAwtDisableMixing.booleanValue();
}
@@ -1956,6 +1870,28 @@
return false;
}
+ private static final Object DEACTIVATION_TIMES_MAP_KEY = new Object();
+
+ public synchronized void setWindowDeactivationTime(Window w, long time) {
+ AppContext ctx = getAppContext(w);
+ WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY);
+ if (map == null) {
+ map = new WeakHashMap<Window, Long>();
+ ctx.put(DEACTIVATION_TIMES_MAP_KEY, map);
+ }
+ map.put(w, time);
+ }
+
+ public synchronized long getWindowDeactivationTime(Window w) {
+ AppContext ctx = getAppContext(w);
+ WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY);
+ if (map == null) {
+ return -1;
+ }
+ Long time = map.get(w);
+ return time == null ? -1 : time;
+ }
+
// Cosntant alpha
public boolean isWindowOpacitySupported() {
return false;
@@ -1976,13 +1912,6 @@
}
/**
- * Returns true if swing backbuffer should be translucent.
- */
- public boolean isSwingBackbufferTranslucencySupported() {
- return false;
- }
-
- /**
* Returns whether or not a containing top level window for the passed
* component is
* {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT PERPIXEL_TRANSLUCENT}.
--- jdk/src/share/classes/sun/awt/TextureSizeConstraining.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/sun/awt/TextureSizeConstraining.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.awt;
+
+/**
+ * A GraphicsConfiguration implements the TextureSizeConstraining
+ * interface to indicate that it imposes certain limitations on the
+ * maximum size of supported textures.
+ */
+public interface TextureSizeConstraining {
+
+ /**
+ * Returns the maximum width of any texture image.
+ */
+ public int getMaxTextureWidth();
+
+ /**
+ * Returns the maximum height of any texture image.
+ */
+ public int getMaxTextureHeight();
+
+}
--- jdk/src/share/classes/sun/awt/TimedWindowEvent.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/sun/awt/TimedWindowEvent.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,51 @@
+/*
+ * 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.awt;
+
+import java.awt.event.WindowEvent;
+import java.awt.Window;
+
+public class TimedWindowEvent extends WindowEvent {
+
+ private long time;
+
+ public long getWhen() {
+ return time;
+ }
+
+ public TimedWindowEvent(Window source, int id, Window opposite, long time) {
+ super(source, id, opposite);
+ this.time = time;
+ }
+
+ public TimedWindowEvent(Window source, int id, Window opposite,
+ int oldState, int newState, long time)
+ {
+ super(source, id, opposite, oldState, newState);
+ this.time = time;
+ }
+}
+
--- jdk/src/share/classes/sun/beans/editors/BooleanEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/BooleanEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,51 +26,7 @@
package sun.beans.editors;
/**
- * Property editor for a java builtin "boolean" type.
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-public class BooleanEditor extends PropertyEditorSupport {
-
-
- public String getJavaInitializationString() {
- Object value = getValue();
- return (value != null)
- ? value.toString()
- : "null";
- }
-
- public String getAsText() {
- Object value = getValue();
- return (value instanceof Boolean)
- ? getValidName((Boolean) value)
- : null;
- }
-
- public void setAsText(String text) throws java.lang.IllegalArgumentException {
- if (text == null) {
- setValue(null);
- } else if (isValidName(true, text)) {
- setValue(Boolean.TRUE);
- } else if (isValidName(false, text)) {
- setValue(Boolean.FALSE);
- } else {
- throw new java.lang.IllegalArgumentException(text);
- }
- }
-
- public String[] getTags() {
- return new String[] {getValidName(true), getValidName(false)};
- }
-
- // the following method should be localized (4890258)
-
- private String getValidName(boolean value) {
- return value ? "True" : "False";
- }
-
- private boolean isValidName(boolean value, String name) {
- return getValidName(value).equalsIgnoreCase(name);
- }
+public class BooleanEditor extends com.sun.beans.editors.BooleanEditor {
}
--- jdk/src/share/classes/sun/beans/editors/ByteEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/ByteEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,23 +26,7 @@
package sun.beans.editors;
/**
- * Property editor for a java builtin "byte" type.
- *
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-public class ByteEditor extends NumberEditor {
-
- public String getJavaInitializationString() {
- Object value = getValue();
- return (value != null)
- ? "((byte)" + value + ")"
- : "null";
- }
-
- public void setAsText(String text) throws IllegalArgumentException {
- setValue((text == null) ? null : Byte.decode(text));
- }
-
+public class ByteEditor extends com.sun.beans.editors.ByteEditor {
}
--- jdk/src/share/classes/sun/beans/editors/ColorEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/ColorEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -25,190 +25,8 @@
package sun.beans.editors;
-import java.awt.*;
-import java.beans.*;
-
-public class ColorEditor extends Panel implements PropertyEditor {
- private static final long serialVersionUID = 1781257185164716054L;
-
- public ColorEditor() {
- setLayout(null);
-
- ourWidth = hPad;
-
- // Create a sample color block bordered in black
- Panel p = new Panel();
- p.setLayout(null);
- p.setBackground(Color.black);
- sample = new Canvas();
- p.add(sample);
- sample.reshape(2, 2, sampleWidth, sampleHeight);
- add(p);
- p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4);
- ourWidth += sampleWidth + 4 + hPad;
-
- text = new TextField("", 14);
- add(text);
- text.reshape(ourWidth,0,100,30);
- ourWidth += 100 + hPad;
-
- choser = new Choice();
- int active = 0;
- for (int i = 0; i < colorNames.length; i++) {
- choser.addItem(colorNames[i]);
- }
- add(choser);
- choser.reshape(ourWidth,0,100,30);
- ourWidth += 100 + hPad;
-
- resize(ourWidth,40);
- }
-
- public void setValue(Object o) {
- Color c = (Color)o;
- changeColor(c);
- }
-
- public Dimension preferredSize() {
- return new Dimension(ourWidth, 40);
- }
-
- public boolean keyUp(Event e, int key) {
- if (e.target == text) {
- try {
- setAsText(text.getText());
- } catch (IllegalArgumentException ex) {
- // Quietly ignore.
- }
- }
- return (false);
- }
-
- public void setAsText(String s) throws java.lang.IllegalArgumentException {
- if (s == null) {
- changeColor(null);
- return;
- }
- int c1 = s.indexOf(',');
- int c2 = s.indexOf(',', c1+1);
- if (c1 < 0 || c2 < 0) {
- // Invalid string.
- throw new IllegalArgumentException(s);
- }
- try {
- int r = Integer.parseInt(s.substring(0,c1));
- int g = Integer.parseInt(s.substring(c1+1, c2));
- int b = Integer.parseInt(s.substring(c2+1));
- Color c = new Color(r,g,b);
- changeColor(c);
- } catch (Exception ex) {
- throw new IllegalArgumentException(s);
- }
-
- }
-
- public boolean action(Event e, Object arg) {
- if (e.target == choser) {
- changeColor(colors[choser.getSelectedIndex()]);
- }
- return false;
- }
-
- public String getJavaInitializationString() {
- return (this.color != null)
- ? "new java.awt.Color(" + this.color.getRGB() + ",true)"
- : "null";
- }
-
-
- private void changeColor(Color c) {
-
- if (c == null) {
- this.color = null;
- this.text.setText("");
- return;
- }
-
- color = c;
-
- text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue());
-
- int active = 0;
- for (int i = 0; i < colorNames.length; i++) {
- if (color.equals(colors[i])) {
- active = i;
- }
- }
- choser.select(active);
-
- sample.setBackground(color);
- sample.repaint();
-
- support.firePropertyChange("", null, null);
- }
-
- public Object getValue() {
- return color;
- }
-
- public boolean isPaintable() {
- return true;
- }
-
- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
- Color oldColor = gfx.getColor();
- gfx.setColor(Color.black);
- gfx.drawRect(box.x, box.y, box.width-3, box.height-3);
- gfx.setColor(color);
- gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4);
- gfx.setColor(oldColor);
- }
-
- public String getAsText() {
- return (this.color != null)
- ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
- : null;
- }
-
- public String[] getTags() {
- return null;
- }
-
- public java.awt.Component getCustomEditor() {
- return this;
- }
-
- public boolean supportsCustomEditor() {
- return true;
- }
-
- public void addPropertyChangeListener(PropertyChangeListener l) {
- support.addPropertyChangeListener(l);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener l) {
- support.removePropertyChangeListener(l);
- }
-
-
- private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray",
- "black", "red", "pink", "orange",
- "yellow", "green", "magenta", "cyan",
- "blue"};
- private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
- Color.black, Color.red, Color.pink, Color.orange,
- Color.yellow, Color.green, Color.magenta, Color.cyan,
- Color.blue};
-
- private Canvas sample;
- private int sampleHeight = 20;
- private int sampleWidth = 40;
- private int hPad = 5;
- private int ourWidth;
-
- private Color color;
- private TextField text;
- private Choice choser;
-
- private PropertyChangeSupport support = new PropertyChangeSupport(this);
+/**
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
+ */
+public class ColorEditor extends com.sun.beans.editors.ColorEditor {
}
--- jdk/src/share/classes/sun/beans/editors/DoubleEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/DoubleEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,16 +26,7 @@
package sun.beans.editors;
/**
- * Property editor for a java builtin "double" type.
- *
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-public class DoubleEditor extends NumberEditor {
-
- public void setAsText(String text) throws IllegalArgumentException {
- setValue((text == null) ? null : Double.valueOf(text));
- }
-
+public class DoubleEditor extends com.sun.beans.editors.DoubleEditor {
}
--- jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -22,122 +22,14 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-package sun.beans.editors;
-import java.awt.Component;
-import java.awt.Graphics;
-import java.awt.Rectangle;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyEditor;
-import java.util.ArrayList;
-import java.util.List;
+package sun.beans.editors;
/**
- * Property editor for java.lang.Enum subclasses.
- *
- * @see PropertyEditor
- *
- * @since 1.7
- *
- * @author Sergey A. Malenkov
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-public final class EnumEditor implements PropertyEditor {
- private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
-
- private final Class type;
- private final String[] tags;
-
- private Object value;
-
- public EnumEditor( Class type ) {
- Object[] values = type.getEnumConstants();
- if ( values == null ) {
- throw new IllegalArgumentException( "Unsupported " + type );
- }
- this.type = type;
- this.tags = new String[values.length];
- for ( int i = 0; i < values.length; i++ ) {
- this.tags[i] = ( ( Enum )values[i] ).name();
- }
- }
-
- public Object getValue() {
- return this.value;
- }
-
- public void setValue( Object value ) {
- if ( ( value != null ) && !this.type.isInstance( value ) ) {
- throw new IllegalArgumentException( "Unsupported value: " + value );
- }
- Object oldValue;
- PropertyChangeListener[] listeners;
- synchronized ( this.listeners ) {
- oldValue = this.value;
- this.value = value;
-
- if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) {
- return; // do not fire event if value is not changed
- }
- int size = this.listeners.size();
- if ( size == 0 ) {
- return; // do not fire event if there are no any listener
- }
- listeners = this.listeners.toArray( new PropertyChangeListener[size] );
- }
- PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value );
- for ( PropertyChangeListener listener : listeners ) {
- listener.propertyChange( event );
- }
- }
-
- public String getAsText() {
- return ( this.value != null )
- ? ( ( Enum )this.value ).name()
- : null;
- }
-
- public void setAsText( String text ) {
- setValue( ( text != null )
- ? Enum.valueOf( this.type, text )
- : null );
- }
-
- public String[] getTags() {
- return this.tags.clone();
- }
-
- public String getJavaInitializationString() {
- String name = getAsText();
- return ( name != null )
- ? this.type.getName() + '.' + name
- : "null";
- }
-
- public boolean isPaintable() {
- return false;
- }
-
- public void paintValue( Graphics gfx, Rectangle box ) {
- }
-
- public boolean supportsCustomEditor() {
- return false;
- }
-
- public Component getCustomEditor() {
- return null;
- }
-
- public void addPropertyChangeListener( PropertyChangeListener listener ) {
- synchronized ( this.listeners ) {
- this.listeners.add( listener );
- }
- }
-
- public void removePropertyChangeListener( PropertyChangeListener listener ) {
- synchronized ( this.listeners ) {
- this.listeners.remove( listener );
- }
+public class EnumEditor extends com.sun.beans.editors.EnumEditor {
+ public EnumEditor(Class type) {
+ super(type);
}
}
--- jdk/src/share/classes/sun/beans/editors/FloatEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/FloatEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,23 +26,7 @@
package sun.beans.editors;
/**
- * Property editor for a java builtin "float" type.
- *
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-public class FloatEditor extends NumberEditor {
-
- public String getJavaInitializationString() {
- Object value = getValue();
- return (value != null)
- ? value + "F"
- : "null";
- }
-
- public void setAsText(String text) throws IllegalArgumentException {
- setValue((text == null) ? null : Float.valueOf(text));
- }
-
+public class FloatEditor extends com.sun.beans.editors.FloatEditor {
}
--- jdk/src/share/classes/sun/beans/editors/FontEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/FontEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -25,195 +25,8 @@
package sun.beans.editors;
-import java.awt.*;
-import java.beans.*;
-
-public class FontEditor extends Panel implements java.beans.PropertyEditor {
- private static final long serialVersionUID = 6732704486002715933L;
-
- public FontEditor() {
- setLayout(null);
-
- toolkit = Toolkit.getDefaultToolkit();
- fonts = toolkit.getFontList();
-
- familyChoser = new Choice();
- for (int i = 0; i < fonts.length; i++) {
- familyChoser.addItem(fonts[i]);
- }
- add(familyChoser);
- familyChoser.reshape(20, 5, 100, 30);
-
- styleChoser = new Choice();
- for (int i = 0; i < styleNames.length; i++) {
- styleChoser.addItem(styleNames[i]);
- }
- add(styleChoser);
- styleChoser.reshape(145, 5, 70, 30);
-
- sizeChoser = new Choice();
- for (int i = 0; i < pointSizes.length; i++) {
- sizeChoser.addItem("" + pointSizes[i]);
- }
- add(sizeChoser);
- sizeChoser.reshape(220, 5, 70, 30);
-
- resize(300,40);
- }
-
-
- public Dimension preferredSize() {
- return new Dimension(300, 40);
- }
-
- public void setValue(Object o) {
- font = (Font) o;
- if (this.font == null)
- return;
-
- changeFont(font);
- // Update the current GUI choices.
- for (int i = 0; i < fonts.length; i++) {
- if (fonts[i].equals(font.getFamily())) {
- familyChoser.select(i);
- break;
- }
- }
- for (int i = 0; i < styleNames.length; i++) {
- if (font.getStyle() == styles[i]) {
- styleChoser.select(i);
- break;
- }
- }
- for (int i = 0; i < pointSizes.length; i++) {
- if (font.getSize() <= pointSizes[i]) {
- sizeChoser.select(i);
- break;
- }
- }
- }
-
- private void changeFont(Font f) {
- font = f;
- if (sample != null) {
- remove(sample);
- }
- sample = new Label(sampleText);
- sample.setFont(font);
- add(sample);
- Component p = getParent();
- if (p != null) {
- p.invalidate();
- p.layout();
- }
- invalidate();
- layout();
- repaint();
- support.firePropertyChange("", null, null);
- }
-
- public Object getValue() {
- return (font);
- }
-
- public String getJavaInitializationString() {
- if (this.font == null)
- return "null";
-
- return "new java.awt.Font(\"" + font.getName() + "\", " +
- font.getStyle() + ", " + font.getSize() + ")";
- }
-
- public boolean action(Event e, Object arg) {
- String family = familyChoser.getSelectedItem();
- int style = styles[styleChoser.getSelectedIndex()];
- int size = pointSizes[sizeChoser.getSelectedIndex()];
- try {
- Font f = new Font(family, style, size);
- changeFont(f);
- } catch (Exception ex) {
- System.err.println("Couldn't create font " + family + "-" +
- styleNames[style] + "-" + size);
- }
- return (false);
- }
-
-
- public boolean isPaintable() {
- return true;
- }
-
- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
- // Silent noop.
- Font oldFont = gfx.getFont();
- gfx.setFont(font);
- FontMetrics fm = gfx.getFontMetrics();
- int vpad = (box.height - fm.getAscent())/2;
- gfx.drawString(sampleText, 0, box.height-vpad);
- gfx.setFont(oldFont);
- }
-
- public String getAsText() {
- if (this.font == null) {
- return null;
- }
- StringBuilder sb = new StringBuilder();
- sb.append(this.font.getName());
- sb.append(' ');
-
- boolean b = this.font.isBold();
- if (b) {
- sb.append("BOLD");
- }
- boolean i = this.font.isItalic();
- if (i) {
- sb.append("ITALIC");
- }
- if (b || i) {
- sb.append(' ');
- }
- sb.append(this.font.getSize());
- return sb.toString();
- }
-
- public void setAsText(String text) throws IllegalArgumentException {
- setValue((text == null) ? null : Font.decode(text));
- }
-
- public String[] getTags() {
- return null;
- }
-
- public java.awt.Component getCustomEditor() {
- return this;
- }
-
- public boolean supportsCustomEditor() {
- return true;
- }
-
- public void addPropertyChangeListener(PropertyChangeListener l) {
- support.addPropertyChangeListener(l);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener l) {
- support.removePropertyChangeListener(l);
- }
-
- private Font font;
- private Toolkit toolkit;
- private String sampleText = "Abcde...";
-
- private Label sample;
- private Choice familyChoser;
- private Choice styleChoser;
- private Choice sizeChoser;
-
- private String fonts[];
- private String[] styleNames = { "plain", "bold", "italic" };
- private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC };
- private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 };
-
- private PropertyChangeSupport support = new PropertyChangeSupport(this);
-
+/**
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
+ */
+public class FontEditor extends com.sun.beans.editors.FontEditor {
}
--- jdk/src/share/classes/sun/beans/editors/IntegerEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/IntegerEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,17 +26,7 @@
package sun.beans.editors;
/**
- * Property editor for a java builtin "int" type.
- *
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-public class IntegerEditor extends NumberEditor {
-
-
- public void setAsText(String text) throws IllegalArgumentException {
- setValue((text == null) ? null : Integer.decode(text));
- }
-
+public class IntegerEditor extends com.sun.beans.editors.IntegerEditor {
}
--- jdk/src/share/classes/sun/beans/editors/LongEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/LongEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,23 +26,7 @@
package sun.beans.editors;
/**
- * Property editor for a java builtin "long" type.
- *
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-public class LongEditor extends NumberEditor {
-
- public String getJavaInitializationString() {
- Object value = getValue();
- return (value != null)
- ? value + "L"
- : "null";
- }
-
- public void setAsText(String text) throws IllegalArgumentException {
- setValue((text == null) ? null : Long.decode(text));
- }
-
+public class LongEditor extends com.sun.beans.editors.LongEditor {
}
--- jdk/src/share/classes/sun/beans/editors/NumberEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/NumberEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,19 +26,7 @@
package sun.beans.editors;
/**
- * Abstract Property editor for a java builtin number types.
- *
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-abstract public class NumberEditor extends PropertyEditorSupport {
-
- public String getJavaInitializationString() {
- Object value = getValue();
- return (value != null)
- ? value.toString()
- : "null";
- }
-
+abstract public class NumberEditor extends com.sun.beans.editors.NumberEditor {
}
--- jdk/src/share/classes/sun/beans/editors/ShortEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/ShortEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -23,27 +23,10 @@
* questions.
*/
-
package sun.beans.editors;
/**
- * Property editor for a java builtin "short" type.
- *
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
*/
-
-import java.beans.*;
-
-public class ShortEditor extends NumberEditor {
-
- public String getJavaInitializationString() {
- Object value = getValue();
- return (value != null)
- ? "((short)" + value + ")"
- : "null";
- }
-
- public void setAsText(String text) throws IllegalArgumentException {
- setValue((text == null) ? null : Short.decode(text));
- }
-
+public class ShortEditor extends com.sun.beans.editors.ShortEditor {
}
--- jdk/src/share/classes/sun/beans/editors/StringEditor.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/editors/StringEditor.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -23,52 +23,10 @@
* questions.
*/
-
package sun.beans.editors;
-import java.beans.*;
-
-public class StringEditor extends PropertyEditorSupport {
-
- public String getJavaInitializationString() {
- Object value = getValue();
- if (value == null)
- return "null";
-
- String str = value.toString();
- int length = str.length();
- StringBuilder sb = new StringBuilder(length + 2);
- sb.append('"');
- for (int i = 0; i < length; i++) {
- char ch = str.charAt(i);
- switch (ch) {
- case '\b': sb.append("\\b"); break;
- case '\t': sb.append("\\t"); break;
- case '\n': sb.append("\\n"); break;
- case '\f': sb.append("\\f"); break;
- case '\r': sb.append("\\r"); break;
- case '\"': sb.append("\\\""); break;
- case '\\': sb.append("\\\\"); break;
- default:
- if ((ch < ' ') || (ch > '~')) {
- sb.append("\\u");
- String hex = Integer.toHexString((int) ch);
- for (int len = hex.length(); len < 4; len++) {
- sb.append('0');
- }
- sb.append(hex);
- } else {
- sb.append(ch);
- }
- break;
- }
- }
- sb.append('"');
- return sb.toString();
- }
-
- public void setAsText(String text) {
- setValue(text);
- }
-
+/**
+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE.
+ */
+public class StringEditor extends com.sun.beans.editors.StringEditor {
}
--- jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java 2012-08-10 10:28:28.000000000 -0700
+++ jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1996, 2002, 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. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.beans.infos;
-
-import java.beans.*;
-
-/**
- * BeanInfo descriptor for a standard AWT component.
- */
-
-public class ComponentBeanInfo extends SimpleBeanInfo {
- private static final Class beanClass = java.awt.Component.class;
-
- public PropertyDescriptor[] getPropertyDescriptors() {
- try {
- PropertyDescriptor
- name = new PropertyDescriptor("name", beanClass),
- background = new PropertyDescriptor("background", beanClass),
- foreground = new PropertyDescriptor("foreground", beanClass),
- font = new PropertyDescriptor("font", beanClass),
- enabled = new PropertyDescriptor("enabled", beanClass),
- visible = new PropertyDescriptor("visible", beanClass),
- focusable = new PropertyDescriptor("focusable", beanClass);
-
- enabled.setExpert(true);
- visible.setHidden(true);
-
- background.setBound(true);
- foreground.setBound(true);
- font.setBound(true);
- focusable.setBound(true);
-
- PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable };
- return rv;
- } catch (IntrospectionException e) {
- throw new Error(e.toString());
- }
- }
-}
--- jdk/src/share/classes/sun/font/FontUtilities.java 2012-08-10 10:28:29.000000000 -0700
+++ jdk/src/share/classes/sun/font/FontUtilities.java 2013-01-16 08:58:15.000000000 -0800
@@ -48,6 +48,8 @@
public static boolean isLinux;
+ public static boolean isBSD;
+
public static boolean isMacOSX;
public static boolean isSolaris8;
@@ -78,6 +80,11 @@
isLinux = osName.startsWith("Linux");
+
+ isBSD = (osName.startsWith("FreeBSD") ||
+ osName.startsWith("NetBSD") ||
+ osName.startsWith("OpenBSD"));
+
isMacOSX = osName.contains("OS X"); // TODO: MacOSX
String t2kStr = System.getProperty("sun.java2d.font.scaler");
--- jdk/src/share/classes/sun/font/SunFontManager.java 2012-08-10 10:28:31.000000000 -0700
+++ jdk/src/share/classes/sun/font/SunFontManager.java 2013-01-16 08:58:15.000000000 -0800
@@ -417,7 +417,7 @@
* registerFonts method as on-screen these JRE fonts
* always go through the T2K rasteriser.
*/
- if (FontUtilities.isLinux) {
+ if (FontUtilities.isLinux || FontUtilities.isBSD) {
/* Linux font configuration uses these fonts */
registerFontDir(jreFontDirName);
}
--- jdk/src/share/classes/sun/invoke/anon/AnonymousClassLoader.java 2012-08-10 10:28:31.000000000 -0700
+++ jdk/src/share/classes/sun/invoke/anon/AnonymousClassLoader.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -73,74 +73,14 @@
public class AnonymousClassLoader {
final Class<?> hostClass;
- // Note: Do not refactor the calls to checkHostClass unless you
- // also adjust this constant:
- private static int CHC_CALLERS = 3;
-
- public AnonymousClassLoader() {
- this.hostClass = checkHostClass(null);
- }
- public AnonymousClassLoader(Class<?> hostClass) {
- this.hostClass = checkHostClass(hostClass);
- }
-
- private static Class<?> getTopLevelClass(Class<?> clazz) {
- for(Class<?> outer = clazz.getDeclaringClass(); outer != null;
- outer = outer.getDeclaringClass()) {
- clazz = outer;
- }
- return clazz;
+ // Privileged constructor.
+ private AnonymousClassLoader(Class<?> hostClass) {
+ this.hostClass = hostClass;
}
- private static Class<?> checkHostClass(Class<?> hostClass) {
- // called only from the constructor
- // does a context-sensitive check on caller class
- // CC[0..3] = {Reflection, this.checkHostClass, this.<init>, caller}
- Class<?> caller = sun.reflect.Reflection.getCallerClass(CHC_CALLERS);
-
- if (caller == null) {
- // called from the JVM directly
- if (hostClass == null)
- return AnonymousClassLoader.class; // anything central will do
- return hostClass;
- }
-
- if (hostClass == null)
- hostClass = caller; // default value is caller itself
-
- // anonymous class will access hostClass on behalf of caller
- Class<?> callee = hostClass;
-
- if (caller == callee)
- // caller can always nominate itself to grant caller's own access rights
- return hostClass;
-
- // normalize caller and callee to their top-level classes:
- caller = getTopLevelClass(caller);
- callee = getTopLevelClass(callee);
- if (caller == callee)
- return caller;
-
- ClassLoader callerCL = caller.getClassLoader();
- if (callerCL == null) {
- // caller is trusted code, so accept the proposed hostClass
- return hostClass;
- }
-
- // %%% should do something with doPrivileged, because trusted
- // code should have a way to execute on behalf of
- // partially-trusted clients
-
- // Does the caller have the right to access the private
- // members of the callee? If not, raise an error.
- final int ACC_PRIVATE = 2;
- try {
- sun.reflect.Reflection.ensureMemberAccess(caller, callee, null, ACC_PRIVATE);
- } catch (IllegalAccessException ee) {
- throw new IllegalArgumentException(ee);
- }
-
- return hostClass;
+ public static AnonymousClassLoader make(sun.misc.Unsafe unsafe, Class<?> hostClass) {
+ if (unsafe == null) throw new NullPointerException();
+ return new AnonymousClassLoader(hostClass);
}
public Class<?> loadClass(byte[] classFile) {
@@ -249,7 +189,7 @@
private static int fakeNameCounter = 99999;
// ignore two warnings on this line:
- static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe();
+ private static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe();
// preceding line requires that this class be on the boot class path
static private final Method defineAnonymousClass;
--- jdk/src/share/classes/sun/launcher/LauncherHelper.java 2012-08-10 10:28:48.000000000 -0700
+++ jdk/src/share/classes/sun/launcher/LauncherHelper.java 2013-01-16 08:58:10.000000000 -0800
@@ -48,6 +48,9 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.charset.Charset;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
import java.util.ResourceBundle;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -69,8 +72,6 @@
private static StringBuilder outBuf = new StringBuilder();
- private static ResourceBundle javarb = null;
-
private static final String INDENT = " ";
private static final String VM_SETTINGS = "VM settings:";
private static final String PROP_SETTINGS = "Property settings:";
@@ -78,6 +79,7 @@
// sync with java.c and sun.misc.VM
private static final String diagprop = "sun.java.launcher.diag";
+ final static boolean trace = sun.misc.VM.getSavedProperty(diagprop) != null;
private static final String defaultBundleName =
"sun.launcher.resources.launcher";
@@ -428,11 +430,11 @@
if (msgKey != null) {
ostream.println(getLocalizedMessage(msgKey, args));
}
- if (sun.misc.VM.getSavedProperty(diagprop) != null) {
+ if (trace) {
if (t != null) {
t.printStackTrace();
} else {
- Thread.currentThread().dumpStack();
+ Thread.dumpStack();
}
}
System.exit(1);
@@ -532,4 +534,82 @@
}
return null; // keep the compiler happy
}
+
+ static String[] expandArgs(String[] argArray) {
+ List<StdArg> aList = new ArrayList<>();
+ for (String x : argArray) {
+ aList.add(new StdArg(x));
+ }
+ return expandArgs(aList);
+ }
+
+ static String[] expandArgs(List<StdArg> argList) {
+ ArrayList<String> out = new ArrayList<>();
+ if (trace) {
+ System.err.println("Incoming arguments:");
+ }
+ for (StdArg a : argList) {
+ if (trace) {
+ System.err.println(a);
+ }
+ if (a.needsExpansion) {
+ File x = new File(a.arg);
+ File parent = x.getParentFile();
+ String glob = x.getName();
+ if (parent == null) {
+ parent = new File(".");
+ }
+ try (DirectoryStream<Path> dstream =
+ Files.newDirectoryStream(parent.toPath(), glob)) {
+ int entries = 0;
+ for (Path p : dstream) {
+ out.add(p.normalize().toString());
+ entries++;
+ }
+ if (entries == 0) {
+ out.add(a.arg);
+ }
+ } catch (Exception e) {
+ out.add(a.arg);
+ if (trace) {
+ System.err.println("Warning: passing argument as-is " + a);
+ System.err.print(e);
+ }
+ }
+ } else {
+ out.add(a.arg);
+ }
+ }
+ String[] oarray = new String[out.size()];
+ out.toArray(oarray);
+
+ if (trace) {
+ System.err.println("Expanded arguments:");
+ for (String x : oarray) {
+ System.err.println(x);
+ }
+ }
+ return oarray;
+ }
+
+ /* duplicate of the native StdArg struct */
+ private static class StdArg {
+ final String arg;
+ final boolean needsExpansion;
+ StdArg(String arg, boolean expand) {
+ this.arg = arg;
+ this.needsExpansion = expand;
+ }
+ // protocol: first char indicates whether expansion is required
+ // 'T' = true ; needs expansion
+ // 'F' = false; needs no expansion
+ StdArg(String in) {
+ this.arg = in.substring(1);
+ needsExpansion = in.charAt(0) == 'T';
+ }
+ public String toString() {
+ return "StdArg{" + "arg=" + arg + ", needsExpansion=" + needsExpansion + '}';
+ }
+ }
}
+
--- jdk/src/share/classes/sun/launcher/resources/launcher.properties 2012-08-10 10:28:48.000000000 -0700
+++ jdk/src/share/classes/sun/launcher/resources/launcher.properties 2013-01-16 08:58:10.000000000 -0800
@@ -43,7 +43,7 @@
\ and ZIP archives to search for class files.\n\
\ -D<name>=<value>\n\
\ set a system property\n\
-\ -verbose[:class|gc|jni]\n\
+\ -verbose:[class|gc|jni]\n\
\ enable verbose output\n\
\ -version print product version and exit\n\
\ -version:<value>\n\
@@ -136,3 +136,4 @@
Error: An unexpected error occurred while trying to open file {0}
java.launcher.jar.error2=manifest not found in {0}
java.launcher.jar.error3=no main manifest attribute, in {0}
+java.launcher.init.error=initialization error
--- jdk/src/share/classes/sun/misc/JavaAWTAccess.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/share/classes/sun/misc/JavaAWTAccess.java 2013-01-16 08:58:10.000000000 -0800
@@ -0,0 +1,34 @@
+/*
+ * 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.misc;
+
+public interface JavaAWTAccess {
+ public Object get(Object key);
+ public void put(Object key, Object value);
+ public void remove(Object key);
+ public boolean isDisposed();
+ public boolean isMainAppContext();
+}
--- jdk/src/share/classes/sun/misc/Service.java 2012-08-10 10:28:57.000000000 -0700
+++ jdk/src/share/classes/sun/misc/Service.java 2013-01-16 08:58:10.000000000 -0800
@@ -284,12 +284,20 @@
}
String cn = nextName;
nextName = null;
+ Class<?> c = null;
try {
- return Class.forName(cn, true, loader).newInstance();
+ c = Class.forName(cn, false, loader);
} catch (ClassNotFoundException x) {
fail(service,
"Provider " + cn + " not found");
- } catch (Exception x) {
+ }
+ if (!service.isAssignableFrom(c)) {
+ fail(service,
+ "Provider " + cn + " not a subtype");
+ }
+ try {
+ return service.cast(c.newInstance());
+ } catch (Throwable x) {
fail(service,
"Provider " + cn + " could not be instantiated: " + x,
x);
--- jdk/src/share/classes/sun/misc/SharedSecrets.java 2012-08-10 10:28:57.000000000 -0700
+++ jdk/src/share/classes/sun/misc/SharedSecrets.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -56,6 +56,7 @@
private static JavaSecurityAccess javaSecurityAccess;
private static JavaxSecurityAuthKerberosAccess javaxSecurityAuthKerberosAccess;
private static JavaUtilZipAccess javaUtilZipAccess;
+ private static JavaAWTAccess javaAWTAccess;
public static JavaUtilJarAccess javaUtilJarAccess() {
if (javaUtilJarAccess == null) {
@@ -177,4 +178,14 @@
}
return javaUtilZipAccess;
}
+
+ public static void setJavaAWTAccess(JavaAWTAccess jaa) {
+ javaAWTAccess = jaa;
+ }
+
+ public static JavaAWTAccess getJavaAWTAccess() {
+ // this may return null in which case calling code needs to
+ // provision for.
+ return javaAWTAccess;
+ }
}
--- jdk/src/share/classes/sun/net/www/MessageHeader.java 2012-08-10 10:29:01.000000000 -0700
+++ jdk/src/share/classes/sun/net/www/MessageHeader.java 2013-01-16 08:58:10.000000000 -0800
@@ -138,6 +138,43 @@
return null;
}
+ /**
+ * Removes bare Negotiate and Kerberos headers when an "NTLM ..."
+ * appears. All Performed on headers with key being k.
+ * @return true if there is a change
+ */
+ public boolean filterNTLMResponses(String k) {
+ boolean found = false;
+ for (int i=0; i<nkeys; i++) {
+ if (k.equalsIgnoreCase(keys[i])
+ && values[i] != null && values[i].length() > 5
+ && values[i].substring(0, 5).equalsIgnoreCase("NTLM ")) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ int j = 0;
+ for (int i=0; i<nkeys; i++) {
+ if (k.equalsIgnoreCase(keys[i]) && (
+ "Negotiate".equalsIgnoreCase(values[i]) ||
+ "Kerberos".equalsIgnoreCase(values[i]))) {
+ continue;
+ }
+ if (i != j) {
+ keys[j] = keys[i];
+ values[j] = values[i];
+ }
+ j++;
+ }
+ if (j != nkeys) {
+ nkeys = j;
+ return true;
+ }
+ }
+ return false;
+ }
+
class HeaderIterator implements Iterator<String> {
int index = 0;
int next = -1;
--- jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2012-08-10 10:29:02.000000000 -0700
+++ jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2013-01-16 08:58:10.000000000 -0800
@@ -1323,6 +1323,16 @@
if (logger.isLoggable(PlatformLogger.FINE)) {
logger.fine(responses.toString());
}
+
+ boolean b1 = responses.filterNTLMResponses("WWW-Authenticate");
+ boolean b2 = responses.filterNTLMResponses("Proxy-Authenticate");
+ if (b1 || b2) {
+ if (logger.isLoggable(PlatformLogger.FINE)) {
+ logger.fine(">>>> Headers are filtered");
+ logger.fine(responses.toString());
+ }
+ }
+
inputStream = http.getInputStream();
respCode = getResponseCode();
@@ -1782,6 +1792,13 @@
logger.fine(responses.toString());
}
+ if (responses.filterNTLMResponses("Proxy-Authenticate")) {
+ if (logger.isLoggable(PlatformLogger.FINE)) {
+ logger.fine(">>>> Headers are filtered");
+ logger.fine(responses.toString());
+ }
+ }
+
statusLine = responses.getValue(0);
StringTokenizer st = new StringTokenizer(statusLine);
st.nextToken();
--- jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2012-08-10 10:29:03.000000000 -0700
+++ jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2013-01-16 00:07:12.000000000 -0800
@@ -749,8 +749,7 @@
if (sm != null)
sm.checkConnect(isa.getAddress().getHostAddress(),
isa.getPort());
- boolean isIPv6 = (family == StandardProtocolFamily.INET6);
- disconnect0(fd, isIPv6);
+ disconnect0(fd);
remoteAddress = null;
state = ST_UNCONNECTED;
@@ -1085,7 +1084,7 @@
private static native void initIDs();
- private static native void disconnect0(FileDescriptor fd, boolean isIPv6)
+ private static native void disconnect0(FileDescriptor fd)
throws IOException;
private native int receive0(FileDescriptor fd, long address, int len,
--- jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-08-10 10:29:08.000000000 -0700
+++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2013-01-16 08:58:15.000000000 -0800
@@ -1537,7 +1537,7 @@
}
String osname = System.getProperty("os.name");
- if (osname.equals("Linux") || osname.contains("OS X")) {
+ if (osname.equals("Linux") || osname.equals("FreeBSD") || osname.equals("NetBSD") || osname.equals("OpenBSD") || osname.equals("OS X")) {
execCmd = new String[ncomps];
execCmd[n++] = "/usr/bin/lpr";
if ((pFlags & PRINTER) != 0) {
--- jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2012-08-10 10:29:15.000000000 -0700
+++ jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2013-01-16 08:58:10.000000000 -0800
@@ -405,7 +405,8 @@
*/
perms.add(new SocketPermission("*", "connect,accept"));
- perms.add(new RuntimePermission("accessClassInPackage.sun.*"));
+ perms.add(new RuntimePermission("accessClassInPackage.sun.jvmstat.*"));
+ perms.add(new RuntimePermission("accessClassInPackage.sun.jvm.hotspot.*"));
perms.add(new FilePermission("<<ALL FILES>>", "read"));
--- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2012-08-10 10:29:20.000000000 -0700
+++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2013-01-16 08:58:15.000000000 -0800
@@ -83,7 +83,8 @@
String osname = System.getProperty("os.name");
if (osname.startsWith("SunOS")) {
gssLibs = new String[]{ "libgss.so" };
- } else if (osname.startsWith("Linux")) {
+ } else if (osname.startsWith("Linux") ||
+ osname.endsWith("BSD")) {
gssLibs = new String[]{
"libgssapi.so",
"libgssapi_krb5.so",
--- jdk/src/share/classes/sun/security/provider/SecureRandom.java 2012-08-10 10:29:25.000000000 -0700
+++ jdk/src/share/classes/sun/security/provider/SecureRandom.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -56,12 +56,6 @@
private static final long serialVersionUID = 3581829991155417889L;
- /**
- * This static object will be seeded by SeedGenerator, and used
- * to seed future instances of SecureRandom
- */
- private static SecureRandom seeder;
-
private static final int DIGEST_SIZE = 20;
private transient MessageDigest digest;
private byte[] state;
@@ -173,6 +167,28 @@
}
/**
+ * This static object will be seeded by SeedGenerator, and used
+ * to seed future instances of SHA1PRNG SecureRandoms.
+ *
+ * Bloch, Effective Java Second Edition: Item 71
+ */
+ private static class SeederHolder {
+
+ private static final SecureRandom seeder;
+
+ static {
+ /*
+ * Call to SeedGenerator.generateSeed() to add additional
+ * seed material (likely from the Native implementation).
+ */
+ seeder = new SecureRandom(SeedGenerator.getSystemEntropy());
+ byte [] b = new byte[DIGEST_SIZE];
+ SeedGenerator.generateSeed(b);
+ seeder.engineSetSeed(b);
+ }
+ }
+
+ /**
* Generates a user-specified number of random bytes.
*
* @param bytes the array to be filled in with random bytes.
@@ -183,13 +199,8 @@
byte[] output = remainder;
if (state == null) {
- if (seeder == null) {
- seeder = new SecureRandom(SeedGenerator.getSystemEntropy());
- seeder.engineSetSeed(engineGenerateSeed(DIGEST_SIZE));
- }
-
byte[] seed = new byte[DIGEST_SIZE];
- seeder.engineNextBytes(seed);
+ SeederHolder.seeder.engineNextBytes(seed);
state = digest.digest(seed);
}
--- jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java 2012-08-10 10:29:26.000000000 -0700
+++ jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java 2013-01-16 08:58:10.000000000 -0800
@@ -257,18 +257,21 @@
}
}
- // Check that the key identifiers match
+ // Check that the key identifiers match, if both are present
+ byte[] anchorKeyId = null;
if (certIssuerKeyId != null &&
- !Arrays.equals(certIssuerKeyId, getKeyId(anchorCert))) {
-
- continue; // try next cert
- }
+ (anchorKeyId =
+ OCSPChecker.getKeyId(anchorCert)) != null) {
+ if (!Arrays.equals(certIssuerKeyId, anchorKeyId)) {
+ continue; // try next cert
+ }
- if (DEBUG != null && certIssuerKeyId != null) {
- DEBUG.println("Issuer certificate key ID: " +
- String.format("0x%0" +
- (certIssuerKeyId.length * 2) + "x",
- new BigInteger(1, certIssuerKeyId)));
+ if (DEBUG != null) {
+ DEBUG.println("Issuer certificate key ID: " +
+ String.format("0x%0" +
+ (certIssuerKeyId.length * 2) + "x",
+ new BigInteger(1, certIssuerKeyId)));
+ }
}
issuerCert = anchorCert;
--- jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2012-08-10 10:29:26.000000000 -0700
+++ jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2013-01-16 08:58:10.000000000 -0800
@@ -264,6 +264,7 @@
DEBUG.println("OCSP Responder name: " + responderName);
}
} else if (tag == KEY_TAG) {
+ seq = seq.data.getDerValue(); // consume tag and length
if (DEBUG != null) {
byte[] responderKeyId = seq.getOctetString();
DEBUG.println("OCSP Responder key ID: " +
@@ -392,21 +393,29 @@
// Retrieve the issuer's key identifier
if (certIssuerKeyId == null) {
certIssuerKeyId = signerCert.getIssuerKeyIdentifier();
+ if (certIssuerKeyId == null) {
+ if (DEBUG != null) {
+ DEBUG.println("No issuer key identifier (AKID) "
+ + "in the signer certificate");
+ }
+ }
}
- // Check that the key identifiers match
- if (certIssuerKeyId == null ||
- !Arrays.equals(certIssuerKeyId,
- OCSPChecker.getKeyId(responderCert))) {
-
- continue; // try next cert
- }
+ // Check that the key identifiers match, if both are present
+ byte[] responderKeyId = null;
+ if (certIssuerKeyId != null &&
+ (responderKeyId =
+ OCSPChecker.getKeyId(responderCert)) != null) {
+ if (!Arrays.equals(certIssuerKeyId, responderKeyId)) {
+ continue; // try next cert
+ }
- if (DEBUG != null) {
- DEBUG.println("Issuer certificate key ID: " +
- String.format("0x%0" +
- (certIssuerKeyId.length * 2) + "x",
- new BigInteger(1, certIssuerKeyId)));
+ if (DEBUG != null) {
+ DEBUG.println("Issuer certificate key ID: " +
+ String.format("0x%0" +
+ (certIssuerKeyId.length * 2) + "x",
+ new BigInteger(1, certIssuerKeyId)));
+ }
}
// Check for the OCSPSigning key purpose
@@ -433,15 +442,11 @@
// Check the date validity
try {
- if (dateCheckedAgainst == null) {
- signerCert.checkValidity();
- } else {
- signerCert.checkValidity(dateCheckedAgainst);
- }
+ signerCert.checkValidity();
} catch (GeneralSecurityException e) {
if (DEBUG != null) {
DEBUG.println("Responder's certificate not within" +
- " the validity period" + e);
+ " the validity period " + e);
}
continue; // try next cert
}
--- jdk/src/share/classes/sun/security/ssl/HandshakeInStream.java 2012-08-10 10:29:27.000000000 -0700
+++ jdk/src/share/classes/sun/security/ssl/HandshakeInStream.java 2013-01-16 08:58:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2009, 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
@@ -190,6 +190,7 @@
byte[] getBytes8() throws IOException {
int len = getInt8();
+ verifyLength(len);
byte b[] = new byte[len];
read(b, 0, len);
@@ -198,6 +199,7 @@
public byte[] getBytes16() throws IOException {
int len = getInt16();
+ verifyLength(len);
byte b[] = new byte[len];
read(b, 0, len);
@@ -206,10 +208,19 @@
byte[] getBytes24() throws IOException {
int len = getInt24();
+ verifyLength(len);
byte b[] = new byte[len];
read(b, 0, len);
return b;
}
+ // Is a length greater than available bytes in the record?
+ private void verifyLength(int len) throws SSLException {
+ if (len > available()) {
+ throw new SSLException(
+ "Not enough data to fill declared vector size");
+ }
+ }
+
}
--- jdk/src/share/classes/sun/security/ssl/Handshaker.java 2012-08-10 10:29:27.000000000 -0700
+++ jdk/src/share/classes/sun/security/ssl/Handshaker.java 2013-01-16 08:58:10.000000000 -0800
@@ -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
@@ -1063,7 +1063,6 @@
if (debug != null && Debug.isOn("handshake")) {
System.out.println("RSA master secret generation error:");
e.printStackTrace(System.out);
- System.out.println("Generating new random premaster secret");
}
if (requestedVersion != null) {
@@ -1130,7 +1129,6 @@
System.out.println("RSA PreMasterSecret version error: expected"
+ protocolVersion + " or " + requestedVersion + ", decrypted: "
+ premasterVersion);
- System.out.println("Generating new random premaster secret");
}
preMasterSecret =
RSAClientKeyExchange.generateDummySecret(requestedVersion);
--- jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2012-08-10 10:29:28.000000000 -0700
+++ jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2013-01-16 08:58:10.000000000 -0800
@@ -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
@@ -36,6 +36,7 @@
import javax.net.ssl.*;
import sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec;
+import sun.security.util.KeyLength;
/**
* This is the client key exchange message (CLIENT --> SERVER) used with
@@ -192,26 +193,38 @@
"unable to get the plaintext of the premaster secret");
}
- // We are not always able to get the encoded key of the
- // premaster secret. Pass the cheking to master secret
+ int keySize = KeyLength.getKeySize(secretKey);
+ if (keySize > 0 && keySize != 384) { // 384 = 48 * 8
+ if (debug != null && Debug.isOn("handshake")) {
+ System.out.println(
+ "incorrect length of premaster secret: " +
+ (keySize/8));
+ }
+
+ return generateDummySecret(clientHelloVersion);
+ }
+
+ // The key size is exactly 48 bytes or not accessible.
+ //
+ // Conservatively, pass the checking to master secret
// calculation.
return secretKey;
} else if (encoded.length == 48) {
// check the version
if (clientHelloVersion.major == encoded[0] &&
clientHelloVersion.minor == encoded[1]) {
+
return secretKey;
- } else if (clientHelloVersion.v <= ProtocolVersion.TLS10.v) {
+ } else if (clientHelloVersion.v <= ProtocolVersion.TLS10.v &&
+ currentVersion.major == encoded[0] &&
+ currentVersion.minor == encoded[1]) {
/*
- * we never checked the client_version in server side
- * for TLS v1.0 and SSL v3.0. For compatibility, we
- * maintain this behavior.
+ * For compatibility, we maintain the behavior that the
+ * version in pre_master_secret can be the negotiated
+ * version for TLS v1.0 and SSL v3.0.
*/
- if (currentVersion.major == encoded[0] &&
- currentVersion.minor == encoded[1]) {
- this.protocolVersion = currentVersion;
- return secretKey;
- }
+ this.protocolVersion = currentVersion;
+ return secretKey;
}
if (debug != null && Debug.isOn("handshake")) {
@@ -220,22 +233,23 @@
", while PreMasterSecret.client_version is " +
ProtocolVersion.valueOf(encoded[0], encoded[1]));
}
+
+ return generateDummySecret(clientHelloVersion);
} else {
if (debug != null && Debug.isOn("handshake")) {
System.out.println(
"incorrect length of premaster secret: " +
encoded.length);
}
- }
- }
- if (debug != null && Debug.isOn("handshake")) {
- if (failoverException != null) {
- System.out.println("Error decrypting premaster secret:");
- failoverException.printStackTrace(System.out);
+ return generateDummySecret(clientHelloVersion);
}
+ }
- System.out.println("Generating random secret");
+ if (debug != null && Debug.isOn("handshake") &&
+ failoverException != null) {
+ System.out.println("Error decrypting premaster secret:");
+ failoverException.printStackTrace(System.out);
}
return generateDummySecret(clientHelloVersion);
@@ -243,6 +257,10 @@
// generate a premaster secret with the specified version number
static SecretKey generateDummySecret(ProtocolVersion version) {
+ if (debug != null && Debug.isOn("handshake")) {
+ System.out.println("Generating a random fake premaster secret");
+ }
+
try {
String s = ((version.v >= ProtocolVersion.TLS12.v) ?
"SunTls12RsaPremasterSecret" : "SunTlsRsaPremasterSecret");
--- jdk/src/share/classes/sun/swing/FilePane.java 2012-08-10 10:29:34.000000000 -0700
+++ jdk/src/share/classes/sun/swing/FilePane.java 2013-01-16 00:07:14.000000000 -0800
@@ -35,7 +35,6 @@
import java.util.List;
import java.util.concurrent.Callable;
-import javax.accessibility.AccessibleContext;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
@@ -83,9 +82,6 @@
private JPanel currentViewPanel;
private String[] viewTypeActionNames;
- private String filesListAccessibleName = null;
- private String filesDetailsAccessibleName = null;
-
private JPopupMenu contextMenu;
private JMenu viewMenu;
@@ -454,9 +450,6 @@
gigaByteString = UIManager.getString("FileChooser.fileSizeGigaBytes", l);
fullRowSelection = UIManager.getBoolean("FileView.fullRowSelection");
- filesListAccessibleName = UIManager.getString("FileChooser.filesListAccessibleName", l);
- filesDetailsAccessibleName = UIManager.getString("FileChooser.filesDetailsAccessibleName", l);
-
renameErrorTitleText = UIManager.getString("FileChooser.renameErrorTitleText", l);
renameErrorText = UIManager.getString("FileChooser.renameErrorText", l);
renameErrorFileExistsText = UIManager.getString("FileChooser.renameErrorFileExistsText", l);
@@ -641,9 +634,6 @@
if (listViewBorder != null) {
scrollpane.setBorder(listViewBorder);
}
-
- list.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, filesListAccessibleName);
-
p.add(scrollpane, BorderLayout.CENTER);
return p;
}
@@ -1238,8 +1228,6 @@
detailsTableModel.fireTableStructureChanged();
- detailsTable.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, filesDetailsAccessibleName);
-
return p;
} // createDetailsView
--- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2012-08-10 10:29:42.000000000 -0700
+++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2013-01-16 08:58:15.000000000 -0800
@@ -30,4 +30,5 @@
#[solaris]sun.tools.attach.SolarisAttachProvider
#[windows]sun.tools.attach.WindowsAttachProvider
#[linux]sun.tools.attach.LinuxAttachProvider
+#[bsd]sun.tools.attach.BsdAttachProvider
#[macosx]sun.tools.attach.BsdAttachProvider
--- jdk/src/share/classes/sun/tools/jar/Main.java 2012-08-10 10:29:42.000000000 -0700
+++ jdk/src/share/classes/sun/tools/jar/Main.java 2013-01-16 08:58:15.000000000 -0800
@@ -51,6 +51,7 @@
String zname = "";
String[] files;
String rootjar = null;
+ String cwd;
// An entryName(path)->File map generated during "expand", it helps to
// decide whether or not an existing entry in a jar file needs to be
@@ -867,6 +868,19 @@
* Extracts specified entries from JAR file.
*/
void extract(InputStream in, String files[]) throws IOException {
+ // Current working directory
+
+ cwd = System.getProperty("user.dir");
+ if (cwd == null) {
+ fatalError(getMsg("error.no.cwd"));
+ }
+ cwd = (new File(cwd)).getCanonicalPath();
+ if (!cwd.endsWith(File.separator)) {
+ cwd += File.separator;
+ }
+
+ // Extract the files
+
ZipInputStream zis = new ZipInputStream(in);
ZipEntry e;
// Set of all directory entries specified in archive. Disallows
@@ -897,6 +911,19 @@
* Extracts specified entries from JAR file, via ZipFile.
*/
void extract(String fname, String files[]) throws IOException {
+ // Current working directory
+
+ cwd = System.getProperty("user.dir");
+ if (cwd == null) {
+ fatalError(getMsg("error.no.cwd"));
+ }
+ cwd = (new File(cwd)).getCanonicalPath();
+ if (!cwd.endsWith(File.separator)) {
+ cwd += File.separator;
+ }
+
+ // Extract the files
+
ZipFile zf = new ZipFile(fname);
Set<ZipEntry> dirs = newDirSet();
Enumeration<? extends ZipEntry> zes = zf.entries();
@@ -928,6 +955,10 @@
ZipEntry rc = null;
String name = e.getName();
File f = new File(e.getName().replace('/', File.separatorChar));
+ if (!f.getCanonicalPath().startsWith(cwd)) {
+ output(formatMsg("out.ignore.entry", name));
+ return null;
+ }
if (e.isDirectory()) {
if (f.exists()) {
if (!f.isDirectory()) {
@@ -949,6 +980,10 @@
} else {
if (f.getParent() != null) {
File d = new File(f.getParent());
+ if (!d.getCanonicalPath().startsWith(cwd)) {
+ output(formatMsg("out.ignore.entry", name));
+ return null;
+ }
if (!d.exists() && !d.mkdirs() || !d.isDirectory()) {
throw new IOException(formatMsg(
"error.create.dir", d.getPath()));
--- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2012-08-10 10:29:42.000000000 -0700
+++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2013-01-16 08:58:15.000000000 -0800
@@ -44,6 +44,8 @@
{0} : could not create directory
error.incorrect.length=\
incorrect length while processing: {0}
+error.no.cwd=\
+ {0} : could not determine current working directory
out.added.manifest=\
added manifest
out.update.manifest=\
--- jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2012-08-10 10:30:07.000000000 -0700
+++ jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2013-01-16 08:58:15.000000000 -0800
@@ -38,6 +38,7 @@
# gnumake JDK=<java_home> OSNAME=solaris [OPT=true] [LIBARCH=sparcv9]
# gnumake JDK=<java_home> OSNAME=linux [OPT=true]
# gnumake JDK=<java_home> OSNAME=win32 [OPT=true]
+# gnumake JDK=<java_home> OSNAME=bsd [OPT=true]
#
########################################################################
@@ -120,6 +121,29 @@
LINK_SHARED=link -dll -out:$@
endif
+# BSD GNU C Compiler
+ifeq ($(OSNAME), bsd)
+ # GNU Compiler options needed to build it
+ COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer
+ # Options that help find errors
+ COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses
+ ifeq ($(OPT), true)
+ CFLAGS=-O2 $(COMMON_FLAGS)
+ else
+ CFLAGS=-g $(COMMON_FLAGS)
+ endif
+ # Object files needed to create library
+ OBJECTS=$(SOURCES:%.c=%.o)
+ # Library name and options needed to build it
+ # XXX: Needs to be fixed for MacOS X
+ LIBRARY=lib$(LIBNAME).so
+ LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
+ # Libraries we are dependent on
+ LIBRARIES=-lc
+ # Building a shared library
+ LINK_SHARED=$(LINK.c) -shared -o $@
+endif
+
# Common -I options
CFLAGS += -I.
CFLAGS += -I../agent_util
--- jdk/src/share/lib/security/java.security 2012-08-10 10:30:16.000000000 -0700
+++ jdk/src/share/lib/security/java.security 2013-01-16 08:58:10.000000000 -0800
@@ -123,7 +123,7 @@
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
#
# List of comma-separated packages that start with or equal this string
@@ -135,7 +135,7 @@
# by default, none of the class loaders supplied with the JDK call
# checkPackageDefinition.
#
-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
#
# Determines whether this properties file can be appended to
--- jdk/src/share/lib/security/java.security-macosx 2012-08-10 10:30:16.000000000 -0700
+++ jdk/src/share/lib/security/java.security-macosx 2013-01-16 08:58:10.000000000 -0800
@@ -124,7 +124,7 @@
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,apple.
+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,apple.
#
# List of comma-separated packages that start with or equal this string
@@ -136,7 +136,7 @@
# by default, none of the class loaders supplied with the JDK call
# checkPackageDefinition.
#
-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,apple.
+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,apple.
#
# Determines whether this properties file can be appended to
--- jdk/src/share/lib/security/java.security-solaris 2012-08-10 10:30:16.000000000 -0700
+++ jdk/src/share/lib/security/java.security-solaris 2013-01-16 08:58:10.000000000 -0800
@@ -125,7 +125,7 @@
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
#
# List of comma-separated packages that start with or equal this string
@@ -137,7 +137,7 @@
# by default, none of the class loaders supplied with the JDK call
# checkPackageDefinition.
#
-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
#
# Determines whether this properties file can be appended to
--- jdk/src/share/lib/security/java.security-windows 2012-08-10 10:30:16.000000000 -0700
+++ jdk/src/share/lib/security/java.security-windows 2013-01-16 08:58:10.000000000 -0800
@@ -124,7 +124,7 @@
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
#
# List of comma-separated packages that start with or equal this string
@@ -136,7 +136,7 @@
# by default, none of the class loaders supplied with the JDK call
# checkPackageDefinition.
#
-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
#
# Determines whether this properties file can be appended to
--- jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2012-08-10 10:30:16.000000000 -0700
+++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2013-01-16 08:58:15.000000000 -0800
@@ -93,7 +93,7 @@
// bytes and byte arrays
typedef unsigned int uint;
-#if !defined(MACOSX) || (defined(MACOSX) && defined(NO_ZLIB))
+#if !defined(_ALLBSD_SOURCE) || (defined(_ALLBSD_SOURCE) && defined(NO_ZLIB))
#ifdef _LP64
typedef unsigned int uLong; // Historical zlib, should be 32-bit.
#else
--- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2012-08-10 10:30:18.000000000 -0700
+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2013-01-16 08:58:15.000000000 -0800
@@ -64,7 +64,7 @@
// following is needed for _LP64
-#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX))
+#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX))
#include <sys/types.h>
#endif
--- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2012-08-10 10:30:19.000000000 -0700
+++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2013-01-16 08:58:15.000000000 -0800
@@ -24,6 +24,9 @@
* questions.
*/
+#ifdef __OpenBSD__
+#include <sys/types.h>
+#endif
#ifdef _ALLBSD_SOURCE
#include <machine/endian.h>
#elif __linux__
@@ -32,6 +35,12 @@
#endif
#include "jfdlibm.h"
+/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */
+#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \
+ _BYTE_ORDER == _BIG_ENDIAN
+#undef _LITTLE_ENDIAN
+#endif
+
#ifdef __NEWVALID /* special setup for Sun test regime */
#if defined(i386) || defined(i486) || \
defined(intel) || defined(x86) || defined(arm) || \
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2012-08-10 10:30:27.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2013-01-16 08:58:15.000000000 -0800
@@ -86,7 +86,7 @@
#endif /* MLIB_USE_FTOI_CLAMPING */
/***************************************************************/
-#if defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG)
+#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG)
/* NB: Explicit cast to DTYPE is necessary to avoid warning from Microsoft VC compiler.
And we need to explicitly define cast behavior if source exceeds destination range.
@@ -103,7 +103,7 @@
dp[0 ] = (DTYPE) ((res0) & DTYPE_MASK); \
dp[chan1] = (DTYPE) ((res1) & DTYPE_MASK)
-#endif /* defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */
+#endif /* (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -114,17 +114,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | ((mlib_s64)sp[0] & 0xffffffff)
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | ((mlib_s64)sp[chan1] & 0xffffffff)
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2012-08-10 10:30:27.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2013-01-16 08:58:15.000000000 -0800
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -138,7 +138,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -149,17 +149,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2012-08-10 10:30:27.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2013-01-16 08:58:15.000000000 -0800
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -106,7 +106,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -117,17 +117,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2013-01-16 08:58:15.000000000 -0800
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -138,7 +138,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -149,17 +149,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2013-01-16 08:58:15.000000000 -0800
@@ -95,7 +95,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -107,7 +107,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -118,17 +118,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2013-01-16 08:58:15.000000000 -0800
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -138,7 +138,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -149,17 +149,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2013-01-16 08:58:15.000000000 -0800
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -106,7 +106,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -117,17 +117,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2013-01-16 08:58:15.000000000 -0800
@@ -95,7 +95,7 @@
dst = dp[0];
if (ld_offset + size < 32) {
dmask = (mask0 << (32 - size)) >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 >> (ld_offset - ls_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -104,12 +104,12 @@
#else
src = (src0 >> (ld_offset - ls_offset));
dp[0] = (dst & (~dmask)) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = mask0 >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 >> (ld_offset - ls_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -118,7 +118,7 @@
#else
src = (src0 >> (ld_offset - ls_offset));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = 32 - ld_offset;
dp++;
ls_offset += j;
@@ -131,7 +131,7 @@
if (ld_offset + size < 32) {
dmask = (mask0 << (32 - size)) >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << shift) | (src1 >> (32 - shift));
@@ -141,12 +141,12 @@
#else
src = (src0 << shift) | (src1 >> (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = mask0 >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << shift) | (src1 >> (32 - shift));
@@ -156,7 +156,7 @@
#else
src = (src0 << shift) | (src1 >> (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = 32 - ld_offset;
dp++;
sp++;
@@ -164,19 +164,19 @@
}
if (j < size) src1 = sp[0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
for (; j <= size - 32; j += 32) {
src0 = src1;
src1 = sp[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24);
#else
dp[0] = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp++;
dp++;
}
@@ -187,7 +187,7 @@
if (ls_offset + j > 32) src1 = sp[1];
dst = dp[0];
dmask = mask0 << (32 - j);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -196,7 +196,7 @@
#else
src = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
#else /* _LONGLONG */
@@ -315,7 +315,7 @@
dst = dp[0];
if (ld_offset >= size) {
dmask = (lmask0 << (32 - size)) >> (ld_offset - size);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 << (ls_offset - ld_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -324,12 +324,12 @@
#else
src = (src0 << (ls_offset - ld_offset));
dp[0] = (dst & (~dmask)) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = lmask0 << (32 - ld_offset);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 << (ls_offset - ld_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -338,7 +338,7 @@
#else
src = (src0 << (ls_offset - ld_offset));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = ld_offset;
dp--;
ls_offset -= j;
@@ -351,7 +351,7 @@
if (ld_offset >= size) {
dmask = (lmask0 << (32 - size)) >> (ld_offset - size);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> shift) | (src1 << (32 - shift));
@@ -361,12 +361,12 @@
#else
src = (src0 >> shift) | (src1 << (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = lmask0 << (32 - ld_offset);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> shift) | (src1 << (32 - shift));
@@ -376,7 +376,7 @@
#else
src = (src0 >> shift) | (src1 << (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = ld_offset;
dp--;
sp--;
@@ -384,22 +384,22 @@
}
if (j < size) src1 = sp[0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (; j <= size - 32; j += 32) {
src0 = src1;
src1 = sp[-1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24);
#else
dp[0] = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp--;
dp--;
}
@@ -410,7 +410,7 @@
if (ls_offset < j) src1 = sp[-1];
dst = dp[0];
dmask = lmask0 >> (32 - j);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -419,7 +419,7 @@
#else
src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
#else /* _LONGLONG */
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2013-01-16 08:58:15.000000000 -0800
@@ -168,7 +168,7 @@
}
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define READ_U8_D64(table0, table1, table2, table3) \
t0 = *(mlib_d64*)((mlib_u8*)table0 + ((s0 << 3) & 0x7F8)); \
@@ -184,7 +184,7 @@
t2 = *(mlib_d64*)((mlib_u8*)table2 + ((s0 >> 5) & 0x7F8)); \
t3 = *(mlib_d64*)((mlib_u8*)table3 + ((s0 << 3) & 0x7F8))
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
void mlib_ImageLookUp_U8_D64(const mlib_u8 *src,
@@ -613,7 +613,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 8, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
@@ -623,12 +623,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
@@ -638,7 +638,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[4] = t0;
dp[5] = t1;
@@ -646,7 +646,7 @@
dp[7] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
@@ -656,12 +656,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
@@ -671,7 +671,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
@@ -719,7 +719,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 12, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -733,14 +733,14 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -754,7 +754,7 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[6] = t0;
dp[7] = t1;
@@ -764,7 +764,7 @@
dp[11] = t5;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -778,14 +778,14 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -799,7 +799,7 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[6] = t0;
dp[7] = t1;
dp[8] = t2;
@@ -852,7 +852,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 16, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -862,12 +862,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
@@ -877,12 +877,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -892,12 +892,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
@@ -907,7 +907,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[12] = t0;
dp[13] = t1;
@@ -915,7 +915,7 @@
dp[15] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -925,12 +925,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
@@ -940,12 +940,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -955,12 +955,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
@@ -970,7 +970,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2013-01-16 08:58:15.000000000 -0800
@@ -88,7 +88,7 @@
} d64_2_f32;
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
static const mlib_u32 mlib_bit_mask[16] = {
0x00000000u, 0xFF000000u, 0x00FF0000u, 0xFFFF0000u,
@@ -126,7 +126,7 @@
0x00000000u, 0x00FFFFFFu, 0xFF000000u, 0xFFFFFFFFu
};
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src,
@@ -228,13 +228,13 @@
#endif /* __SUNPRO_C */
for (; i <= (size - 16); i += 16) {
s0 = *(mlib_u16*)sa;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*da++ = dd_array[s0 & 0xFF];
*da++ = dd_array[s0 >> 8];
#else
*da++ = dd_array[s0 >> 8];
*da++ = dd_array[s0 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sa += 2;
}
@@ -258,20 +258,20 @@
val1 = p_dd[2*val0+1];
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u32*)da)[0] = (val1 & emask) | (((mlib_u32*)da)[0] &~ emask);
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8);
#else
mlib_u64 emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u64*)da)[0] = (((mlib_u64*)dd_array)[sa[0]] & emask) | (((mlib_u64*)da)[0] &~ emask);
@@ -323,13 +323,13 @@
val0 = table[0][0];
val1 = table[0][1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
val0 = val0 | (table[1][0] << 8);
val1 = val1 | (table[1][1] << 8);
#else
val0 = (val0 << 8) | table[1][0];
val1 = (val1 << 8) | table[1][1];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
val0 |= (val0 << 16);
val1 |= (val1 << 16);
@@ -394,11 +394,11 @@
dd1 = dd2;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u32*)da)[0] = (dd1 & emask) | (((mlib_u32*)da)[0] &~ emask);
#else /* _NO_LONGLONG */
@@ -412,11 +412,11 @@
dd = ((mlib_u64*)dd_array)[s0 & 0xf];
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8);
#else
emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u64*)da)[0] = (dd & emask) | (((mlib_u64*)da)[0] &~ emask);
#endif /* _NO_LONGLONG */
@@ -462,7 +462,7 @@
buffs = buff + size;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
l0 = (table[0][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]);
h0 = (table[0][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]);
l1 = (l0 >> 8); l1 |= (l1 << 24);
@@ -476,7 +476,7 @@
h1 = (h0 << 8); h1 |= (h1 >> 24);
l2 = (l1 << 8); l2 |= (l2 >> 24);
h2 = (h1 << 8); h2 |= (h2 >> 24);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/* calculate lookup table */
#ifdef __SUNPRO_C
@@ -564,11 +564,11 @@
dd = ((mlib_u32*)(d_array12 + (s0 & 0xF)))[1];
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = (dd & emask) | (da[0] &~ emask);
}
@@ -611,13 +611,13 @@
buffs = buff + size;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
l = (table[3][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]);
h = (table[3][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]);
#else
l = (table[0][0] << 24) | (table[1][0] << 16) | (table[2][0] << 8) | (table[3][0]);
h = (table[0][1] << 24) | (table[1][1] << 16) | (table[2][1] << 8) | (table[3][1]);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u32*)lh)[0] = l; ((mlib_u32*)lh)[1] = l;
((mlib_u32*)lh)[2] = l; ((mlib_u32*)lh)[3] = h;
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2013-01-16 08:58:15.000000000 -0800
@@ -30,7 +30,7 @@
typedef union {
mlib_d64 db;
struct {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
mlib_s32 int1, int0;
#else
mlib_s32 int0, int1;
--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2012-08-10 10:30:29.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2013-01-16 08:58:15.000000000 -0800
@@ -275,11 +275,11 @@
for (i = 0; j <= (b_size - 4); j += 4, i++) {
src0 = src1;
src1 = pws[i + 1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
pwd[i] = (src0 >> lshift) | (src1 << rshift);
#else
pwd[i] = (src0 << lshift) | (src1 >> rshift);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
sa += i << 2;
@@ -381,11 +381,11 @@
for (; j <= (src_width - 4); j += 4) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s32 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);
#else
*((mlib_s32 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -414,11 +414,11 @@
for (; j <= (src_width - 8); j += 8) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);
#else
*((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -484,11 +484,11 @@
for (; j <= (src_width - 2); j += 2) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s32 *) (pdst_row + j)) = (src0 >> 16) | (src1 << 16);
#else
*((mlib_s32 *) (pdst_row + j)) = (src0 << 16) | (src1 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -516,11 +516,11 @@
for (; j <= (src_width - 4); j += 4) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);
#else
*((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -585,11 +585,11 @@
for (; j <= (src_width - 2); j += 2) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s64 *) (pdst_row + j)) = (src0 >> 32) | (src1 << 32);
#else
*((mlib_s64 *) (pdst_row + j)) = (src0 << 32) | (src1 >> 32);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -687,11 +687,11 @@
#endif /* __SUNPRO_C */
for (; n > SIZE; n -= SIZE) {
s1 = *tmp++;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*(TYPE *) dp = (s0 >> shl) | (s1 << shr);
#else
*(TYPE *) dp = (s0 << shl) | (s1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = s1;
dp += SIZE;
sp += SIZE;
--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2012-08-10 10:30:29.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2013-01-16 08:58:15.000000000 -0800
@@ -120,7 +120,7 @@
} \
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
/***************************************************************/
#define READ_U8_U8_ALIGN(table0, table1, table2, table3) \
@@ -163,7 +163,7 @@
t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 14) & 0x3FC)); \
t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 >> 22) & 0x3FC))
-#else /* _LITTLE_ENDIAN */
+#else /* BYTE_ORDER == ... */
/***********/
#define READ_U8_U8_ALIGN(table0, table1, table2, table3) \
@@ -206,7 +206,7 @@
t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 6) & 0x3FC)); \
t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 << 2) & 0x3FC))
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
void mlib_c_ImageLookUp_U8_U8(const mlib_u8 *src,
@@ -297,11 +297,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab[s2 >> 8];
#else
*dp++ = tab[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
for (; i < size; i++, dp++, sp++)
@@ -403,11 +403,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab0[s2 >> 8];
#else
*dp++ = tab0[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
@@ -544,11 +544,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab1[s2 >> 8];
#else
*dp++ = tab1[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
@@ -694,11 +694,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab0[s2 >> 8];
#else
*dp++ = tab0[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
@@ -1852,21 +1852,21 @@
s0 = tab0[0];
s1 = tab1[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 8) + s0;
#else
s2 = (s0 << 8) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
tab[i - 1] = (mlib_u16) s2;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 8) + s0;
#else
s2 = (s0 << 8) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = (mlib_u16) s2;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -1897,11 +1897,11 @@
for (i = 0; i < size - 3; i += 2, da++, sa += 2) {
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t1 << 16) + t0;
#else
t = (t0 << 16) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
da[0] = t;
@@ -1909,11 +1909,11 @@
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t1 << 16) + t0;
#else
t = (t0 << 16) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = t;
da++;
@@ -1927,13 +1927,13 @@
if (off > 1) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[1] = (t0 >> 8);
dp[0] = t0;
#else
dp[0] = (t0 >> 8);
dp[1] = t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sa++;
size--;
dp += 2;
@@ -1941,11 +1941,11 @@
t0 = tab[sa[0]];
sa++;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = t0;
#else
*dp++ = (t0 >> 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da = (mlib_s32 *) dp;
@@ -1959,11 +1959,11 @@
for (i = 0; i < size - 4; i += 2, da++, sa += 2) {
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t0 >> 8) + (t1 << 8) + (t2 << 24);
#else
t = (t0 << 24) + (t1 << 8) + (t2 >> 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = t2;
s0 = sa[0];
s1 = sa[1];
@@ -1972,29 +1972,29 @@
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t0 >> 8) + (t1 << 8) + (t2 << 24);
#else
t = (t0 << 24) + (t1 << 8) + (t2 >> 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[0] = (t2 >> 8);
#else
dp[0] = t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
if ((size & 1) == 0) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[2] = (t0 >> 8);
dp[1] = t0;
#else
dp[1] = (t0 >> 8);
dp[2] = t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2012,22 +2012,22 @@
s1 = tab1[0];
s2 = tab2[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s3 = (s2 << 24) + (s1 << 16) + (s0 << 8);
#else
s3 = (s0 << 16) + (s1 << 8) + s2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
tab[i - 1] = s3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s3 = (s2 << 24) + (s1 << 16) + (s0 << 8);
#else
s3 = (s0 << 16) + (s1 << 8) + s2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = s3;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -2064,24 +2064,24 @@
for (i = 0; i < size - 7; i += 4, da += 3, sa += 4) {
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t0 >> 8) + (t1 << 16);
res2 = (t1 >> 16);
#else
da[0] = (t0 << 8) + (t1 >> 16);
res2 = (t1 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += (t0 << 8);
res1 = (t0 >> 24) + t1;
#else
res2 += (t0 >> 8);
res1 = (t0 << 24) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[2];
s1 = sa[3];
da[1] = res2;
@@ -2090,24 +2090,24 @@
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t0 >> 8) + (t1 << 16);
res2 = (t1 >> 16);
#else
da[0] = (t0 << 8) + (t1 >> 16);
res2 = (t1 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += (t0 << 8);
res1 = (t0 >> 24) + t1;
#else
res2 += (t0 >> 8);
res1 = (t0 << 24) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[1] = res2;
da[2] = res1;
da += 3;
@@ -2143,11 +2143,11 @@
s2 = tab2[0];
s3 = tab3[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0;
#else
s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
@@ -2155,11 +2155,11 @@
tab[i - 1] = s4;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0;
#else
s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = s4;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -2225,13 +2225,13 @@
for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) {
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> shift) + (t1 << shift1);
res2 = (t1 >> shift) + (t2 << shift1);
#else
res1 = (t0 << shift) + (t1 >> shift1);
res2 = (t1 << shift) + (t2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = t2;
s0 = sa[0];
s1 = sa[1];
@@ -2241,28 +2241,28 @@
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> shift) + (t1 << shift1);
res2 = (t1 >> shift) + (t2 << shift1);
#else
res1 = (t0 << shift) + (t1 >> shift1);
res2 = (t1 << shift) + (t2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = (da[2] >> shift1);
da[2] = (t2 >> shift) + (t0 << shift1);
#else
t0 = (da[2] << shift1);
da[2] = (t2 << shift) + (t0 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da += 2;
dp = (mlib_u8 *) da + (4 - off);
if ((size & 1) == 0) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[3] = (mlib_u8) (t0 >> 24);
dp[2] = (mlib_u8) (t0 >> 16);
dp[1] = (mlib_u8) (t0 >> 8);
@@ -2272,7 +2272,7 @@
dp[1] = (mlib_u8) (t0 >> 16);
dp[2] = (mlib_u8) (t0 >> 8);
dp[3] = (mlib_u8) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2348,13 +2348,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2363,13 +2363,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[2];
s1 = sa[3];
da[1] = res2;
@@ -2382,13 +2382,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2397,13 +2397,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[1] = res2;
da[2] = res1;
da += 3;
@@ -2455,11 +2455,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
da[0] = res;
}
@@ -2468,11 +2468,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
}
@@ -2496,11 +2496,11 @@
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
sa++;
@@ -2513,13 +2513,13 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
res1 = res2;
s0 = sa[0];
da[0] = res;
@@ -2529,21 +2529,21 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (da[1] >> shift1);
da[1] = (res2 >> shift) + (res1 << shift1);
#else
res1 = (da[1] << shift1);
da[1] = (res2 << shift) + (res1 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2617,13 +2617,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2632,13 +2632,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[2];
s1 = sa[3];
da[1] = res2;
@@ -2651,13 +2651,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2666,13 +2666,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[1] = res2;
da[2] = res1;
da += 3;
@@ -2724,11 +2724,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
da[0] = res;
}
@@ -2737,11 +2737,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
}
@@ -2765,11 +2765,11 @@
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
sa++;
@@ -2782,13 +2782,13 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
res1 = res2;
s0 = sa[0];
da[0] = res;
@@ -2798,21 +2798,21 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (da[1] >> shift1);
da[1] = (res2 >> shift) + (res1 << shift1);
#else
res1 = (da[1] << shift1);
da[1] = (res2 << shift) + (res1 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2863,21 +2863,21 @@
s0 = tab0[0];
s1 = tab1[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 16) + s0;
#else
s2 = (s0 << 16) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
tab[i - 1] = s2;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 16) + s0;
#else
s2 = (s0 << 16) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = s2;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -2919,11 +2919,11 @@
else {
t0 = tab[*sa++];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = (mlib_u16) (t0);
#else
*dp++ = (mlib_u16) (t0 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da = (mlib_u32 *) dp;
s0 = sa[0];
s1 = sa[1];
@@ -2935,13 +2935,13 @@
for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) {
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + (t2 << 16);
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + (t2 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = t2;
s0 = sa[0];
s1 = sa[1];
@@ -2951,32 +2951,32 @@
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + (t2 << 16);
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + (t2 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
da += 2;
dp = (mlib_u16 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[0] = (mlib_u16) (t2 >> 16);
#else
dp[0] = (mlib_u16) t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
if ((size & 1) == 0) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[2] = (mlib_u16) (t0 >> 16);
dp[1] = (mlib_u16) t0;
#else
dp[1] = (mlib_u16) (t0 >> 16);
dp[2] = (mlib_u16) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2994,13 +2994,13 @@
s1 = tab1[0];
s2 = tab2[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s3 = (s0 << 16);
s4 = (s2 << 16) + s1;
#else
s3 = s0;
s4 = (s1 << 16) + s2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
@@ -3008,13 +3008,13 @@
tab[2 * i - 1] = s4;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s2 << 16) + s1;
tab[510] = s0 << 16;
#else
s4 = (s1 << 16) + s2;
tab[510] = s0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[511] = s4;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -3050,13 +3050,13 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + t2;
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0] << 3;
s1 = sa[1] << 3;
da[0] = res1;
@@ -3068,13 +3068,13 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + t2;
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
da[2] = t3;
@@ -3105,13 +3105,13 @@
s2 = tab2[0];
s3 = tab3[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s1 << 16) + s0;
s5 = (s3 << 16) + s2;
#else
s4 = (s0 << 16) + s1;
s5 = (s2 << 16) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
@@ -3120,13 +3120,13 @@
tab[2 * i - 1] = s5;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s1 << 16) + s0;
s5 = (s3 << 16) + s2;
#else
s4 = (s0 << 16) + s1;
s5 = (s2 << 16) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[510] = s4;
tab[511] = s5;
@@ -3181,18 +3181,18 @@
t4 = tab[2 * sa[0]];
t5 = tab[2 * sa[0] + 1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = (mlib_u16) (t4);
#else
*dp++ = (mlib_u16) (t4 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sa++;
da = (mlib_u32 *) dp;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*da++ = (t4 >> 16) + (t5 << 16);
#else
*da++ = (t4 << 16) + (t5 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0] << 3;
s1 = sa[1] << 3;
sa += 2;
@@ -3205,7 +3205,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t5 >> 16) + (t0 << 16);
res2 = (t0 >> 16) + (t1 << 16);
res3 = (t1 >> 16) + (t2 << 16);
@@ -3215,7 +3215,7 @@
res2 = (t0 << 16) + (t1 >> 16);
res3 = (t1 << 16) + (t2 >> 16);
res4 = (t2 << 16) + (t3 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0] << 3;
s1 = sa[1] << 3;
da[0] = res1;
@@ -3229,7 +3229,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t5 >> 16) + (t0 << 16);
res2 = (t0 >> 16) + (t1 << 16);
res3 = (t1 >> 16) + (t2 << 16);
@@ -3239,36 +3239,36 @@
res2 = (t0 << 16) + (t1 >> 16);
res3 = (t1 << 16) + (t2 >> 16);
res4 = (t2 << 16) + (t3 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
da[2] = res3;
da[3] = res4;
da += 4;
dp = (mlib_u16 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[0] = (mlib_u16) (t3 >> 16);
#else
dp[0] = (mlib_u16) t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
if ((size & 1) == 0) {
t0 = tab[2 * sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[2] = (mlib_u16) (t0 >> 16);
dp[1] = (mlib_u16) t0;
#else
dp[1] = (mlib_u16) (t0 >> 16);
dp[2] = (mlib_u16) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = tab[2 * sa[0] + 1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[4] = (mlib_u16) (t0 >> 16);
dp[3] = (mlib_u16) t0;
#else
dp[3] = (mlib_u16) (t0 >> 16);
dp[4] = (mlib_u16) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -3439,7 +3439,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 8, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
@@ -3449,12 +3449,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
@@ -3464,7 +3464,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[4] = t0;
dp[5] = t1;
@@ -3472,7 +3472,7 @@
dp[7] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
@@ -3482,12 +3482,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
@@ -3497,7 +3497,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
@@ -3545,7 +3545,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 12, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3559,14 +3559,14 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3580,7 +3580,7 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[6] = t0;
dp[7] = t1;
@@ -3590,7 +3590,7 @@
dp[11] = t5;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3604,14 +3604,14 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3625,7 +3625,7 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[6] = t0;
dp[7] = t1;
dp[8] = t2;
@@ -3678,7 +3678,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 16, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3688,12 +3688,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
@@ -3703,12 +3703,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3718,12 +3718,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
@@ -3733,7 +3733,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[12] = t0;
dp[13] = t1;
@@ -3741,7 +3741,7 @@
dp[15] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3751,12 +3751,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
@@ -3766,12 +3766,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3781,12 +3781,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
@@ -3796,7 +3796,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
--- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2012-08-10 10:30:29.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2013-01-16 08:58:15.000000000 -0800
@@ -27,9 +27,21 @@
#ifndef MLIB_IMAGE_H
#define MLIB_IMAGE_H
-#ifdef MACOSX
+#ifdef __OpenBSD__
+#include <sys/types.h>
+#endif
+
+#ifdef _ALLBSD_SOURCE
#include <machine/endian.h>
+
+/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */
+#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \
+ _BYTE_ORDER == _BIG_ENDIAN
+#undef _LITTLE_ENDIAN
#endif
+
+#endif /* _ALLBSD_SOURCE */
+
#include <mlib_types.h>
#include <mlib_status.h>
#include <mlib_sys.h>
--- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2012-08-10 10:30:30.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2013-01-16 08:58:15.000000000 -0800
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <string.h>
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
#include <unistd.h>
#include <sys/param.h>
#endif
@@ -90,7 +90,10 @@
* alignment. -- from stdlib.h of MS VC++5.0.
*/
return (void *) malloc(size);
-#elif defined(MACOSX)
+#elif defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
+ void *ret;
+ return posix_memalign(&ret, 8, size) ? NULL : ret;
+#elif defined(_ALLBSD_SOURCE)
return valloc(size);
#else
return (void *) memalign(8, size);
--- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2012-08-10 10:30:30.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2013-01-16 08:58:15.000000000 -0800
@@ -59,8 +59,16 @@
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__)
+#if defined(_ALLBSD_SOURCE)
#include <stddef.h> /* for ptrdiff_t */
#include <stdint.h> /* for uintptr_t */
+#elif defined(__linux__)
+#include <stdint.h> /* for uintptr_t */
+#include <malloc.h> /* for ptrdiff_t */
+#else
+#include <link.h> /* for uintptr_t */
+#include <stddef.h> /* for ptrdiff_t */
+#endif /* __linux__ */
#if defined(MLIB_OS64BIT) || (defined(MACOSX) && defined(_LP64))
--- jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2012-08-10 10:31:05.000000000 -0700
+++ jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2013-01-16 00:07:18.000000000 -0800
@@ -393,16 +393,7 @@
OGLSDOps *dstOps,
jint dx1, jint dy1, jint dx2, jint dy2)
{
- jboolean adjustAlpha = (pf != NULL && !pf->hasAlpha);
j2d_glBindTexture(dstOps->textureTarget, dstOps->textureID);
-
- if (adjustAlpha) {
- // if the source surface does not have an alpha channel,
- // we need to ensure that the alpha values are forced to 1.0f
- j2d_glPixelTransferf(GL_ALPHA_SCALE, 0.0f);
- j2d_glPixelTransferf(GL_ALPHA_BIAS, 1.0f);
- }
-
// in case pixel stride is not a multiple of scanline stride the copy
// has to be done line by line (see 6207877)
if (srcInfo->scanStride % srcInfo->pixelStride != 0) {
@@ -422,11 +413,6 @@
dx1, dy1, dx2-dx1, dy2-dy1,
pf->format, pf->type, srcInfo->rasBase);
}
- if (adjustAlpha) {
- // restore scale/bias to their original values
- j2d_glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
- j2d_glPixelTransferf(GL_ALPHA_BIAS, 0.0f);
- }
}
/**
--- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2012-08-10 10:31:05.000000000 -0700
+++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2013-01-16 08:58:15.000000000 -0800
@@ -26,7 +26,7 @@
#ifndef OGLFuncs_h_Included
#define OGLFuncs_h_Included
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
#include <dlfcn.h>
#endif
#include "jni.h"
--- jdk/src/solaris/back/util_md.h 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/back/util_md.h 2013-01-16 08:58:15.000000000 -0800
@@ -51,7 +51,7 @@
/* On little endian machines, convert java big endian numbers. */
-#if defined(_LITTLE_ENDIAN)
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define HOST_TO_JAVA_CHAR(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
#define HOST_TO_JAVA_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
--- jdk/src/solaris/bin/ergo.c 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/ergo.c 2013-01-16 08:58:15.000000000 -0800
@@ -100,6 +100,27 @@
/* Compute physical memory by asking the OS */
uint64_t
physical_memory(void) {
+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+ uint64_t result;
+#ifdef HW_PHYSMEM64
+ int64_t physmem;
+ int name[2] = { CTL_HW, HW_PHYSMEM64 };
+#else
+ unsigned long physmem;
+ int name[2] = { CTL_HW, HW_PHYSMEM };
+#endif
+ size_t physmem_len = sizeof(physmem);
+# define UINT64_FORMAT "%" PRIu64
+
+ if (sysctl(name, 2, &physmem, &physmem_len, NULL, 0) == -1)
+ physmem = 256 * MB;
+
+ result = (uint64_t)physmem;
+
+ JLI_TraceLauncher("physical memory: " UINT64_FORMAT " (%.3fGB)\n",
+ result, result / (double) GB);
+ return result;
+#else /* !_ALLBSD_SOURCE */
const uint64_t pages = (uint64_t) sysconf(_SC_PHYS_PAGES);
const uint64_t page_size = (uint64_t) sysconf(_SC_PAGESIZE);
const uint64_t result = pages * page_size;
@@ -110,4 +131,5 @@
" physical memory: " UINT64_FORMAT " (%.3fGB)\n",
pages, page_size, result, result / (double) GB);
return result;
+#endif
}
--- jdk/src/solaris/bin/ergo.h 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/ergo.h 2013-01-16 08:58:15.000000000 -0800
@@ -33,6 +33,10 @@
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
+#ifdef _ALLBSD_SOURCE
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
#include "java.h"
--- jdk/src/solaris/bin/ergo_i586.c 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/ergo_i586.c 2013-01-16 08:58:15.000000000 -0800
@@ -106,7 +106,7 @@
#endif /* __solaris__ */
-#ifdef __linux__
+#if !defined(MACOSX) && (defined(__linux__) || defined(_ALLBSD_SOURCE))
/*
* A utility method for asking the CPU about itself.
@@ -171,6 +171,12 @@
#endif /* _LP64 */
}
+#ifdef __linux__
+#define OSNAMEPREFIX "linux_"
+#else
+#define OSNAMEPREFIX "bsd_"
+#endif
+
/* The definition of a server-class machine for linux-i586 */
jboolean
ServerClassMachineImpl(void) {
@@ -193,11 +199,11 @@
result = JNI_TRUE;
}
}
- JLI_TraceLauncher("linux_" LIBARCHNAME "_ServerClassMachine: %s\n",
+ JLI_TraceLauncher(OSNAMEPREFIX LIBARCHNAME "_ServerClassMachine: %s\n",
(result == JNI_TRUE ? "true" : "false"));
return result;
}
-#endif /* __linux__ */
+#endif /* !MACOSX && (__linux__ || _ALLBSD_SOURCE) */
/*
* Routines shared by solaris-i586 and linux-i586.
@@ -308,6 +314,15 @@
/* Compute the number of physical processors, not logical processors */
static unsigned long
physical_processors(void) {
+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+ unsigned long result;
+ int name[2] = { CTL_HW, HW_NCPU };
+ size_t rlen = sizeof(result);
+
+ if (sysctl(name, 2, &result, &rlen, NULL, 0) == -1)
+ result = 1;
+ return result;
+#else
const long sys_processors = sysconf(_SC_NPROCESSORS_CONF);
unsigned long result = sys_processors;
@@ -320,4 +335,5 @@
}
JLI_TraceLauncher("physical processors: %lu\n", result);
return result;
+#endif
}
--- jdk/src/solaris/bin/java_md_common.c 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/java_md_common.c 2013-01-16 08:58:11.000000000 -0800
@@ -502,3 +502,19 @@
return findBootClass(env, classname);
}
+StdArg
+*JLI_GetStdArgs()
+{
+ return NULL;
+}
+
+int
+JLI_GetStdArgc() {
+ return 0;
+}
+
+jobjectArray
+CreateApplicationArgs(JNIEnv *env, char **strv, int argc)
+{
+ return NewPlatformStringArray(env, strv, argc);
+}
--- jdk/src/solaris/bin/java_md_solinux.c 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/java_md_solinux.c 2013-01-16 08:58:15.000000000 -0800
@@ -951,6 +951,19 @@
return exec_path;
}
+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+/*
+ * BSD's implementation of CounterGet()
+ */
+int64_t
+CounterGet()
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (tv.tv_sec * 1000) + tv.tv_usec;
+}
+#endif
+
/* --- Splash Screen shared library support --- */
static const char* SPLASHSCREEN_SO = JNI_LIB_NAME("splashscreen");
static void* hSplashLib = NULL;
@@ -982,18 +995,7 @@
int
ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
int rslt;
-#ifdef __solaris__
- thread_t tid;
- long flags = 0;
- if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) {
- void * tmp;
- thr_join(tid, NULL, &tmp);
- rslt = (int)tmp;
- } else {
- /* See below. Continue in current thread if thr_create() failed */
- rslt = continuation(args);
- }
-#else /* ! __solaris__ */
+#if !defined(MACOSX) && (defined(__linux__) || defined(_ALLBSD_SOURCE))
pthread_t tid;
pthread_attr_t attr;
pthread_attr_init(&attr);
@@ -1018,7 +1020,18 @@
}
pthread_attr_destroy(&attr);
-#endif /* __solaris__ */
+#else /* ! __linux__ */
+ thread_t tid;
+ long flags = 0;
+ if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) {
+ void * tmp;
+ thr_join(tid, NULL, &tmp);
+ rslt = (int)tmp;
+ } else {
+ /* See above. Continue in current thread if thr_create() failed */
+ rslt = continuation(args);
+ }
+#endif /* __linux__ */
return rslt;
}
--- jdk/src/solaris/bin/java_md_solinux.h 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/java_md_solinux.h 2013-01-16 08:58:15.000000000 -0800
@@ -33,6 +33,10 @@
#include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
#define Counter2Micros(counts) (counts)
+#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+/* CounterGet() is implemented in java_md_solinux.c */
+int64_t CounterGet(void);
+#define Counter2Micros(counts) (counts)
#else /* ! HAVE_GETHRTIME */
#define CounterGet() (0)
#define Counter2Micros(counts) (1)
@@ -48,16 +52,19 @@
#ifdef __linux__
static const char *system_dir = "/usr/java";
static const char *user_dir = "/java";
+#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+static const char *system_dir = PACKAGE_PATH "/openjdk7";
+static const char *user_dir = "/java";
#else /* Solaris */
static const char *system_dir = "/usr/jdk";
static const char *user_dir = "/jdk";
#endif
#include <dlfcn.h>
-#ifdef __solaris__
-#include <thread.h>
-#else
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <pthread.h>
+#else
+#include <thread.h>
#endif
#define JVM_DLL "libjvm.so"
--- jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java 2012-08-10 10:31:17.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -29,27 +29,12 @@
import java.awt.peer.*;
import java.awt.event.*;
-import java.lang.reflect.Field;
-import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
class XCheckboxMenuItemPeer extends XMenuItemPeer implements CheckboxMenuItemPeer {
/************************************************
*
- * Data members
- *
- ************************************************/
-
- /*
- * CheckboxMenuItem's fields
- */
- private final static Field f_state;
- static {
- f_state = SunToolkit.getField(CheckboxMenuItem.class, "state");
- }
-
- /************************************************
- *
* Construction
*
************************************************/
@@ -74,16 +59,8 @@
*
************************************************/
boolean getTargetState() {
- MenuItem target = getTarget();
- if (target == null) {
- return false;
- }
- try {
- return f_state.getBoolean(target);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return false;
+ return AWTAccessor.getCheckboxMenuItemAccessor()
+ .getState((CheckboxMenuItem)getTarget());
}
/************************************************
--- jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2012-08-10 10:31:18.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -29,14 +29,8 @@
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetListener;
import java.awt.event.*;
-import java.awt.image.ColorModel;
-import java.awt.image.ImageObserver;
-import java.awt.image.ImageProducer;
-import java.awt.image.VolatileImage;
-import java.awt.peer.*;
import sun.awt.*;
-import sun.awt.motif.X11FontMetrics;
-import java.lang.reflect.*;
+import sun.awt.AWTAccessor;
import sun.util.logging.PlatformLogger;
import java.util.*;
import static sun.awt.X11.XEmbedHelper.*;
@@ -455,16 +449,8 @@
}
}
- static Field bdataField;
static byte[] getBData(KeyEvent e) {
- try {
- if (bdataField == null) {
- bdataField = SunToolkit.getField(java.awt.AWTEvent.class, "bdata");
- }
- return (byte[])bdataField.get(e);
- } catch (IllegalAccessException ex) {
- return null;
- }
+ return AWTAccessor.getAWTEventAccessor().getBData(e);
}
void forwardKeyEvent(KeyEvent e) {
--- jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java 2012-08-10 10:31:18.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java 2013-01-16 08:58:11.000000000 -0800
@@ -29,7 +29,7 @@
import java.util.HashMap;
import java.awt.event.KeyEvent;
import java.lang.reflect.*;
-import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
public class XEmbeddingContainer extends XEmbedHelper implements XEventDispatcher {
HashMap children = new HashMap();
@@ -127,20 +127,8 @@
}
}
- static Field bdata;
- byte[] getBData(KeyEvent e) {
- try {
- if (bdata == null) {
- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata");
- }
- return (byte[])bdata.get(e);
- } catch (IllegalAccessException ex) {
- return null;
- }
- }
-
void forwardKeyEvent(long child, KeyEvent e) {
- byte[] bdata = getBData(e);
+ byte[] bdata = AWTAccessor.getAWTEventAccessor().getBData(e);
long data = Native.toData(bdata);
if (data == 0) {
return;
--- jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java 2012-08-10 10:31:18.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java 2013-01-16 08:58:11.000000000 -0800
@@ -27,10 +27,7 @@
import java.awt.*;
import java.awt.peer.ComponentPeer;
-import java.awt.peer.LightweightPeer;
import java.lang.ref.WeakReference;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import sun.awt.AWTAccessor;
import sun.awt.GlobalCursorManager;
@@ -38,23 +35,6 @@
public final class XGlobalCursorManager extends GlobalCursorManager {
- private static Field field_pData;
- private static Field field_type;
- private static Class cursorClass;
- private static Method method_setPData;
- static {
- cursorClass = java.awt.Cursor.class;
- field_pData = SunToolkit.getField(cursorClass, "pData");
- field_type = SunToolkit.getField(cursorClass, "type");
- method_setPData = SunToolkit.getMethod(cursorClass, "setPData", new Class[] {long.class});
- if (field_pData == null || field_type == null || method_setPData == null) {
- System.out.println("Unable to initialize XGlobalCursorManager: ");
- Thread.dumpStack();
-
- }
- }
-
-
// cached nativeContainer
private WeakReference<Component> nativeContainer;
@@ -213,8 +193,8 @@
long pData = 0;
int type = 0;
try {
- pData = field_pData.getLong(c);
- type = field_type.getInt(c);
+ pData = AWTAccessor.getCursorAccessor().getPData(c);
+ type = AWTAccessor.getCursorAccessor().getType(c);
}
catch (Exception e)
{
@@ -284,7 +264,7 @@
static void setPData(Cursor c, long pData) {
try {
- method_setPData.invoke(c, pData);
+ AWTAccessor.getCursorAccessor().setPData(c, pData);
}
catch (Exception e)
{
--- jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java 2012-08-10 10:31:18.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -28,10 +28,9 @@
import java.awt.peer.*;
import java.awt.event.*;
-import java.lang.reflect.Field;
import java.util.Vector;
import sun.util.logging.PlatformLogger;
-import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
@@ -67,15 +66,6 @@
private final static int BAR_ITEM_MARGIN_TOP = 2;
private final static int BAR_ITEM_MARGIN_BOTTOM = 2;
- //fields
- private static Field f_helpMenu;
- private static Field f_menus;
-
- static {
- f_helpMenu = SunToolkit.getField(MenuBar.class, "helpMenu");
- f_menus = SunToolkit.getField(MenuBar.class, "menus");
- }
-
/************************************************
*
* Mapping data
@@ -204,16 +194,12 @@
*/
void postInit(XCreateWindowParams params) {
super.postInit(params);
- Vector targetMenuVector = null;
- Menu targetHelpMenu = null;
- try {
- // Get menus from the target.
- targetMenuVector = (Vector)f_menus.get(menuBarTarget);
- targetHelpMenu = (Menu)f_helpMenu.get(menuBarTarget);
- reloadItems(targetMenuVector);
- } catch (IllegalAccessException iae) {
- iae.printStackTrace();
- }
+ // Get menus from the target.
+ Vector targetMenuVector = AWTAccessor.getMenuBarAccessor()
+ .getMenus(menuBarTarget);
+ Menu targetHelpMenu = AWTAccessor.getMenuBarAccessor()
+ .getHelpMenu(menuBarTarget);
+ reloadItems(targetMenuVector);
if (targetHelpMenu != null) {
addHelpMenu(targetHelpMenu);
}
--- jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java 2012-08-10 10:31:18.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -28,10 +28,7 @@
import java.awt.peer.*;
import java.awt.event.*;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
public class XMenuItemPeer implements MenuItemPeer {
@@ -81,24 +78,6 @@
private final static int SEPARATOR_WIDTH = 20;
private final static int SEPARATOR_HEIGHT = 5;
- /*
- * MenuItem's fields & methods
- */
- private final static Field f_enabled;
- private final static Field f_label;
- private final static Field f_shortcut;
- private final static Method m_getFont;
- private final static Method m_isItemEnabled;
- private final static Method m_getActionCommand;
- static {
- f_enabled = SunToolkit.getField(MenuItem.class, "enabled");
- f_label = SunToolkit.getField(MenuItem.class, "label");
- f_shortcut = SunToolkit.getField(MenuItem.class, "shortcut");
-
- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null);
- m_getActionCommand = SunToolkit.getMethod(MenuItem.class, "getActionCommandImpl", null);
- m_isItemEnabled = SunToolkit.getMethod(MenuItem.class, "isItemEnabled", null);
- }
/************************************************
*
* Text Metrics
@@ -216,39 +195,22 @@
if (target == null) {
return XWindow.getDefaultFont();
}
- try {
- return (Font)m_getFont.invoke(target, new Object[0]);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return XWindow.getDefaultFont();
+ return AWTAccessor.getMenuComponentAccessor().getFont_NoClientCode(target);
}
String getTargetLabel() {
if (target == null) {
return "";
}
- try {
- String label = (String)f_label.get(target);
- return (label == null) ? "" : label;
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return "";
+ String label = AWTAccessor.getMenuItemAccessor().getLabel(target);
+ return (label == null) ? "" : label;
}
boolean isTargetEnabled() {
if (target == null) {
return false;
}
- try {
- return f_enabled.getBoolean(target);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return false;
+ return AWTAccessor.getMenuItemAccessor().isEnabled(target);
}
/**
@@ -260,40 +222,21 @@
if (target == null) {
return false;
}
- try {
- return ((Boolean)m_isItemEnabled.invoke(target, new Object[0])).booleanValue();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return false;
+ return AWTAccessor.getMenuItemAccessor().isItemEnabled(target);
}
String getTargetActionCommand() {
if (target == null) {
return "";
}
- try {
- return (String) m_getActionCommand.invoke(target,(Object[]) null);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return "";
+ return AWTAccessor.getMenuItemAccessor().getActionCommandImpl(target);
}
MenuShortcut getTargetShortcut() {
if (target == null) {
return null;
}
- try {
- return (MenuShortcut)f_shortcut.get(target);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return null;
+ return AWTAccessor.getMenuItemAccessor().getShortcut(target);
}
String getShortcutText() {
--- jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -27,10 +27,9 @@
import java.awt.*;
import java.awt.peer.*;
-import java.lang.reflect.Field;
import java.util.Vector;
import sun.util.logging.PlatformLogger;
-import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
@@ -46,16 +45,6 @@
*/
XMenuWindow menuWindow;
-
- /*
- * Menu's fields & methods
- */
- private final static Field f_items;
-
- static {
- f_items = SunToolkit.getField(Menu.class, "items");
- }
-
/************************************************
*
* Construction
@@ -153,12 +142,7 @@
*
************************************************/
Vector getTargetItems() {
- try {
- return (Vector)f_items.get(getTarget());
- } catch (IllegalAccessException iae) {
- iae.printStackTrace();
- return null;
- }
+ return AWTAccessor.getMenuAccessor().getItems((Menu)getTarget());
}
/************************************************
--- jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -28,15 +28,10 @@
import java.awt.peer.*;
import java.awt.event.*;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-
import java.util.Vector;
+import sun.awt.AWTAccessor;
import sun.util.logging.PlatformLogger;
-import sun.awt.SunToolkit;
-
public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {
/************************************************
@@ -66,24 +61,6 @@
private final static int CAPTION_MARGIN_TOP = 4;
private final static int CAPTION_SEPARATOR_HEIGHT = 6;
- /*
- * Menu's fields & methods
- */
- //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false)
- private final static Field f_enabled;
- //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit
- private final static Field f_label;
- private final static Method m_getFont;
- private final static Field f_items;
-
- static {
- f_enabled = SunToolkit.getField(MenuItem.class, "enabled");
- f_label = SunToolkit.getField(MenuItem.class, "label");
- f_items = SunToolkit.getField(Menu.class, "items");
- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null);
- }
-
-
/************************************************
*
* Construction
@@ -96,7 +73,7 @@
/************************************************
*
- * Implementaion of interface methods
+ * Implementation of interface methods
*
************************************************/
/*
@@ -189,27 +166,16 @@
if (popupMenuTarget == null) {
return XWindow.getDefaultFont();
}
- try {
- return (Font)m_getFont.invoke(popupMenuTarget, new Object[0]);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return XWindow.getDefaultFont();
+ return AWTAccessor.getMenuComponentAccessor()
+ .getFont_NoClientCode(popupMenuTarget);
}
+ //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit
String getTargetLabel() {
if (target == null) {
return "";
}
- try {
- String label = (String)f_label.get(popupMenuTarget);
- return (label == null) ? "" : label;
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return "";
+ return AWTAccessor.getMenuItemAccessor().getLabel(popupMenuTarget);
}
//Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false)
@@ -217,21 +183,14 @@
if (popupMenuTarget == null) {
return false;
}
- try {
- return f_enabled.getBoolean(popupMenuTarget);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return false;
+ return AWTAccessor.getMenuItemAccessor().isEnabled(popupMenuTarget);
}
Vector getMenuTargetItems() {
- try {
- return (Vector)f_items.get(popupMenuTarget);
- } catch (IllegalAccessException iae) {
- iae.printStackTrace();
+ if (popupMenuTarget == null) {
return null;
}
+ return AWTAccessor.getMenuAccessor().getItems(popupMenuTarget);
}
/************************************************
--- jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -29,7 +29,7 @@
import java.awt.event.*;
import java.awt.peer.*;
import java.lang.reflect.*;
-import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollbarClient {
@@ -41,9 +41,7 @@
public final static int VERTICAL = 1 << 0;
public final static int HORIZONTAL = 1 << 1;
- private static Method m_setValue;
static {
- m_setValue = SunToolkit.getMethod(ScrollPaneAdjustable.class, "setTypedValue", new Class[] {Integer.TYPE, Integer.TYPE});
SCROLLBAR = XToolkit.getUIDefaults().getInt("ScrollBar.defaultWidth");
}
@@ -316,19 +314,9 @@
}
void setAdjustableValue(ScrollPaneAdjustable adj, int value, int type) {
- try {
- m_setValue.invoke(adj, new Object[] {Integer.valueOf(value), Integer.valueOf(type)});
- } catch (IllegalAccessException iae) {
- adj.setValue(value);
- } catch (IllegalArgumentException iae2) {
- adj.setValue(value);
- } catch (InvocationTargetException ite) {
- adj.setValue(value);
- ite.getCause().printStackTrace();
- }
+ AWTAccessor.getScrollPaneAdjustableAccessor().setTypedValue(adj, value, type);
}
-
public void paint(Graphics g) {
paintComponent(g);
}
--- jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -27,10 +27,9 @@
import java.awt.*;
import java.awt.peer.SystemTrayPeer;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
import sun.awt.SunToolkit;
import sun.awt.AppContext;
+import sun.awt.AWTAccessor;
import sun.util.logging.PlatformLogger;
public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener {
@@ -42,11 +41,6 @@
private volatile boolean available;
private final XMSelection selection = new XMSelection("_NET_SYSTEM_TRAY");
- private static final Method firePropertyChangeMethod =
- XToolkit.getMethod(SystemTray.class, "firePropertyChange", new Class[] {String.class, Object.class, Object.class});
- private static final Method addNotifyMethod = XToolkit.getMethod(TrayIcon.class, "addNotify", null);
- private static final Method removeNotifyMethod = XToolkit.getMethod(TrayIcon.class, "removeNotify", null);
-
private static final int SCREEN = 0;
private static final String SYSTEM_TRAY_PROPERTY_NAME = "systemTray";
private static final XAtom _NET_SYSTEM_TRAY = XAtom.get("_NET_SYSTEM_TRAY_S" + SCREEN);
@@ -157,46 +151,45 @@
return peerInstance;
}
- private void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) {
+ private void firePropertyChange(final String propertyName,
+ final Object oldValue,
+ final Object newValue) {
Runnable runnable = new Runnable() {
public void run() {
- Object[] args = new Object[] {propertyName, oldValue, newValue};
- invokeMethod(firePropertyChangeMethod, target, args);
+ AWTAccessor.getSystemTrayAccessor()
+ .firePropertyChange(target, propertyName, oldValue, newValue);
}
};
invokeOnEachAppContext(runnable);
}
private void createTrayPeers() {
- invokeOnEachTrayIcon(addNotifyMethod);
+ Runnable runnable = new Runnable() {
+ public void run() {
+ TrayIcon[] icons = target.getTrayIcons();
+ try {
+ for (TrayIcon ti : icons) {
+ AWTAccessor.getTrayIconAccessor().addNotify(ti);
+ }
+ } catch (AWTException e) {
+ }
+ }
+ };
+ invokeOnEachAppContext(runnable);
}
private void removeTrayPeers() {
- invokeOnEachTrayIcon(removeNotifyMethod);
- }
-
- private void invokeOnEachTrayIcon(final Method method) {
Runnable runnable = new Runnable() {
public void run() {
TrayIcon[] icons = target.getTrayIcons();
for (TrayIcon ti : icons) {
- invokeMethod(method, ti, (Object[]) null);
+ AWTAccessor.getTrayIconAccessor().removeNotify(ti);
}
}
};
invokeOnEachAppContext(runnable);
}
- private void invokeMethod(Method method, Object obj, Object[] args) {
- try{
- method.invoke(obj, args);
- } catch (InvocationTargetException e){
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- }
-
private void invokeOnEachAppContext(Runnable runnable) {
for (AppContext appContext : AppContext.getAppContexts()) {
SunToolkit.invokeLaterOnAppContext(appContext, runnable);
--- jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -105,6 +105,7 @@
this.target = target;
//ComponentAccessor.enableEvents(target,AWTEvent.MOUSE_WHEEL_EVENT_MASK);
+ target.enableInputMethods(true);
firstChangeSkipped = false;
String text = ((TextArea)target).getText();
@@ -112,6 +113,7 @@
jtext.setWrapStyleWord(true);
jtext.getDocument().addDocumentListener(jtext);
XToolkit.specialPeerMap.put(jtext,this);
+ jtext.enableInputMethods(true);
textPane = new AWTTextPane(jtext,this, target.getParent());
setBounds(x, y, width, height, SET_BOUNDS);
@@ -464,6 +466,13 @@
protected boolean setTextImpl(String txt) {
if (jtext != null) {
+ // Please note that we do not want to post an event
+ // if setText() replaces an empty text by an empty text,
+ // that is, if component's text remains unchanged.
+ if (jtext.getDocument().getLength() == 0 && txt.length() == 0) {
+ return true;
+ }
+
// JTextArea.setText() posts two different events (remove & insert).
// Since we make no differences between text events,
// the document listener has to be disabled while
@@ -1006,8 +1015,10 @@
// loading SystemFlavorMap and associated classes.
public void setTransferHandler(TransferHandler newHandler) {
TransferHandler oldHandler = (TransferHandler)
- getClientProperty(XTextTransferHelper.getTransferHandlerKey());
- putClientProperty(XTextTransferHelper.getTransferHandlerKey(),
+ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
+ .getJComponent_TRANSFER_HANDLER());
+ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
+ .getJComponent_TRANSFER_HANDLER(),
newHandler);
firePropertyChange("transferHandler", oldHandler, newHandler);
--- jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2013-01-16 08:58:11.000000000 -0800
@@ -73,6 +73,8 @@
xtext = new XAWTTextField(text,this, target.getParent());
xtext.getDocument().addDocumentListener(xtext);
xtext.setCursor(target.getCursor());
+ target.enableInputMethods(true);
+ xtext.enableInputMethods(true);
XToolkit.specialPeerMap.put(xtext,this);
TextField txt = (TextField) target;
@@ -714,8 +716,10 @@
// loading SystemFlavorMap and associated classes.
public void setTransferHandler(TransferHandler newHandler) {
TransferHandler oldHandler = (TransferHandler)
- getClientProperty(XTextTransferHelper.getTransferHandlerKey());
- putClientProperty(XTextTransferHelper.getTransferHandlerKey(),
+ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
+ .getJComponent_TRANSFER_HANDLER());
+ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
+ .getJComponent_TRANSFER_HANDLER(),
newHandler);
firePropertyChange("transferHandler", oldHandler, newHandler);
--- jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, 2007, 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. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.awt.X11;
-
-import java.lang.reflect.Field;
-import sun.awt.SunToolkit;
-
-class XTextTransferHelper {
- private static Object transferHandlerKey = null;
- static Object getTransferHandlerKey() {
- if (transferHandlerKey == null) {
- try {
- Class clazz = Class.forName("javax.swing.ClientPropertyKey");
- Field field = SunToolkit.getField(clazz, "JComponent_TRANSFER_HANDLER");
- transferHandlerKey = field.get(null);
- } catch (IllegalAccessException ex) {
- return null;
- } catch (ClassNotFoundException cnfe) {
- cnfe.printStackTrace();
- }
- }
- return transferHandlerKey;
- }
-}
--- jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2013-01-16 08:58:11.000000000 -0800
@@ -41,8 +41,6 @@
import java.awt.image.ColorModel;
import java.awt.peer.*;
import java.beans.PropertyChangeListener;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.*;
@@ -50,9 +48,9 @@
import javax.swing.UIDefaults;
import sun.awt.*;
import sun.font.FontConfigManager;
-import sun.font.FontManager;
import sun.misc.PerformanceLogger;
import sun.print.PrintJob2D;
+import sun.security.action.GetPropertyAction;
import sun.security.action.GetBooleanAction;
import sun.util.logging.PlatformLogger;
@@ -112,7 +110,6 @@
private static int screenWidth = -1, screenHeight = -1; // Dimensions of default screen
static long awt_defaultFg; // Pixel
private static XMouseInfoPeer xPeer;
- private static Method m_removeSourceEvents;
static {
initSecurityWarning();
@@ -130,8 +127,6 @@
initIDs();
setBackingStoreType();
}
- m_removeSourceEvents = SunToolkit.getMethod(EventQueue.class, "removeSourceEvents", new Class[] {Object.class, Boolean.TYPE}) ;
-
noisyAwtHandler = AccessController.doPrivileged(new GetBooleanAction("sun.awt.noisyerrorhandler"));
}
@@ -222,7 +217,8 @@
static void initSecurityWarning() {
// Enable warning only for internal builds
- String runtime = getSystemProperty("java.runtime.version");
+ String runtime = AccessController.doPrivileged(
+ new GetPropertyAction("java.runtime.version"));
securityWarningEnabled = (runtime != null && runtime.contains("internal"));
}
@@ -1067,8 +1063,8 @@
*/
public synchronized static boolean getSunAwtDisableGtkFileDialogs() {
if (sunAwtDisableGtkFileDialogs == null) {
- sunAwtDisableGtkFileDialogs =
- getBooleanSystemProperty("sun.awt.disableGtkFileDialogs");
+ sunAwtDisableGtkFileDialogs = AccessController.doPrivileged(
+ new GetBooleanAction("sun.awt.disableGtkFileDialogs"));
}
return sunAwtDisableGtkFileDialogs.booleanValue();
}
@@ -2056,17 +2052,11 @@
return null;
}
- static void removeSourceEvents(EventQueue queue, Object source, boolean removeAllEvents) {
- try {
- m_removeSourceEvents.invoke(queue, source, removeAllEvents);
- }
- catch (IllegalAccessException e)
- {
- e.printStackTrace();
- }
- catch (InvocationTargetException e) {
- e.printStackTrace();
- }
+ static void removeSourceEvents(EventQueue queue,
+ Object source,
+ boolean removeAllEvents) {
+ AWTAccessor.getEventQueueAccessor()
+ .removeSourceEvents(queue, source, removeAllEvents);
}
public boolean isAlwaysOnTopSupported() {
--- jdk/src/solaris/classes/sun/awt/X11/XWindow.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XWindow.java 2013-01-16 08:58:11.000000000 -0800
@@ -126,10 +126,6 @@
native void getWindowBounds(long window, long x, long y, long width, long height);
private native static void initIDs();
- private static Field isPostedField;
- private static Field rawCodeField;
- private static Field primaryLevelUnicodeField;
- private static Field extendedKeyCodeField;
static {
initIDs();
}
@@ -398,20 +394,11 @@
static Method m_sendMessage;
static void sendEvent(final AWTEvent e) {
- if (isPostedField == null) {
- isPostedField = SunToolkit.getField(AWTEvent.class, "isPosted");
- }
// The uses of this method imply that the incoming event is system-generated
SunToolkit.setSystemGenerated(e);
PeerEvent pe = new PeerEvent(Toolkit.getDefaultToolkit(), new Runnable() {
public void run() {
- try {
- isPostedField.setBoolean(e, true);
- } catch (IllegalArgumentException e) {
- assert(false);
- } catch (IllegalAccessException e) {
- assert(false);
- }
+ AWTAccessor.getAWTEventAccessor().setPosted(e);
((Component)e.getSource()).dispatchEvent(e);
}
}, PeerEvent.ULTIMATE_PRIORITY_EVENT);
@@ -1427,16 +1414,8 @@
}
- static Field bdata;
static void setBData(KeyEvent e, byte[] data) {
- try {
- if (bdata == null) {
- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata");
- }
- bdata.set(e, data);
- } catch (IllegalAccessException ex) {
- assert false;
- }
+ AWTAccessor.getAWTEventAccessor().setBData(e, data);
}
public void postKeyEvent(int id, long when, int keyCode, int keyChar,
@@ -1446,15 +1425,6 @@
{
long jWhen = XToolkit.nowMillisUTC_offset(when);
int modifiers = getModifiers(state, 0, keyCode);
- if (rawCodeField == null) {
- rawCodeField = XToolkit.getField(KeyEvent.class, "rawCode");
- }
- if (primaryLevelUnicodeField == null) {
- primaryLevelUnicodeField = XToolkit.getField(KeyEvent.class, "primaryLevelUnicode");
- }
- if (extendedKeyCodeField == null) {
- extendedKeyCodeField = XToolkit.getField(KeyEvent.class, "extendedKeyCode");
- }
KeyEvent ke = new KeyEvent((Component)getEventSource(), id, jWhen,
modifiers, keyCode, (char)keyChar, keyLocation);
@@ -1462,15 +1432,11 @@
byte[] data = Native.toBytes(event, eventSize);
setBData(ke, data);
}
- try {
- rawCodeField.set(ke, rawCode);
- primaryLevelUnicodeField.set(ke, (long)unicodeFromPrimaryKeysym);
- extendedKeyCodeField.set(ke, (long)extendedKeyCode);
- } catch (IllegalArgumentException e) {
- assert(false);
- } catch (IllegalAccessException e) {
- assert(false);
- }
+
+ AWTAccessor.KeyEventAccessor kea = AWTAccessor.getKeyEventAccessor();
+ kea.setRawCode(ke, rawCode);
+ kea.setPrimaryLevelUnicode(ke, (long)unicodeFromPrimaryKeysym);
+ kea.setExtendedKeyCode(ke, (long)extendedKeyCode);
postEventToEventQueue(ke);
}
--- jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java 2013-01-16 08:58:11.000000000 -0800
@@ -27,6 +27,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
+import sun.security.action.GetPropertyAction;
import sun.misc.*;
final public class XlibWrapper
@@ -590,12 +591,8 @@
static final boolean isBuildInternal;
static {
- String dataModelProp = (String)AccessController.doPrivileged(
- new PrivilegedAction() {
- public Object run() {
- return System.getProperty("sun.arch.data.model");
- }
- });
+ String dataModelProp = AccessController.doPrivileged(
+ new GetPropertyAction("sun.arch.data.model"));
try {
dataModel = Integer.parseInt(dataModelProp);
} catch (Exception e) {
@@ -647,7 +644,8 @@
}
private static boolean getBuildInternal() {
- String javaVersion = XToolkit.getSystemProperty("java.version");
+ String javaVersion = AccessController.doPrivileged(
+ new GetPropertyAction("java.version"));
return javaVersion != null && javaVersion.contains("internal");
}
--- jdk/src/solaris/classes/sun/awt/X11FontManager.java 2012-08-10 10:31:20.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11FontManager.java 2013-01-16 08:58:15.000000000 -0800
@@ -213,7 +213,7 @@
if (fontID != null) {
fileName = (String)fontNameMap.get(fontID);
/* On Linux check for the Lucida Oblique fonts */
- if (fileName == null && FontUtilities.isLinux && !isOpenJDK()) {
+ if (fileName == null && (FontUtilities.isLinux || FontUtilities.isBSD) && !isOpenJDK()) {
if (oblmap == null) {
initObliqueLucidaFontMap();
}
@@ -712,7 +712,7 @@
if (fontConfigDirs == null) {
return;
}
- if (FontUtilities.isLinux) {
+ if (FontUtilities.isLinux || FontUtilities.isBSD) {
fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
}
fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
@@ -740,7 +740,7 @@
*/
FontConfiguration mFontConfig = new MFontConfiguration(this);
if (FontUtilities.isOpenSolaris ||
- (FontUtilities.isLinux &&
+ ((FontUtilities.isLinux || FontUtilities.isBSD) &&
(!mFontConfig.foundOsSpecificFile() ||
!mFontConfig.fontFilesArePresent()) ||
(FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
--- jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2012-08-10 10:31:23.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2013-01-16 08:58:11.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -68,7 +68,7 @@
static final short REVENT_OFFSET = 6;
// Special value to indicate that an update should be ignored
- static final byte CANCELLED = (byte)-1;
+ static final byte IGNORE = (byte)-1;
// Maximum number of open file descriptors
static final int OPEN_MAX = fdLimit();
@@ -192,15 +192,15 @@
// events are stored as bytes for efficiency reasons
byte b = (byte)mask;
- assert (b == mask) && (b != CANCELLED);
+ assert (b == mask) && (b != IGNORE);
setUpdateEvents(fd, b);
}
}
void release(int fd) {
synchronized (updateLock) {
- // cancel any pending update for this file descriptor
- setUpdateEvents(fd, CANCELLED);
+ // ignore any pending update for this file descriptor
+ setUpdateEvents(fd, IGNORE);
// remove from /dev/poll
if (registered.get(fd)) {
@@ -236,32 +236,40 @@
while (j < updateCount) {
int fd = updateDescriptors[j];
short events = getUpdateEvents(fd);
- boolean isRegistered = registered.get(fd);
+ boolean wasRegistered = registered.get(fd);
// events = 0 => POLLREMOVE or do-nothing
- if (events != CANCELLED) {
+ if (events != IGNORE) {
if (events == 0) {
- if (isRegistered) {
+ if (wasRegistered) {
events = POLLREMOVE;
registered.clear(fd);
} else {
- events = CANCELLED;
+ events = IGNORE;
}
} else {
- if (!isRegistered) {
+ if (!wasRegistered) {
registered.set(fd);
}
}
}
// populate pollfd array with updated event
- if (events != CANCELLED) {
+ if (events != IGNORE) {
+ // insert POLLREMOVE if changing events
+ if (wasRegistered && events != POLLREMOVE) {
+ putPollFD(pollArray, index, fd, POLLREMOVE);
+ index++;
+ }
putPollFD(pollArray, index, fd, events);
index++;
- if (index >= NUM_POLLFDS) {
+ if (index >= (NUM_POLLFDS-1)) {
registerMultiple(wfd, pollArray.address(), index);
index = 0;
}
+
+ // events for this fd now up to date
+ setUpdateEvents(fd, IGNORE);
}
j++;
}
--- jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2013-01-16 08:58:15.000000000 -0800
@@ -68,7 +68,7 @@
return createProvider("sun.nio.fs.SolarisFileSystemProvider");
if (osname.equals("Linux"))
return createProvider("sun.nio.fs.LinuxFileSystemProvider");
- if (osname.equals("Darwin") || osname.contains("OS X"))
+ if (osname.endsWith("BSD") || osname.equals("Darwin") || osname.contains("OS X"))
return createProvider("sun.nio.fs.BsdFileSystemProvider");
throw new AssertionError("Platform not recognized");
}
--- jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -55,7 +55,7 @@
name = USER_NAMESPACE + name;
byte[] bytes = name.getBytes();
if (bytes.length > XATTR_NAME_MAX) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "'" + name + "' is too big");
}
return bytes;
@@ -116,7 +116,7 @@
buffer = NativeBuffers.getNativeBuffer(size);
continue;
}
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get list of extended attributes: " +
x.getMessage());
}
@@ -138,7 +138,7 @@
// fgetxattr returns size if called with size==0
return fgetxattr(fd, nameAsBytes(file,name), 0L, 0);
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get size of extended attribute '" + name +
"': " + x.getMessage());
} finally {
@@ -191,7 +191,7 @@
} catch (UnixException x) {
String msg = (x.errno() == ERANGE) ?
"Insufficient space in buffer" : x.getMessage();
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Error reading extended attribute '" + name + "': " + msg);
} finally {
close(fd);
@@ -243,7 +243,7 @@
src.position(pos + rem);
return rem;
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Error writing extended attribute '" + name + "': " +
x.getMessage());
} finally {
@@ -264,7 +264,7 @@
try {
fremovexattr(fd, nameAsBytes(file,name));
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to delete extended attribute '" + name + "': " + x.getMessage());
} finally {
close(fd);
--- jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -243,7 +243,7 @@
return x.asIOException(dir);
}
if (!attrs.isDirectory()) {
- return new NotDirectoryException(dir.getPathForExceptionMessage());
+ return new NotDirectoryException(dir.getPathForExecptionMessage());
}
// register with inotify (replaces existing mask if already registered)
--- jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -324,7 +324,7 @@
return decode(address, n);
} catch (UnixException x) {
if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, x.getMessage() + " (file system does not support NFSv4 ACLs)");
}
x.rethrowAsIOException(file);
@@ -355,7 +355,7 @@
facl(fd, ACE_SETACL, n, address);
} catch (UnixException x) {
if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, x.getMessage() + " (file system does not support NFSv4 ACLs)");
}
if (x.errno() == EINVAL && (n < 3))
--- jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -49,7 +49,7 @@
if (bytes.length <= 1 ||
(bytes.length == 2 && bytes[1] == '.'))
{
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "'" + name + "' is not a valid name");
}
}
@@ -96,7 +96,7 @@
}
return Collections.unmodifiableList(list);
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get list of extended attributes: " +
x.getMessage());
}
@@ -126,7 +126,7 @@
close(afd);
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get size of extended attribute '" + name +
"': " + x.getMessage());
}
@@ -165,7 +165,7 @@
fc.close();
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to read extended attribute '" + name +
"': " + x.getMessage());
}
@@ -201,7 +201,7 @@
fc.close();
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to write extended attribute '" + name +
"': " + x.getMessage());
}
@@ -224,7 +224,7 @@
close(dfd);
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to delete extended attribute '" + name +
"': " + x.getMessage());
} finally {
--- jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -288,7 +288,7 @@
return x.asIOException(dir);
}
if (!attrs.isDirectory()) {
- return new NotDirectoryException(dir.getPathForExceptionMessage());
+ return new NotDirectoryException(dir.getPathForExecptionMessage());
}
// return existing watch key after updating events if already
--- jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java 2013-01-16 00:07:19.000000000 -0800
@@ -36,6 +36,8 @@
import sun.misc.SharedSecrets;
import sun.misc.JavaIOFileDescriptorAccess;
+import com.sun.nio.file.ExtendedOpenOption;
+
import static sun.nio.fs.UnixNativeDispatcher.*;
import static sun.nio.fs.UnixConstants.*;
@@ -84,13 +86,13 @@
}
continue;
}
- if (option == LinkOption.NOFOLLOW_LINKS && supportsNoFollowLinks()) {
+ if (option == LinkOption.NOFOLLOW_LINKS) {
flags.noFollowLinks = true;
continue;
}
if (option == null)
throw new NullPointerException();
- throw new UnsupportedOperationException(option + " not supported");
+ throw new UnsupportedOperationException();
}
return flags;
}
@@ -218,15 +220,6 @@
// follow links by default
boolean followLinks = true;
if (!flags.createNew && (flags.noFollowLinks || flags.deleteOnClose)) {
- if (flags.deleteOnClose && !supportsNoFollowLinks()) {
- try {
- if (UnixFileAttributes.get(path, false).isSymbolicLink())
- throw new UnixException("DELETE_ON_CLOSE specified and file is a symbolic link");
- } catch (UnixException x) {
- if (!flags.create || x.errno() != ENOENT)
- throw x;
- }
- }
followLinks = false;
oflags |= O_NOFOLLOW;
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -383,8 +383,8 @@
} catch (UnixException x) {
if (x.errno() == EXDEV) {
throw new AtomicMoveNotSupportedException(
- source.getPathForExceptionMessage(),
- target.getPathForExceptionMessage(),
+ source.getPathForExecptionMessage(),
+ target.getPathForExecptionMessage(),
x.errorString());
}
x.rethrowAsIOException(source, target);
@@ -420,7 +420,7 @@
return; // nothing to do as files are identical
if (!flags.replaceExisting) {
throw new FileAlreadyExistsException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
}
// attempt to delete target
@@ -436,7 +436,7 @@
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{
throw new DirectoryNotEmptyException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
}
x.rethrowAsIOException(target);
}
@@ -489,7 +489,7 @@
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{
throw new DirectoryNotEmptyException(
- source.getPathForExceptionMessage());
+ source.getPathForExecptionMessage());
}
x.rethrowAsIOException(source);
}
@@ -542,7 +542,7 @@
return; // nothing to do as files are identical
if (!flags.replaceExisting)
throw new FileAlreadyExistsException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
try {
if (targetAttrs.isDirectory()) {
rmdir(target);
@@ -555,7 +555,7 @@
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{
throw new DirectoryNotEmptyException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
}
x.rethrowAsIOException(target);
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixException.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixException.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2009, 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
@@ -97,8 +97,8 @@
}
void rethrowAsIOException(UnixPath file, UnixPath other) throws IOException {
- String a = (file == null) ? null : file.getPathForExceptionMessage();
- String b = (other == null) ? null : other.getPathForExceptionMessage();
+ String a = (file == null) ? null : file.getPathForExecptionMessage();
+ String b = (other == null) ? null : other.getPathForExecptionMessage();
IOException x = translateToIOException(a, b);
throw x;
}
@@ -108,6 +108,6 @@
}
IOException asIOException(UnixPath file) {
- return translateToIOException(file.getPathForExceptionMessage(), null);
+ return translateToIOException(file.getPathForExecptionMessage(), null);
}
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -238,7 +238,7 @@
// DirectoryNotEmptyException if not empty
if (attrs != null && attrs.isDirectory() &&
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
- throw new DirectoryNotEmptyException(file.getPathForExceptionMessage());
+ throw new DirectoryNotEmptyException(file.getPathForExecptionMessage());
x.rethrowAsIOException(file);
return false;
@@ -395,13 +395,13 @@
// can't return SecureDirectoryStream on kernels that don't support
// openat, etc.
- if (!supportsAtSysCalls() || !supportsNoFollowLinks()) {
+ if (!supportsAtSysCalls()) {
try {
long ptr = opendir(dir);
return new UnixDirectoryStream(dir, ptr, filter);
} catch (UnixException x) {
if (x.errno() == ENOTDIR)
- throw new NotDirectoryException(dir.getPathForExceptionMessage());
+ throw new NotDirectoryException(dir.getPathForExecptionMessage());
x.rethrowAsIOException(dir);
}
}
@@ -421,7 +421,7 @@
if (dfd2 != -1)
UnixNativeDispatcher.close(dfd2);
if (x.errno() == UnixConstants.ENOTDIR)
- throw new NotDirectoryException(dir.getPathForExceptionMessage());
+ throw new NotDirectoryException(dir.getPathForExecptionMessage());
x.rethrowAsIOException(dir);
}
return new UnixSecureDirectoryStream(dir, dp, dfd2, filter);
@@ -490,7 +490,7 @@
return new UnixPath(link.getFileSystem(), target);
} catch (UnixException x) {
if (x.errno() == UnixConstants.EINVAL)
- throw new NotLinkException(link.getPathForExceptionMessage());
+ throw new NotLinkException(link.getPathForExecptionMessage());
x.rethrowAsIOException(link);
return null; // keep compiler happy
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java 2012-08-10 10:31:25.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java 2013-01-16 00:07:19.000000000 -0800
@@ -548,10 +548,6 @@
return hasAtSysCalls;
}
- static boolean supportsNoFollowLinks() {
- return UnixConstants.O_NOFOLLOW != 0;
- }
-
// initialize syscalls and fieldIDs
private static native int init();
--- jdk/src/solaris/classes/sun/nio/fs/UnixPath.java 2012-08-10 10:31:25.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixPath.java 2013-01-16 00:07:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -179,7 +179,7 @@
}
// use this message when throwing exceptions
- String getPathForExceptionMessage() {
+ String getPathForExecptionMessage() {
return toString();
}
@@ -767,11 +767,8 @@
// package-private
int openForAttributeAccess(boolean followLinks) throws IOException {
int flags = O_RDONLY;
- if (!followLinks) {
- if (!supportsNoFollowLinks())
- throw new IOException("NOFOLLOW_LINKS is not supported on this platform");
+ if (!followLinks)
flags |= O_NOFOLLOW;
- }
try {
return open(this, flags, 0);
} catch (UnixException x) {
@@ -780,7 +777,7 @@
x.setError(ELOOP);
if (x.errno() == ELOOP)
- throw new FileSystemException(getPathForExceptionMessage(), null,
+ throw new FileSystemException(getPathForExecptionMessage(), null,
x.getMessage() + " or unable to access attributes of symbolic link");
x.rethrowAsIOException(this);
--- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-08-10 10:31:25.000000000 -0700
+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2013-01-16 08:58:15.000000000 -0800
@@ -125,6 +125,7 @@
static boolean isBSD() {
return (osname.equals("Linux") ||
+ osname.endsWith("BSD") ||
osname.contains("OS X"));
}
--- jdk/src/solaris/javavm/export/jvm_md.h 2012-08-10 10:31:28.000000000 -0700
+++ jdk/src/solaris/javavm/export/jvm_md.h 2013-01-16 08:58:15.000000000 -0800
@@ -75,7 +75,11 @@
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
+#if !defined(__APPLE__) && defined(_ALLBSD_SOURCE)
+#define JVM_O_DELETE 0x10000000
+#else
#define JVM_O_DELETE 0x10000
+#endif
/* Signals */
--- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2012-08-10 10:31:28.000000000 -0700
+++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -168,6 +168,9 @@
/*
* XXXBSD: there's no way available to get swap info in
* FreeBSD. Usage of libkvm is not an option here
+ *
+ * XXX: Investigate how swapinfo(8) does this.
+ * Total swap is in vm.swap_total
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (0);
@@ -242,6 +245,8 @@
#else /* _ALLBSD_SOURCE */
/*
* XXXBSD: there's no way available to do it in FreeBSD, AFAIK.
+ *
+ * XXX: Determine how linprocfs gets this.
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (64 * MB);
@@ -323,6 +328,8 @@
#elif defined(_ALLBSD_SOURCE)
/*
* XXXBSD: there's no way available to do it in FreeBSD, AFAIK.
+ *
+ * XXX: Investigate how top(8) gets this on FreeBSD.
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (128 * MB);
@@ -342,7 +349,11 @@
size_t rlen;
mib[0] = CTL_HW;
+#ifdef __APPLE__
mib[1] = HW_MEMSIZE;
+#else
+ mib[1] = HW_PHYSMEM;
+#endif
rlen = sizeof(result);
if (sysctl(mib, 2, &result, &rlen, NULL, 0) != 0) {
throw_internal_error(env, "sysctl failed");
@@ -408,6 +419,8 @@
#elif defined(_ALLBSD_SOURCE)
/*
* XXXBSD: there's no way available to do it in FreeBSD, AFAIK.
+ *
+ * XXX: Investigate getting this on FreeBSD. Look at lsof.
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (100);
--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -146,7 +146,6 @@
return rv;
}
-
JNIEXPORT jboolean JNICALL
Java_java_io_UnixFileSystem_setPermission(JNIEnv *env, jobject this,
jobject file,
--- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -53,7 +53,7 @@
for (i = 0; environ[i]; i++) {
/* Ignore corrupted environment variables */
- if (strchr(environ[i], '=') != NULL)
+ if (strchr(environ[i], '=') != NULL && *environ[i] != '=')
count++;
}
@@ -63,7 +63,7 @@
for (i = 0, j = 0; environ[i]; i++) {
const char * varEnd = strchr(environ[i], '=');
/* Ignore corrupted environment variables */
- if (varEnd != NULL) {
+ if (varEnd != NULL && varEnd != environ[i]) {
jbyteArray var, val;
const char * valBeg = varEnd + 1;
jsize varLength = varEnd - environ[i];
--- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -394,7 +394,17 @@
return c >= '0' && c <= '9';
}
-#ifdef _ALLBSD_SOURCE
+#if defined(__OpenBSD__)
+static int
+closeDescriptors(void)
+{
+ int err;
+ RESTARTABLE(closefrom(FAIL_FILENO + 1), err);
+ return err;
+}
+#else
+
+#if defined(_ALLBSD_SOURCE)
#define FD_DIR "/dev/fd"
#define dirent64 dirent
#define readdir64 readdir
@@ -436,6 +446,7 @@
return 1;
}
+#endif
static int
moveDescriptor(int fd_from, int fd_to)
--- jdk/src/solaris/native/java/lang/java_props_md.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/lang/java_props_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -151,7 +151,7 @@
lc = setlocale(cat, NULL);
#endif
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__OpenBSD__)
if (lc == NULL) {
return 0;
}
@@ -484,12 +484,19 @@
&(sprops.format_country),
&(sprops.format_variant),
&(sprops.encoding))) {
+#ifdef __OpenBSD__
+ sprops.language = sprops.format_language;
+ sprops.script = sprops.format_script;
+ sprops.country = sprops.format_country;
+ sprops.variant = sprops.format_variant;
+#else
ParseLocale(LC_MESSAGES,
&(sprops.language),
&(sprops.script),
&(sprops.country),
&(sprops.variant),
NULL);
+#endif
} else {
sprops.language = "en";
sprops.encoding = "ISO8859-1";
--- jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2013-01-16 08:58:15.000000000 -0800
@@ -669,11 +669,11 @@
sizeof(struct sockaddr));
if (n < 0 && errno != EINPROGRESS ) {
#ifdef __linux__
- if (errno != EINVAL && errno != EHOSTUNREACH)
+ if (errno != EINVAL)
/*
* On some Linuxes, when bound to the loopback interface, sendto
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /*__linux__ */
NET_ThrowNew(env, errno, "Can't send ICMP packet");
@@ -828,11 +828,10 @@
case EADDRNOTAVAIL: /* address is not available on the remote machine */
#ifdef __linux__
case EINVAL:
- case EHOSTUNREACH:
/*
* On some Linuxes, when bound to the loopback interface, connect
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /* __linux__ */
close(fd);
--- jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2013-01-16 08:58:15.000000000 -0800
@@ -512,11 +512,11 @@
n = sendto(fd, sendbuf, plen, 0, (struct sockaddr*) him, sizeof(struct sockaddr_in6));
if (n < 0 && errno != EINPROGRESS) {
#ifdef __linux__
- if (errno != EINVAL && errno != EHOSTUNREACH)
+ if (errno != EINVAL)
/*
* On some Linuxes, when bound to the loopback interface, sendto
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /*__linux__ */
NET_ThrowNew(env, errno, "Can't send ICMP packet");
@@ -680,11 +680,10 @@
case EADDRNOTAVAIL: /* address is not available on the remote machine */
#ifdef __linux__
case EINVAL:
- case EHOSTUNREACH:
/*
* On some Linuxes, when bound to the loopback interface, connect
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /* __linux__ */
close(fd);
--- jdk/src/solaris/native/java/net/NetworkInterface.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/NetworkInterface.c 2013-01-16 08:58:15.000000000 -0800
@@ -60,14 +60,18 @@
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/sockio.h>
-#if defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__)
#include <net/ethernet.h>
#include <net/if_var.h>
+#elif defined(__OpenBSD__)
+#include <netinet/if_ether.h>
+#elif defined(__NetBSD__)
+#include <net/if_ether.h>
+#endif
#include <net/if_dl.h>
#include <netinet/in_var.h>
#include <ifaddrs.h>
#endif
-#endif
#include "jvm.h"
#include "jni_util.h"
@@ -1289,7 +1293,11 @@
return -1;
}
- return if2.ifr_flags;
+#ifdef __FreeBSD__
+ return ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16));
+#else
+ return (((int) if2.ifr_flags) & 0xffff);
+#endif
}
#endif
@@ -1979,7 +1987,11 @@
return -1;
}
+#ifdef __FreeBSD__
+ return ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16));
+#else
return (((int) if2.ifr_flags) & 0xffff);
+#endif
}
#endif
--- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2013-01-16 08:58:15.000000000 -0800
@@ -23,12 +23,12 @@
* questions.
*/
+#include <sys/types.h>
+#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#ifdef __solaris__
#include <fcntl.h>
@@ -357,13 +357,21 @@
#ifdef AF_INET6
if (ipv6_available()) {
struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&addr;
+#ifdef __FreeBSD__
+ him6->sin6_family = AF_INET6;
+#else
him6->sin6_family = AF_UNSPEC;
+#endif
len = sizeof(struct sockaddr_in6);
} else
#endif
{
struct sockaddr_in *him4 = (struct sockaddr_in*)&addr;
+#ifdef __FreeBSD__
+ him4->sin_family = AF_INET;
+#else
him4->sin_family = AF_UNSPEC;
+#endif
len = sizeof(struct sockaddr_in);
}
JVM_Connect(fd, (struct sockaddr *)&addr, len);
--- jdk/src/solaris/native/java/net/net_util_md.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/net_util_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -45,6 +45,10 @@
#endif
#endif
+#ifdef __OpenBSD__
+#include <sys/socketvar.h>
+#endif
+
#ifdef __solaris__
#include <sys/sockio.h>
#include <stropts.h>
@@ -1505,7 +1509,22 @@
}
}
-#endif
+#ifndef __APPLE__
+ /*
+ * Don't allow SO_LINGER value to be too big.
+ * Current max value (240) is empiric value based on tcp_timer.h's
+ * constant TCP_LINGERTIME, which was doubled.
+ *
+ * XXXBSD: maybe we should step it down to 120 ?
+ */
+ if (level == SOL_SOCKET && opt == SO_LINGER) {
+ ling = (struct linger *)arg;
+ if (ling->l_linger > 240 || ling->l_linger < 0) {
+ ling->l_linger = 240;
+ }
+ }
+#endif __APPLE__
+#endif _ALLBSD_SOURCE
return setsockopt(fd, level, opt, arg, len);
}
--- jdk/src/solaris/native/java/net/net_util_md.h 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/net_util_md.h 2013-01-16 08:58:15.000000000 -0800
@@ -37,7 +37,7 @@
#endif
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(MACOSX)
extern int NET_Timeout(int s, long timeout);
extern int NET_Read(int s, void* buf, size_t len);
extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
--- jdk/src/solaris/native/java/util/TimeZone_md.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/util/TimeZone_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -123,7 +123,7 @@
return NULL;
}
-#if defined(__linux__) || defined(MACOSX) || (defined(__solaris__) \
+#if defined(__linux__) || defined(_ALLBSD_SOURCE) || (defined(__solaris__) \
&& (defined(_POSIX_PTHREAD_SEMANTICS) || defined(_LP64)))
while (readdir_r(dirp, entry, &dp) == 0 && dp != NULL) {
#else
@@ -212,7 +212,7 @@
return tz;
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/*
* Performs Linux specific mapping and returns a zone ID
@@ -678,7 +678,7 @@
* Returns a GMT-offset-based zone ID. (e.g., "GMT-08:00")
*/
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
char *
getGMTOffsetID()
@@ -738,4 +738,4 @@
sign, (int)(offset/3600), (int)((offset%3600)/60));
return strdup(buf);
}
-#endif /* MACOSX */
+#endif /* _ALLBSD_SOURCE */
--- jdk/src/solaris/native/sun/awt/awt_Font.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_Font.c 2013-01-16 08:58:15.000000000 -0800
@@ -334,7 +334,7 @@
if (strcmp(style, "regular") == 0) {
altstyle = "roman";
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
if (!strcmp(family, "lucidasans")) {
family = "lucida";
}
--- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2013-01-16 08:58:15.000000000 -0800
@@ -123,7 +123,7 @@
*/
#define MAXFRAMEBUFFERS 16
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
typedef struct {
int screen_number;
short x_org;
@@ -652,7 +652,7 @@
#endif /* HEADLESS */
#ifndef HEADLESS
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static void xinerama_init_linux()
{
void* libHandle = NULL;
@@ -703,7 +703,7 @@
}
}
#endif
-#if !defined(__linux__) && !defined(MACOSX) /* Solaris */
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) /* Solaris */
static void xinerama_init_solaris()
{
void* libHandle = NULL;
@@ -763,11 +763,11 @@
}
DTRACE_PRINTLN("Xinerama extension is available");
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
xinerama_init_linux();
#else /* Solaris */
xinerama_init_solaris();
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
}
#endif /* HEADLESS */
@@ -1642,7 +1642,7 @@
{
jobject point = NULL;
#ifndef HEADLESS /* return NULL in HEADLESS, Linux */
-#if !defined(__linux__) && !defined(MACOSX)
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE)
int x,y;
AWT_LOCK();
@@ -1655,7 +1655,7 @@
DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null");
}
AWT_FLUSH_UNLOCK();
-#endif /* __linux __ || MACOSX */
+#endif /* __linux __ || _ALLBSD_SOURCE */
#endif /* HEADLESS */
return point;
}
--- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-01-16 08:58:15.000000000 -0800
@@ -67,7 +67,7 @@
XIMPreeditDrawCallbackStruct *);
static void PreeditCaretCallback(XIC, XPointer,
XIMPreeditCaretCallbackStruct *);
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static void StatusStartCallback(XIC, XPointer, XPointer);
static void StatusDoneCallback(XIC, XPointer, XPointer);
static void StatusDrawCallback(XIC, XPointer,
@@ -81,7 +81,7 @@
#define PreeditDoneIndex 1
#define PreeditDrawIndex 2
#define PreeditCaretIndex 3
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#define StatusStartIndex 4
#define StatusDoneIndex 5
#define StatusDrawIndex 6
@@ -99,14 +99,14 @@
(XIMProc)PreeditDoneCallback,
(XIMProc)PreeditDrawCallback,
(XIMProc)PreeditCaretCallback,
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
(XIMProc)StatusStartCallback,
(XIMProc)StatusDoneCallback,
(XIMProc)StatusDrawCallback,
#endif
};
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#define MAX_STATUS_LEN 100
typedef struct {
Window w; /*status window id */
@@ -146,7 +146,7 @@
#endif /* XAWT */
jobject x11inputmethod; /* global ref to X11InputMethod instance */
/* associated with the XIC */
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
StatusWindow *statusWindow; /* our own status window */
#else
#ifndef XAWT
@@ -425,7 +425,7 @@
static void
freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData)
{
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
if (pX11IMData->statusWindow != NULL){
StatusWindow *sw = pX11IMData->statusWindow;
XFreeGC(awt_display, sw->lightGC);
@@ -531,7 +531,7 @@
pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance);
if (pX11IMData == NULL) {
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
return False;
#else
return result;
@@ -539,7 +539,7 @@
}
if ((ic = pX11IMData->current_ic) == (XIC)0){
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
return False;
#else
return result;
@@ -648,7 +648,7 @@
return result;
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static StatusWindow *createStatusWindow(
#ifdef XAWT
Window parent) {
@@ -993,7 +993,7 @@
}
}
}
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
/*
* Creates two XICs, one for active clients and the other for passive
* clients. All information on those XICs are stored in the
@@ -1050,7 +1050,7 @@
return FALSE ;
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
on_the_spot_styles |= XIMStatusNothing;
/*kinput does not support XIMPreeditCallbacks and XIMStatusArea
@@ -1063,7 +1063,7 @@
break;
}
}
-#else /*! __linux__ && !MACOSX */
+#else /*! __linux__ && !_ALLBSD_SOURCE */
#ifdef XAWT
on_the_spot_styles |= XIMStatusNothing;
#else /* !XAWT */
@@ -1086,7 +1086,7 @@
on_the_spot_styles |= XIMStatusNothing;
#endif /* XAWT */
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
for (i = 0; i < im_styles->count_styles; i++) {
active_styles |= im_styles->supported_styles[i] & on_the_spot_styles;
@@ -1134,7 +1134,7 @@
NULL);
if (preedit == (XVaNestedList)NULL)
goto err;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/*always try XIMStatusCallbacks for active client...*/
{
status = (XVaNestedList)XVaCreateNestedList(0,
@@ -1156,7 +1156,7 @@
XFree((void *)status);
XFree((void *)preedit);
}
-#else /* !__linux__ && !MACOSX */
+#else /* !__linux__ && !_ALLBSD_SOURCE */
#ifndef XAWT
if (on_the_spot_styles & XIMStatusArea) {
Widget parent;
@@ -1184,7 +1184,7 @@
}
#endif /* XAWT */
XFree((void *)preedit);
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
pX11IMData->ic_passive = XCreateIC(X11im,
XNClientWindow, w,
XNFocusWindow, w,
@@ -1343,7 +1343,7 @@
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static void
StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data)
{
@@ -1411,7 +1411,7 @@
finally:
AWT_UNLOCK();
}
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) {
JNIEnv *env = GetJNIEnv();
@@ -1517,14 +1517,14 @@
/* Use IMInstantiate call back only on Linux, as there is a bug in Solaris
(4768335)
*/
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL,
NULL, (XIDProc)OpenXIMCallback, NULL);
if (!registered) {
/* directly call openXIM callback */
#endif
OpenXIMCallback(dpy, NULL, NULL);
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
}
#endif
@@ -1588,13 +1588,13 @@
#endif /* XAWT */
globalRef = (*env)->NewGlobalRef(env, this);
pX11IMData->x11inputmethod = globalRef;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
pX11IMData->statusWindow = NULL;
-#else /* !__linux__ && !MACOSX */
+#else /* !__linux__ && !_ALLBSD_SOURCE */
#ifndef XAWT
pX11IMData->statusWidget = (Widget) NULL;
#endif /* XAWT */
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
pX11IMData->lookup_buf = 0;
pX11IMData->lookup_buf_len = 0;
@@ -1741,14 +1741,14 @@
setXICFocus(pX11IMData->current_ic, req);
currentX11InputMethodInstance = pX11IMData->x11inputmethod;
currentFocusWindow = w;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on)
onoffStatusWindow(pX11IMData, w, True);
#endif
} else {
currentX11InputMethodInstance = NULL;
currentFocusWindow = 0;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
onoffStatusWindow(pX11IMData, 0, False);
if (pX11IMData->current_ic != NULL)
#endif
@@ -1765,7 +1765,7 @@
Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env,
jobject this)
{
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
X11InputMethodData *pX11IMData;
StatusWindow *statusWindow;
@@ -1862,7 +1862,7 @@
X11InputMethodData *pX11IMData;
XVaNestedList status;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/*do nothing for linux? */
#else
AWT_LOCK();
@@ -1968,7 +1968,7 @@
JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow
(JNIEnv *env, jobject this, jlong window)
{
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
AWT_LOCK();
adjustStatusWindow(window);
AWT_UNLOCK();
--- jdk/src/solaris/native/sun/awt/awt_Robot.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2013-01-16 08:58:15.000000000 -0800
@@ -45,7 +45,7 @@
#include "wsutils.h"
#include "list.h"
#include "multiVis.h"
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <sys/socket.h>
#endif
--- jdk/src/solaris/native/sun/awt/awt_util.h 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_util.h 2013-01-16 08:58:15.000000000 -0800
@@ -187,7 +187,7 @@
#ifdef __solaris__
extern Widget awt_util_getXICStatusAreaWindow(Widget w);
#else
-#if defined(MACOSX)
+#if defined(_ALLBSD_SOURCE)
int32_t awt_util_getIMStatusHeight(Widget vw);
Widget awt_util_getXICStatusAreaWindow(Widget w);
#else
@@ -200,7 +200,7 @@
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
typedef struct _XmImRefRec {
Cardinal num_refs; /* Number of referencing widgets. */
Cardinal max_refs; /* Maximum length of refs array. */
--- jdk/src/solaris/native/sun/awt/awt_wm.c 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_wm.c 2013-01-16 08:58:15.000000000 -0800
@@ -121,12 +121,19 @@
static Atom XA_KWM_WIN_MAXIMIZED;
/* OpenLook */
+static Atom _XA_OL_DECOR_ADD;
static Atom _XA_OL_DECOR_DEL;
static Atom _XA_OL_DECOR_HEADER;
static Atom _XA_OL_DECOR_RESIZE;
static Atom _XA_OL_DECOR_PIN;
static Atom _XA_OL_DECOR_CLOSE;
+/* AfterStep */
+static Atom _XA_AS_STYLE;
+
+/* WindowMaker */
+static Atom _XA_WINDOWMAKER_STATE;
+
/* For _NET_WM_STATE ClientMessage requests */
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
@@ -193,7 +200,12 @@
{ &_XA_OL_DECOR_HEADER, "_OL_DECOR_HEADER" },
{ &_XA_OL_DECOR_RESIZE, "_OL_DECOR_RESIZE" },
{ &_XA_OL_DECOR_PIN, "_OL_DECOR_PIN" },
- { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" }
+ { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" },
+ { &_XA_OL_DECOR_ADD, "_OL_DECOR_ADD" },
+
+ { &_XA_AS_STYLE, "_XA_AS_STYLE" },
+
+ { &_XA_WINDOWMAKER_STATE, "_XA_WINDOWMAKER_STATE" }
};
#define ATOM_LIST_LENGTH (sizeof(atom_list)/sizeof(atom_list[0]))
@@ -942,6 +954,39 @@
return True;
}
+/*
+ * Window Maker.
+ */
+static Boolean
+awt_wm_isWindowmaker()
+{
+ if (awt_wm_atomInterned(&_XA_WINDOWMAKER_STATE, "_WINDOWMAKER_STATE"))
+ return True;
+ return False;
+}
+
+/*
+ * Afterstep.
+ */
+static Boolean
+awt_wm_isAfterstep()
+{
+ if (awt_wm_atomInterned(&_XA_AS_STYLE, "_AS_STYLE"))
+ return True;
+ return False;
+}
+
+/*
+ * FVWM 2.
+ */
+static Boolean
+awt_wm_isFvwm2()
+{
+ if (awt_wm_atomInterned(&_XA_OL_DECOR_ADD, "_OL_DECOR_ADD")
+ && !awt_wm_atomInterned(&_XA_OL_DECOR_PIN, "_OL_DECOR_PIN"))
+ return True;
+ return False;
+}
static Boolean
awt_wm_isNetWMName(char *name)
@@ -1280,6 +1325,12 @@
else if (awt_wm_isKDE2()) {
awt_wmgr = KDE2_WM;
}
+ else if (awt_wm_isWindowmaker()) {
+ awt_wmgr = WINDOWMAKER_WM;
+ }
+ else if (awt_wm_isAfterstep()) {
+ awt_wmgr = AFTERSTEP_WM;
+ }
/*
* We don't check for legacy WM when we already know that WM
* supports WIN or _NET wm spec.
@@ -1302,6 +1353,9 @@
awt_wmgr = MOTIF_WM;
}
else if (awt_wm_isOpenLook()) {
+ awt_wmgr = OPENLOOK_WM;
+ }
+ else if (awt_wm_isFvwm2()) {
awt_wmgr = OPENLOOK_WM;
}
else {
--- jdk/src/solaris/native/sun/awt/awt_wm.h 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_wm.h 2013-01-16 08:58:15.000000000 -0800
@@ -45,7 +45,10 @@
KDE2_WM,
SAWFISH_WM,
ICE_WM,
- METACITY_WM
+ METACITY_WM,
+ AFTERSTEP_WM,
+ WINDOWMAKER_WM,
+ FVWM2_WM
};
extern void awt_wm_init(void);
--- jdk/src/solaris/native/sun/awt/extutil.h 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/extutil.h 2013-01-16 08:58:15.000000000 -0800
@@ -58,7 +58,7 @@
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#ifndef _EXTUTIL_H_
#define _EXTUTIL_H_
@@ -248,4 +248,4 @@
char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
#endif
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
--- jdk/src/solaris/native/sun/awt/fontpath.c 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/fontpath.c 2013-01-16 08:58:15.000000000 -0800
@@ -23,7 +23,7 @@
* questions.
*/
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <string.h>
#endif /* __linux__ */
#include <stdio.h>
@@ -78,7 +78,7 @@
#define MAXFDIRS 512 /* Max number of directories that contain fonts */
-#if !defined(__linux__) && !defined(MACOSX)
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE)
/*
* This can be set in the makefile to "/usr/X11" if so desired.
*/
@@ -144,6 +144,22 @@
PACKAGE_PATH "/share/fonts/Type1",
NULL, /* terminates the list */
};
+#elif _ALLBSD_SOURCE
+static char *fullBSDFontPath[] = {
+ X11_PATH "/lib/X11/fonts/TrueType",
+ X11_PATH "/lib/X11/fonts/truetype",
+ X11_PATH "/lib/X11/fonts/tt",
+ X11_PATH "/lib/X11/fonts/TTF",
+ X11_PATH "/lib/X11/fonts/OTF",
+ PACKAGE_PATH "/share/fonts/TrueType",
+ PACKAGE_PATH "/share/fonts/truetype",
+ PACKAGE_PATH "/share/fonts/tt",
+ PACKAGE_PATH "/share/fonts/TTF",
+ PACKAGE_PATH "/share/fonts/OTF",
+ X11_PATH "/lib/X11/fonts/Type1",
+ PACKAGE_PATH "/share/fonts/Type1",
+ NULL, /* terminates the list */
+};
#else /* __linux */
/* All the known interesting locations we have discovered on
* various flavors of Linux
@@ -395,7 +411,7 @@
#endif /* !HEADLESS */
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/* from awt_LoadLibrary.c */
JNIEXPORT jboolean JNICALL AWTIsHeadless();
#endif
@@ -524,6 +540,8 @@
knowndirs = fullLinuxFontPath;
#elif defined(MACOSX)
knowndirs = full_MACOSX_X11FontPath;
+#elif defined(_ALLBSD_SOURCE)
+ knowndirs = fullBSDFontPath;
#else /* IF SOLARIS */
knowndirs = fullSolarisFontPath;
#endif
@@ -534,7 +552,7 @@
* be initialised.
*/
#ifndef HEADLESS
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/* There's no headless build on linux ... */
if (!AWTIsHeadless()) { /* .. so need to call a function to check */
#endif
@@ -550,7 +568,7 @@
x11dirs = getX11FontPath();
}
AWT_UNLOCK();
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
}
#endif
#endif /* !HEADLESS */
--- jdk/src/solaris/native/sun/awt/robot_common.c 2012-08-10 10:31:35.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/robot_common.c 2013-01-16 08:58:15.000000000 -0800
@@ -27,7 +27,7 @@
#error This file should not be included in headless library
#endif
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
#include <stdlib.h>
#endif
--- jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 2012-08-10 10:31:35.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 2013-01-16 00:07:20.000000000 -0800
@@ -32,7 +32,7 @@
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#include <sys/types.h>
-#include <unistd.h>
+#include <sys/unistd.h>
#include <pthread.h>
#include <signal.h>
#include <inttypes.h>
--- jdk/src/solaris/native/sun/java2d/j2d_md.h 2012-08-10 10:31:35.000000000 -0700
+++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2013-01-16 08:58:15.000000000 -0800
@@ -28,9 +28,9 @@
#include <sys/types.h>
/*
- * Linux and MACOSX's version of <sys/types.h> does not define intptr_t
+ * Linux and BSD's's version of <sys/types.h> does not define intptr_t
*/
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <stdint.h>
#endif /* __linux__ || MACOSX */
--- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2012-08-10 10:31:36.000000000 -0700
+++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2013-01-16 08:58:15.000000000 -0800
@@ -804,7 +804,7 @@
static int initialized;
static int usevis = JNI_TRUE;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
# define ULTRA_CHIP "sparc64"
#else
# define ULTRA_CHIP "sun4u"
--- jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2013-01-16 08:58:15.000000000 -0800
@@ -77,7 +77,7 @@
JNIEXPORT void JNICALL
Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this,
- jobject fdo, jboolean isIPv6)
+ jobject fdo)
{
jint fd = fdval(env, fdo);
int rv;
@@ -94,7 +94,7 @@
memset(&sa, 0, sizeof(sa));
#ifdef AF_INET6
- if (isIPv6) {
+ if (ipv6_available()) {
struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&sa;
#if defined(_ALLBSD_SOURCE)
him6->sin6_family = AF_INET6;
--- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2013-01-16 08:58:15.000000000 -0800
@@ -36,7 +36,6 @@
#include <sys/socket.h>
#include "nio_util.h"
-#include <limits.h>
JNIEXPORT jint JNICALL
Java_sun_nio_ch_DatagramDispatcher_read0(JNIEnv *env, jclass clazz,
@@ -61,14 +60,23 @@
ssize_t result = 0;
struct iovec *iov = (struct iovec *)jlong_to_ptr(address);
struct msghdr m;
- if (len > IOV_MAX) {
- len = IOV_MAX;
+ if (len > 16) {
+ len = 16;
}
- // initialize the message
- memset(&m, 0, sizeof(m));
+ m.msg_name = NULL;
+ m.msg_namelen = 0;
m.msg_iov = iov;
m.msg_iovlen = len;
+#ifdef __solaris__
+ m.msg_accrights = NULL;
+ m.msg_accrightslen = 0;
+#endif
+
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ m.msg_control = NULL;
+ m.msg_controllen = 0;
+#endif
result = recvmsg(fd, &m, 0);
if (result < 0 && errno == ECONNREFUSED) {
@@ -100,14 +108,23 @@
struct iovec *iov = (struct iovec *)jlong_to_ptr(address);
struct msghdr m;
ssize_t result = 0;
- if (len > IOV_MAX) {
- len = IOV_MAX;
+ if (len > 16) {
+ len = 16;
}
- // initialize the message
- memset(&m, 0, sizeof(m));
+ m.msg_name = NULL;
+ m.msg_namelen = 0;
m.msg_iov = iov;
m.msg_iovlen = len;
+#ifdef __solaris__
+ m.msg_accrights = NULL;
+ m.msg_accrightslen = 0;
+#endif
+
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ m.msg_control = NULL;
+ m.msg_controllen = 0;
+#endif
result = sendmsg(fd, &m, 0);
if (result < 0 && errno == ECONNREFUSED) {
--- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2013-01-16 08:58:15.000000000 -0800
@@ -201,7 +201,7 @@
return IOS_THROWN;
}
return result;
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
off_t numBytes;
int result;
@@ -209,6 +209,8 @@
#ifdef __APPLE__
result = sendfile(srcFD, dstFD, position, &numBytes, NULL, 0);
+#elif defined(__FreeBSD__)
+ result = sendfile(srcFD, dstFD, position, count, NULL, &numBytes, 0);
#endif
if (numBytes > 0)
--- jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2013-01-16 08:58:15.000000000 -0800
@@ -200,7 +200,7 @@
}
lockResult = fcntl(fd, cmd, &fl);
if (lockResult < 0) {
- if ((cmd == F_SETLK64) && (errno == EAGAIN || errno == EACCES))
+ if ((cmd == F_SETLK64) && (errno == EAGAIN))
return sun_nio_ch_FileDispatcherImpl_NO_LOCK;
if (errno == EINTR)
return sun_nio_ch_FileDispatcherImpl_INTERRUPTED;
@@ -227,6 +227,21 @@
fl.l_start = (off64_t)pos;
fl.l_type = F_UNLCK;
lockResult = fcntl(fd, cmd, &fl);
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
+ /* XXXFREEBSD: While doing of preClose0() we're closing actual fd which
+ was locked, so here we'll get an error which need to be ignored to
+ satisfy TCK FileLock test */
+ if (lockResult < 0 && errno == EBADF)
+ lockResult = errno = 0;
+#endif
+#if defined(__NetBSD__)
+ /* XXXNETBSD: The dup2 in preClose0 is being done onto 1 end of a
+ socketpair which isn't a valid target for F_UNLCK. No good way to see
+ this vs. a bad lock setup so just return errno = 0 there
+ to pass JCK (lock will get removed once all fd's close anyways) */
+ if (lockResult < 0 && errno == EINVAL)
+ lockResult = errno = 0;
+#endif
if (lockResult < 0) {
JNU_ThrowIOExceptionWithLastError(env, "Release failed");
}
--- jdk/src/solaris/native/sun/nio/ch/Sctp.h 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/Sctp.h 2013-01-16 08:58:15.000000000 -0800
@@ -320,8 +320,20 @@
typedef int sctp_peeloff_func(int sock, sctp_assoc_t id);
+#elif defined(__FreeBSD__) && __FreeBSD__ >= 7
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/sctp.h>
+#include <netinet/sctp_peeloff.h>
+#include <netinet/sctp_uio.h>
+#include "jni.h"
+
#endif /* __linux__ */
+#if !defined(__FreeBSD__) || __FreeBSD__ < 7
+
sctp_getladdrs_func* nio_sctp_getladdrs;
sctp_freeladdrs_func* nio_sctp_freeladdrs;
sctp_getpaddrs_func* nio_sctp_getpaddrs;
@@ -329,6 +341,17 @@
sctp_bindx_func* nio_sctp_bindx;
sctp_peeloff_func* nio_sctp_peeloff;
+#else
+
+#define nio_sctp_getladdrs sctp_getladdrs
+#define nio_sctp_freeladdrs sctp_freeladdrs
+#define nio_sctp_getpaddrs sctp_getpaddrs
+#define nio_sctp_freepaddrs sctp_freepaddrs
+#define nio_sctp_bindx sctp_bindx
+#define nio_sctp_peeloff sctp_peeloff
+
+#endif
+
jboolean loadSocketExtensionFuncs(JNIEnv* env);
#endif /* !SUN_NIO_CH_SCTP_H */
--- jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2013-01-16 08:58:15.000000000 -0800
@@ -58,6 +58,7 @@
*/
jboolean loadSocketExtensionFuncs
(JNIEnv* env) {
+#if !defined(__FreeBSD__) || __FreeBSD__ < 7 /* On FreeBSD 7.x these functions are in libc */
if (dlopen(nativeSctpLib, RTLD_GLOBAL | RTLD_LAZY) == NULL) {
JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
dlerror());
@@ -105,6 +106,7 @@
dlerror());
return JNI_FALSE;
}
+#endif /* __FreeBSD__ */
funcsLoaded = JNI_TRUE;
return JNI_TRUE;
--- jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c 2013-01-16 00:07:20.000000000 -0800
@@ -27,7 +27,7 @@
#include <errno.h>
#include <unistd.h>
#include <sys/acl.h>
-#include <fcntl.h>
+#include <sys/fcntl.h>
#include <sys/stat.h>
/**
--- jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c 2013-01-16 08:58:15.000000000 -0800
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
-#include <fcntl.h>
+#include <sys/fcntl.h>
#include <sys/stat.h>
/**
@@ -69,12 +69,7 @@
#else
DEFX(O_DSYNC);
#endif
-#ifdef O_NOFOLLOW
DEFX(O_NOFOLLOW);
-#else
- // not supported (dummy values will not be used at runtime).
- emitX("O_NOFOLLOW", 0x0);
-#endif
// mode masks
emitX("S_IAMB",
--- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -36,6 +36,11 @@
#include "j2secmod.h"
+#ifndef RTLD_NOLOAD
+/* A gross hack that will work if the NSS library is only opened once */
+static void *nssLibHandle = NULL;
+#endif
+
void *findFunction(JNIEnv *env, jlong jHandle, const char *functionName) {
void *hModule = (void*)jHandle;
void *fAddress = dlsym(hModule, functionName);
@@ -53,7 +58,11 @@
{
const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL);
// look up existing handle only, do not load
+#ifdef RTLD_NOLOAD
void *hModule = dlopen(libName, RTLD_NOLOAD);
+#else
+ void *hModule = nssLibHandle;
+#endif
dprintf2("-handle for %s: %u\n", libName, hModule);
(*env)->ReleaseStringUTFChars(env, jLibName, libName);
return (jlong)hModule;
@@ -67,6 +76,9 @@
dprintf1("-lib %s\n", libName);
hModule = dlopen(libName, RTLD_LAZY);
+#ifndef RTLD_NOLOAD
+ nssLibHandle = hModule;
+#endif
(*env)->ReleaseStringUTFChars(env, jLibName, libName);
dprintf2("-handle: %u (0X%X)\n", hModule, hModule);
--- jdk/src/solaris/native/sun/xawt/XWindow.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/xawt/XWindow.c 2013-01-16 08:58:15.000000000 -0800
@@ -867,7 +867,7 @@
{
KeySym originalKeysym = *keysym;
-#if !defined(__linux__) && !defined(MACOSX)
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE)
/* The following code on Linux will cause the keypad keys
* not to echo on JTextField when the NumLock is on. The
* keysyms will be 0, because the last parameter 2 is not defined.
--- jdk/src/solaris/transport/socket/socket_md.c 2012-08-10 10:31:39.000000000 -0700
+++ jdk/src/solaris/transport/socket/socket_md.c 2013-01-16 08:58:15.000000000 -0800
@@ -35,7 +35,8 @@
#include <sys/time.h>
#ifdef __solaris__
#include <thread.h>
-#else
+#endif
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <pthread.h>
#include <sys/poll.h>
#endif
@@ -305,7 +306,9 @@
return r;
}
-#else
+#endif
+
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
int
dbgsysTlsAlloc() {
pthread_key_t key;
--- jdk/src/windows/bin/cmdtoargs.c 1969-12-31 16:00:00.000000000 -0800
+++ jdk/src/windows/bin/cmdtoargs.c 2013-01-16 08:58:12.000000000 -0800
@@ -0,0 +1,598 @@
+/*
+ * 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+/*
+ * Converts a single string command line to the traditional argc, argv.
+ * There are rules which govern the breaking of the the arguments, and
+ * these rules are embodied in the regression tests below, and duplicated
+ * in the jdk regression tests.
+ */
+
+#ifndef IDE_STANDALONE
+#include "java.h"
+#include "jli_util.h"
+#else /* IDE_STANDALONE */
+// The defines we need for stand alone testing
+#include <stdio.h>
+#include <stdlib.h>
+#include <Windows.h>
+#define JNI_TRUE TRUE
+#define JNI_FALSE FALSE
+#define JLI_MemRealloc realloc
+#define JLI_StringDup _strdup
+#define JLI_MemFree free
+#define jboolean boolean
+typedef struct {
+ char* arg;
+ boolean has_wildcard;
+} StdArg ;
+#endif
+static StdArg *stdargs;
+static int stdargc;
+
+static char* next_arg(char* cmdline, char* arg, jboolean* wildcard) {
+
+ char* src = cmdline;
+ char* dest = arg;
+ jboolean separator = JNI_FALSE;
+ int quotes = 0;
+ int slashes = 0;
+
+ char prev = 0;
+ char ch = 0;
+ int i;
+ jboolean done = JNI_FALSE;
+
+ *wildcard = JNI_FALSE;
+ while ((ch = *src) != 0 && !done) {
+ switch (ch) {
+ case '"':
+ if (separator) {
+ done = JNI_TRUE;
+ break;
+ }
+ if (prev == '\\') {
+ for (i = 1; i < slashes; i += 2) {
+ *dest++ = prev;
+ }
+ if (slashes % 2 == 1) {
+ *dest++ = ch;
+ } else {
+ quotes++;
+ }
+ } else if (prev == '"' && quotes % 2 == 0) {
+ quotes++;
+ *dest++ = ch; // emit every other consecutive quote
+ } else if (quotes == 0) {
+ quotes++; // starting quote
+ } else {
+ quotes--; // matching quote
+ }
+ slashes = 0;
+ break;
+
+ case '\\':
+ slashes++;
+ if (separator) {
+ done = JNI_TRUE;
+ separator = JNI_FALSE;
+ }
+ break;
+
+ case ' ':
+ case '\t':
+ if (quotes % 2 == 1) {
+ *dest++ = ch;
+ } else {
+ separator = JNI_TRUE;
+ }
+ slashes = 0;
+ break;
+
+ case '*':
+ case '?':
+ if (separator) {
+ done = JNI_TRUE;
+ separator = JNI_FALSE;
+ break;
+ }
+ if (quotes % 2 == 0) {
+ *wildcard = JNI_TRUE;
+ }
+ if (prev == '\\') {
+ *dest++ = prev;
+ }
+ *dest++ = ch;
+ break;
+
+ default:
+ if (prev == '\\') {
+ for (i = 0 ; i < slashes ; i++) {
+ *dest++ = prev;
+ }
+ *dest++ = ch;
+ } else if (separator) {
+ done = JNI_TRUE;
+ } else {
+ *dest++ = ch;
+ }
+ slashes = 0;
+ }
+
+ if (!done) {
+ prev = ch;
+ src++;
+ }
+ }
+ if (prev == '\\') {
+ for (i = 0; i < slashes; i++) {
+ *dest++ = prev;
+ }
+ }
+ *dest = 0;
+ return done ? src : NULL;
+}
+
+int JLI_GetStdArgc() {
+ return stdargc;
+}
+
+StdArg* JLI_GetStdArgs() {
+ return stdargs;
+}
+
+void JLI_CmdToArgs(char* cmdline) {
+ int nargs = 0;
+ StdArg* argv = NULL;
+ jboolean wildcard = JNI_FALSE;
+ char* src = cmdline;
+
+ // allocate arg buffer with sufficient space to receive the largest arg
+ char* arg = JLI_StringDup(cmdline);
+
+ do {
+ src = next_arg(src, arg, &wildcard);
+ // resize to accommodate another Arg
+ argv = (StdArg*) JLI_MemRealloc(argv, (nargs+1) * sizeof(StdArg));
+ argv[nargs].arg = JLI_StringDup(arg);
+ argv[nargs].has_wildcard = wildcard;
+
+ nargs++;
+ } while (src != NULL);
+
+ stdargc = nargs;
+ stdargs = argv;
+}
+
+#ifdef IDE_STANDALONE
+void doexit(int rv) {
+ printf("Hit any key to quit\n");
+ int c = getchar();
+ exit(rv);
+}
+
+void doabort() {
+ doexit(1);
+}
+
+class Vector {
+public:
+ char* cmdline;
+ int argc;
+ char* argv[10];
+ boolean wildcard[10];
+ boolean enabled;
+
+ Vector(){}
+ // Initialize our test vector with the program name, argv[0]
+ // and the single string command line.
+ Vector(char* pname, char* cline) {
+ argv[0] = pname;
+ wildcard[0] = FALSE;
+ cmdline = cline;
+ argc = 1;
+ enabled = TRUE;
+ }
+
+ // add our expected strings, the program name has already been
+ // added so ignore that
+ void add(char* arg, boolean w) {
+ argv[argc] = arg;
+ wildcard[argc] = w;
+ argc++;
+ }
+
+ void disable() {
+ enabled = FALSE;
+ }
+
+ // validate the returned arguments with the expected arguments, using the
+ // new CmdToArgs method.
+ bool check() {
+ // "pgmname" rest of cmdline ie. pgmname + 2 double quotes + space + cmdline from windows
+ char* cptr = (char*) malloc(strlen(argv[0]) + sizeof(char) * 3 + strlen(cmdline) + 1);
+ _snprintf(cptr, MAX_PATH, "\"%s\" %s", argv[0], cmdline);
+ JLI_CmdToArgs(cptr);
+ free(cptr);
+ StdArg *kargv = JLI_GetStdArgs();
+ int kargc = JLI_GetStdArgc();
+ bool retval = true;
+ printf("\n===========================\n");
+ printf("cmdline=%s\n", cmdline);
+ if (argc != kargc) {
+ printf("*** argument count does not match\n");
+ printme();
+ printtest(kargc, kargv);
+ doabort();
+ }
+ for (int i = 0 ; i < argc && retval == true ; i++) {
+ if (strcmp(argv[i], kargv[i].arg) != 0) {
+ printf("*** argument at [%d] don't match\n got: %s\n exp: %s\n",
+ i, kargv[i].arg, argv[i]);
+ doabort();
+ }
+ }
+ for (int i = 0 ; i < argc && retval == true ; i++) {
+ if (wildcard[i] != kargv[i].has_wildcard) {
+ printf("*** expansion flag at [%d] doesn't match\n got: %d\n exp: %d\n",
+ i, kargv[i].has_wildcard, wildcard[i]);
+ doabort();
+ }
+ }
+ for (int i = 0 ; i < kargc ; i++) {
+ printf("k[%d]=%s\n", i, kargv[i].arg);
+ printf(" [%d]=%s\n", i, argv[i]);
+ }
+ return retval;
+ }
+ void printtest(int kargc, StdArg* kargv) {
+ for (int i = 0 ; i < kargc ; i++) {
+ printf("k[%d]=%s\n", i, kargv[i].arg);
+ }
+ }
+ void printme() {
+ for (int i = 0 ; i < argc ; i++) {
+ printf(" [%d]=%s\n", i, argv[i]);
+ }
+ }
+};
+
+void dotest(Vector** vectors) {
+ Vector* v = vectors[0];
+ for (int i = 0 ; v != NULL;) {
+ if (v->enabled) {
+ v->check();
+ }
+ v = vectors[++i];
+ }
+}
+
+#define MAXV 128
+int main(int argc, char* argv[]) {
+
+ int n;
+ for (n=1; n < argc; n++) {
+ printf("%d %s\n", n, argv[n]);
+ }
+ if (n > 1) {
+ JLI_CmdToArgs(GetCommandLine());
+ for (n = 0; n < stdargc; n++) {
+ printf(" [%d]=%s\n", n, stdargs[n].arg);
+ printf(" [%d]=%s\n", n, stdargs[n].has_wildcard ? "TRUE" : "FALSE");
+ }
+ doexit(0);
+ }
+
+ Vector *vectors[MAXV];
+
+ memset(vectors, 0, sizeof(vectors));
+ int i = 0;
+ Vector* v = new Vector(argv[0], "abcd");
+ v->add("abcd", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"a b c d\"");
+ v->add("a b c d", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "a\"b c d\"e");
+ v->add("ab c de", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "ab\\\"cd");
+ v->add("ab\"cd", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"a b c d\\\\\"");
+ v->add("a b c d\\", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "ab\\\\\\\"cd");
+ v->add("ab\\\"cd", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ // Windows tests
+ v = new Vector(argv[0], "a\\\\\\c");
+ v->add("a\\\\\\c", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"a\\\\\\d\"");
+ v->add("a\\\\\\d", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"a b c\" d e");
+ v->add("a b c", FALSE);
+ v->add("d", FALSE);
+ v->add("e", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"ab\\\"c\" \"\\\\\" d");
+ v->add("ab\"c", FALSE);
+ v->add("\\", FALSE);
+ v->add("d", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "a\\\\\\c d\"e f\"g h");
+ v->add("a\\\\\\c", FALSE);
+ v->add("de fg", FALSE);
+ v->add("h", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "a\\\\\\\"b c d");
+ v->add("a\\\"b", FALSE); // XXX "a\\\\\\\"b"
+ v->add("c", FALSE);
+ v->add("d", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "a\\\\\\\\\"g c\" d e"); // XXX "a\\\\\\\\\"b c\" d e"
+ v->add("a\\\\\g c", FALSE); // XXX "a\\\\\\\\\"b c"
+ v->add("d", FALSE);
+ v->add("e", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ // Additional tests
+ v = new Vector(argv[0], "\"a b c\"\"");
+ v->add("a b c\"", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"\"a b c\"\"");
+ v->add("a", FALSE);
+ v->add("b", FALSE);
+ v->add("c", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"\"\"a b c\"\"\"");
+ v->add("\"a b c\"", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"\"\"\"a b c\"\"\"\"");
+ v->add("\"a", FALSE);
+ v->add("b", FALSE);
+ v->add("c\"", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"\"\"\"\"a b c\"\"\"\"\"");
+ v->add("\"\"a b c\"\"", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"C:\\TEST A\\\\\"");
+ v->add("C:\\TEST A\\", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"\"C:\\TEST A\\\\\"\"");
+ v->add("C:\\TEST", FALSE);
+ v->add("A\\", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ // test if a wildcard is present
+ v = new Vector(argv[0], "abc*def");
+ v->add("abc*def", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"abc*def\"");
+ v->add("abc*def", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "*.abc");
+ v->add("*.abc", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"*.abc\"");
+ v->add("*.abc", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "x.???");
+ v->add("x.???", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\"x.???\"");
+ v->add("x.???", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "Debug\\*");
+ v->add("Debug\\*", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "Debug\\f?a");
+ v->add("Debug\\f?a", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "Debug\\?a.java");
+ v->add("Debug\\?a.java", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "foo *.noexts");
+ v->add("foo", FALSE);
+ v->add("*.noexts", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "X\\Y\\Z");
+ v->add("X\\Y\\Z", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "\\X\\Y\\Z");
+ v->add("\\X\\Y\\Z", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "a b");
+ v->add("a", FALSE);
+ v->add("b", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "a\tb");
+ v->add("a", FALSE);
+ v->add("b", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+
+ v = new Vector(argv[0], "a \t b");
+ v->add("a", FALSE);
+ v->add("b", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], "*\\");
+ v->add("*\\", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], "*/");
+ v->add("*/", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], ".\\*");
+ v->add(".\\*", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], "./*");
+ v->add("./*", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], ".\\*");
+ v->add(".\\*", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], ".//*");
+ v->add(".//*", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], "..\\..\\*");
+ v->add("..\\..\\*", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], "../../*");
+ v->add("../../*", TRUE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], "..\\..\\");
+ v->add("..\\..\\", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+ v = new Vector(argv[0], "../../");
+ v->add("../../", FALSE);
+ // v->disable();
+ vectors[i++] = v;
+
+ dotest(vectors);
+ printf("All tests pass [%d]\n", i);
+ doexit(0);
+}
+#endif /* IDE_STANDALONE */
--- jdk/src/windows/bin/java_md.c 2012-08-10 10:31:39.000000000 -0700
+++ jdk/src/windows/bin/java_md.c 2013-01-16 08:58:12.000000000 -0800
@@ -1357,3 +1357,89 @@
{
return JNI_FALSE;
}
+
+/*
+ * At this point we have the arguments to the application, and we need to
+ * check with original stdargs in order to compare which of these truly
+ * needs expansion. cmdtoargs will specify this if it finds a bare
+ * (unquoted) argument containing a glob character(s) ie. * or ?
+ */
+jobjectArray
+CreateApplicationArgs(JNIEnv *env, char **strv, int argc)
+{
+ int i, j, idx, tlen;
+ jobjectArray outArray, inArray;
+ char *ostart, *astart, **nargv;
+ jboolean needs_expansion = JNI_FALSE;
+ jmethodID mid;
+ int stdargc;
+ StdArg *stdargs;
+ jclass cls = GetLauncherHelperClass(env);
+ NULL_CHECK0(cls);
+
+ if (argc == 0) {
+ return NewPlatformStringArray(env, strv, argc);
+ }
+ // the holy grail we need to compare with.
+ stdargs = JLI_GetStdArgs();
+ stdargc = JLI_GetStdArgc();
+
+ // sanity check, this should never happen
+ if (argc > stdargc) {
+ JLI_TraceLauncher("Warning: app args is larger than the original, %d %d\n", argc, stdargc);
+ JLI_TraceLauncher("passing arguments as-is.\n");
+ return NewPlatformStringArray(env, strv, argc);
+ }
+
+ // sanity check, match the args we have, to the holy grail
+ idx = stdargc - argc;
+ ostart = stdargs[idx].arg;
+ astart = strv[0];
+ // sanity check, ensure that the first argument of the arrays are the same
+ if (JLI_StrCmp(ostart, astart) != 0) {
+ // some thing is amiss the args don't match
+ JLI_TraceLauncher("Warning: app args parsing error\n");
+ JLI_TraceLauncher("passing arguments as-is\n");
+ return NewPlatformStringArray(env, strv, argc);
+ }
+
+ // make a copy of the args which will be expanded in java if required.
+ nargv = (char **)JLI_MemAlloc(argc * sizeof(char*));
+ for (i = 0, j = idx; i < argc; i++, j++) {
+ jboolean arg_expand = (JLI_StrCmp(stdargs[j].arg, strv[i]) == 0)
+ ? stdargs[j].has_wildcard
+ : JNI_FALSE;
+ if (needs_expansion == JNI_FALSE)
+ needs_expansion = arg_expand;
+
+ // indicator char + String + NULL terminator, the java method will strip
+ // out the first character, the indicator character, so no matter what
+ // we add the indicator
+ tlen = 1 + JLI_StrLen(strv[i]) + 1;
+ nargv[i] = (char *) JLI_MemAlloc(tlen);
+ JLI_Snprintf(nargv[i], tlen, "%c%s", arg_expand ? 'T' : 'F', strv[i]);
+ JLI_TraceLauncher("%s\n", nargv[i]);
+ }
+
+ if (!needs_expansion) {
+ // clean up any allocated memory and return back the old arguments
+ for (i = 0 ; i < argc ; i++) {
+ JLI_MemFree(nargv[i]);
+ }
+ JLI_MemFree(nargv);
+ return NewPlatformStringArray(env, strv, argc);
+ }
+ NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls,
+ "expandArgs",
+ "([Ljava/lang/String;)[Ljava/lang/String;"));
+
+ // expand the arguments that require expansion, the java method will strip
+ // out the indicator character.
+ inArray = NewPlatformStringArray(env, nargv, argc);
+ outArray = (*env)->CallStaticObjectMethod(env, cls, mid, inArray);
+ for (i = 0; i < argc; i++) {
+ JLI_MemFree(nargv[i]);
+ }
+ JLI_MemFree(nargv);
+ return outArray;
+}
--- jdk/src/windows/classes/sun/awt/windows/WCanvasPeer.java 2012-08-10 10:31:41.000000000 -0700
+++ jdk/src/windows/classes/sun/awt/windows/WCanvasPeer.java 2013-01-16 08:58:12.000000000 -0800
@@ -27,7 +27,6 @@
import java.awt.*;
import java.awt.peer.*;
import java.lang.ref.WeakReference;
-import java.lang.reflect.Method;
import sun.awt.SunToolkit;
import sun.awt.Win32GraphicsDevice;
import sun.awt.PaintEventDispatcher;
--- jdk/src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java 2012-08-10 10:31:42.000000000 -0700
+++ jdk/src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java 2013-01-16 08:58:12.000000000 -0800
@@ -39,8 +39,6 @@
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
-import java.lang.reflect.*;
-
import sun.awt.dnd.SunDragSourceContextPeer;
/**
--- jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java 2012-08-10 10:31:42.000000000 -0700
+++ jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java 2013-01-16 08:58:12.000000000 -0800
@@ -26,9 +26,7 @@
import java.awt.*;
import java.awt.peer.*;
-import java.lang.reflect.Field;
-import sun.awt.SunToolkit;
import sun.awt.AWTAccessor;
public class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
--- jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java 2012-08-10 10:31:42.000000000 -0700
+++ jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java 2013-01-16 08:58:12.000000000 -0800
@@ -31,8 +31,6 @@
import java.beans.*;
-import java.lang.reflect.*;
-
import java.util.*;
import java.util.List;
import sun.util.logging.PlatformLogger;
--- jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java 2012-08-10 10:31:45.000000000 -0700
+++ jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java 2013-01-16 08:58:12.000000000 -0800
@@ -45,15 +45,25 @@
private long ctxHandle;
static {
- initFirst();
+ initFirst(Status.class);
}
+ // Used by native code to indicate when a particular protocol sequence is completed
+ // and must not be re-used.
+
+ class Status {
+ boolean sequenceComplete;
+ }
+
+ Status status;
+
NTLMAuthSequence (String username, String password, String ntdomain)
throws IOException
{
this.username = username;
this.password = password;
this.ntdomain = ntdomain;
+ this.status = new Status();
state = 0;
crdHandle = getCredentialsHandle (username, ntdomain, password);
if (crdHandle == 0) {
@@ -63,19 +73,26 @@
public String getAuthHeader (String token) throws IOException {
byte[] input = null;
+
+ assert !status.sequenceComplete;
+
if (token != null)
input = (new BASE64Decoder()).decodeBuffer(token);
- byte[] b = getNextToken (crdHandle, input);
+ byte[] b = getNextToken (crdHandle, input, status);
if (b == null)
throw new IOException ("Internal authentication error");
return (new B64Encoder()).encode (b);
}
- private native static void initFirst ();
+ public boolean isComplete() {
+ return status.sequenceComplete;
+ }
+
+ private native static void initFirst (Class<NTLMAuthSequence.Status> clazz);
private native long getCredentialsHandle (String user, String domain, String password);
- private native byte[] getNextToken (long crdHandle, byte[] lastToken);
+ private native byte[] getNextToken (long crdHandle, byte[] lastToken, Status returned);
}
class B64Encoder extends BASE64Encoder {
--- jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java 2012-08-10 10:31:45.000000000 -0700
+++ jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java 2013-01-16 08:58:12.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -186,6 +186,7 @@
public synchronized boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw) {
try {
+
NTLMAuthSequence seq = (NTLMAuthSequence)conn.authObj();
if (seq == null) {
seq = new NTLMAuthSequence (username, password, ntdomain);
@@ -193,8 +194,12 @@
}
String response = "NTLM " + seq.getAuthHeader (raw.length()>6?raw.substring(5):null);
conn.setAuthenticationProperty(getHeaderName(), response);
+ if (seq.isComplete()) { // 7200720
+ conn.authObj(null);
+ }
return true;
} catch (IOException e) {
+ conn.authObj(null); // MMM 7200720 ??
return false;
}
}
--- jdk/src/windows/native/java/net/NetworkInterface.c 2012-08-10 10:31:48.000000000 -0700
+++ jdk/src/windows/native/java/net/NetworkInterface.c 2013-01-16 00:07:21.000000000 -0800
@@ -504,7 +504,8 @@
*/
if (netaddrCount < 0) {
netaddrCount = enumAddresses_win(env, ifs, &netaddrP);
- if (netaddrCount == -1) {
+ if ((*env)->ExceptionOccurred(env)) {
+ free_netaddr(netaddrP);
return NULL;
}
}
--- jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2012-08-10 10:31:48.000000000 -0700
+++ jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2013-01-16 00:07:21.000000000 -0800
@@ -194,7 +194,8 @@
while (curr != NULL) {
netaddr *netaddrP;
ret = enumAddresses_win(env, curr, &netaddrP);
- if (ret == -1) {
+ if ((*env)->ExceptionOccurred(env)) {
+ free_netaddr(netaddrP);
return -1;
}
curr->addrs = netaddrP;
@@ -448,7 +449,8 @@
*/
if (netaddrCount < 0) {
netaddrCount = enumAddresses_win(env, ifs, &netaddrP);
- if (netaddrCount == -1) {
+ if ((*env)->ExceptionOccurred(env)) {
+ free_netaddr(netaddrP);
return NULL;
}
}
--- jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c 2012-08-10 10:31:52.000000000 -0700
+++ jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c 2013-01-16 08:58:12.000000000 -0800
@@ -41,18 +41,20 @@
#define SECURITY_WIN32
#include "sspi.h"
-static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle);
+static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle, JNIEnv *env, jobject status);
static jfieldID ntlm_ctxHandleID;
static jfieldID ntlm_crdHandleID;
+static jfieldID status_seqCompleteID;
static HINSTANCE lib = NULL;
JNIEXPORT void JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_initFirst
-(JNIEnv *env, jclass clazz)
+(JNIEnv *env, jclass authseq_clazz, jclass status_clazz)
{
- ntlm_ctxHandleID = (*env)->GetFieldID(env, clazz, "ctxHandle", "J");
- ntlm_crdHandleID = (*env)->GetFieldID(env, clazz, "crdHandle", "J");
+ ntlm_ctxHandleID = (*env)->GetFieldID(env, authseq_clazz, "ctxHandle", "J");
+ ntlm_crdHandleID = (*env)->GetFieldID(env, authseq_clazz, "crdHandle", "J");
+ status_seqCompleteID = (*env)->GetFieldID(env, status_clazz, "sequenceComplete", "Z");
}
/*
@@ -145,8 +147,14 @@
}
}
+
+/*
+ * Class: sun_net_www_protocol_http_ntlm_NTLMAuthSequence
+ * Method: getNextToken
+ * Signature: (J[BLsun/net/www/protocol/http/ntlm/NTLMAuthSequence/Status;)[B
+ */
JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_getNextToken
-(JNIEnv *env, jobject this, jlong crdHandle, jbyteArray lastToken)
+(JNIEnv *env, jobject this, jlong crdHandle, jbyteArray lastToken, jobject status)
{
VOID *pInput = 0;
@@ -217,7 +225,7 @@
}
if (ss < 0) {
- endSequence (pCred, pCtx);
+ endSequence (pCred, pCtx, env, status);
return 0;
}
@@ -225,7 +233,7 @@
ss = CompleteAuthToken( pCtx, &OutBuffDesc );
if (ss < 0) {
- endSequence (pCred, pCtx);
+ endSequence (pCred, pCtx, env, status);
return 0;
}
}
@@ -235,18 +243,18 @@
(*env)->SetByteArrayRegion(env, ret, 0, OutSecBuff.cbBuffer,
OutSecBuff.pvBuffer);
if (lastToken != 0) // 2nd stage
- endSequence (pCred, pCtx);
+ endSequence (pCred, pCtx, env, status);
result = ret;
}
if ((ss != SEC_I_CONTINUE_NEEDED) && (ss == SEC_I_COMPLETE_AND_CONTINUE)) {
- endSequence (pCred, pCtx);
+ endSequence (pCred, pCtx, env, status);
}
return result;
}
-static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle) {
+static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle, JNIEnv *env, jobject status) {
if (credHand != 0) {
FreeCredentialsHandle(credHand);
free(credHand);
@@ -256,4 +264,7 @@
DeleteSecurityContext(ctxHandle);
free(ctxHandle);
}
+
+ /* Sequence is complete so set flag */
+ (*env)->SetBooleanField(env, status, status_seqCompleteID, JNI_TRUE);
}
--- jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-10 10:31:52.000000000 -0700
+++ jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2013-01-16 00:07:21.000000000 -0800
@@ -108,7 +108,7 @@
JNIEXPORT void JNICALL
Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this,
- jobject fdo, jboolean isIPv6)
+ jobject fdo)
{
jint fd = fdval(env, fdo);
int rv = 0;
--- jdk/src/windows/native/sun/windows/awt_Component.cpp 2012-08-10 10:31:55.000000000 -0700
+++ jdk/src/windows/native/sun/windows/awt_Component.cpp 2013-01-16 00:07:21.000000000 -0800
@@ -558,8 +558,6 @@
m_hwnd = hwnd;
- ::ImmAssociateContext(m_hwnd, NULL);
-
SetDrawState((jint)JAWT_LOCK_SURFACE_CHANGED |
(jint)JAWT_LOCK_BOUNDS_CHANGED |
(jint)JAWT_LOCK_CLIP_CHANGED);
--- jdk/src/windows/native/sun/windows/awt_Window.cpp 2012-08-10 10:31:58.000000000 -0700
+++ jdk/src/windows/native/sun/windows/awt_Window.cpp 2013-01-16 08:58:12.000000000 -0800
@@ -1477,7 +1477,7 @@
if (wClassEvent == NULL) {
if (env->PushLocalFrame(1) < 0)
return;
- wClassEvent = env->FindClass("java/awt/event/WindowEvent");
+ wClassEvent = env->FindClass("sun/awt/TimedWindowEvent");
if (wClassEvent != NULL) {
wClassEvent = (jclass)env->NewGlobalRef(wClassEvent);
}
@@ -1491,7 +1491,7 @@
if (wEventInitMID == NULL) {
wEventInitMID =
env->GetMethodID(wClassEvent, "<init>",
- "(Ljava/awt/Window;ILjava/awt/Window;II)V");
+ "(Ljava/awt/Window;ILjava/awt/Window;IIJ)V");
DASSERT(wEventInitMID);
if (wEventInitMID == NULL) {
return;
@@ -1532,7 +1532,7 @@
}
}
jobject event = env->NewObject(wClassEvent, wEventInitMID, target, id,
- jOpposite, oldState, newState);
+ jOpposite, oldState, newState, TimeHelper::getMessageTimeUTC());
DASSERT(!safe_ExceptionOccurred(env));
DASSERT(event != NULL);
if (jOpposite != NULL) {
@@ -1559,21 +1559,8 @@
BOOL AwtWindow::AwtSetActiveWindow(BOOL isMouseEventCause, UINT hittest)
{
- // Fix for 6458497.
- // Retreat if current foreground window is out of both our and embedder process.
- // The exception is when activation is requested due to a mouse event.
- if (!isMouseEventCause) {
- HWND fgWindow = ::GetForegroundWindow();
- if (NULL != fgWindow) {
- DWORD fgProcessID;
- ::GetWindowThreadProcessId(fgWindow, &fgProcessID);
- if (fgProcessID != ::GetCurrentProcessId()
- && !AwtToolkit::GetInstance().IsEmbedderProcessId(fgProcessID))
- {
- return FALSE;
- }
- }
- }
+ // We used to reject non mouse window activation if our app wasn't active.
+ // This code since has been removed as the fix for 7185280
HWND proxyContainerHWnd = GetProxyToplevelContainer();
HWND proxyHWnd = GetProxyFocusOwner();
--- jdk/test/Makefile 2012-08-10 10:31:59.000000000 -0700
+++ jdk/test/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -79,6 +79,11 @@
endif
OS_VERSION := $(shell $(UNAME) -r)
endif
+ifeq ($(findstring BSD,$(UNAME_S)), BSD)
+ OS_NAME = bsd
+ OS_ARCH := $(shell $(UNAME) -m)
+ OS_VERSION := $(shell $(UNAME) -r)
+endif
ifeq ($(UNAME_S), Darwin)
OS_NAME = macosx
OS_ARCH := $(shell $(UNAME) -m)
--- jdk/test/ProblemList.txt 2012-08-10 10:31:59.000000000 -0700
+++ jdk/test/ProblemList.txt 2013-01-16 08:58:12.000000000 -0800
@@ -114,83 +114,10 @@
# jdk_awt
-# None of the awt tests are using samevm, might not be worth the effort due
-# to the vm overhead not being enough to make a difference.
-# In general, the awt tests are problematic with or without samevm, and there
-# are issues with using a Xvfb display.
-
-# Fails on solaris sparc, timedout? in othervm mode
-java/awt/event/MouseEvent/AcceptExtraButton/AcceptExtraButton.java generic-all
-
-# Causes hang in samevm mode??? Solaris 11 i586
-java/awt/FullScreen/SetFSWindow/FSFrame.java generic-all
-
-# Fails on solaris 11 i586, -client, in othervm mode not sure why
-java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java generic-all
-java/awt/Focus/CloseDialogActivateOwnerTest/CloseDialogActivateOwnerTest.java generic-all
-java/awt/FontClass/FontAccess.java generic-all
-java/awt/Mixing/HWDisappear.java generic-all
-java/awt/Mixing/MixingInHwPanel.java generic-all
-java/awt/Mouse/MaximizedFrameTest/MaximizedFrameTest.html generic-all
-java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java generic-all
-java/awt/Toolkit/SecurityTest/SecurityTest2.java generic-all
-java/awt/image/mlib/MlibOpsTest.java generic-all
-
-# Fails on windows, othervm mode, various errors
-java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java generic-all
-java/awt/Focus/OwnedWindowFocusIMECrashTest/OwnedWindowFocusIMECrashTest.java generic-all
-java/awt/FullScreen/NoResizeEventOnDMChangeTest/NoResizeEventOnDMChangeTest.java generic-all
-java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java generic-all
-java/awt/event/KeyEvent/KeyTyped/CtrlASCII.html generic-all
-java/awt/font/Threads/FontThread.java generic-all
-java/awt/print/PrinterJob/PrtException.java generic-all
-
-# Fails with windows X64, othervm, -server
-com/sun/awt/Translucency/WindowOpacity.java generic-all
-java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java generic-all
-java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html generic-all
-java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.html generic-all
-java/awt/Focus/FocusEmbeddedFrameTest/FocusEmbeddedFrameTest.java generic-all
-java/awt/Frame/LayoutOnMaximizeTest/LayoutOnMaximizeTest.java generic-all
-java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java generic-all
-java/awt/Mixing/MixingOnShrinkingHWButton.java generic-all
-java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java generic-all
-
############################################################################
# jdk_beans
-# A large set of the beans tests set the security manager, which would seem
-# to indicate that a large number of them should be "othervm", yet are all
-# very small tests and could greatly benefit from a samevm test run.
-# So a large batch of beans tests are currently run with othervm mode.
-
-# Filed 6986807
-java/beans/Introspector/TestTypeResolver.java generic-all
-
-# Filed 6986813
-java/beans/Introspector/memory/Test4508780.java generic-all
-
-# Linux, some kind of problems with X11 display
-java/beans/PropertyChangeSupport/Test4682386.java generic-all
-java/beans/PropertyChangeSupport/TestSynchronization.java generic-all
-java/beans/Statement/Test4653179.java generic-all
-
-# Runs REALLY slow on Solaris sparc for some reason, both -client and -server
-java/beans/XMLEncoder/Test4625418.java solaris-sparc
-
-# Problems with samevm and setting security manager (speculation partially)
-java/beans/Introspector/4168475/Test4168475.java generic-all
-java/beans/Introspector/4520754/Test4520754.java generic-all
-java/beans/Introspector/6380849/TestBeanInfo.java generic-all
-java/beans/Introspector/Test4144543.java generic-all
-
-# Failed to call method solaris-sparc???
-java/beans/EventHandler/Test6788531.java generic-all
-
-# Jar or class not found???
-java/beans/XMLEncoder/6329581/Test6329581.java generic-all
-
############################################################################
# jdk_lang
@@ -304,95 +231,29 @@
# 6988950
demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java generic-all
-# 7162111
-demo/jvmti/mtrace/TraceJFrame.java macosx-all
-
-# Need to be marked othervm, or changed to be samevm safe
+# 7056489
com/sun/jndi/ldap/ReadTimeoutTest.java generic-all
-com/sun/jndi/rmi/registry/RegistryContext/UnbindIdempotent.java generic-all
-
-# Need to be marked othervm, or changed to be samevm safe
-com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java generic-all
-
-# Solaris sparc and others, exception in initializer
-javax/imageio/CachePremissionsTest/CachePermissionsTest.java generic-all
-
-# Leaves file rgba_* open, fails with windows samevm
-javax/imageio/plugins/png/PngOutputTypeTest.java generic-all
-
-# Suspect test.png file is left open, windows samevm problems
-javax/imageio/plugins/png/ITXtTest.java generic-all
-
-# Solaris sparc and others, failed to compile testcase
-javax/imageio/metadata/DOML3Node.java generic-all
-
-# One of these tests is leaving file IMGP1001.JPG open, windows samevm
-javax/imageio/plugins/jpeg/ConcurrentReadingTest.java generic-all
-javax/imageio/plugins/jpeg/ReadingInterruptionTest.java generic-all
-
-# One of these files is missing a close on writer_* files, windows samevm
-javax/imageio/plugins/jpeg/ConcurrentWritingTest.java generic-all
-javax/imageio/plugins/jpeg/WritingInterruptionTest.java generic-all
-
-# Leaving file test.jpg open, windows samevm
-javax/imageio/plugins/jpeg/ReadAsGrayTest.java generic-all
-
-# Missing close on file wbmp*, windows samevm
-javax/imageio/plugins/wbmp/CanDecodeTest.java generic-all
-
-# Failures on OpenSolaris, cannot read input files? samevm issues?
-javax/imageio/metadata/BooleanAttributes.java generic-all
-javax/imageio/plugins/bmp/BMPSubsamplingTest.java generic-all
-javax/imageio/plugins/bmp/TopDownTest.java generic-all
-javax/imageio/plugins/gif/EncodeSubImageTest.java generic-all
-javax/imageio/plugins/gif/GifTransparencyTest.java generic-all
-javax/imageio/plugins/png/GrayPngTest.java generic-all
-javax/imageio/plugins/png/ItxtUtf8Test.java generic-all
-javax/imageio/plugins/png/MergeStdCommentTest.java generic-all
-javax/imageio/plugins/png/ShortHistogramTest.java generic-all
-javax/imageio/plugins/shared/BitDepth.java generic-all
-
-# Exclude all javax/print tests, even if they passed, they may need samevm work
-
-# Times out on solaris-sparc, sparcv9, x64 -server, some on i586 -client
-javax/print/attribute/autosense/PrintAutoSenseData.java generic-all
-javax/print/attribute/Chroma.java generic-all
-javax/print/attribute/CollateAttr.java generic-all
-javax/print/attribute/PSCopiesFlavorTest.java generic-all
-javax/print/LookupServices.java generic-all
-javax/print/TestRaceCond.java generic-all
-
-# These tests really require a printer (might all be windows only tests?)
-javax/print/CheckDupFlavor.java generic-all
-javax/print/PrintSE/PrintSE.sh generic-all
-javax/print/attribute/ChromaticityValues.java generic-all
-javax/print/attribute/GetCopiesSupported.java generic-all
-javax/print/attribute/SidesPageRangesTest.java generic-all
-javax/print/attribute/SupportedPrintableAreas.java generic-all
-javax/print/attribute/AttributeTest.java generic-all
-
-# Only print test left, excluding just because all print tests have been
-javax/print/attribute/MediaMappingsTest.java generic-all
# 7162111
-javax/script/CauseExceptionTest.java macosx-all
-javax/script/GetInterfaceTest.java macosx-all
-javax/script/JavaScriptScopeTest.java macosx-all
-javax/script/NullUndefinedVarTest.java macosx-all
-javax/script/PluggableContextTest.java macosx-all
-javax/script/ProviderTest.sh macosx-all
-javax/script/RhinoExceptionTest.java macosx-all
-javax/script/StringWriterPrintTest.java macosx-all
-javax/script/Test1.java macosx-all
-javax/script/Test2.java macosx-all
-javax/script/Test3.java macosx-all
-javax/script/Test4.java macosx-all
-javax/script/Test5.java macosx-all
-javax/script/Test6.java macosx-all
-javax/script/Test7.java macosx-all
-javax/script/Test8.java macosx-all
-javax/script/UnescapedBracketRegExTest.java macosx-all
-javax/script/VersionTest.java macosx-all
+demo/jvmti/mtrace/TraceJFrame.java macosx-all
+javax/script/CauseExceptionTest.java macosx-all
+javax/script/GetInterfaceTest.java macosx-all
+javax/script/JavaScriptScopeTest.java macosx-all
+javax/script/NullUndefinedVarTest.java macosx-all
+javax/script/PluggableContextTest.java macosx-all
+javax/script/ProviderTest.sh macosx-all
+javax/script/RhinoExceptionTest.java macosx-all
+javax/script/StringWriterPrintTest.java macosx-all
+javax/script/Test1.java macosx-all
+javax/script/Test2.java macosx-all
+javax/script/Test3.java macosx-all
+javax/script/Test4.java macosx-all
+javax/script/Test5.java macosx-all
+javax/script/Test6.java macosx-all
+javax/script/Test7.java macosx-all
+javax/script/Test8.java macosx-all
+javax/script/UnescapedBracketRegExTest.java macosx-all
+javax/script/VersionTest.java macosx-all
############################################################################
@@ -708,15 +569,12 @@
sun/security/tools/keytool/importreadall.sh solaris-all
sun/security/tools/keytool/selfissued.sh solaris-all
-############################################################################
+# 7147060
+com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java generic-all
-# jdk_swing (not using samevm)
+############################################################################
-# Fails on solaris 11 i586, with othervm
-javax/swing/JFileChooser/6570445/bug6570445.java generic-all
-javax/swing/JFileChooser/6738668/bug6738668.java generic-all
-javax/swing/JPopupMenu/6675802/bug6675802.java generic-all
-javax/swing/system/6799345/TestShutdown.java generic-all
+# jdk_swing
############################################################################
@@ -729,6 +587,9 @@
# jdk_tools
+# 6461635
+com/sun/tools/attach/BasicTests.sh generic-all
+
# Filed 6952105
com/sun/jdi/SuspendThreadTest.java generic-all
@@ -752,6 +613,13 @@
sun/tools/jrunscript/jrunscript-fTest.sh macosx-all
sun/tools/jrunscript/jrunscriptTest.sh macosx-all
+# 8001118
+sun/tools/jcmd/jcmd-f.sh generic-all
+sun/tools/jcmd/jcmd-help-help.sh generic-all
+
+# 7175775
+sun/tools/jinfo/Basic.sh macosx-all
+
############################################################################
# jdk_util
@@ -785,6 +653,10 @@
# 7162111
java/util/ResourceBundle/Control/Bug6530694.java macosx-all
+java/util/logging/LoggingDeadlock4.java macosx-all
+
+# 7041639, Solaris DSA keypair generation bug
+java/util/TimeZone/TimeZoneDatePermissionCheck.sh solaris-all
############################################################################
--- jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2012-08-10 10:32:04.000000000 -0700
+++ jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -56,7 +56,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/com/sun/jdi/JITDebug.sh 2012-08-10 10:32:04.000000000 -0700
+++ jdk/test/com/sun/jdi/JITDebug.sh 2013-01-16 08:58:15.000000000 -0800
@@ -63,7 +63,7 @@
OS=`uname -s`
export TRANSPORT_METHOD
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
TRANSPORT_METHOD=dt_socket
;;
--- jdk/test/com/sun/jdi/PrivateTransportTest.sh 2012-08-10 10:32:05.000000000 -0700
+++ jdk/test/com/sun/jdi/PrivateTransportTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -123,7 +123,7 @@
esac
libloc=${jreloc}/lib/${libarch}
;;
- Linux)
+ Linux | *BSD)
xx=`find ${jreloc}/lib -name libdt_socket.so`
libloc=`dirname ${xx}`
;;
--- jdk/test/com/sun/jdi/ShellScaffold.sh 2012-08-10 10:32:06.000000000 -0700
+++ jdk/test/com/sun/jdi/ShellScaffold.sh 2013-01-16 08:58:15.000000000 -0800
@@ -292,7 +292,7 @@
psCmd=ps
jstack=jstack.exe
;;
- SunOS | Linux | Darwin)
+ SunOS | Linux | *BSD | Darwin)
transport=dt_socket
address=
devnull=/dev/null
--- jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2012-08-10 10:32:06.000000000 -0700
+++ jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2013-01-16 08:58:15.000000000 -0800
@@ -112,7 +112,7 @@
fi
;;
- Linux | Darwin )
+ Linux | *BSD | Darwin )
pass "This test always passes on $OS"
;;
--- jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2012-08-10 10:32:07.000000000 -0700
+++ jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2013-01-16 08:58:15.000000000 -0800
@@ -45,7 +45,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
;;
Windows* | CYGWIN*)
--- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2012-08-10 10:32:09.000000000 -0700
+++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2013-01-16 08:58:15.000000000 -0800
@@ -72,6 +72,16 @@
done
}
+bsd_swap_size()
+{
+ total_swap=0
+ for i in `/usr/sbin/swapinfo -k | awk '{print $2}' | grep -v blocks`
+ do
+ # swapinfo -k returns size in kilobytes.
+ total_swap=`expr $i \* 1024 + $total_swap`
+ done
+}
+
# Test GetTotalSwapSpaceSize if we are running on Unix
total_swap=0
case `uname -s` in
@@ -83,6 +93,9 @@
total_swap=`free -b | grep -i swap | awk '{print $2}'`
runOne GetTotalSwapSpaceSize $total_swap
;;
+ *BSD )
+ bsd_swap_size
+ runOne GetTotalSwapSpaceSize $total_swap
Darwin )
# $ sysctl -n vm.swapusage
# total = 8192.00M used = 7471.11M free = 720.89M (encrypted)
--- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2012-08-10 10:32:11.000000000 -0700
+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2013-01-16 08:58:15.000000000 -0800
@@ -48,7 +48,7 @@
# Test GetMaxFileDescriptorCount if we are running on Unix
case `uname -s` in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
runOne GetMaxFileDescriptorCount
;;
* )
--- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2012-08-10 10:32:11.000000000 -0700
+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2013-01-16 08:58:15.000000000 -0800
@@ -48,7 +48,7 @@
# Test GetOpenFileDescriptorCount if we are running on Unix
case `uname -s` in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
runOne GetOpenFileDescriptorCount
;;
* )
--- jdk/test/com/sun/tools/attach/CommonSetup.sh 2012-08-10 10:32:15.000000000 -0700
+++ jdk/test/com/sun/tools/attach/CommonSetup.sh 2013-01-16 08:58:15.000000000 -0800
@@ -36,7 +36,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/awt/Focus/OverrideRedirectWindowActivationTest/OverrideRedirectWindowActivationTest.java 2012-08-10 10:32:20.000000000 -0700
+++ jdk/test/java/awt/Focus/OverrideRedirectWindowActivationTest/OverrideRedirectWindowActivationTest.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,157 +0,0 @@
-/*
- * 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 6385277
- * @summary Tests that override redirect window gets activated on click.
- * @author anton.tarasov@sun.com: area=awt.focus
- * @library ../../regtesthelpers
- * @build Util
- * @run main OverrideRedirectWindowActivationTest
- */
-import java.awt.*;
-import java.awt.event.*;
-import java.util.concurrent.Callable;
-import javax.swing.SwingUtilities;
-import sun.awt.SunToolkit;
-import test.java.awt.regtesthelpers.Util;
-
-public class OverrideRedirectWindowActivationTest {
-
- private static Frame frame;
- private static Window window;
- private static Button fbutton;
- private static Button wbutton;
- private static Label label;
- private static Robot robot;
- private static SunToolkit toolkit;
-
- public static void main(String[] args) throws Exception {
-
- if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) {
- System.out.println("No testing on Motif. Test passed.");
- return;
- }
-
- toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
- robot = new Robot();
- robot.setAutoDelay(50);
-
- Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
-
- public void eventDispatched(AWTEvent e) {
- System.out.println(e);
- }
- }, FocusEvent.FOCUS_EVENT_MASK | WindowEvent.WINDOW_FOCUS_EVENT_MASK);
-
- createAndShowWindow();
- toolkit.realSync();
-
- createAndShowFrame();
- toolkit.realSync();
-
- // click on Frame
- clickOn(getClickPoint(frame));
-
- if (!frame.isFocused()) {
- throw new RuntimeException("Error: a frame couldn't be focused by click.");
- }
-
- //click on Label in Window
- clickOn(getClickPoint(label));
-
- if (!window.isFocused()) {
- throw new RuntimeException("Test failed: the window couldn't be activated by click!");
- }
-
- // bring focus back to the frame
- clickOn(getClickPoint(fbutton));
-
- if (!frame.isFocused()) {
- throw new RuntimeException("Error: a frame couldn't be focused by click.");
- }
-
- // Test 2. Verifies that clicking on a component of unfocusable Window
- // won't activate it.
-
- window.setFocusableWindowState(false);
- toolkit.realSync();
-
-
- clickOn(getClickPoint(label));
-
- if (window.isFocused()) {
- throw new RuntimeException("Test failed: unfocusable window got activated by click!");
- }
- System.out.println("Test passed.");
-
- }
-
- private static void createAndShowWindow() {
-
- frame = new Frame("Test Frame");
- window = new Window(frame);
- wbutton = new Button("wbutton");
- label = new Label("label");
-
- window.setBounds(800, 200, 200, 100);
- window.setLayout(new FlowLayout());
- window.add(wbutton);
- window.add(label);
- window.setVisible(true);
-
- }
-
- private static void createAndShowFrame() {
- fbutton = new Button("fbutton");
-
- frame.setBounds(800, 0, 200, 100);
- frame.setLayout(new FlowLayout());
- frame.add(fbutton);
- frame.setVisible(true);
-
- }
-
- static void clickOn(Point point) {
-
- robot.mouseMove(point.x, point.y);
-
- robot.mousePress(InputEvent.BUTTON1_MASK);
- robot.mouseRelease(InputEvent.BUTTON1_MASK);
-
- toolkit.realSync();
- }
-
- static Point getClickPoint(Component c) {
- Point p = c.getLocationOnScreen();
- Dimension d = c.getSize();
- return new Point(p.x + (int) (d.getWidth() / 2), p.y + (int) (d.getHeight() / 2));
- }
-
- static Point getClickPoint(Frame frame) {
- Point p = frame.getLocationOnScreen();
- Dimension d = frame.getSize();
- return new Point(p.x + (int) (d.getWidth() / 2), p.y + (frame.getInsets().top / 2));
- }
-}
--- jdk/test/java/awt/Frame/7024749/bug7024749.java 2012-08-10 10:32:20.000000000 -0700
+++ jdk/test/java/awt/Frame/7024749/bug7024749.java 2013-01-16 08:58:12.000000000 -0800
@@ -23,9 +23,9 @@
/*
* @test
- * @bug 7024749
+ * @bug 7024749 7184326
* @summary JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
- * @library ../../../regtesthelpers
+ * @library ../../regtesthelpers
* @build Util
* @author Oleg Pekhovskiy: area=awt.toplevel
@run main bug7024749
--- jdk/test/java/awt/Frame/HugeFrame/HugeFrame.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/java/awt/Frame/HugeFrame/HugeFrame.java 2013-01-16 08:58:12.000000000 -0800
@@ -0,0 +1,49 @@
+/*
+ * 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 7160609
+ @summary A window with huge dimensions shouldn't crash JVM
+ @author anthony.petrov@oracle.com: area=awt.toplevel
+ @run main HugeFrame
+*/
+
+import java.awt.*;
+
+public class HugeFrame {
+ public static void main(String[] args) throws Exception {
+ Frame f = new Frame("Huge");
+
+ // 8193+ should already produce a crash, but let's go extreme...
+ f.setBounds(10, 10, 30000, 500000);
+ f.setVisible(true);
+
+ // We would crash by now if the bug wasn't fixed
+ Thread.sleep(1000);
+ System.err.println(f.getBounds());
+
+ // Cleanup
+ f.dispose();
+ }
+}
--- jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2012-08-10 10:32:25.000000000 -0700
+++ jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2013-01-16 08:58:15.000000000 -0800
@@ -25,10 +25,11 @@
fi
-if [ $OS = SunOS -o $OS = Linux ]
-then
- exit 0
-fi
+case "${OS}" in
+ SunOS | Linux | *BSD | Darwin )
+ exit 0
+ ;;
+esac
# Windows
if [ -z "${TESTJAVA}" ] ; then
--- jdk/test/java/awt/Window/Grab/GrabTest.java 2012-08-10 10:32:26.000000000 -0700
+++ jdk/test/java/awt/Window/Grab/GrabTest.java 2013-01-16 00:07:23.000000000 -0800
@@ -65,7 +65,7 @@
}, sun.awt.SunToolkit.GRAB_EVENT_MASK);
f = new Frame("Frame");
- f.setBounds(0, 0, 300, 300);
+ f.setSize(200, 200);
f.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
System.out.println(e);
@@ -74,7 +74,7 @@
});
f1 = new Frame("OtherFrame");
- f1.setBounds(700, 100, 200, 200);
+ f1.setBounds(600, 100, 200, 200);
w = new Window(f);
w.setLayout(new FlowLayout());
@@ -86,7 +86,7 @@
}
});
w.add(b);
- w.setBounds(400, 100, 200, 200);
+ w.setBounds(300, 100, 200, 200);
w.setBackground(Color.blue);
w.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
@@ -175,8 +175,7 @@
// 6. Check that press on the outside area causes ungrab
Point loc = f.getLocationOnScreen();
- robot.mouseMove(loc.x + 100, loc.y + f.getSize().height + 1);
- Util.waitForIdle(robot);
+ robot.mouseMove(loc.x + 100, loc.y + f.getSize().height + 300);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.delay(50);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
--- jdk/test/java/awt/event/TextEvent/TextEventSequenceTest/TextEventSequenceTest.java 2012-08-10 10:32:28.000000000 -0700
+++ jdk/test/java/awt/event/TextEvent/TextEventSequenceTest/TextEventSequenceTest.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,138 +0,0 @@
-/*
- * 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 4028580
- * @summary TextArea does not send TextEvent when setText. Does for insert
- * @author kdm@sparc.spb.su: area= awt.TextAvent
- * @run main TextEventSequenceTest
- */
-import java.awt.*;
-import java.awt.event.*;
-import sun.awt.SunToolkit;
-
-public class TextEventSequenceTest {
-
- private static Frame f;
- private static TextField tf;
- private static TextArea t;
- private static int cntEmptyStrings = 0;
- private static int cntNonEmptyStrings = 0;
-
- public static void main(String[] args) {
-
- test("non-empty text string");
- test("");
- test(null);
- }
-
- private static void test(String test) {
- SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
-
- createAndShowGUI(test);
- toolkit.realSync();
-
- initCounts();
- t.setText("Hello ");
- toolkit.realSync();
- t.append("World! !");
- toolkit.realSync();
- t.insert("from Roger Pham", 13);
- toolkit.realSync();
- t.replaceRange("Java Duke", 18, 28);
- toolkit.realSync();
- checkCounts(0, 4);
-
- initCounts();
- t.setText("");
- toolkit.realSync();
- t.setText("");
- toolkit.realSync();
- t.setText("");
- toolkit.realSync();
- checkCounts(1, 0);
-
- initCounts();
- tf.setText("Hello There!");
- toolkit.realSync();
- checkCounts(0, 1);
-
- initCounts();
- tf.setText("");
- toolkit.realSync();
- tf.setText("");
- toolkit.realSync();
- tf.setText("");
- toolkit.realSync();
- checkCounts(1, 0);
-
- f.dispose();
- }
-
- private static void createAndShowGUI(String text) {
- f = new Frame("TextEventSequenceTest");
- f.setLayout(new FlowLayout());
-
- TextListener listener = new MyTextListener();
-
- tf = new TextField(text);
- tf.addTextListener(listener);
- f.add(tf);
-
- t = new TextArea(text, 10, 30);
- t.addTextListener(listener);
- f.add(t);
-
- f.pack();
- f.setVisible(true);
- }
-
- static class MyTextListener implements TextListener {
-
- public synchronized void textValueChanged(TextEvent e) {
- TextComponent tc = (TextComponent) e.getSource();
- String text = tc.getText();
- if (text.length() == 0) {
- cntEmptyStrings++;
- } else {
- cntNonEmptyStrings++;
- }
- }
- }
-
- synchronized static void initCounts() {
- cntEmptyStrings = 0;
- cntNonEmptyStrings = 0;
- }
-
- synchronized static void checkCounts(int empty, int nonempty) {
- if (empty != cntEmptyStrings || nonempty != cntNonEmptyStrings) {
- throw new RuntimeException(
- String.format("Expected events: empty = %d, nonempty = %d, "
- + "actual events: empty = %d, nonempty = %d",
- empty, nonempty, cntEmptyStrings, cntNonEmptyStrings));
- }
- }
-}
-
--- jdk/test/java/beans/Introspector/4520754/Test4520754.java 2012-08-10 10:32:30.000000000 -0700
+++ jdk/test/java/beans/Introspector/4520754/Test4520754.java 2013-01-16 08:58:12.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -58,7 +58,7 @@
public static void main(String[] args) {
// ensure that 4168475 does not regress
test4168475(Component.class);
- // AWT classes (sun.beans.infos.ComponentBeanInfo)
+ // AWT classes (com.sun.beans.infos.ComponentBeanInfo)
test(null, Button.class, Component.class, List.class, Menu.class, Panel.class);
// Swing classes (dt.jar)
test(null, JApplet.class, JButton.class, JCheckBox.class);
--- jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java 2012-08-10 10:32:31.000000000 -0700
+++ jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java 2013-01-16 08:58:12.000000000 -0800
@@ -38,8 +38,7 @@
import java.beans.BeanInfo;
import java.beans.Introspector;
-import java.lang.ref.Reference;
-import java.lang.reflect.Field;
+import java.lang.reflect.Method;
public class TestBeanInfo implements Runnable {
@@ -60,10 +59,9 @@
try {
actual = Introspector.getBeanInfo(type);
type = actual.getClass();
- Field field = type.getDeclaredField("targetBeanInfoRef"); // NON-NLS: field name
- field.setAccessible(true);
- Reference ref = (Reference) field.get(actual);
- actual = (BeanInfo) ref.get();
+ Method method = type.getDeclaredMethod("getTargetBeanInfo"); // NON-NLS: method name
+ method.setAccessible(true);
+ actual = (BeanInfo) method.invoke(actual);
}
catch (Exception exception) {
throw new Error("unexpected error", exception);
--- jdk/test/java/beans/Introspector/Test7193977.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/java/beans/Introspector/Test7193977.java 2013-01-16 08:58:12.000000000 -0800
@@ -0,0 +1,159 @@
+/*
+ * 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 7193977
+ * @summary Tests that generified property descriptors do not loose additional info
+ * @author Sergey Malenkov
+ */
+
+import java.awt.Image;
+import java.beans.BeanDescriptor;
+import java.beans.BeanInfo;
+import java.beans.EventSetDescriptor;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.MethodDescriptor;
+import java.beans.PropertyDescriptor;
+import java.util.Arrays;
+import java.util.List;
+
+public class Test7193977 {
+
+ private static final List<String> names = Arrays.asList("listType", "list", "value");
+
+ public static void main(String args[]) {
+ for (String name : names) {
+ test(Abstract.class, name);
+ test(Concrete.class, name);
+ }
+ }
+
+ private static void test(Class<?> type, String name) {
+ if (!Boolean.TRUE.equals(BeanUtils.getPropertyDescriptor(type, name).getValue("transient"))) {
+ throw new Error("property '" + name + "' is not transient");
+ }
+ }
+
+ public static final class Concrete extends Abstract<String> {
+ }
+
+ public static abstract class Abstract<T> {
+ private List<T> list;
+
+ public List<T> getList() {
+ return this.list;
+ }
+
+ public void setList(List<T> list) {
+ this.list = list;
+ }
+
+ public T getValue(int index) {
+ return (0 <= index) && (this.list != null) && (index < this.list.size())
+ ? this.list.get(index)
+ : null;
+ }
+
+ public void setValue(int index, T value) {
+ if ((0 <= index) && (this.list != null)) {
+ if (index == this.list.size()) {
+ this.list.add(value);
+ }
+ else if (index < this.list.size()) {
+ this.list.set(index, value);
+ }
+ }
+ }
+
+ public String getListType() {
+ return (this.list != null)
+ ? this.list.getClass().getName()
+ : null;
+ }
+
+ public void setListType(String type) throws Exception {
+ this.list = (type != null)
+ ? (List<T>) Class.forName(type).newInstance()
+ : null;
+ }
+ }
+
+ public static final class ConcreteBeanInfo extends Wrapper {
+ public ConcreteBeanInfo() throws IntrospectionException {
+ super(Concrete.class);
+ }
+ }
+
+ public static final class AbstractBeanInfo extends Wrapper {
+ public AbstractBeanInfo() throws IntrospectionException {
+ super(Abstract.class);
+ for (PropertyDescriptor pd : getPropertyDescriptors()) {
+ if (names.contains(pd.getName())) {
+ pd.setValue("transient", Boolean.TRUE);
+ }
+ }
+ }
+ }
+
+ private static class Wrapper implements BeanInfo {
+ private final BeanInfo info;
+
+ Wrapper(Class<?> type) throws IntrospectionException {
+ this.info = Introspector.getBeanInfo(type, Introspector.IGNORE_IMMEDIATE_BEANINFO);
+ }
+
+ public BeanDescriptor getBeanDescriptor() {
+ return this.info.getBeanDescriptor();
+ }
+
+ public EventSetDescriptor[] getEventSetDescriptors() {
+ return this.info.getEventSetDescriptors();
+ }
+
+ public int getDefaultEventIndex() {
+ return this.info.getDefaultEventIndex();
+ }
+
+ public PropertyDescriptor[] getPropertyDescriptors() {
+ return this.info.getPropertyDescriptors();
+ }
+
+ public int getDefaultPropertyIndex() {
+ return this.info.getDefaultPropertyIndex();
+ }
+
+ public MethodDescriptor[] getMethodDescriptors() {
+ return this.info.getMethodDescriptors();
+ }
+
+ public BeanInfo[] getAdditionalBeanInfo() {
+ return this.info.getAdditionalBeanInfo();
+ }
+
+ public Image getIcon(int kind) {
+ return this.info.getIcon(kind);
+ }
+ }
+}
--- jdk/test/java/beans/Introspector/Test7195106.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/java/beans/Introspector/Test7195106.java 2013-01-16 08:58:12.000000000 -0800
@@ -0,0 +1,67 @@
+/*
+ * 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 7195106
+ * @summary Tests that explicit BeanInfo is not collected
+ * @author Sergey Malenkov
+ */
+
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.beans.SimpleBeanInfo;
+
+public class Test7195106 {
+
+ public static void main(String[] arg) throws Exception {
+ BeanInfo info = Introspector.getBeanInfo(My.class);
+ if (null == info.getIcon(BeanInfo.ICON_COLOR_16x16)) {
+ throw new Error("Unexpected behavior");
+ }
+ try {
+ int[] array = new int[1024];
+ while (true) {
+ array = new int[array.length << 1];
+ }
+ }
+ catch (OutOfMemoryError error) {
+ System.gc();
+ }
+ if (null == info.getIcon(BeanInfo.ICON_COLOR_16x16)) {
+ throw new Error("Explicit BeanInfo is collected");
+ }
+ }
+
+ public static class My {
+ }
+
+ public static class MyBeanInfo extends SimpleBeanInfo {
+ @Override
+ public Image getIcon(int type) {
+ return new BufferedImage(16, 16, BufferedImage.TYPE_INT_RGB);
+ }
+ }
+}
--- jdk/test/java/beans/Performance/Test7122740.java 2012-08-10 10:32:32.000000000 -0700
+++ jdk/test/java/beans/Performance/Test7122740.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,57 +0,0 @@
-/*
- * 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 7122740
- * @summary Tests just a benchmark of PropertyDescriptor(String, Class) performance
- * @author Sergey Malenkov
- * @run main/manual Test7122740
- */
-
-import java.beans.PropertyDescriptor;
-
-public class Test7122740 {
- public static void main(String[] args) throws Exception {
- long time = System.nanoTime();
- for (int i = 0; i < 1000; i++) {
- new PropertyDescriptor("name", PropertyDescriptor.class);
- new PropertyDescriptor("value", Concrete.class);
- }
- time -= System.nanoTime();
- System.out.println("Time (ms): " + (-time / 1000000));
- }
-
- public static class Abstract<T> {
- private T value;
- public T getValue() {
- return this.value;
- }
- public void setValue(T value) {
- this.value = value;
- }
- }
-
- private static class Concrete extends Abstract<String> {
- }
-}
--- jdk/test/java/beans/Performance/Test7184799.java 2012-08-10 10:32:32.000000000 -0700
+++ jdk/test/java/beans/Performance/Test7184799.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,71 +0,0 @@
-/*
- * 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 7184799
- * @summary Tests just a benchmark of Introspector.getBeanInfo(Class) performance
- * @author Sergey Malenkov
- * @run main/manual Test7184799
- */
-
-import java.beans.Introspector;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-public class Test7184799 {
- private static final Class[] TYPES = {
- Class.class,
- String.class,
- Character.class,
- Boolean.class,
- Byte.class,
- Short.class,
- Integer.class,
- Long.class,
- Float.class,
- Double.class,
- Collection.class,
- Set.class,
- HashSet.class,
- TreeSet.class,
- LinkedHashSet.class,
- Map.class,
- HashMap.class,
- TreeMap.class,
- LinkedHashMap.class,
- WeakHashMap.class,
- ConcurrentHashMap.class,
- Dictionary.class,
- Exception.class,
- };
-
- public static void main(String[] args) throws Exception {
- long time = System.nanoTime();
- for (Class type : TYPES) {
- Introspector.getBeanInfo(type);
- }
- time -= System.nanoTime();
- System.out.println("Time (ms): " + (-time / 1000000));
- }
-}
--- jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java 2012-08-10 10:32:33.000000000 -0700
+++ jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java 2013-01-16 08:58:12.000000000 -0800
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -26,6 +26,8 @@
* @bug 6380849
* @summary Tests PropertyEditor finder
* @author Sergey Malenkov
+ * @compile -XDignore.symbol.file TestPropertyEditor.java
+ * @run main TestPropertyEditor
*/
import editors.SecondBeanEditor;
@@ -36,17 +38,17 @@
import java.beans.PropertyEditor;
import java.beans.PropertyEditorManager;
-import sun.beans.editors.BooleanEditor;
-import sun.beans.editors.ByteEditor;
-import sun.beans.editors.ColorEditor;
-import sun.beans.editors.DoubleEditor;
-import sun.beans.editors.EnumEditor;
-import sun.beans.editors.FloatEditor;
-import sun.beans.editors.FontEditor;
-import sun.beans.editors.IntegerEditor;
-import sun.beans.editors.LongEditor;
-import sun.beans.editors.ShortEditor;
-import sun.beans.editors.StringEditor;
+import com.sun.beans.editors.BooleanEditor;
+import com.sun.beans.editors.ByteEditor;
+import com.sun.beans.editors.ColorEditor;
+import com.sun.beans.editors.DoubleEditor;
+import com.sun.beans.editors.EnumEditor;
+import com.sun.beans.editors.FloatEditor;
+import com.sun.beans.editors.FontEditor;
+import com.sun.beans.editors.IntegerEditor;
+import com.sun.beans.editors.LongEditor;
+import com.sun.beans.editors.ShortEditor;
+import com.sun.beans.editors.StringEditor;
public class TestPropertyEditor implements Runnable {
--- jdk/test/java/beans/PropertyEditor/Test6963811.java 2012-08-10 10:32:33.000000000 -0700
+++ jdk/test/java/beans/PropertyEditor/Test6963811.java 2013-01-16 08:58:12.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -26,10 +26,12 @@
* @bug 6963811
* @summary Tests deadlock in PropertyEditorManager
* @author Sergey Malenkov
+ * @compile -XDignore.symbol.file Test6963811.java
+ * @run main Test6963811
*/
import java.beans.PropertyEditorManager;
-import sun.beans.editors.StringEditor;
+import com.sun.beans.editors.StringEditor;
public class Test6963811 implements Runnable {
private final long time;
--- jdk/test/java/beans/XMLEncoder/Test7169395.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/java/beans/XMLEncoder/Test7169395.java 2013-01-16 08:58:12.000000000 -0800
@@ -0,0 +1,101 @@
+/*
+ * 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 7169395
+ * @summary Tests that array list initialized correctly
+ * @author Sergey Malenkov
+ */
+
+import java.beans.ConstructorProperties;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
+
+public class Test7169395 extends AbstractTest {
+
+ public static void main(String[] args) {
+ new Test7169395().test(true);
+ }
+
+ protected Object getObject() {
+ Container container = new Container();
+ container.add("test-null", null);
+ container.add("test-value", "value");
+ container.add("test-other", "other");
+ return container;
+ }
+
+ public static class Component {
+
+ private final Container container;
+ private final String name;
+ private String value;
+
+ @ConstructorProperties({ "container", "name" })
+ public Component(Container container, String name) {
+ this.container = container;
+ this.name = name;
+ }
+
+ public Container getContainer() {
+ return this.container;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+
+ public static class Container {
+
+ private final Map<String, Component> map = new TreeMap<String, Component>();
+
+ public Collection<Component> getComponents() {
+ return new ArrayList<Component>(this.map.values());
+ }
+
+ public void setComponents(Collection<Component> components) {
+ this.map.clear();
+ for (Component component : components){
+ this.map.put(component.getName(), component);
+ }
+ }
+
+ public void add(String name, String value) {
+ Component list = new Component(this, name);
+ list.setValue(value);
+ this.map.put(name, list);
+ }
+ }
+}
--- jdk/test/java/io/File/GetXSpace.sh 2012-08-10 10:32:44.000000000 -0700
+++ jdk/test/java/io/File/GetXSpace.sh 2013-01-16 08:58:15.000000000 -0800
@@ -26,7 +26,7 @@
# set platform-dependent variable
OS=`uname -s`
case "$OS" in
- SunOS | Linux ) TMP=/tmp ;;
+ SunOS | Linux | *BSD | Darwin ) TMP=/tmp ;;
Windows_98 ) return ;;
Windows* ) SID=`sid`; TMP="c:/temp" ;;
* )
--- jdk/test/java/io/FileOutputStream/ManyFiles.java 2012-08-10 10:32:46.000000000 -0700
+++ jdk/test/java/io/FileOutputStream/ManyFiles.java 2013-01-16 08:58:15.000000000 -0800
@@ -43,7 +43,7 @@
// Windows capability it is much simpler to only run it
// on that platform.
String osName = System.getProperty("os.name");
- if (osName.startsWith("Linux")||osName.startsWith("SunOS"))
+ if (osName.startsWith("Linux")||osName.startsWith("SunOS")||osName.endsWith("BSD")||osName.contains("OS X"))
return;
for (int n = 0; n < NUM_FILES; n++) {
--- jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2012-08-10 10:33:10.000000000 -0700
+++ jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2013-01-16 08:58:15.000000000 -0800
@@ -41,7 +41,7 @@
# Need to determine the classpath separator and filepath separator based on the
# operating system.
case "$OS" in
-SunOS | Linux | Darwin )
+SunOS | Linux | *BSD | Darwin )
PS=":" ;;
Windows* | CYGWIN* )
PS=";" ;;
--- jdk/test/java/io/Serializable/serialver/classpath/run.sh 2012-08-10 10:33:31.000000000 -0700
+++ jdk/test/java/io/Serializable/serialver/classpath/run.sh 2013-01-16 08:58:15.000000000 -0800
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":" ;;
Windows* | CYGWIN* )
PS=";" ;;
--- jdk/test/java/io/Serializable/serialver/nested/run.sh 2012-08-10 10:33:31.000000000 -0700
+++ jdk/test/java/io/Serializable/serialver/nested/run.sh 2013-01-16 08:58:15.000000000 -0800
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":" ;;
Windows* | CYGWIN* )
PS=";" ;;
--- jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2012-08-10 10:34:02.000000000 -0700
+++ jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2013-01-16 08:58:15.000000000 -0800
@@ -45,13 +45,7 @@
# set platform-specific variables
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- ;;
- Linux )
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
Windows*)
--- jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2012-08-10 10:34:02.000000000 -0700
+++ jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2013-01-16 08:58:15.000000000 -0800
@@ -49,13 +49,7 @@
# set platform-specific variables
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- ;;
- Linux )
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
Windows* | CYGWIN* )
--- jdk/test/java/lang/StringCoding/CheckEncodings.sh 2012-08-10 10:34:06.000000000 -0700
+++ jdk/test/java/lang/StringCoding/CheckEncodings.sh 2013-01-16 08:58:15.000000000 -0800
@@ -30,7 +30,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin) ;;
+ SunOS | Linux | *BSD | Darwin) ;;
Windows* | CYGWIN* )
echo "Passed"; exit 0 ;;
* ) echo "Unrecognized system!" ; exit 1 ;;
--- jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2012-08-10 10:34:07.000000000 -0700
+++ jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2013-01-16 08:58:15.000000000 -0800
@@ -44,7 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin)
+ SunOS | Linux | *BSD | Darwin)
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/java/lang/instrument/MakeJAR2.sh 2012-08-10 10:34:08.000000000 -0700
+++ jdk/test/java/lang/instrument/MakeJAR2.sh 2013-01-16 08:58:15.000000000 -0800
@@ -49,7 +49,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2012-08-10 10:34:11.000000000 -0700
+++ jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2013-01-16 08:58:15.000000000 -0800
@@ -35,15 +35,7 @@
OS=`uname -s`
case "$OS" in
- SunOS )
- PS=":"
- FS="/"
- ;;
- Linux )
- PS=":"
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2012-08-10 10:34:13.000000000 -0700
+++ jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2013-01-16 08:58:15.000000000 -0800
@@ -61,7 +61,7 @@
while true; do
echo "Run $i: TestSystemLoadAvg"
case `uname -s` in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
runOne GetSystemLoadAverage
;;
* )
--- jdk/test/java/net/Authenticator/B4933582.sh 2012-08-10 10:34:17.000000000 -0700
+++ jdk/test/java/net/Authenticator/B4933582.sh 2013-01-16 08:58:15.000000000 -0800
@@ -26,7 +26,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/CookieHandler/NullUriCookieTest.java 2012-08-10 10:34:18.000000000 -0700
+++ jdk/test/java/net/CookieHandler/NullUriCookieTest.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2011, 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 6953455
- * @summary CookieStore.add() cannot handle null URI parameter
- */
-
-import java.net.CookieManager;
-import java.net.CookieStore;
-import java.net.HttpCookie;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-
-public class NullUriCookieTest {
- static boolean fail = false;
-
- public static void main(String[] args) throws Exception {
- checkCookieNullUri();
- }
-
- static void checkCookieNullUri() throws Exception {
- //get a cookie store implementation and add a cookie to the store with null URI
- CookieStore cookieStore = (new CookieManager()).getCookieStore();
- HttpCookie cookie = new HttpCookie("MY_COOKIE", "MY_COOKIE_VALUE");
- cookie.setDomain("foo.com");
- cookieStore.add(null, cookie);
-
- //Retrieve added cookie
- URI uri = new URI("http://foo.com");
- List<HttpCookie> addedCookieList = cookieStore.get(uri);
-
- //Verify CookieStore behaves well
- if (addedCookieList.size() != 1) {
- fail = true;
- }
- checkFail("Abnormal size of cookie jar");
-
- for (HttpCookie chip : addedCookieList) {
- if (!chip.equals(cookie)) {
- fail = true;
- }
- }
- checkFail("Cookie not retrieved from Cookie Jar");
- boolean ret = cookieStore.remove(null,cookie);
- if (!ret) {
- fail = true;
- }
- checkFail("Abnormal removal behaviour from Cookie Jar");
- }
-
- static void checkFail(String exp) {
- if (fail) {
- throw new RuntimeException(exp);
- }
- }
-}
-
--- jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2012-08-10 10:34:18.000000000 -0700
+++ jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2013-01-16 08:58:15.000000000 -0800
@@ -45,6 +45,8 @@
return (true);
if (p.getProperty ("os.name").equals ("Linux"))
return (true);
+ if (p.getProperty ("os.name").endsWith ("BSD"))
+ return (true);
if (p.getProperty ("os.name").startsWith ("Mac OS"))
return (true);
// Check for specific Solaris version from here
--- jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2012-08-10 10:34:18.000000000 -0700
+++ jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2013-01-16 08:58:15.000000000 -0800
@@ -27,11 +27,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/net/Socket/OldSocketImpl.sh 2012-08-10 10:34:21.000000000 -0700
+++ jdk/test/java/net/Socket/OldSocketImpl.sh 2013-01-16 08:58:15.000000000 -0800
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URL/B5086147.sh 2012-08-10 10:34:22.000000000 -0700
+++ jdk/test/java/net/URL/B5086147.sh 2013-01-16 08:58:15.000000000 -0800
@@ -26,7 +26,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
exit 0
;;
CYGWIN* )
--- jdk/test/java/net/URL/Gopher.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/java/net/URL/Gopher.java 2013-01-16 08:58:12.000000000 -0800
@@ -0,0 +1,74 @@
+/*
+ * 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 7189567
+ * @summary java net obselete protocol
+ * @run main Gopher
+ * @run main/othervm -Djdk.net.registerGopherProtocol Gopher enabled
+ * @run main/othervm -Djdk.net.registerGopherProtocol=false Gopher
+ */
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+public class Gopher {
+ static final String GOPHER_PROP = "jdk.net.registerGopherProtocol";
+
+ public static void main(String[] args) throws Exception {
+ boolean expectEnabled = false;
+ if (args.length >= 1 && args[0].equals("enabled"))
+ expectEnabled = true;
+
+ String prop = System.getProperty(GOPHER_PROP);
+ boolean gopherEnabled = prop == null ? false :
+ (prop.equalsIgnoreCase("false") ? false : true);
+
+ // Validate system property reading
+ if (expectEnabled && !gopherEnabled) {
+ System.err.println(GOPHER_PROP + ": " + gopherEnabled);
+ throw new RuntimeException(
+ "Failed: expected system property to be enabled, but it is not");
+ }
+ if (!expectEnabled && gopherEnabled) {
+ System.err.println(GOPHER_PROP + ": " + gopherEnabled);
+ throw new RuntimeException(
+ "Failed: expected system property to be disabled, but it is not");
+ }
+
+ try {
+ new URL("gopher://anyhost:70/[anydata]");
+ if (!gopherEnabled) {
+ System.err.println(GOPHER_PROP + ": " + gopherEnabled);
+ throw new RuntimeException("Failed: gopher should NOT be enabled");
+ }
+ } catch (MalformedURLException x) {
+ if (gopherEnabled) {
+ System.err.println(GOPHER_PROP + ": " + gopherEnabled);
+ x.printStackTrace();
+ throw new RuntimeException("Failed: gopher should be enabled");
+ }
+ }
+ }
+}
--- jdk/test/java/net/URL/Test.java 2012-08-10 10:34:23.000000000 -0700
+++ jdk/test/java/net/URL/Test.java 2013-01-16 08:58:12.000000000 -0800
@@ -322,10 +322,6 @@
test("ftp://ftp.is.co.za/rfc/rfc1808.txt")
.s("ftp").h("ftp.is.co.za").p("/rfc/rfc1808.txt").z();
- test("gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles")
- .s("gopher").h("spinaltap.micro.umn.edu")
- .p("/00/Weather/California/Los%20Angeles").z();
-
test("http://www.math.uio.no/faq/compression-faq/part1.html")
.s("http").h("www.math.uio.no").p("/faq/compression-faq/part1.html").z();
--- jdk/test/java/net/URL/runconstructor.sh 2012-08-10 10:34:23.000000000 -0700
+++ jdk/test/java/net/URL/runconstructor.sh 2013-01-16 08:58:15.000000000 -0800
@@ -27,7 +27,7 @@
#
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URLClassLoader/B5077773.sh 2012-08-10 10:34:23.000000000 -0700
+++ jdk/test/java/net/URLClassLoader/B5077773.sh 2013-01-16 08:58:15.000000000 -0800
@@ -34,11 +34,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PS=":"
- FS="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2012-08-10 10:34:25.000000000 -0700
+++ jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2013-01-16 08:58:15.000000000 -0800
@@ -27,11 +27,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PS=":"
- FS="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URLConnection/6212146/test.sh 2012-08-10 10:34:25.000000000 -0700
+++ jdk/test/java/net/URLConnection/6212146/test.sh 2013-01-16 08:58:15.000000000 -0800
@@ -33,11 +33,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PS=":"
- FS="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/nio/channels/DatagramChannel/Disconnect.java 2012-08-10 10:34:28.000000000 -0700
+++ jdk/test/java/nio/channels/DatagramChannel/Disconnect.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,77 +0,0 @@
-/*
- * 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 7132924
- * @summary Test DatagramChannel.disconnect when DatagramChannel is connected to an IPv4 socket
- * @run main Disconnect
- * @run main/othervm -Djava.net.preferIPv4Stack=true Disconnect
- */
-
-import java.net.*;
-import java.nio.*;
-import java.nio.channels.*;
-import java.io.IOException;
-
-public class Disconnect {
- public static void main(String[] args) throws IOException {
- // test with default protocol family
- try (DatagramChannel dc = DatagramChannel.open()) {
- test(dc);
- test(dc);
- }
-
- // test with IPv4 only
- try (DatagramChannel dc = DatagramChannel.open(StandardProtocolFamily.INET)) {
- test(dc);
- test(dc);
- }
- }
-
- /**
- * Connect DatagramChannel to a server, write a datagram and disconnect. Invoke
- * a second or subsequent time with the same DatagramChannel instance to check
- * that disconnect works as expected.
- */
- static void test(DatagramChannel dc) throws IOException {
- try (DatagramChannel server = DatagramChannel.open()) {
- server.bind(new InetSocketAddress(0));
-
- InetAddress lh = InetAddress.getLocalHost();
- dc.connect(new InetSocketAddress(lh, server.socket().getLocalPort()));
-
- dc.write(ByteBuffer.wrap("hello".getBytes()));
-
- ByteBuffer bb = ByteBuffer.allocate(100);
- server.receive(bb);
-
- dc.disconnect();
-
- try {
- dc.write(ByteBuffer.wrap("another message".getBytes()));
- throw new RuntimeException("write should fail, not connected");
- } catch (NotYetConnectedException expected) {
- }
- }
- }
-}
--- jdk/test/java/nio/channels/Selector/ChangingInterests.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/java/nio/channels/Selector/ChangingInterests.java 2013-01-16 08:58:12.000000000 -0800
@@ -0,0 +1,190 @@
+/*
+ * 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 7200742
+ * @summary Test that Selector doesn't spin when changing interest ops
+ */
+
+import java.net.*;
+import java.nio.ByteBuffer;
+import java.nio.channels.*;
+import static java.nio.channels.SelectionKey.*;
+import java.io.IOException;
+
+public class ChangingInterests {
+
+ static int OPS[] = { 0, OP_WRITE, OP_READ, (OP_WRITE|OP_READ) };
+
+ static String toOpsString(int ops) {
+ String s = "";
+ if ((ops & OP_READ) > 0)
+ s += "POLLIN";
+ if ((ops & OP_WRITE) > 0) {
+ if (s.length() > 0)
+ s += "|";
+ s += "POLLOUT";
+ }
+ if (s.length() == 0)
+ s = "0";
+ return "(" + s + ")";
+ }
+
+ static void write1(SocketChannel peer) throws IOException {
+ peer.write(ByteBuffer.wrap(new byte[1]));
+ // give time for other end to be readable
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException ignore) { }
+ }
+
+ static void drain(SocketChannel sc) throws IOException {
+ ByteBuffer buf = ByteBuffer.allocate(100);
+ int n;
+ while ((n = sc.read(buf)) > 0) {
+ buf.rewind();
+ }
+ }
+
+ /**
+ * Changes the given key's interest set from one set to another and then
+ * checks the selected key set and the key's channel.
+ */
+ static void testChange(SelectionKey key, int from, int to) throws IOException {
+ Selector sel = key.selector();
+ assertTrue(sel.keys().size() == 1, "Only one channel should be registered");
+
+ // ensure that channel is registered with the "from" interest set
+ key.interestOps(from);
+ sel.selectNow();
+ sel.selectedKeys().clear();
+
+ // change to the "to" interest set
+ key.interestOps(to);
+ System.out.println("select...");
+ int selected = sel.selectNow();
+ System.out.println("" + selected + " channel(s) selected");
+
+ int expected = (to == 0) ? 0 : 1;
+ assertTrue(selected == expected, "Expected " + expected);
+
+ // check selected keys
+ for (SelectionKey k: sel.selectedKeys()) {
+ assertTrue(k == key, "Unexpected key selected");
+
+ boolean readable = k.isReadable();
+ boolean writable = k.isWritable();
+
+ System.out.println("key readable: " + readable);
+ System.out.println("key writable: " + writable);
+
+ if ((to & OP_READ) == 0) {
+ assertTrue(!readable, "Not expected to be readable");
+ } else {
+ assertTrue(readable, "Expected to be readable");
+ }
+
+ if ((to & OP_WRITE) == 0) {
+ assertTrue(!writable, "Not expected to be writable");
+ } else {
+ assertTrue(writable, "Expected to be writable");
+ }
+
+ sel.selectedKeys().clear();
+ }
+ }
+
+ /**
+ * Tests that given Selector's select method blocks.
+ */
+ static void testForSpin(Selector sel) throws IOException {
+ System.out.println("Test for spin...");
+ long start = System.currentTimeMillis();
+ int count = 3;
+ while (count-- > 0) {
+ int selected = sel.select(1000);
+ System.out.println("" + selected + " channel(s) selected");
+ assertTrue(selected == 0, "Channel should not be selected");
+ }
+ long dur = System.currentTimeMillis() - start;
+ assertTrue(dur > 1000, "select was too short");
+ }
+
+ public static void main(String[] args) throws IOException {
+ InetAddress lh = InetAddress.getLocalHost();
+
+ // create loopback connection
+ ServerSocketChannel ssc =
+ ServerSocketChannel.open().bind(new InetSocketAddress(0));
+
+ final SocketChannel sc = SocketChannel.open();
+ sc.connect(new InetSocketAddress(lh, ssc.socket().getLocalPort()));
+ SocketChannel peer = ssc.accept();
+
+ sc.configureBlocking(false);
+
+ // ensure that channel "sc" is readable
+ write1(peer);
+
+ try (Selector sel = Selector.open()) {
+ SelectionKey key = sc.register(sel, 0);
+ sel.selectNow();
+
+ // test all transitions
+ for (int from: OPS) {
+ for (int to: OPS) {
+
+ System.out.println(toOpsString(from) + " -> " + toOpsString(to));
+
+ testChange(key, from, to);
+
+ // if the interst ops is now 0 then Selector should not spin
+ if (to == 0)
+ testForSpin(sel);
+
+ // if interest ops is now OP_READ then make non-readable
+ // and test that Selector does not spin.
+ if (to == OP_READ) {
+ System.out.println("Drain channel...");
+ drain(sc);
+ testForSpin(sel);
+ System.out.println("Make channel readable again");
+ write1(peer);
+ }
+
+ System.out.println();
+ }
+ }
+
+ } finally {
+ sc.close();
+ peer.close();
+ ssc.close();
+ }
+ }
+
+ static void assertTrue(boolean v, String msg) {
+ if (!v) throw new RuntimeException(msg);
+ }
+
+}
--- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2012-08-10 10:34:31.000000000 -0700
+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2013-01-16 08:58:15.000000000 -0800
@@ -71,6 +71,48 @@
EXTRA_LIBS = -lc
endif
+ifeq ($(uname), Darwin)
+ PLATFORM = bsd
+ archExpr = case "`$(UNAME) -m`" in \
+ i[3-6]86) \
+ $(ECHO) i586 \
+ ;; \
+ sparc*) \
+ $(ECHO) sparc \
+ ;; \
+ *) \
+ $(UNAME) -m \
+ ;; \
+ esac
+ ARCH := $(shell $(archExpr) )
+ CC = gcc
+ CFLAGS = -fno-strict-aliasing -fPIC -W -Wall
+ LD = ld
+ LDFLAGS_COMMON = -shared
+ EXTRA_LIBS = -lc
+endif
+
+ifeq ($(findstring BSD,$(uname)), BSD)
+ PLATFORM = bsd
+ archExpr = case "`$(UNAME) -m`" in \
+ i[3-6]86) \
+ $(ECHO) i586 \
+ ;; \
+ sparc*) \
+ $(ECHO) sparc \
+ ;; \
+ *) \
+ $(UNAME) -m \
+ ;; \
+ esac
+ ARCH := $(shell $(archExpr) )
+ CC = gcc
+ CFLAGS = -fno-strict-aliasing -fPIC -W -Wall
+ LD = ld
+ LDFLAGS_COMMON = -shared
+ EXTRA_LIBS = -lc
+endif
+
LIBDIR=lib/$(PLATFORM)-$(ARCH)
LAUNCHERLIB=$(LIBDIR)/libLauncher.so
--- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2013-01-16 08:58:15.000000000 -0800
@@ -33,11 +33,14 @@
# @run shell run_tests.sh
os=`uname -s`
-
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ SunOS | Linux | *BSD | Darwin )
+ ;;
+ * )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
# if TESTJAVA isn't set then we assume an interactive run. So that it's
@@ -67,7 +70,8 @@
# On Solaris we assume 64-bit if java -d64 works.
DFLAG=
-if [ "$os" = "SunOS" ]; then
+case "${os}" in
+ SunOS )
PLATFORM=solaris
case "`uname -p`" in
i[3-9]86)
@@ -84,9 +88,9 @@
fi
;;
esac
-fi
+ ;;
-if [ "$os" = "Linux" ]; then
+ Linux )
PLATFORM=linux
ARCH=unknown
case "`uname -m`" in
@@ -100,7 +104,24 @@
ARCH=amd64
;;
esac
-fi
+ ;;
+
+ *BSD | Darwin )
+ PLATFORM=bsd
+ ARCH=unknown
+ case "`uname -m`" in
+ i[3-6]86)
+ ARCH=i586
+ ;;
+ ia64)
+ ARCH=ia64
+ ;;
+ x86_64)
+ ARCH=amd64
+ ;;
+ esac
+ ;;
+esac
LIBDIR=lib/${PLATFORM}-${ARCH}
LAUNCHERLIB=${LIBDIR}/libLauncher.so
--- jdk/test/java/nio/charset/Charset/default.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/charset/Charset/default.sh 2013-01-16 08:58:15.000000000 -0800
@@ -41,10 +41,14 @@
fi
s="`uname -s`"
-if [ "$s" != Linux -a "$s" != SunOS ]; then
- echo "$s: locale command not supported on this system, skipping..."
- exit 0
-fi
+case "$s" in
+ Linux|SunOS|*BSD|Darwin)
+ ;;
+ *)
+ echo "$s: locale command not supported on this system, skipping..."
+ exit 0
+ ;;
+esac
JAVA=$TESTJAVA/bin/java
--- jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2013-01-16 08:58:15.000000000 -0800
@@ -34,7 +34,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin ) ;;
+ SunOS | Linux | *BSD | Darwin ) ;;
# Skip locale test for Windows
Windows* )
echo "Passed"; exit 0 ;;
--- jdk/test/java/nio/charset/spi/basic.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/charset/spi/basic.sh 2013-01-16 08:58:15.000000000 -0800
@@ -70,10 +70,14 @@
L="$1"
shift
s=`uname -s`
- if [ $s != Linux -a $s != SunOS -a $s != Darwin ]; then
- echo "$L: Locales not supported on this system, skipping..."
- exit 0
- fi
+ case "$s" in
+ Linux|SunOS|*BSD|Darwin)
+ ;;
+ *)
+ echo "$L: Locales not supported on this system, skipping..."
+ exit 0
+ ;;
+ esac
if [ "x`locale -a | grep $L`" != "x$L" ]; then
echo "$L: Locale not supported, skipping..."
exit 0
@@ -85,7 +89,7 @@
cd $TMP
case `uname` in
- SunOS | Linux | Darwin ) CPS=':' ;;
+ SunOS | Linux | *BSD | Darwin ) CPS=':' ;;
Windows* ) CPS=';' ;;
*) echo "Unknown platform: `uname`"; exit 1 ;;
esac
--- jdk/test/java/nio/file/FileSystem/Basic.java 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/file/FileSystem/Basic.java 2013-01-16 08:58:15.000000000 -0800
@@ -76,6 +76,8 @@
checkSupported(fs, "posix", "unix", "owner", "acl", "user");
if (os.equals("Linux"))
checkSupported(fs, "posix", "unix", "owner", "dos", "user");
+ if (os.endsWith("BSD"))
+ checkSupported(fs, "posix", "unix", "owner");
if (os.contains("OS X"))
checkSupported(fs, "posix", "unix", "owner");
if (os.equals("Windows"))
--- jdk/test/java/nio/file/Files/CopyAndMove.java 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/file/Files/CopyAndMove.java 2013-01-16 08:58:15.000000000 -0800
@@ -634,7 +634,7 @@
// check POSIX attributes are copied
String os = System.getProperty("os.name");
- if (os.equals("SunOS") || os.equals("Linux")) {
+ if (os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD")) {
checkPosixAttributes(
readAttributes(source, PosixFileAttributes.class, linkOptions),
readAttributes(target, PosixFileAttributes.class, linkOptions));
@@ -1136,7 +1136,7 @@
static void randomizeAttributes(Path file) throws IOException {
String os = System.getProperty("os.name");
boolean isWindows = os.startsWith("Windows");
- boolean isUnix = os.equals("SunOS") || os.equals("Linux");
+ boolean isUnix = os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD");
boolean isDirectory = isDirectory(file, NOFOLLOW_LINKS);
if (isUnix) {
--- jdk/test/java/rmi/registry/readTest/readTest.sh 2012-08-10 10:34:39.000000000 -0700
+++ jdk/test/java/rmi/registry/readTest/readTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
FILEURL="file:"
--- jdk/test/java/rmi/reliability/launch_reliability.ksh 2012-08-10 10:34:42.000000000 -0700
+++ jdk/test/java/rmi/reliability/launch_reliability.ksh 2013-01-16 08:58:15.000000000 -0800
@@ -84,14 +84,12 @@
# set platform-dependent variables
-if [ `uname` = "SunOS" ] ; then
+case `uname` in
+ SunOS | Linux | *BSD | Darwin )
PATH_SEP=":"
-
-elif [ `uname` = "Linux" ] ; then
- PATH_SEP=":"
-else
+ * )
PATH_SEP=";"
-fi
+esac
export PATH_SEP
mainpid=$$
--- jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2013-01-16 08:58:15.000000000 -0800
@@ -46,15 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2013-01-16 08:58:15.000000000 -0800
@@ -34,15 +34,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2013-01-16 08:58:15.000000000 -0800
@@ -50,15 +50,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/signedfirst/Dyn.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/signedfirst/Dyn.sh 2013-01-16 08:58:15.000000000 -0800
@@ -46,15 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/signedfirst/Static.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/signedfirst/Static.sh 2013-01-16 08:58:15.000000000 -0800
@@ -46,15 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/util/Currency/PropertiesTest.sh 2012-08-10 10:34:57.000000000 -0700
+++ jdk/test/java/util/Currency/PropertiesTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -30,7 +30,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/util/PluggableLocale/ExecTest.sh 2012-08-10 10:35:02.000000000 -0700
+++ jdk/test/java/util/PluggableLocale/ExecTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -58,7 +58,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2012-08-10 10:35:04.000000000 -0700
+++ jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2013-01-16 08:58:15.000000000 -0800
@@ -31,7 +31,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2012-08-10 10:35:05.000000000 -0700
+++ jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -72,10 +72,10 @@
Windows* | CYGWIN* )
DEL=";"
;;
-SunOS | Darwin)
+SunOS | Darwin )
DEL=":"
;;
-Linux)
+Linux | *BSD )
DEL=":"
HAS_S=YES
;;
--- jdk/test/java/util/ServiceLoader/basic.sh 2012-08-10 10:35:06.000000000 -0700
+++ jdk/test/java/util/ServiceLoader/basic.sh 2013-01-16 08:58:15.000000000 -0800
@@ -42,9 +42,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- SEP=':' ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
SEP=':' ;;
* )
SEP='\;' ;;
--- jdk/test/java/util/concurrent/BlockingQueue/LastElement.java 2012-08-10 10:35:08.000000000 -0700
+++ jdk/test/java/util/concurrent/BlockingQueue/LastElement.java 2013-01-16 00:07:30.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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 6215625 7161229
+ * @bug 6215625
* @summary Check correct behavior when last element is removed.
* @author Martin Buchholz
*/
@@ -38,7 +38,9 @@
testQueue(new ArrayBlockingQueue<Integer>(10, true));
testQueue(new ArrayBlockingQueue<Integer>(10, false));
testQueue(new LinkedTransferQueue<Integer>());
- testQueue(new PriorityBlockingQueue<Integer>());
+
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new Exception("Some tests failed");
}
void testQueue(BlockingQueue<Integer> q) throws Throwable {
@@ -57,7 +59,6 @@
try {check(q.take() == three);}
catch (Throwable t) {unexpected(t);}
check(q.isEmpty() && q.size() == 0);
- check(noRetention(q));
// iterator().remove()
q.clear();
@@ -76,26 +77,6 @@
check(q.isEmpty() && q.size() == 0);
}
- boolean noRetention(BlockingQueue<?> q) {
- if (q instanceof PriorityBlockingQueue) {
- PriorityBlockingQueue<?> pbq = (PriorityBlockingQueue) q;
- try {
- java.lang.reflect.Field queue =
- PriorityBlockingQueue.class.getDeclaredField("queue");
- queue.setAccessible(true);
- Object[] a = (Object[]) queue.get(pbq);
- return a[0] == null;
- }
- catch (NoSuchFieldException e) {
- unexpected(e);
- }
- catch (IllegalAccessException e) {
- // ignore - security manager must be installed
- }
- }
- return true;
- }
-
//--------------------- Infrastructure ---------------------------
volatile int passed = 0, failed = 0;
void pass() {passed++;}
--- jdk/test/java/util/concurrent/Executors/AutoShutdown.java 2012-08-10 10:35:09.000000000 -0700
+++ jdk/test/java/util/concurrent/Executors/AutoShutdown.java 2013-01-16 08:58:13.000000000 -0800
@@ -67,6 +67,11 @@
e1 = e2 = null;
for (int i = 0; i < 10 && Thread.activeCount() > count0; i++)
tryWaitForFinalizersToRun();
+ for (int i = 0; i < 10; ++i) { // give JVM a chance to settle.
+ if (Thread.activeCount() == count0)
+ return;
+ Thread.sleep(1000);
+ }
equal(Thread.activeCount(), count0);
}
--- jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2012-08-10 10:35:14.000000000 -0700
+++ jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -51,7 +51,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/javax/crypto/sanity/CheckManifestForRelease.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/javax/crypto/sanity/CheckManifestForRelease.java 2013-01-16 08:58:13.000000000 -0800
@@ -0,0 +1,187 @@
+/*
+ * 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 7195931 7197071 7198146
+ * @summary UnsatisfiedLinkError on PKCS11.C_GetOperationState while
+ * using NSS from jre7u6+
+ */
+import java.net.*;
+import java.io.*;
+import java.security.*;
+import java.lang.reflect.*;
+
+/**
+ * When the Java specification version is incremented, all of the providers
+ * must be recompiled with the proper implementation version to match.
+ */
+public class CheckManifestForRelease {
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) throws Exception {
+ checkP11MessageDigestClone();
+ checkFileManifests();
+ }
+
+ /*
+ * Iterate over the files of interest: JCE framework and providers
+ */
+ static private void checkFileManifests() throws Exception {
+ System.out.println("=============");
+ String libDirName = System.getProperty("java.home", ".") + "/lib";
+ String extDirName = libDirName + "/ext";
+
+ System.out.println("Checking Manifest in directory: \n " +
+ extDirName);
+
+ /*
+ * Current list of JCE providers, all of which currently live in
+ * the extensions directory. Add if more are created.
+ */
+ String[] providers = new String[]{
+ "sunjce_provider.jar",
+ "sunec.jar",
+ "sunmscapi.jar",
+ "sunpkcs11.jar",
+ "ucrypto.jar"
+ };
+
+ checkManifest(libDirName, "jce.jar");
+ for (String provider : providers) {
+ checkManifest(extDirName, provider);
+ }
+ System.out.println("Passed.");
+ }
+
+ // Helper method to format the URL properly.
+ static private String formatURL(String dir, String file) {
+ return "jar:file:///" + dir + "/" + file + "!/";
+ }
+
+ static private String specVersion =
+ System.getProperty("java.specification.version");
+
+ /*
+ * Test the root cause, which is that there were no manifest values
+ * for many of the providers, and for those that had them, there was
+ * no test to make sure that the impl version was appropriate for
+ * the spec version.
+ */
+ static private void checkManifest(String dir, String file)
+ throws Exception {
+
+ System.out.println("Checking: " + file);
+
+ String url = formatURL(dir, file);
+ JarURLConnection urlc =
+ (JarURLConnection) (new URL(url).openConnection());
+
+ String implVersion;
+ try {
+ implVersion = urlc.getManifest().getMainAttributes().getValue(
+ "Implementation-Version");
+ } catch (FileNotFoundException e) {
+ /*
+ * If the file doesn't exist (e.g. mscapi on solaris),
+ * skip it. If there are other problems, fail out.
+ */
+ System.out.println(" " + file + " not found, skipping...");
+ return;
+ }
+
+ if (implVersion == null) {
+ throw new Exception(
+ "Implementation-Version not found in Manifest");
+ }
+
+ if (!implVersion.startsWith(specVersion)) {
+ throw new Exception(
+ "Implementation-Version does not match " +
+ "Specification-Version");
+ }
+ }
+
+ /*
+ * Workaround for unfortunately generified forName() API
+ */
+ @SuppressWarnings("unchecked")
+ static private Class<Provider> getProviderClass(String name)
+ throws Exception {
+ return (Class<Provider>)Class.forName(name);
+ }
+
+ /*
+ * Check the symptom, an UnsatisfiedLinkError in MessageDigests.
+ */
+ static private void checkP11MessageDigestClone() throws Exception {
+
+ System.out.println("=============");
+ System.out.println("Checking for UnsatisfiedLinkError");
+ String os = System.getProperty("os.name");
+ // Only run on Solaris
+ if (!os.equals("SunOS")) {
+ return;
+ }
+
+ /*
+ * We have to do some gyrations here, since the code to exercise
+ * this is in the P11 MessageDigests, and most of those mechanisms
+ * are disabled by default.
+ */
+ String customP11File =
+ System.getProperty("TESTSRC", ".") + "/p11-solaris.txt";
+
+ /*
+ * In 7u, we don't have a 64 PKCS11 windows build yet, so we
+ * have to do some dynamic checking to determine if there is
+ * a PKCS11 library available to test against. Otherwise, the
+ * windows 64 bit will throw a compilation error before the
+ * test is even run.
+ */
+ Constructor<Provider> cons;
+ Provider provider;
+ try {
+ Class<Provider> clazz =
+ getProviderClass("sun.security.pkcs11.SunPKCS11");
+ cons = clazz.getConstructor(new Class[]{String.class});
+ provider = cons.newInstance(new Object[]{customP11File});
+ } catch (Exception ex) {
+ System.out.println("Skipping test - no PKCS11 provider available");
+ return;
+ }
+
+ try {
+ MessageDigest md = MessageDigest.getInstance("SHA1", provider);
+ md.update((byte) 0x01);
+ System.out.println(md.getProvider());
+ md.clone();
+ } catch (Exception e) {
+ // These kinds of failure are ok. We're testing the
+ // UnsatisfiedLinkError here.
+ }
+ System.out.println("Passed.");
+ }
+}
--- jdk/test/javax/crypto/sanity/p11-solaris.txt 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/javax/crypto/sanity/p11-solaris.txt 2013-01-16 08:58:13.000000000 -0800
@@ -0,0 +1,21 @@
+#
+# Configuration file to allow the SunPKCS11 provider to utilize
+# the Solaris Cryptographic Framework, if it is available
+#
+# This is a temporary file only for testing. It does not contain the
+# normal disabled PKCS11 mechanisms that we will use for this test.
+#
+
+name = MyProvider
+
+description = SunPKCS11 accessing Solaris Cryptographic Framework
+
+library = /usr/lib/$ISA/libpkcs11.so
+
+handleStartupErrors = ignoreAll
+
+attributes = compatibility
+
+disabledMechanisms = {
+ CKM_MD2
+}
--- jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2012-08-10 10:35:15.000000000 -0700
+++ jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2013-01-16 08:58:15.000000000 -0800
@@ -84,7 +84,7 @@
TMP="/tmp"
;;
- Linux | Darwin )
+ Linux | *BSD | Darwin )
VAR="A different value for Linux"
DEFAULT_JDK=/usr/local/java/jdk1.4/linux-i386
FILESEP="/"
--- jdk/test/javax/script/CommonSetup.sh 2012-08-10 10:35:25.000000000 -0700
+++ jdk/test/javax/script/CommonSetup.sh 2013-01-16 08:58:15.000000000 -0800
@@ -36,7 +36,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/javax/security/auth/Subject/doAs/Test.sh 2012-08-10 10:35:26.000000000 -0700
+++ jdk/test/javax/security/auth/Subject/doAs/Test.sh 2013-01-16 08:58:15.000000000 -0800
@@ -33,17 +33,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PS=":"
- FS="/"
- RM="/bin/rm -f"
- ;;
- Linux )
- PS=":"
- FS="/"
- RM="/bin/rm -f"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
RM="/bin/rm -f"
--- jdk/test/javax/swing/AncestorNotifier/7193219/bug7193219.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/javax/swing/AncestorNotifier/7193219/bug7193219.java 2013-01-16 08:58:13.000000000 -0800
@@ -0,0 +1,83 @@
+/*
+ * 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 7193219
+ @summary JComboBox serialization fails in JDK 1.7
+ @author Anton Litvinov
+*/
+
+import java.io.*;
+
+import javax.swing.*;
+
+public class bug7193219 {
+ private static byte[] serializeGUI() {
+ // Create and set up the window.
+ JFrame frame = new JFrame("Serialization");
+ JPanel mainPanel = new JPanel();
+
+ /**
+ * If JComboBox is replaced with other component like JLabel
+ * The issue does not happen.
+ */
+ JComboBox status = new JComboBox();
+ status.addItem("123");
+ mainPanel.add(status);
+ frame.getContentPane().add(mainPanel);
+ frame.pack();
+
+ try {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(mainPanel);
+ oos.flush();
+ frame.dispose();
+ return baos.toByteArray();
+ } catch (IOException ioe) {
+ throw new RuntimeException(ioe);
+ }
+ }
+
+ private static void deserializeGUI(byte[] serializedData) {
+ try {
+ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(serializedData));
+ JPanel mainPanel = (JPanel)ois.readObject();
+ JFrame frame = new JFrame("Deserialization");
+ frame.getContentPane().add(mainPanel);
+ frame.pack();
+ frame.dispose();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ deserializeGUI(serializeGUI());
+ }
+ });
+ }
+}
--- jdk/test/javax/swing/JComponent/7154030/bug7154030.java 2012-08-10 10:36:00.000000000 -0700
+++ jdk/test/javax/swing/JComponent/7154030/bug7154030.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,169 +0,0 @@
-/*
- * 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.
- */
-
-/*
- * Portions Copyright (c) 2012 IBM Corporation
- */
-
-import javax.swing.JButton;
-import javax.swing.JDesktopPane;
-import javax.swing.JFrame;
-import javax.swing.SwingUtilities;
-import sun.awt.SunToolkit;
-
-import java.awt.AWTException;
-import java.awt.AlphaComposite;
-import java.awt.Color;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Rectangle;
-import java.awt.Robot;
-import java.awt.Toolkit;
-import java.awt.image.BufferedImage;
-
-/* @test 1.1 2012/04/12
- * @bug 7154030
- * @summary Swing components fail to hide after calling hide()
- * @author Jonathan Lu
- * @library ../../regtesthelpers/
- * @build Util
- * @run main bug7154030
- */
-
-public class bug7154030 {
-
- private static JButton button = null;
-
- public static void main(String[] args) throws Exception {
- BufferedImage imageInit = null;
-
- BufferedImage imageShow = null;
-
- BufferedImage imageHide = null;
-
- SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
-
- Robot robot = new Robot();
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- JDesktopPane desktop = new JDesktopPane();
- button = new JButton("button");
- JFrame frame = new JFrame();
-
- button.setSize(200, 200);
- button.setLocation(100, 100);
- button.setForeground(Color.RED);
- button.setBackground(Color.RED);
- button.setOpaque(true);
- button.setVisible(false);
- desktop.add(button);
-
- frame.setContentPane(desktop);
- frame.setSize(300, 300);
- frame.setLocation(0, 0);
- frame.setVisible(true);
- frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- }
- });
-
- toolkit.realSync();
- imageInit = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.show();
- }
- });
-
- toolkit.realSync();
- imageShow = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
- if (Util.compareBufferedImages(imageInit, imageShow)) {
- throw new Exception("Failed to show opaque button");
- }
-
- toolkit.realSync();
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.hide();
- }
- });
-
- toolkit.realSync();
- imageHide = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- if (!Util.compareBufferedImages(imageInit, imageHide)) {
- throw new Exception("Failed to hide opaque button");
- }
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.setOpaque(false);
- button.setBackground(new Color(128, 128, 0));
- button.setVisible(false);
- }
- });
-
- toolkit.realSync();
- imageInit = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.show();
- }
- });
-
- toolkit.realSync();
- imageShow = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.hide();
- }
- });
-
- if (Util.compareBufferedImages(imageInit, imageShow)) {
- throw new Exception("Failed to show non-opaque button");
- }
-
- toolkit.realSync();
- imageHide = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- if (!Util.compareBufferedImages(imageInit, imageHide)) {
- throw new Exception("Failed to hide non-opaque button");
- }
- }
-}
--- jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 2013-01-16 08:58:13.000000000 -0800
@@ -0,0 +1,83 @@
+/*
+ * 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 7160951
+ * @summary [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
+ * @author vera.akulova@oracle.com
+ * @run main ActionListenerCalledTwiceTest
+ */
+
+import sun.awt.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+public class ActionListenerCalledTwiceTest {
+ static volatile int listenerCallCounter = 0;
+ public static void main(String[] args) throws Exception {
+ if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
+ System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
+ return;
+ }
+ System.setProperty("apple.laf.useScreenMenuBar", "true");
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ createAndShowGUI();
+ }
+ });
+ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+ Robot robot = new Robot();
+ robot.setAutoDelay(100);
+ robot.keyPress(KeyEvent.VK_META);
+ robot.keyPress(KeyEvent.VK_E);
+ robot.keyRelease(KeyEvent.VK_E);
+ robot.keyRelease(KeyEvent.VK_META);
+ toolkit.realSync();
+ if (listenerCallCounter != 1) {
+ throw new Exception("Test failed: ActionListener called " + listenerCallCounter + " times instead of 1!");
+ }
+ }
+
+ private static void createAndShowGUI() {
+ JMenuItem newItem = new JMenuItem("Exit");
+ newItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.META_MASK));
+ newItem.addActionListener(
+ new ActionListener(){
+ public void actionPerformed(ActionEvent e) {
+ listenerCallCounter++;
+ }
+ }
+ );
+ JMenu menu = new JMenu("Menu");
+ menu.add(newItem);
+ JMenuBar bar = new JMenuBar();
+ bar.add(menu);
+ JFrame frame = new JFrame("Test");
+ frame.setJMenuBar(bar);
+ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ frame.pack();
+ frame.setVisible(true);
+ }
+}
--- jdk/test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java 2013-01-16 08:58:13.000000000 -0800
@@ -0,0 +1,105 @@
+/*
+ * 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 7186371
+ * @summary [macosx] Main menu shortcuts not displayed
+ * @author vera.akulova@oracle.com
+ * @run main/manual ShortcutNotDisplayedTest
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+public class ShortcutNotDisplayedTest {
+ static volatile boolean done = false;
+ static volatile boolean pass = false;
+ static final String PASS_COMMAND = "pass";
+
+ public static void main(String[] args) throws Exception {
+ if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
+ System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
+ return;
+ }
+ System.setProperty("apple.laf.useScreenMenuBar", "true");
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ createAndShowGUI();
+ }
+ });
+
+ do { try { Thread.sleep(300); } catch (Exception e) {} } while (!done) ;
+ if (!pass) {
+ throw new Exception("Shortcuts not displayed as expected in the screen menu bar.");
+ }
+ }
+
+ private static void createAndShowGUI() {
+ JMenuItem newItem = new JMenuItem("Exit");
+ newItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, java.awt.event.InputEvent.META_MASK));
+
+ JMenu menu = new JMenu("Test Frame Window Menu");
+ menu.setMnemonic(KeyEvent.VK_M);
+ menu.add(newItem);
+
+ JMenuBar bar = new JMenuBar();
+ bar.add(menu);
+ JTextArea text = new JTextArea(
+ " Please follow instructions:\n" +
+ " 1. You should see \"Test Frame Window Menu\" menu on the screen menu bar.\n" +
+ " 2. Open \"Test Frame Window Menu\" menu. \n" +
+ " Check that menu item \"Exit\" has a shortcut with image for Command Key and symbol \"E\". \n" +
+ " If you see the shortcut press \"Passed\". Otherwise press \"Failed\".\n"
+ );
+ text.setEditable(false);
+
+ JScrollPane sp = new JScrollPane(text);
+ sp.setSize(300,200);
+
+ JButton passBtn = new JButton("Pass");
+ passBtn.setActionCommand(PASS_COMMAND);
+ JButton failBtn = new JButton("Fail");
+ ActionListener listener = new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ if (e.getActionCommand().equals(PASS_COMMAND)) {
+ pass = true;
+ }
+ done = true;
+ }
+ };
+
+ JFrame testFrame = new JFrame("Test Frame Window");
+ testFrame.setLayout(new FlowLayout());
+ testFrame.setBounds(100, 100, 600, 180);
+ testFrame.setJMenuBar(bar);
+ testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ passBtn.addActionListener(listener);
+ failBtn.addActionListener(listener);
+ testFrame.getContentPane().add(sp);
+ testFrame.getContentPane().add(passBtn);
+ testFrame.getContentPane().add(failBtn);
+ testFrame.setVisible(true);
+ }
+}
--- jdk/test/javax/swing/text/DefaultCaret/6938583/bug6938583.java 2012-08-10 10:36:15.000000000 -0700
+++ jdk/test/javax/swing/text/DefaultCaret/6938583/bug6938583.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2011 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.
- */
-
-/*
- * Portions Copyright (c) 2011 IBM Corporation
- */
-
-/*
- * @test
- * @bug 6938583
- * @summary Unexpected NullPointerException when use CodeIM demo on windows
- * @author LittleE
- */
-
-import javax.swing.*;
-import javax.swing.text.DefaultCaret;
-import java.awt.event.MouseEvent;
-
-public class bug6938583 {
- public static void main(String[] args) throws Exception {
- SwingUtilities.invokeAndWait(new Runnable() {
- public void run() {
- JTextArea jta = new JTextArea();
- DefaultCaret dc = new DefaultCaret();
- jta.setCaret(dc);
- dc.deinstall(jta);
- dc.mouseClicked(new MouseEvent(jta, MouseEvent.MOUSE_CLICKED, 0, 0, 0, 0, 0, false));
- }
- });
- }
-}
--- jdk/test/jprt.config 2012-08-10 10:36:17.000000000 -0700
+++ jdk/test/jprt.config 2013-01-16 08:58:15.000000000 -0800
@@ -71,8 +71,8 @@
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
osname=`uname -s`
-if [ "${osname}" = SunOS ] ; then
-
+case "${osname}" in
+ SunOS )
# SOLARIS: Sparc or X86
osarch=`uname -p`
if [ "${osarch}" = sparc ] ; then
@@ -96,9 +96,9 @@
# File creation mask
umask 002
+ ;;
-elif [ "${osname}" = Linux ] ; then
-
+ Linux | Darwin )
# Add basic paths
path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
@@ -107,8 +107,31 @@
fileMustExist "${make}" make
umask 002
+ ;;
+
+ FreeBSD | OpenBSD )
+ # Add basic paths
+ path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
-else
+ # Find GNU make
+ make=/usr/local/bin/gmake
+ fileMustExist "${make}" make
+
+ umask 002
+ ;;
+
+ NetBSD )
+ # Add basic paths
+ path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
+
+ # Find GNU make
+ make=/usr/pkg/bin/gmake
+ fileMustExist "${make}" make
+
+ umask 002
+ ;;
+
+ * )
# Windows: Differs on CYGWIN vs. MKS.
@@ -150,8 +173,8 @@
if [ "${unix_toolset}" = CYGWIN ] ; then
path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
fi
-
-fi
+ ;;
+esac
# Export PATH setting
PATH="${path4sdk}"
--- jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2012-08-10 10:36:17.000000000 -0700
+++ jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2004, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4215035
+# @bug 4215035 7083664
# @summary standard extensions path is hard-coded in default system policy file
#
# @build Ext_AllPolicy
@@ -50,23 +50,20 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
- TMP=/tmp
;;
Windows_95 | Windows_98 | Windows_NT )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/java2d/OpenGL/bug7181438.java 2012-08-10 10:36:19.000000000 -0700
+++ jdk/test/sun/java2d/OpenGL/bug7181438.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,83 +0,0 @@
-/*
- * 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.Color;
-import java.awt.Graphics;
-import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsEnvironment;
-import java.awt.Transparency;
-import java.awt.image.BufferedImage;
-import java.awt.image.VolatileImage;
-
-/**
- * @test
- * @bug 7181438
- * @summary Verifies that we get correct alpha, when we draw opaque
- * BufferedImage to non opaque VolatileImage via intermediate opaque texture.
- * @author Sergey Bylokhov
- * @run main/othervm -Dsun.java2d.accthreshold=0 bug7181438
- */
-public final class bug7181438 {
-
- private static final int SIZE = 500;
-
- public static void main(final String[] args) {
-
- final BufferedImage bi = createBufferedImage();
- final VolatileImage vi = createVolatileImage();
- final Graphics s2dVi = vi.getGraphics();
-
- //sw->texture->surface blit
- s2dVi.drawImage(bi, 0, 0, null);
-
- final BufferedImage results = vi.getSnapshot();
- for (int i = 0; i < SIZE; ++i) {
- for (int j = 0; j < SIZE; ++j) {
- //Image should be opaque: (black color and alpha = 255)
- if (results.getRGB(i, j) != 0xFF000000) {
- throw new RuntimeException("Failed: Wrong alpha");
- }
- }
- }
- System.out.println("Passed");
- }
-
-
- private static VolatileImage createVolatileImage() {
- final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
- final GraphicsConfiguration gc = ge.getDefaultScreenDevice().getDefaultConfiguration();
- return gc.createCompatibleVolatileImage(SIZE, SIZE,
- Transparency.TRANSLUCENT);
- }
-
- private static BufferedImage createBufferedImage() {
- final BufferedImage bi = new BufferedImage(SIZE, SIZE,
- BufferedImage.TYPE_INT_RGB);
- final Graphics bg = bi.getGraphics();
- //Black color and alpha = 0
- bg.setColor(new Color(0, 0, 0, 0));
- bg.fillRect(0, 0, SIZE, SIZE);
- bg.dispose();
- return bi;
- }
-}
--- jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -45,37 +45,53 @@
# has to locate libjvm.so. Also $! is not reliable on some releases of MKS.
#{
OS=`uname -s`
-if [ "$OS" != "Linux" -a "$OS" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${OS}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
#
# Locate the custom launcher for this platform
#
PLATFORM=unknown
ARCH=unknown
-if [ "$OS" = "SunOS" ]; then
- PLATFORM=solaris
- case "`uname -p`" in
- i[3-9]86)
- ARCH=i586
- ;;
- sparc)
- ARCH=sparc
- ;;
- esac
-else
- PLATFORM=linux
- case "`uname -m`" in
- i[3-6]86)
- ARCH=i586
- ;;
- x86_64)
- ARCH=amd64
- ;;
- esac
-fi
+case "${OS}" in
+ SunOS )
+ PLATFORM=solaris
+ case "`uname -p`" in
+ i[3-9]86)
+ ARCH=i586
+ ;;
+ sparc)
+ ARCH=sparc
+ ;;
+ esac
+ ;;
+ Linux )
+ PLATFORM=linux
+ case "`uname -m`" in
+ i[3-6]86)
+ ARCH=i586
+ ;;
+ x86_64)
+ ARCH=amd64
+ ;;
+ esac
+ ;;
+ *BSD | Darwin )
+ PLATFORM=bsd
+ case "`uname -m`" in
+ i[3-6]86)
+ ARCH=i586
+ ;;
+ x86_64)
+ ARCH=amd64
+ ;;
+ esac
+ ;;
+esac
#
--- jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2013-01-16 08:58:15.000000000 -0800
@@ -35,7 +35,7 @@
UMASK=`umask`
case $OS in
-SunOS | Linux | Darwin)
+SunOS | Linux | *BSD | Darwin)
PATHSEP=":"
FILESEP="/"
DFILESEP=$FILESEP
--- jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -86,10 +86,12 @@
# on Windows 98.
os=`uname -s`
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
JAVA=${TESTJAVA}/bin/java
CLASSPATH=${TESTCLASSES}
--- jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -70,10 +70,12 @@
# security the password file.
os=`uname -s`
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
# Create configuration file and dummy password file
--- jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2012-08-10 10:36:22.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -69,10 +69,12 @@
# security the password file.
os=`uname -s`
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
# Create management and SSL configuration files
--- jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2012-08-10 10:36:24.000000000 -0700
+++ jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -36,7 +36,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/MarkResetTest.sh 2012-08-10 10:36:27.000000000 -0700
+++ jdk/test/sun/net/www/MarkResetTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2012-08-10 10:36:28.000000000 -0700
+++ jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2013-01-16 08:58:15.000000000 -0800
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/messageheader/HTest.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/sun/net/www/messageheader/HTest.java 2013-01-16 08:58:13.000000000 -0800
@@ -0,0 +1,73 @@
+/*
+ * 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 8003948
+ * @run main HTest
+ */
+import java.io.*;
+import sun.net.www.MessageHeader;
+
+public class HTest {
+ public static void main (String[] args) throws Exception {
+ String prefix = System.getProperty("test.src");
+ System.out.println ("TEST.SRC = " + prefix);
+ for (int i=0; i<7; i++) {
+ File f = new File(prefix, Integer.toString(i));
+ FileInputStream fis = new FileInputStream(f);
+ MessageHeader h = new MessageHeader(fis);
+ String before = h.toString();
+ before = before.substring(before.indexOf('{'));
+ System.out.println ("Before");
+ System.out.println (before);
+ boolean result = h.filterNTLMResponses("WWW-Authenticate");
+ String after = h.toString();
+ after = after.substring(after.indexOf('{'));
+ System.out.println ("After");
+ System.out.println (after);
+ System.out.println ("Expected");
+ System.out.println (expected[i]);
+ if (!expected[i].equals(after)) {
+ throw new RuntimeException(Integer.toString(i) + " expected != after");
+ }
+ if (result != expectedResult[i]) {
+ throw new RuntimeException(Integer.toString(i) + " result != expectedResult");
+ }
+ }
+ }
+
+ static String expected[] = {
+ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}",
+ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: }",
+ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}",
+ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}",
+ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}{Bar: foo}",
+ "{null: HTTP/1.1 200 Ok}{WWW-Authenticate: Negotiate}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM}{Bar: foo}{WWW-Authenticate: Kerberos}",
+ "{null: HTTP/1.1 200 Ok}{Foo: foo}{Bar: }{WWW-Authenticate: NTLM blob}{Bar: foo blob}"
+ };
+
+ static boolean[] expectedResult = {
+ false, false, true, true, true, false, false
+ };
+}
--- jdk/test/sun/net/www/protocol/jar/B5105410.sh 2012-08-10 10:36:29.000000000 -0700
+++ jdk/test/sun/net/www/protocol/jar/B5105410.sh 2013-01-16 08:58:15.000000000 -0800
@@ -31,7 +31,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2012-08-10 10:36:30.000000000 -0700
+++ jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2013-01-16 08:58:15.000000000 -0800
@@ -31,7 +31,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/nio/ch/SelProvider.java 2012-08-10 10:36:30.000000000 -0700
+++ jdk/test/sun/nio/ch/SelProvider.java 2013-01-16 08:58:15.000000000 -0800
@@ -39,6 +39,8 @@
expected = "sun.nio.ch.DevPollSelectorProvider";
} else if ("Linux".equals(osname)) {
expected = "sun.nio.ch.EPollSelectorProvider";
+ } else if (osname.endsWith("BSD")) {
+ expected = "sun.nio.ch.KQueueSelectorProvider";
} else if (osname.contains("OS X")) {
expected = "sun.nio.ch.KQueueSelectorProvider";
} else
--- jdk/test/sun/security/krb5/runNameEquals.sh 2012-08-10 10:36:39.000000000 -0700
+++ jdk/test/sun/security/krb5/runNameEquals.sh 2013-01-16 08:58:15.000000000 -0800
@@ -48,15 +48,11 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | Darwin | *BSD )
PATHSEP=":"
FILESEP="/"
NATIVE=true
;;
- Darwin )
- PATHSEP=":"
- FILESEP="/"
- ;;
CYGWIN* )
PATHSEP=";"
FILESEP="/"
--- jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2012-08-10 10:36:40.000000000 -0700
+++ jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2013-01-16 08:58:15.000000000 -0800
@@ -131,6 +131,27 @@
;;
esac
;;
+ *BSD | Darwin )
+ ARCH=`uname -m`
+ case "$ARCH" in
+ i[3-6]86 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ amd64* | x86_64 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ * )
+ echo "Unsupported System: ${OS} ${ARCH}"
+ exit 0;
+ ;;
+ esac
+ ;;
Windows* )
FS="\\"
PS=";"
--- jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2012-08-10 10:36:41.000000000 -0700
+++ jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2013-01-16 08:58:15.000000000 -0800
@@ -93,6 +93,27 @@
;;
esac
;;
+ *BSD | Darwin )
+ ARCH=`uname -m`
+ case "$ARCH" in
+ i[3-6]86 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ amd64* | x86_64 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ * )
+ echo "Unsupported System: ${OS} ${ARCH}"
+ exit 0;
+ ;;
+ esac
+ ;;
Windows* )
FS="\\"
PS=";"
--- jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2012-08-10 10:36:42.000000000 -0700
+++ jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2013-01-16 08:58:15.000000000 -0800
@@ -50,19 +50,7 @@
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Linux )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
PS=":"
CP="${FS}bin${FS}cp"
--- jdk/test/sun/security/pkcs11/Provider/Login.sh 2012-08-10 10:36:42.000000000 -0700
+++ jdk/test/sun/security/pkcs11/Provider/Login.sh 2013-01-16 08:58:15.000000000 -0800
@@ -51,19 +51,7 @@
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Linux )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
PS=":"
CP="${FS}bin${FS}cp"
--- jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2012-08-10 10:36:53.000000000 -0700
+++ jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2013-01-16 08:58:15.000000000 -0800
@@ -44,11 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2012-08-10 10:36:55.000000000 -0700
+++ jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2013-01-16 08:58:15.000000000 -0800
@@ -47,15 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PS=":"
- FS="/"
- ;;
- Linux )
- PS=":"
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2012-08-10 10:36:58.000000000 -0700
+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2013-01-16 08:58:15.000000000 -0800
@@ -33,7 +33,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2012-08-10 10:36:59.000000000 -0700
+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -42,7 +42,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FILESEP="/"
PATHSEP=":"
;;
--- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2012-08-10 10:37:02.000000000 -0700
+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2013-01-16 08:58:15.000000000 -0800
@@ -32,7 +32,7 @@
HOSTNAME=`uname -n`
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2013-01-16 08:58:15.000000000 -0800
@@ -32,7 +32,7 @@
HOSTNAME=`uname -n`
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 5094028 6219522
+# @bug 5094028 6219522 7083664
# @summary test new jarsigner -sigalg and -digestalg options
# @author Sean Mullan
#
@@ -46,26 +46,23 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
CP="${FS}bin${FS}cp -f"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
CP="cp -f"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
PS=";"
FS="\\"
CP="cp -f"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
--- jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 6522933
+# @bug 6522933 7083664
# @summary jarsigner fails in a directory with a path contianing a % sign
# @author Wang Weijun
#
@@ -46,26 +46,23 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
CP="${FS}bin${FS}cp -f"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
CP="cp -f"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
PS=";"
FS="\\"
CP="cp -f"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
--- jdk/test/sun/security/tools/jarsigner/diffend.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/diffend.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 6948909
+# @bug 6948909 7083664
# @summary Jarsigner removes MANIFEST.MF info for badly packages jar's
#
@@ -41,26 +41,23 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
CP="${FS}bin${FS}cp -f"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
CP="cp -f"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
PS=";"
FS="\\"
CP="cp -f"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
--- jdk/test/sun/security/tools/jarsigner/oldsig.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/oldsig.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 6543940 6868865
+# @bug 6543940 6868865 7083664
# @summary Exception thrown when signing a jarfile in java 1.5
#
# @run shell oldsig.sh
@@ -42,26 +42,23 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
CP="${FS}bin${FS}cp -f"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
CP="cp -f"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
PS=";"
FS="\\"
CP="cp -f"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
--- jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4906940
+# @bug 4906940 7083664
# @summary Add -providerPath option for keytool allowing one to specify
# an additional classpath to search for providers.
# @author Andrew Fan
@@ -46,23 +46,20 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
--- jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2013-01-16 08:58:15.000000000 -0800
@@ -47,15 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2013-01-16 08:58:15.000000000 -0800
@@ -42,13 +42,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- FILESEP="/"
- ;;
- Linux )
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FILESEP="/"
;;
CYGWIN* )
--- jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4694076
+# @bug 4694076 7083664
# @summary KeyTool throws ArrayIndexOutOfBoundsException for listing
# SecretKey entries in non-verbose mode.
# @author Valerie Peng
@@ -45,23 +45,20 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
--- jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 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
@@ -22,7 +22,7 @@
#
# @test 1.1 04/11/12
-# @bug 4909889
+# @bug 4909889 7083664
# @summary KeyTool accepts any input that user make as long as we can make some
# sense out of it, but when comes to present the info the user, it
# promotes a standard look.
@@ -46,23 +46,20 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
--- jdk/test/sun/security/tools/keytool/autotest.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/autotest.sh 2013-01-16 08:58:15.000000000 -0800
@@ -72,6 +72,27 @@
;;
esac
;;
+ *BSD | Darwin )
+ case "${OS}" in
+ *BSD )
+ LIBNAME=libsoftokn3.so
+ ;;
+ Darwin )
+ LIBNAME=libsoftokn3.dylib
+ ;;
+ esac
+ ARCH=`uname -m`
+ FS="/"
+ case "$ARCH" in
+ i[3-6]86 )
+ PF="bsd-i586"
+ ;;
+ * )
+ echo "Will not run test on: ${OS} ${ARCH}"
+ exit 0;
+ ;;
+ esac
+ ;;
* )
echo "Will not run test on: ${OS}"
exit 0;
--- jdk/test/sun/security/tools/keytool/i18n.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/i18n.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2003, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4348369
+# @bug 4348369 7083664
# @summary keytool not i18n compliant
# @author charlie lai
#
@@ -46,23 +46,20 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
- TMP=/tmp
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/tools/keytool/printssl.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/printssl.sh 2013-01-16 08:58:15.000000000 -0800
@@ -37,7 +37,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- jdk/test/sun/security/tools/keytool/resource.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/resource.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 6239297
+# @bug 6239297 7083664
# @summary keytool usage is broken after changing Resources.java
# @author Max Wang
#
@@ -43,20 +43,17 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
FS="/"
- TMP=/tmp
;;
CYGWIN* )
NULL=/dev/null
FS="/"
- TMP=/tmp
;;
Windows_* )
NULL=NUL
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized operating system!"
@@ -65,13 +62,11 @@
esac
# the test code
-${TESTJAVA}${FS}bin${FS}keytool > ${TMP}${FS}temp_file_40875602475 2> ${NULL}
-grep MissingResourceException ${TMP}${FS}temp_file_40875602475
+${TESTJAVA}${FS}bin${FS}keytool > temp_file_40875602475 2> ${NULL}
+grep MissingResourceException temp_file_40875602475
if [ $? -eq 0 ]; then
- rm ${TMP}${FS}temp_file_40875602475
exit 1
fi
-rm ${TMP}${FS}temp_file_40875602475
exit 0
--- jdk/test/sun/security/tools/keytool/standard.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/standard.sh 2013-01-16 08:58:15.000000000 -0800
@@ -44,7 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows_* )
--- jdk/test/sun/security/tools/policytool/Alias.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/Alias.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4449491
+# @bug 4449491 7083664
# @summary policytool should allow principal type to be empty
# (keystore alias substitution)
#
@@ -47,17 +47,20 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
;;
+ CYGWIN* )
+ NULL=/dev/null
+ PS=";"
+ FS="/"
+ ;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/tools/policytool/ChangeUI.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/ChangeUI.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 6296772 6293981 6290216
+# @bug 6296772 6293981 6290216 7083664
# @summary FilePermission and DelegationPermission, and cancel button
#
# @run applet/manual=done ChangeUI.html
@@ -46,17 +46,20 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
+ ;;
+ CYGWIN* )
+ NULL=/dev/null
+ PS=";"
+ FS="/"
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2002, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4224186
+# @bug 4224186 7083664
# @summary missing File.separatorChar when initially opening policy file
#
# @run applet/manual=done OpenPolicy.html
@@ -46,17 +46,21 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
+ ;;
+ CYGWIN* )
+ NULL=/dev/null
+ PS=";"
+ FS="/"
+ CP="cp -f"
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/tools/policytool/SaveAs.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/SaveAs.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2002, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4252583
+# @bug 4252583 7083664
# @summary policytool throws FileNotFoundException when user tries to
# save new policy file
#
@@ -47,17 +47,21 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
+ ;;
+ CYGWIN* )
+ NULL=/dev/null
+ PS=";"
+ FS="/"
+ CP="cp -f"
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2002, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4218206
+# @bug 4218206 7083664
# @summary missing or invalid permission target names in policy tool
#
# @run applet/manual=done UpdatePermissions.html
@@ -46,17 +46,21 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
+ ;;
+ CYGWIN* )
+ NULL=/dev/null
+ PS=";"
+ FS="/"
+ CP="cp -f"
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/tools/policytool/UsePolicy.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/UsePolicy.sh 2013-01-16 08:58:15.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2002, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4273771
+# @bug 4273771 7083664
# @summary Need to add "usePolicy" RuntimePermission to policytool
#
# @run applet/manual=done UsePolicy.html
@@ -46,17 +46,21 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
+ ;;
+ CYGWIN* )
+ NULL=/dev/null
+ PS=";"
+ FS="/"
+ CP="cp -f"
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/tools/policytool/i18n.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/i18n.sh 2013-01-16 08:58:16.000000000 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2002, 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
@@ -22,7 +22,7 @@
#
# @test
-# @bug 4348370
+# @bug 4348370 7083664
# @summary policytool not i18n compliant
#
# @run applet/manual=done i18n.html
@@ -46,17 +46,21 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
- TMP=/tmp
+ ;;
+ CYGWIN* )
+ NULL=/dev/null
+ PS=";"
+ FS="/"
+ CP="cp -f"
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
- TMP="c:/temp"
;;
* )
echo "Unrecognized system!"
--- jdk/test/sun/security/util/Oid/S11N.sh 2012-08-10 10:37:06.000000000 -0700
+++ jdk/test/sun/security/util/Oid/S11N.sh 2013-01-16 00:07:38.000000000 -0800
@@ -71,7 +71,7 @@
i[3-6]86 )
PF="linux-i586"
;;
- amd64* | x86_64 )
+ amd64* )
PF="linux-amd64"
;;
* )
@@ -97,29 +97,15 @@
;;
esac
-echo "==================================================="
-echo "Try to set ALT_JAVA_RE_JDK if you see timeout error"
-echo "==================================================="
-
# the test code
${TESTJAVA}${FS}bin${FS}javac -target 1.4 -source 1.4 \
-d . ${TESTSRC}${FS}SerialTest.java || exit 10
-# You can set ALT_JAVA_RE_JDK to another location that contains the
-# binaries for older JDK releases. You can set it to a non-existent
-# directory to skip the interop tests between different versions.
-
-if [ "$ALT_JAVA_RE_JDK" = "" ]; then
- JAVA_RE_JDK=/java/re/j2se
-else
- JAVA_RE_JDK=$ALT_JAVA_RE_JDK
-fi
-
OLDJAVA="
- $JAVA_RE_JDK/1.6.0/latest/binaries/${PF}
- $JAVA_RE_JDK/1.5.0/latest/binaries/${PF}
- $JAVA_RE_JDK/1.4.2/latest/binaries/${PF}
+ /java/re/j2se/1.6.0/latest/binaries/${PF}
+ /java/re/j2se/1.5.0/latest/binaries/${PF}
+ /java/re/j2se/1.4.2/latest/binaries/${PF}
"
SMALL="
--- jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2012-08-10 10:37:09.000000000 -0700
+++ jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2013-01-16 08:58:16.000000000 -0800
@@ -53,7 +53,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2012-08-10 10:37:09.000000000 -0700
+++ jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2013-01-16 08:58:16.000000000 -0800
@@ -54,7 +54,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2012-08-10 10:37:12.000000000 -0700
+++ jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2013-01-16 08:58:16.000000000 -0800
@@ -33,7 +33,7 @@
case `uname -s` in
Windows* | CYGWIN*) OS=Windows;;
- SunOS|Linux) OS=Unix;;
+ SunOS|Linux|*BSD|Darwin) OS=Unix;;
esac
N2A=$TESTJAVA/bin/native2ascii
--- jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2012-08-10 10:37:12.000000000 -0700
+++ jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2013-01-16 08:58:16.000000000 -0800
@@ -56,7 +56,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/tools/launcher/Arrrghs.java 2012-08-10 10:37:13.000000000 -0700
+++ jdk/test/tools/launcher/Arrrghs.java 2013-01-16 08:58:13.000000000 -0800
@@ -36,7 +36,13 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
public class Arrrghs extends TestHelper {
private Arrrghs(){}
@@ -75,7 +81,7 @@
/*
* This method detects the cookie in the output stream of the process.
*/
- private static boolean detectCookie(InputStream istream,
+ private boolean detectCookie(InputStream istream,
String expectedArguments) throws IOException {
BufferedReader rd = new BufferedReader(new InputStreamReader(istream));
boolean retval = false;
@@ -105,7 +111,7 @@
return retval;
}
- private static boolean doTest0(ProcessBuilder pb, String expectedArguments) {
+ private boolean doReExecTest0(ProcessBuilder pb, String expectedArguments) {
boolean retval = false;
try {
pb.redirectErrorStream(true);
@@ -121,26 +127,27 @@
}
/**
- * This method return true if the expected and detected arguments are the same.
+ * This method returns true if the expected and detected arguments are the same.
* Quoting could cause dissimilar testArguments and expected arguments.
*/
- static int doTest(String testArguments, String expectedPattern) {
+ int doReExecTest(String testArguments, String expectedPattern) {
ProcessBuilder pb = new ProcessBuilder(javaCmd,
VersionStr, testArguments);
Map<String, String> env = pb.environment();
- env.put("_JAVA_LAUNCHER_DEBUG", "true");
- return doTest0(pb, testArguments) ? 0 : 1;
+ env.put(JLDEBUG_KEY, "true");
+ return doReExecTest0(pb, testArguments) ? 0 : 1;
}
/**
* A convenience method for identical test pattern and expected arguments
*/
- static int doTest(String testPattern) {
- return doTest(testPattern, testPattern);
+ int doReExecTest(String testPattern) {
+ return doReExecTest(testPattern, testPattern);
}
- static void quoteParsingTests() {
+ @Test
+ void testQuoteParsingThroughReExec() {
/*
* Tests for 6214916
* These tests require that a JVM (any JVM) be installed in the system registry.
@@ -155,96 +162,425 @@
// Basic test
- testExitValue += doTest("-a -b -c -d");
+ testExitValue += doReExecTest("-a -b -c -d");
// Basic test with many spaces
- testExitValue += doTest("-a -b -c -d");
+ testExitValue += doReExecTest("-a -b -c -d");
// Quoted whitespace does matter ?
- testExitValue += doTest("-a \"\"-b -c\"\" -d");
+ testExitValue += doReExecTest("-a \"\"-b -c\"\" -d");
// Escaped quotes outside of quotes as literals
- testExitValue += doTest("-a \\\"-b -c\\\" -d");
+ testExitValue += doReExecTest("-a \\\"-b -c\\\" -d");
// Check for escaped quotes inside of quotes as literal
- testExitValue += doTest("-a \"-b \\\"stuff\\\"\" -c -d");
+ testExitValue += doReExecTest("-a \"-b \\\"stuff\\\"\" -c -d");
// A quote preceeded by an odd number of slashes is a literal quote
- testExitValue += doTest("-a -b\\\\\\\" -c -d");
+ testExitValue += doReExecTest("-a -b\\\\\\\" -c -d");
// A quote preceeded by an even number of slashes is a literal quote
// see 6214916.
- testExitValue += doTest("-a -b\\\\\\\\\" -c -d");
+ testExitValue += doReExecTest("-a -b\\\\\\\\\" -c -d");
// Make sure that whitespace doesn't interfere with the removal of the
// appropriate tokens. (space-tab-space preceeds -jre-restict-search).
- testExitValue += doTest("-a -b \t -jre-restrict-search -c -d","-a -b -c -d");
+ testExitValue += doReExecTest("-a -b \t -jre-restrict-search -c -d", "-a -b -c -d");
// Make sure that the mJRE tokens being stripped, aren't stripped if
// they happen to appear as arguments to the main class.
- testExitValue += doTest("foo -version:1.1+");
+ testExitValue += doReExecTest("foo -version:1.1+");
- System.out.println("Completed arguments quoting tests with " +
- testExitValue + " errors");
+ System.out.println("Completed arguments quoting tests with "
+ + testExitValue + " errors");
+ }
+ // the pattern we hope to see in the output
+ static final Pattern ArgPattern = Pattern.compile("\\s*argv\\[[0-9]*\\].*=.*");
+
+ void checkArgumentParsing(String inArgs, String... expArgs) throws IOException {
+ List<String> scratchpad = new ArrayList<>();
+ scratchpad.add("set " + JLDEBUG_KEY + "=true");
+ // GAK, -version needs to be added so that windows can flush its stderr
+ // exiting the process prematurely can terminate the stderr.
+ scratchpad.add(javaCmd + " -version " + inArgs);
+ File batFile = new File("atest.bat");
+ java.nio.file.Files.deleteIfExists(batFile.toPath());
+ createFile(batFile, scratchpad);
+
+ TestResult tr = doExec(batFile.getName());
+
+ ArrayList<String> expList = new ArrayList<>();
+ expList.add(javaCmd);
+ expList.add("-version");
+ expList.addAll(Arrays.asList(expArgs));
+
+ List<String> gotList = new ArrayList<>();
+ for (String x : tr.testOutput) {
+ Matcher m = ArgPattern.matcher(x);
+ if (m.matches()) {
+ String a[] = x.split("=");
+ gotList.add(a[a.length - 1].trim());
+ }
+ }
+ if (!gotList.equals(expList)) {
+ System.out.println(tr);
+ System.out.println("Expected args:");
+ System.out.println(expList);
+ System.out.println("Obtained args:");
+ System.out.println(gotList);
+ throw new RuntimeException("Error: args do not match");
+ }
+ System.out.println("\'" + inArgs + "\'" + " - Test passed");
+ }
+
+ /*
+ * This tests general quoting and are specific to Windows, *nixes
+ * need not worry about this, these have been tested with Windows
+ * implementation and those that are known to work are used against
+ * the java implementation. Note that the ProcessBuilder gets in the
+ * way when testing some of these arguments, therefore we need to
+ * create and execute a .bat file containing the arguments.
+ */
+ @Test
+ void testArgumentParsing() throws IOException {
+ if (!isWindows)
+ return;
+ // no quotes
+ checkArgumentParsing("a b c d", "a", "b", "c", "d");
+
+ // single quotes
+ checkArgumentParsing("\"a b c d\"", "a b c d");
+
+ //double quotes
+ checkArgumentParsing("\"\"a b c d\"\"", "a", "b", "c", "d");
+
+ // triple quotes
+ checkArgumentParsing("\"\"\"a b c d\"\"\"", "\"a b c d\"");
+
+ // a literal within single quotes
+ checkArgumentParsing("\"a\"b c d\"e\"", "ab", "c", "de");
+
+ // a literal within double quotes
+ checkArgumentParsing("\"\"a\"b c d\"e\"\"", "ab c de");
+
+ // a literal quote
+ checkArgumentParsing("a\\\"b", "a\"b");
+
+ // double back-slash
+ checkArgumentParsing("\"a b c d\\\\\"", "a b c d\\");
+
+ // triple back-slash
+ checkArgumentParsing("a\\\\\\\"b", "a\\\"b");
+
+ // dangling quote
+ checkArgumentParsing("\"a b c\"\"", "a b c\"");
+
+ // expansions of white space separators
+ checkArgumentParsing("a b", "a", "b");
+ checkArgumentParsing("a\tb", "a", "b");
+ checkArgumentParsing("a \t b", "a", "b");
+
+ checkArgumentParsing("\"C:\\TEST A\\\\\"", "C:\\TEST A\\");
+ checkArgumentParsing("\"\"C:\\TEST A\\\\\"\"", "C:\\TEST", "A\\");
+
+ // MS Windows tests
+ // triple back-slash
+ checkArgumentParsing("a\\\\\\d", "a\\\\\\d");
+
+ // triple back-slash in quotes
+ checkArgumentParsing("\"a\\\\\\d\"", "a\\\\\\d");
+
+ // slashes separating characters
+ checkArgumentParsing("X\\Y\\Z", "X\\Y\\Z");
+ checkArgumentParsing("\\X\\Y\\Z", "\\X\\Y\\Z");
+
+ // literals within dangling quotes, etc.
+ checkArgumentParsing("\"a b c\" d e", "a b c", "d", "e");
+ checkArgumentParsing("\"ab\\\"c\" \"\\\\\" d", "ab\"c", "\\", "d");
+ checkArgumentParsing("a\\\\\\c d\"e f\"g h", "a\\\\\\c", "de fg", "h");
+ checkArgumentParsing("a\\\\\\\"b c d", "a\\\"b", "c", "d");
+ checkArgumentParsing("a\\\\\\\\\"g c\" d e", "a\\\\g c", "d", "e");
+
+ // treatment of back-slashes
+ checkArgumentParsing("*\\", "*\\");
+ checkArgumentParsing("*/", "*/");
+ checkArgumentParsing(".\\*", ".\\*");
+ checkArgumentParsing("./*", "./*");
+ checkArgumentParsing("..\\..\\*", "..\\..\\*");
+ checkArgumentParsing("../../*", "../../*");
+ checkArgumentParsing("..\\..\\", "..\\..\\");
+ checkArgumentParsing("../../", "../../");
+ }
+
+ private void initEmptyDir(File emptyDir) throws IOException {
+ if (emptyDir.exists()) {
+ recursiveDelete(emptyDir);
+ }
+ emptyDir.mkdir();
+ }
+
+ private void initDirWithJavaFiles(File libDir) throws IOException {
+
+ if (libDir.exists()) {
+ recursiveDelete(libDir);
+ }
+ libDir.mkdirs();
+ ArrayList<String> scratchpad = new ArrayList<>();
+ scratchpad.add("package lib;");
+ scratchpad.add("public class Fbo {");
+ scratchpad.add("public static void main(String... args){Foo.f();}");
+ scratchpad.add("public static void f(){}");
+ scratchpad.add("}");
+ createFile(new File(libDir, "Fbo.java"), scratchpad);
+
+ scratchpad.clear();
+ scratchpad.add("package lib;");
+ scratchpad.add("public class Foo {");
+ scratchpad.add("public static void main(String... args){");
+ scratchpad.add("for (String x : args) {");
+ scratchpad.add("System.out.println(x);");
+ scratchpad.add("}");
+ scratchpad.add("Fbo.f();");
+ scratchpad.add("}");
+ scratchpad.add("public static void f(){}");
+ scratchpad.add("}");
+ createFile(new File(libDir, "Foo.java"), scratchpad);
+ }
+
+ void checkArgumentWildcard(String inArgs, String... expArgs) throws IOException {
+ String[] in = {inArgs};
+ checkArgumentWildcard(in, expArgs);
+
+ // now add arbitrary arguments before and after
+ String[] outInArgs = { "-Q", inArgs, "-R"};
+
+ String[] outExpArgs = new String[expArgs.length + 2];
+ outExpArgs[0] = "-Q";
+ System.arraycopy(expArgs, 0, outExpArgs, 1, expArgs.length);
+ outExpArgs[expArgs.length + 1] = "-R";
+ checkArgumentWildcard(outInArgs, outExpArgs);
+ }
+
+ void checkArgumentWildcard(String[] inArgs, String[] expArgs) throws IOException {
+ ArrayList<String> argList = new ArrayList<>();
+ argList.add(javaCmd);
+ argList.add("-cp");
+ argList.add("lib" + File.separator + "*");
+ argList.add("lib.Foo");
+ argList.addAll(Arrays.asList(inArgs));
+ String[] cmds = new String[argList.size()];
+ argList.toArray(cmds);
+ TestResult tr = doExec(cmds);
+ if (!tr.isOK()) {
+ System.out.println(tr);
+ throw new RuntimeException("Error: classpath single entry wildcard entry");
+ }
+
+ ArrayList<String> expList = new ArrayList<>();
+ expList.addAll(Arrays.asList(expArgs));
+
+ List<String> gotList = new ArrayList<>();
+ for (String x : tr.testOutput) {
+ gotList.add(x.trim());
+ }
+ if (!gotList.equals(expList)) {
+ System.out.println(tr);
+ System.out.println("Expected args:");
+ System.out.println(expList);
+ System.out.println("Obtained args:");
+ System.out.println(gotList);
+ throw new RuntimeException("Error: args do not match");
+ }
+ System.out.print("\'");
+ for (String x : inArgs) {
+ System.out.print(x + " ");
+ }
+ System.out.println("\'" + " - Test passed");
}
/*
+ * These tests are not expected to work on *nixes, and are ignored.
+ */
+ @Test
+ void testWildCardArgumentProcessing() throws IOException {
+ if (!isWindows)
+ return;
+ File cwd = new File(".");
+ File libDir = new File(cwd, "lib");
+ initDirWithJavaFiles(libDir);
+ initEmptyDir(new File(cwd, "empty"));
+
+ // test if javac (the command) can compile *.java
+ TestResult tr = doExec(javacCmd, libDir.getName() + File.separator + "*.java");
+ if (!tr.isOK()) {
+ System.out.println(tr);
+ throw new RuntimeException("Error: compiling java wildcards");
+ }
+
+ // use the jar cmd to create jars using the ? wildcard
+ File jarFoo = new File(libDir, "Foo.jar");
+ tr = doExec(jarCmd, "cvf", jarFoo.getAbsolutePath(), "lib" + File.separator + "F?o.class");
+ if (!tr.isOK()) {
+ System.out.println(tr);
+ throw new RuntimeException("Error: creating jar with wildcards");
+ }
+
+ // now the litmus test!, this should work
+ checkArgumentWildcard("a", "a");
+
+ // test for basic expansion
+ checkArgumentWildcard("lib\\F*java", "lib\\Fbo.java", "lib\\Foo.java");
+
+ // basic expansion in quotes
+ checkArgumentWildcard("\"lib\\F*java\"", "lib\\F*java");
+
+ checkArgumentWildcard("lib\\**", "lib\\Fbo.class", "lib\\Fbo.java",
+ "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java");
+
+ checkArgumentWildcard("lib\\*?", "lib\\Fbo.class", "lib\\Fbo.java",
+ "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java");
+
+ checkArgumentWildcard("lib\\?*", "lib\\Fbo.class", "lib\\Fbo.java",
+ "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java");
+
+ checkArgumentWildcard("lib\\?", "lib\\?");
+
+ // test for basic expansion
+ checkArgumentWildcard("lib\\*java", "lib\\Fbo.java", "lib\\Foo.java");
+
+ // basic expansion in quotes
+ checkArgumentWildcard("\"lib\\*.java\"", "lib\\*.java");
+
+ // suffix expansion
+ checkArgumentWildcard("lib\\*.class", "lib\\Fbo.class", "lib\\Foo.class");
+
+ // suffix expansion in quotes
+ checkArgumentWildcard("\"lib\\*.class\"", "lib\\*.class");
+
+ // check for ? expansion now
+ checkArgumentWildcard("lib\\F?o.java", "lib\\Fbo.java", "lib\\Foo.java");
+
+ // check ? in quotes
+ checkArgumentWildcard("\"lib\\F?o.java\"", "lib\\F?o.java");
+
+ // check ? as suffixes
+ checkArgumentWildcard("lib\\F?o.????", "lib\\Fbo.java", "lib\\Foo.java");
+
+ // check ? in a leading role
+ checkArgumentWildcard("lib\\???.java", "lib\\Fbo.java", "lib\\Foo.java");
+ checkArgumentWildcard("\"lib\\???.java\"", "lib\\???.java");
+
+ // check ? prefixed with -
+ checkArgumentWildcard("-?", "-?");
+
+ // check * prefixed with -
+ checkArgumentWildcard("-*", "-*");
+
+ // check on empty directory
+ checkArgumentWildcard("empty\\*", "empty\\*");
+ checkArgumentWildcard("empty\\**", "empty\\**");
+ checkArgumentWildcard("empty\\?", "empty\\?");
+ checkArgumentWildcard("empty\\??", "empty\\??");
+ checkArgumentWildcard("empty\\*?", "empty\\*?");
+ checkArgumentWildcard("empty\\?*", "empty\\?*");
+
+ }
+
+ void doArgumentCheck(String inArgs, String... expArgs) {
+ Map<String, String> env = new HashMap<>();
+ env.put(JLDEBUG_KEY, "true");
+ TestResult tr = doExec(env, javaCmd, inArgs);
+ System.out.println(tr);
+ int sindex = tr.testOutput.indexOf("Command line args:");
+ if (sindex < 0) {
+ System.out.println(tr);
+ throw new RuntimeException("Error: no output");
+ }
+ sindex++; // skip over the tag
+ List<String> gotList = new ArrayList<>();
+ for (String x : tr.testOutput.subList(sindex, sindex + expArgs.length)) {
+ String a[] = x.split("=");
+ gotList.add(a[a.length - 1].trim());
+ }
+ List<String> expList = Arrays.asList(expArgs);
+ if (!gotList.equals(expList)) {
+ System.out.println(tr);
+ System.out.println("Expected args:");
+ System.out.println(expList);
+ System.out.println("Obtained args:");
+ System.out.println(gotList);
+ throw new RuntimeException("Error: args do not match");
+ }
+ }
+
+
+ /*
* These tests are usually run on non-existent targets to check error results
*/
- static void runBasicErrorMessageTests() {
+ @Test
+ void testBasicErrorMessages() {
// Tests for 5030233
TestResult tr = doExec(javaCmd, "-cp");
tr.checkNegative();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
tr = doExec(javaCmd, "-classpath");
tr.checkNegative();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
tr = doExec(javaCmd, "-jar");
tr.checkNegative();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
tr = doExec(javacCmd, "-cp");
tr.checkNegative();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// Test for 6356475 "REGRESSION:"java -X" from cmdline fails"
tr = doExec(javaCmd, "-X");
tr.checkPositive();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
tr = doExec(javaCmd, "-help");
tr.checkPositive();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// 6753938, test for non-negative exit value for an incorrectly formed
// command line, '% java'
tr = doExec(javaCmd);
tr.checkNegative();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// 6753938, test for non-negative exit value for an incorrectly formed
// command line, '% java -Xcomp'
tr = doExec(javaCmd, "-Xcomp");
tr.checkNegative();
tr.isNotZeroOutput();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
}
/*
* Tests various dispositions of the main method, these tests are limited
* to English locales as they check for error messages that are localized.
*/
- static void runMainMethodTests() throws FileNotFoundException {
+ @Test
+ void testMainMethod() throws FileNotFoundException {
if (!isEnglishLocale()) {
return;
}
@@ -256,55 +592,65 @@
(String[])null);
tr = doExec(javaCmd, "-jar", "some.jar");
tr.contains("Error: Could not find or load main class MIA");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// use classpath to check
tr = doExec(javaCmd, "-cp", "some.jar", "MIA");
tr.contains("Error: Could not find or load main class MIA");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// incorrect method access
createJar(new File("some.jar"), new File("Foo"),
"private static void main(String[] args){}");
tr = doExec(javaCmd, "-jar", "some.jar");
tr.contains("Error: Main method not found in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// use classpath to check
tr = doExec(javaCmd, "-cp", "some.jar", "Foo");
tr.contains("Error: Main method not found in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// incorrect return type
createJar(new File("some.jar"), new File("Foo"),
"public static int main(String[] args){return 1;}");
tr = doExec(javaCmd, "-jar", "some.jar");
tr.contains("Error: Main method must return a value of type void in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// use classpath to check
tr = doExec(javaCmd, "-cp", "some.jar", "Foo");
tr.contains("Error: Main method must return a value of type void in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// incorrect parameter type
createJar(new File("some.jar"), new File("Foo"),
"public static void main(Object[] args){}");
tr = doExec(javaCmd, "-jar", "some.jar");
tr.contains("Error: Main method not found in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// use classpath to check
tr = doExec(javaCmd, "-cp", "some.jar", "Foo");
tr.contains("Error: Main method not found in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// incorrect method type - non-static
createJar(new File("some.jar"), new File("Foo"),
"public void main(String[] args){}");
tr = doExec(javaCmd, "-jar", "some.jar");
tr.contains("Error: Main method is not static in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// use classpath to check
tr = doExec(javaCmd, "-cp", "some.jar", "Foo");
tr.contains("Error: Main method is not static in class Foo");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// amongst a potpourri of kindred main methods, is the right one chosen ?
createJar(new File("some.jar"), new File("Foo"),
@@ -316,25 +662,29 @@
"public static void main(String[] args) {System.out.println(\"THE_CHOSEN_ONE\");}");
tr = doExec(javaCmd, "-jar", "some.jar");
tr.contains("THE_CHOSEN_ONE");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// use classpath to check
tr = doExec(javaCmd, "-cp", "some.jar", "Foo");
tr.contains("THE_CHOSEN_ONE");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// test for extraneous whitespace in the Main-Class attribute
createJar(" Foo ", new File("some.jar"), new File("Foo"),
"public static void main(String... args){}");
tr = doExec(javaCmd, "-jar", "some.jar");
tr.checkPositive();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
}
/*
* tests 6968053, ie. we turn on the -Xdiag (for now) flag and check if
* the suppressed stack traces are exposed, ignore these tests for localized
* locales, limiting to English only.
*/
- static void runDiagOptionTests() throws FileNotFoundException {
+ @Test
+ void testDiagOptions() throws FileNotFoundException {
if (!isEnglishLocale()) { // only english version
return;
}
@@ -345,48 +695,51 @@
tr = doExec(javaCmd, "-Xdiag", "-jar", "some.jar");
tr.contains("Error: Could not find or load main class MIA");
tr.contains("java.lang.ClassNotFoundException: MIA");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// use classpath to check
tr = doExec(javaCmd, "-Xdiag", "-cp", "some.jar", "MIA");
tr.contains("Error: Could not find or load main class MIA");
tr.contains("java.lang.ClassNotFoundException: MIA");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
// a missing class on the classpath
tr = doExec(javaCmd, "-Xdiag", "NonExistentClass");
tr.contains("Error: Could not find or load main class NonExistentClass");
tr.contains("java.lang.ClassNotFoundException: NonExistentClass");
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
}
- static void test6894719() {
+ @Test
+ static void testJreRestrictSearchFlag() {
// test both arguments to ensure they exist
TestResult tr = null;
tr = doExec(javaCmd,
"-no-jre-restrict-search", "-version");
tr.checkPositive();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
tr = doExec(javaCmd,
"-jre-restrict-search", "-version");
tr.checkPositive();
- System.out.println(tr);
+ if (!tr.testStatus)
+ System.out.println(tr);
}
/**
* @param args the command line arguments
* @throws java.io.FileNotFoundException
*/
- public static void main(String[] args) throws FileNotFoundException {
+ public static void main(String[] args) throws Exception {
if (debug) {
System.out.println("Starting Arrrghs tests");
}
- quoteParsingTests();
- runBasicErrorMessageTests();
- runMainMethodTests();
- test6894719();
- runDiagOptionTests();
+ Arrrghs a = new Arrrghs();
+ a.run(args);
if (testExitValue > 0) {
System.out.println("Total of " + testExitValue + " failed");
System.exit(1);
--- jdk/test/tools/launcher/TestHelper.java 2012-08-10 10:37:13.000000000 -0700
+++ jdk/test/tools/launcher/TestHelper.java 2013-01-16 08:58:13.000000000 -0800
@@ -21,6 +21,14 @@
* questions.
*/
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Method;
+import java.util.regex.Pattern;
+import java.io.StringWriter;
+import java.io.PrintWriter;
import java.util.Set;
import java.io.BufferedReader;
import java.io.File;
@@ -55,11 +63,14 @@
static final File TEST_SOURCES_DIR;
static final String JAVAHOME = System.getProperty("java.home");
+ static final String JAVA_BIN;
static final boolean isSDK = JAVAHOME.endsWith("jre");
static final String javaCmd;
static final String javawCmd;
static final String java64Cmd;
static final String javacCmd;
+ static final String jarCmd;
+
static final JavaCompiler compiler;
static final boolean debug = Boolean.getBoolean("TestHelper.Debug");
@@ -84,8 +95,10 @@
static final String JAVA_FILE_EXT = ".java";
static final String CLASS_FILE_EXT = ".class";
static final String JAR_FILE_EXT = ".jar";
+ static final String EXE_FILE_EXT = ".exe";
static final String JLDEBUG_KEY = "_JAVA_LAUNCHER_DEBUG";
static final String EXPECTED_MARKER = "TRACER_MARKER:About to EXEC";
+ static final String TEST_PREFIX = "###TestError###: ";
static int testExitValue = 0;
@@ -111,6 +124,7 @@
compiler = ToolProvider.getSystemJavaCompiler();
File binDir = (isSDK) ? new File((new File(JAVAHOME)).getParentFile(), "bin")
: new File(JAVAHOME, "bin");
+ JAVA_BIN = binDir.getAbsolutePath();
File javaCmdFile = (isWindows)
? new File(binDir, "java.exe")
: new File(binDir, "java");
@@ -125,6 +139,15 @@
: new File(binDir, "javac");
javacCmd = javacCmdFile.getAbsolutePath();
+ File jarCmdFile = (isWindows)
+ ? new File(binDir, "jar.exe")
+ : new File(binDir, "jar");
+ jarCmd = jarCmdFile.getAbsolutePath();
+ if (!jarCmdFile.canExecute()) {
+ throw new RuntimeException("java <" + TestHelper.jarCmd +
+ "> must exist and should be executable");
+ }
+
if (isWindows) {
File javawCmdFile = new File(binDir, "javaw.exe");
javawCmd = javawCmdFile.getAbsolutePath();
@@ -152,6 +175,35 @@
java64Cmd = null;
}
}
+ void run(String[] args) throws Exception {
+ int passed = 0, failed = 0;
+ final Pattern p = (args != null && args.length > 0)
+ ? Pattern.compile(args[0])
+ : null;
+ for (Method m : this.getClass().getDeclaredMethods()) {
+ boolean selected = (p == null)
+ ? m.isAnnotationPresent(Test.class)
+ : p.matcher(m.getName()).matches();
+ if (selected) {
+ try {
+ m.invoke(this, (Object[]) null);
+ System.out.println(m.getName() + ": OK");
+ passed++;
+ } catch (Throwable ex) {
+ System.out.printf("Test %s failed: %s %n", m, ex.getCause());
+ failed++;
+ }
+ }
+ }
+ System.out.printf("Passed: %d, Failed %d%n", passed, failed);
+ if (failed > 0) {
+ throw new RuntimeException("Tests failed: " + failed);
+ }
+ if (passed == 0 && failed == 0) {
+ throw new AssertionError("No test(s) selected: passed = " +
+ passed + ", failed = " + failed + " ??????????");
+ }
+ }
/*
* is a dual mode available in the test jdk
@@ -383,35 +435,46 @@
* of use methods to check the test results.
*/
static class TestResult {
- StringBuilder status;
+ PrintWriter status;
+ StringWriter sw;
int exitValue;
List<String> testOutput;
Map<String, String> env;
Throwable t;
+ boolean testStatus;
public TestResult(String str, int rv, List<String> oList,
Map<String, String> env, Throwable t) {
- status = new StringBuilder("Executed command: " + str + "\n");
+ sw = new StringWriter();
+ status = new PrintWriter(sw);
+ status.println("Executed command: " + str + "\n");
exitValue = rv;
testOutput = oList;
this.env = env;
this.t = t;
+ testStatus = true;
+ }
+
+ void appendError(String x) {
+ status.println(TEST_PREFIX + x);
}
- void appendStatus(String x) {
- status = status.append(" " + x + "\n");
+ void indentStatus(String x) {
+ status.println(" " + x);
}
void checkNegative() {
if (exitValue == 0) {
- appendStatus("Error: test must not return 0 exit value");
+ appendError("test must not return 0 exit value");
+ testStatus = false;
testExitValue++;
}
}
void checkPositive() {
if (exitValue != 0) {
- appendStatus("Error: test did not return 0 exit value");
+ testStatus = false;
+ appendError("test did not return 0 exit value");
testExitValue++;
}
}
@@ -422,7 +485,8 @@
boolean isZeroOutput() {
if (!testOutput.isEmpty()) {
- appendStatus("Error: No message from cmd please");
+ testStatus = false;
+ appendError("No message from cmd please");
testExitValue++;
return false;
}
@@ -431,7 +495,8 @@
boolean isNotZeroOutput() {
if (testOutput.isEmpty()) {
- appendStatus("Error: Missing message");
+ testStatus = false;
+ appendError("Missing message");
testExitValue++;
return false;
}
@@ -440,22 +505,26 @@
@Override
public String toString() {
- status.append("++++Begin Test Info++++\n");
- status.append("++++Test Environment++++\n");
+ status.println("++++Begin Test Info++++");
+ status.println("Test Status: " + (testStatus ? "PASS" : "FAIL"));
+ status.println("++++Test Environment++++");
for (String x : env.keySet()) {
- status.append(x).append("=").append(env.get(x)).append("\n");
+ indentStatus(x + "=" + env.get(x));
}
- status.append("++++Test Output++++\n");
+ status.println("++++Test Output++++");
for (String x : testOutput) {
- appendStatus(x);
+ indentStatus(x);
}
- status.append("++++Test Stack Trace++++\n");
- status.append(t.toString());
+ status.println("++++Test Stack Trace++++");
+ status.println(t.toString());
for (StackTraceElement e : t.getStackTrace()) {
- status.append(e.toString());
+ indentStatus(e.toString());
}
- status.append("++++End of Test Info++++\n");
- return status.toString();
+ status.println("++++End of Test Info++++");
+ status.flush();
+ String out = sw.toString();
+ status.close();
+ return out;
}
boolean contains(String str) {
@@ -464,7 +533,7 @@
return true;
}
}
- appendStatus("Error: string <" + str + "> not found");
+ appendError("string <" + str + "> not found");
testExitValue++;
return false;
}
@@ -475,9 +544,15 @@
return true;
}
}
- appendStatus("Error: string <" + stringToMatch + "> not found");
+ appendError("string <" + stringToMatch + "> not found");
testExitValue++;
return false;
}
}
+ /**
+ * Indicates that the annotated method is a test method.
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.METHOD)
+ public @interface Test {}
}
--- jdk/test/tools/launcher/ToolsOpts.java 1969-12-31 16:00:00.000000000 -0800
+++ jdk/test/tools/launcher/ToolsOpts.java 2013-01-16 08:58:13.000000000 -0800
@@ -0,0 +1,217 @@
+/*
+ * 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
+ * @summary Test options patterns for javac,javah,javap and javadoc using
+ * javac as a test launcher. Create a dummy javac and intercept options to check
+ * reception of options as passed through the launcher without having to launch
+ * javac. Only -J and -cp ./* options should be consumed by the launcher.
+ * @run main ToolsOpts
+ * @author ssides
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ToolsOpts extends TestHelper {
+ static final String JBCP_PREPEND = "-J-Xbootclasspath/p:";
+ private static File testJar = null;
+ static String[][] optionPatterns = {
+ {"-J-Xmx128m"},
+ {"-J-version"},
+ {"-J-XshowSettings:vm"},
+ {"-J-Xdiag"},
+ {"-J-showversion"},
+ {"-J-version", "-option"},
+ {"-option"},
+ {"-option:sub"},
+ {"-option:sub-"},
+ {"-option:sub1,sub2"}, // -option:list
+ {"-option:{sub1,sub2,sub3}"}, // -option:{list}
+ {"-option:{{sub1,sub2,sub3}}"},// -option:{{list}}
+ {"-option/c:/export/date/tmp"},
+ {"-option=value"},
+ {"-Dpk1.pk2.pk3"}, // dot in option
+ {"-Dpk1.pk2=value"}, // dot in option followed by =value
+ {"@<filename>"},
+ {"-option", "http://site.com", "http://site.org"},
+ {"-option", "name", "p1:p2.."},
+ {"-All these non-options show launchers pass options as is to tool."},
+ {"-option"},
+ {"-option:sub"},
+ {"-option:sub-"},
+ {"-option", "<path>"},
+ {"-option", "<file>"},
+ {"-option", "<dir>"},
+ {"-option", "http://a/b/c/g;x?y#s"},
+ {"-option", "<html code>"},
+ {"-option", "name1:name2"},
+ {"-option", "3"},
+ {"option1", "-J-version", "option2"},
+ {"option1", "-J-version", "-J-XshowSettings:vm", "option2"},};
+
+ static void init() throws IOException {
+ if (testJar != null) {
+ return;
+ }
+
+ // A tool which simulates com.sun.tools.javac.Main argument processing,
+ // intercepts options passed via the javac launcher.
+ final String mainJava = "Main" + JAVA_FILE_EXT;
+ testJar = new File("test" + JAR_FILE_EXT);
+ List<String> contents = new ArrayList<>();
+ contents.add("package com.sun.tools.javac;");
+ contents.add("public class Main {");
+ contents.add(" public static void main(String... args) {\n");
+ contents.add(" for (String x : args) {\n");
+ contents.add(" if(x.compareTo(\" \")!=0)\n");
+ contents.add(" System.out.println(x);\n");
+ contents.add(" }\n");
+ contents.add(" }\n");
+ contents.add("}\n");
+ createFile(new File(mainJava), contents);
+
+ // compile and jar Main.java into test.jar
+ compile("-d", ".", mainJava);
+ createJar("cvf", testJar.getAbsolutePath(), "com");
+ }
+
+ static void pass(String msg) {
+ System.out.println("pass: " + msg);
+ }
+
+ static void errout(String msg) {
+ System.err.println(msg);
+ }
+
+ // Return position of -J option or -1 is does not contain a -J option.
+ static int indexOfJoption(String[] opts) {
+ for (int i = 0; i < opts.length; i++) {
+ if (opts[i].startsWith("-J")) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ /*
+ * Check that J options a) are not passed to tool, and b) do the right thing,
+ * that is, they should be passed to java launcher and work as expected.
+ */
+ static void checkJoptionOutput(TestResult tr, String[] opts) throws IOException {
+ // Check -J-version options are not passed but do what they should.
+ String jopts = "";
+ for (String pat : opts) {
+ jopts = jopts.concat(pat + " ");
+ if (tr.contains("-J")) {
+ throw new RuntimeException(
+ "failed: output should not contain option " + pat);
+ }
+ if (pat.compareTo("-J-version") == 0 ||
+ pat.compareTo("-J-showversion") == 0) {
+ if (!tr.contains("java version") &&
+ !tr.contains("openjdk version")) {
+ throw new RuntimeException("failed: " + pat +
+ " should display a version string.");
+ }
+ } else if (pat.compareTo("-J-XshowSettings:VM") == 0) {
+ if (!tr.contains("VM settings")) {
+ throw new RuntimeException("failed: " + pat +
+ " should have display VM settings.");
+ }
+ }
+ }
+ pass("Joption check: " + jopts);
+ }
+
+ /*
+ * Feed each option pattern in optionPatterns array to javac launcher with
+ * checking program preempting javac. Check that option received by 'dummy'
+ * javac is the one passed on the command line.
+ */
+ static void runTestOptions() throws IOException {
+ init();
+ TestResult tr = null;
+ String sTestJar = testJar.getAbsolutePath();
+ int jpos = -1;
+ for (String arg[] : optionPatterns) {
+ jpos = indexOfJoption(arg);
+ //Build a cmd string for output in results reporting.
+ String cmdString = javacCmd + " " + JBCP_PREPEND + sTestJar;
+ for (String opt : arg) {
+ cmdString = cmdString.concat(" " + opt);
+ }
+ switch (arg.length) {
+ case 1:
+ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar,
+ arg[0]);
+ break;
+ case 2:
+ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar,
+ arg[0], arg[1]);
+ break;
+ case 3:
+ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar,
+ arg[0], arg[1], arg[2]);
+ break;
+ case 4:
+ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar,
+ arg[0], arg[1], arg[2], arg[3]);
+ break;
+ default:
+ tr = null;
+ break;
+ }
+
+ String[] output = tr.testOutput.toArray(new String[tr.testOutput.size()]);
+ //-Joptions should not be passed to tool
+ if (jpos > -1) {
+ checkJoptionOutput(tr, arg);
+ if (tr.contains(arg[jpos])) {
+ throw new RuntimeException(
+ "failed! Should not have passed -J option to tool.\n"
+ + "CMD: " + cmdString);
+ }
+ } else {
+ //check that each non -J option was passed to tool.
+ for (int i = 0; i < arg.length; i++) {
+ if (output[i].compareTo(arg[i]) != 0) {
+ throw new RuntimeException(
+ "failed! CMD: " + cmdString + "\n case:" +
+ output[i] + " != " + arg[i]);
+ } else {
+ pass("check " + output[i] + " == " + arg[i]);
+ }
+ }
+ }
+ pass(cmdString);
+ }
+ }
+
+ public static void main(String... args) throws IOException {
+ runTestOptions();
+ }
+}
--- langtools/.hgtags 2012-08-10 10:39:19.000000000 -0700
+++ langtools/.hgtags 2013-01-16 09:20:24.000000000 -0800
@@ -123,6 +123,7 @@
9425dd4f53d5bfcd992d9aecea0eb7d8b2d4f62b jdk7-b146
d34578643d1c6c752d4a6b5e79c6ab1b60850b4a jdk7u1-b01
58bc532d63418ac3c9b42460d89cdaf595c6f3e1 jdk7-b147
+23aadf169f085b180803bcdc53baad4ae870f75b 7u0
cd2cc8b5edb045b950aed46d159b4fb8fc2fd1df jdk7u1-b02
82820a30201dbf4b80f1916f3d0f4a92ad21b61a jdk7u1-b03
baa2c13c70fea3d6e259a34f0903197fdceb64b5 jdk7u1-b04
@@ -197,5 +198,28 @@
a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u6-b21
4f3aafa690d1fcb18693fc4085049eeffe4778f7 jdk7u6-b22
dd3e29d8892fcaba6d76431d5fa9d49e7c088f76 jdk7u6-b23
-a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u8-b01
-41bc8da868e58f7182d26b2ab9b6f8a4b09894ed jdk7u8-b02
+6aac89e84fc96d15bb78b13aa71c9e6b73d7237e jdk7u6-b24
+bcd1d067d525065630deb98b678bc00b499adbe1 jdk7u6-b30
+2d6017454236d4e95aad7feaff5fc92a612598f4 jdk7u7-b10
+27041587508dbc4e08c956ba98a11ce0d5608dc4 jdk7u7-b30
+b92a9f4f6bce4ec500ed3adb8203e6424b579f94 jdk7u7-b11
+f0fd7463f02ea681ca53022d6d0d425ec1584b34 jdk7u7-b31
+6bfc26fc14a0650805dd6583048db0b4f8669844 jdk7u7-b01
+0d4cb328938002fa9a2efc8190ea97beae3230a9 jdk7u7-b02
+04848e261e42c697cb70401f8059186434855f33 jdk7u9-b03
+0000000000000000000000000000000000000000 jdk7u7-b01
+6bfc26fc14a0650805dd6583048db0b4f8669844 jdk7u9-b01
+0000000000000000000000000000000000000000 jdk7u7-b02
+0d4cb328938002fa9a2efc8190ea97beae3230a9 jdk7u9-b02
+9148cdb9a18b55ad7d51bb9644b6db812de34eea jdk7u9-b04
+1de4a0865a714076b4922a9a7119adb98aee23f2 jdk7u9-b05
+8dfbebb98865d822ddd9e0b9641d21e8bdb8a866 jdk7u10-b10
+01c6dde274bd520067264231b3015c37e8e62d24 jdk7u10-b11
+1fb02747d3bce646374c2cab95048c516cec6b01 jdk7u10-b12
+14735b3d8bdffc7892f1db04b6262bdaad2eb9d7 jdk7u10-b13
+f555fcdbd07156ee11b25fb4ac106065bbf496b4 jdk7u10-b14
+dfcd16ac3fbcabed815b8ef4e792716cce0bce21 jdk7u10-b15
+eaa8a0141c35edc382d7ce0b1148912db8422b16 jdk7u10-b16
+7101b3e80e96b000b0b4f0bd7fe4dd7910d02f74 jdk7u10-b17
+4f529e320d83f517a55065b4710c7f1e5ff692c9 jdk7u10-b18
+1e5aed8511b9bea5c2ebe51a2d9094be8bac73cc jdk7u10-b30
--- langtools/test/Makefile 2012-08-10 10:39:30.000000000 -0700
+++ langtools/test/Makefile 2013-01-16 09:20:24.000000000 -0800
@@ -42,6 +42,14 @@
ARCH=i586
endif
endif
+ifeq ($(findstring BSD,$(OSNAME)), BSD)
+ PLATFORM = bsd
+ JT_PLATFORM = linux
+ ARCH = $(shell uname -m)
+ ifeq ($(ARCH), i386)
+ ARCH=i586
+ endif
+endif
ifeq ($(OSNAME), Windows_NT)
PLATFORM = windows
JT_PLATFORM = win32
@@ -101,7 +109,7 @@
ifdef JPRT_JAVA_HOME
JT_JAVA = $(JPRT_JAVA_HOME)
else
- JT_JAVA = $(SLASH_JAVA)/re/jdk/1.6.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
+ JT_JAVA = $(TEST_ROOT)/../../build/$(PLATFORM)-$(ARCH)
endif
# Default JDK to test
@@ -196,7 +204,9 @@
# The test directories to run
DEFAULT_TESTDIRS = .
-TESTDIRS = $(DEFAULT_TESTDIRS)
+ifndef TESTDIRS
+ TESTDIRS = $(DEFAULT_TESTDIRS)
+endif
# Root of all test results
TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
--- langtools/test/tools/javac/4846262/Test.sh 2012-08-10 10:39:38.000000000 -0700
+++ langtools/test/tools/javac/4846262/Test.sh 2013-01-16 09:20:24.000000000 -0800
@@ -44,7 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- langtools/test/tools/javac/6302184/T6302184.sh 2012-08-10 10:39:38.000000000 -0700
+++ langtools/test/tools/javac/6302184/T6302184.sh 2013-01-16 09:20:24.000000000 -0800
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2012-08-10 10:39:41.000000000 -0700
+++ langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2013-01-16 09:20:24.000000000 -0800
@@ -56,7 +56,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2012-08-10 10:39:43.000000000 -0700
+++ langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2013-01-16 09:20:24.000000000 -0800
@@ -54,7 +54,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javac/MissingInclude.sh 2012-08-10 10:39:44.000000000 -0700
+++ langtools/test/tools/javac/MissingInclude.sh 2013-01-16 09:20:24.000000000 -0800
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2012-08-10 10:39:45.000000000 -0700
+++ langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2013-01-16 09:20:24.000000000 -0800
@@ -52,7 +52,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javac/T5090006/compiler.sh 2012-08-10 10:39:47.000000000 -0700
+++ langtools/test/tools/javac/T5090006/compiler.sh 2013-01-16 09:20:24.000000000 -0800
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/apt.sh 2012-08-10 10:39:53.000000000 -0700
+++ langtools/test/tools/javac/apt.sh 2013-01-16 09:20:24.000000000 -0800
@@ -38,7 +38,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- langtools/test/tools/javac/constDebug/ConstDebug.sh 2012-08-10 10:39:55.000000000 -0700
+++ langtools/test/tools/javac/constDebug/ConstDebug.sh 2013-01-16 09:20:24.000000000 -0800
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2012-08-10 10:40:03.000000000 -0700
+++ langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2013-01-16 09:20:24.000000000 -0800
@@ -48,7 +48,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- langtools/test/tools/javac/innerClassFile/Driver.sh 2012-08-10 10:40:14.000000000 -0700
+++ langtools/test/tools/javac/innerClassFile/Driver.sh 2013-01-16 09:20:24.000000000 -0800
@@ -53,7 +53,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/javazip/Test.sh 2012-08-10 10:40:14.000000000 -0700
+++ langtools/test/tools/javac/javazip/Test.sh 2013-01-16 09:20:24.000000000 -0800
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
SCR=`pwd`
;;
--- langtools/test/tools/javac/links/links.sh 2012-08-10 10:40:15.000000000 -0700
+++ langtools/test/tools/javac/links/links.sh 2013-01-16 09:20:24.000000000 -0800
@@ -53,7 +53,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- langtools/test/tools/javac/newlines/Newlines.sh 2012-08-10 10:40:17.000000000 -0700
+++ langtools/test/tools/javac/newlines/Newlines.sh 2013-01-16 09:20:24.000000000 -0800
@@ -50,7 +50,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/stackmap/T4955930.sh 2012-08-10 10:40:22.000000000 -0700
+++ langtools/test/tools/javac/stackmap/T4955930.sh 2013-01-16 09:20:24.000000000 -0800
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows_95 | Windows_98 | Windows_NT )
--- langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2012-08-10 10:40:25.000000000 -0700
+++ langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2013-01-16 09:20:24.000000000 -0800
@@ -55,7 +55,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | Darwin | *BSD )
if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ]
then
ENV="env LANG=en_US.UTF-8"
--- langtools/test/tools/javah/6257087/foo.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/6257087/foo.sh 2013-01-16 09:20:24.000000000 -0800
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javah/ConstMacroTest.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/ConstMacroTest.sh 2013-01-16 09:20:24.000000000 -0800
@@ -56,7 +56,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javah/MissingParamClassTest.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/MissingParamClassTest.sh 2013-01-16 09:20:24.000000000 -0800
@@ -58,7 +58,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
PS=":"
FS="/"
;;
--- langtools/test/tools/javah/ReadOldClass.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/ReadOldClass.sh 2013-01-16 09:20:24.000000000 -0800
@@ -43,7 +43,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
PS=":"
FS="/"
;;
--- langtools/test/tools/javap/pathsep.sh 2012-08-10 10:40:29.000000000 -0700
+++ langtools/test/tools/javap/pathsep.sh 2013-01-16 09:20:24.000000000 -0800
@@ -40,7 +40,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- make/scripts/hgforest.sh 2012-08-10 09:07:04.000000000 -0700
+++ make/scripts/hgforest.sh 2013-01-15 23:01:23.000000000 -0800
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2010, 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
@@ -24,8 +24,6 @@
#
# Shell script for a fast parallel forest command
-command="$1"
-pull_extra_base="$2"
tmp=/tmp/forest.$$
rm -f -r ${tmp}
@@ -37,58 +35,40 @@
# Only look in specific locations for possible forests (avoids long searches)
pull_default=""
-repos=""
-repos_extra=""
-if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
+if [ "$1" = "clone" -o "$1" = "fclone" ] ; then
subrepos="corba jaxp jaxws langtools jdk hotspot"
if [ -f .hg/hgrc ] ; then
pull_default=`hg paths default`
- if [ "${pull_default}" = "" ] ; then
- echo "ERROR: Need initial clone with 'hg paths default' defined"
- exit 1
- fi
fi
if [ "${pull_default}" = "" ] ; then
- echo "ERROR: Need initial repository to use this script"
+ echo "ERROR: Need initial clone with 'hg paths default' defined"
exit 1
fi
+ repos=""
for i in ${subrepos} ; do
if [ ! -f ${i}/.hg/hgrc ] ; then
repos="${repos} ${i}"
fi
done
- if [ "${pull_extra_base}" != "" ] ; then
- subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
- pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'`
- pull_extra="${pull_extra_base}/${pull_default_tail}"
- for i in ${subrepos_extra} ; do
- if [ ! -f ${i}/.hg/hgrc ] ; then
- repos_extra="${repos_extra} ${i}"
- fi
- done
- fi
at_a_time=2
- # Any repos to deal with?
- if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then
- echo "No repositories to clone."
- exit
- fi
else
hgdirs=`ls -d ./.hg ./*/.hg ./*/*/.hg ./*/*/*/.hg ./*/*/*/*/.hg 2>/dev/null`
# Derive repository names from the .hg directory locations
+ repos=""
for i in ${hgdirs} ; do
repos="${repos} `echo ${i} | sed -e 's@/.hg$@@'`"
done
at_a_time=8
- # Any repos to deal with?
- if [ "${repos}" = "" ] ; then
- echo "No repositories to process."
- exit
- fi
fi
-# Echo out what repositories we will clone
-echo "# Repos: ${repos} ${repos_extra}"
+# Any repos to deal with?
+if [ "${repos}" = "" ] ; then
+ echo "No repositories to process."
+ exit
+fi
+
+# Echo out what repositories we will process
+echo "# Repos: ${repos}"
# Run the supplied command on all repos in parallel, save output until end
n=0
@@ -97,9 +77,8 @@
n=`expr ${n} '+' 1`
(
(
- if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
- pull_newrepo="`echo ${pull_default}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
- cline="hg clone ${pull_newrepo} ${i}"
+ if [ "$1" = "clone" -o "$1" = "fclone" ] ; then
+ cline="hg $* ${pull_default}/${i} ${i}"
echo "# ${cline}"
( eval "${cline}" )
else
@@ -113,29 +92,10 @@
sleep 5
fi
done
+
# Wait for all hg commands to complete
wait
-if [ "${repos_extra}" != "" ] ; then
- for i in ${repos_extra} ; do
- echo "Starting on ${i}"
- n=`expr ${n} '+' 1`
- (
- (
- pull_newextrarepo="`echo ${pull_extra}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
- cline="hg clone ${pull_newextrarepo} ${i}"
- echo "# ${cline}"
- ( eval "${cline}" )
- echo "# exit code $?"
- ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) &
- if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
- sleep 5
- fi
- done
- # Wait for all hg commands to complete
- wait
-fi
-
# Cleanup
rm -f -r ${tmp}
--- make/scripts/normalizer.pl 2012-08-10 09:07:04.000000000 -0700
+++ make/scripts/normalizer.pl 1969-12-31 16:00:00.000000000 -0800
@@ -1,208 +0,0 @@
-#!/usr/bin/perl
-
-#
-# Copyright (c) 2009, 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.
-#
-
-#
-# Parses java files:
-# 1. Removes from the end of lines spaces and TABs
-# 2. Replaces TABs by spaces
-# 3. Replaces all NewLine separators by Unix NewLine separators
-# 4. Makes one and only one empty line at the end of each file
-
-if ($#ARGV < 0) {
- &usage;
-
- die;
-}
-
-use Cwd 'abs_path';
-
-my @extensions = ("java");
-
-# Read options
-my $dirpos = 0;
-
-while ($dirpos < $#ARGV) {
- if ($ARGV[$dirpos] eq "-e") {
- @extensions = split(/,/, $ARGV[$dirpos + 1]);
- } else {
- last;
- }
-
- $dirpos += 2;
-}
-
-if ($dirpos > $#ARGV) {
- &usage;
-
- die;
-}
-
-use Cwd;
-my $currdir = getcwd;
-
-my $allfiles = 0;
-
-my $filecount = 0;
-
-my @tabvalues;
-
-# Init tabvalues
-push (@tabvalues, " ");
-
-for (my $i = 1; $i < 8; $i++) {
- push(@tabvalues, $tabvalues[$i - 1] . " ");
-}
-
-open(FILELIST, ">$currdir/filelist") or die "Failed while open $currdir/filelist: $!\n";
-
-while ($dirpos <= $#ARGV) {
- use File::Find;
-
- find(\&parse_file, abs_path($ARGV[$dirpos]));
-
- $dirpos += 1;
-}
-
-close(FILELIST);
-
-use Cwd 'chdir';
-chdir $currdir;
-
-print "Checked $allfiles file(s)\n";
-print "Modified $filecount file(s)\n";
-print "See results in the file $currdir/filelist\n";
-
-sub parse_file {
- my $filename = $File::Find::name;
-
- # Skip directories
- return if -d;
-
- # Skip SCCS files
- return if ($filename =~ /\/SCCS\//);
-
- # Skip files with invalid extensions
- my $accepted = 0;
- foreach my $ext (@extensions) {
- if ($_ =~ /\.$ext$/i) {
- $accepted = 1;
-
- last;
- }
- }
- return if ($accepted == 0);
-
- use File::Basename;
- my $dirname = dirname($filename);
-
- use Cwd 'chdir';
- chdir $dirname;
-
- open(FILE, $filename) or die "Failed while open $filename: $!\n";
-
- # Read file
- my @content;
- my $line;
- my $emptylinescount = 0;
- my $modified = 0;
-
- while ($line = <FILE>) {
- my $originalline = $line;
-
- # Process line
-
- # Remove from the end of the line spaces and return character
- while ($line =~ /\s$/) {
- chop($line);
- }
-
- # Replace TABs
- for (my $i = 0; $i < length($line); $i++) {
- if (substr($line, $i, 1) =~ /\t/) {
- $line = substr($line, 0, $i) . $tabvalues[7 - ($i % 8)] . substr($line, $i + 1);
- }
- }
-
- if (length($line) == 0) {
- $emptylinescount++;
- } else {
- while ($emptylinescount > 0) {
- push(@content, "");
-
- $emptylinescount--;
- }
-
- push(@content, $line);
- }
-
- if ($originalline ne ($line . "\n")) {
- $modified = 1;
- }
-
- }
-
- $allfiles++;
-
- if ($emptylinescount > 0) {
- $modified = 1;
- }
-
- close(FILE);
-
- if ($modified != 0) {
- # Write file
- open(FILE, ">$filename") or die "Failed while open $filename: $!\n";
-
- for (my $i = 0; $i <= $#content; $i++) {
- print FILE "$content[$i]\n";
- }
-
- close(FILE);
-
- # Print name from current dir
- if (index($filename, $currdir) == 0) {
- print FILELIST substr($filename, length($currdir) + 1);
- } else {
- print FILELIST $filename;
- }
- print FILELIST "\n";
-
- $filecount++;
-
- print "$filename: modified\n";
- }
-}
-
-sub usage {
- print "Usage:\n";
- print " normalizer.pl [-options] <dir> [dir2 dir3 ...]\n";
- print " Available options:\n";
- print " -e comma separated files extensions. By default accepts only java files\n";
- print "\n";
- print "Examples:\n";
- print " normalizer.pl -e c,cpp,h,hpp .\n";
-}
-
-