This commit is contained in:
Vladimir Kozlov 2014-02-18 15:48:14 -08:00
commit f6ebcf51d7
345 changed files with 6423 additions and 30789 deletions

View File

@ -44,6 +44,10 @@ EXCLUDES += com/sun/pept \
com/sun/tools/example/debug/event \
com/sun/tools/example/debug/gui
ifeq ($(RMICONNECTOR_IIOP), false)
EXCLUDES += com/sun/jmx/remote/protocol/iiop
endif
ifdef OPENJDK
EXCLUDES += sun/dc \
com/sun/jmx/snmp \
@ -409,7 +413,7 @@ endif
##########################################################################################
all: $(BUILD_JDK) $(BUILD_SECURITY) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \
all: $(BUILD_JDK) $(BUILD_SECURITY) $(COPY_EXTRA) \
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
$(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
$(BUILD_ACCESSBRIDGE_LEGACY)

View File

@ -52,7 +52,7 @@ $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_RMIC, \
##########################################################################################
BTRMIC_CP := $(CORBA_OUTPUTDIR)/btjars/btcorba.jar$(PATH_SEP)$(JDK_OUTPUTDIR)/btclasses_rmic$(PATH_SEP)$(BOOTSTRAP_JAVAC_JAR)
BTRMIC_CP := $(INTERIM_CORBA_JAR)$(PATH_SEP)$(JDK_OUTPUTDIR)/btclasses_rmic$(PATH_SEP)$(INTERIM_LANGTOOLS_JAR)
BTRMIC_ARGS := "-Xbootclasspath/p:$(BTRMIC_CP)" -cp "$(BTRMIC_CP)"
RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
@ -89,21 +89,25 @@ GENCLASSES += $(RMI_11)
# For RMI/IIOP call rmic a second time with -standardPackage option
# so that *_tie classes are generated in package without the prefix
# org.omg.stub (6375696)
JMAN_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
JMX_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
javax.management.remote.rmi.RMIServerImpl
GENRMIIIOPCLASSES :=
ifneq ($(RMICONNECTOR_IIOP), false)
GENRMIIIOPCLASSES := $(RMICONNECTOR_IIOP)
endif
$(eval $(call SetupRMICompilation,RMI_IIOP, \
CLASSES := $(JMAN_RMI_CLASSES), \
CLASSES := $(JMX_RMI_CLASSES), \
CLASSES_DIR := $(CLASSES_DIR), \
STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
RUN_V12 := true, \
RUN_IIOP := true, \
RUN_IIOP_STDPKG := true))
RUN_IIOP := $(GENRMIIIOPCLASSES), \
RUN_IIOP_STDPKG := $(GENRMIIIOPCLASSES)))
GENCLASSES += $(RMI_IIOP)
# Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
# so that javadoc can include them in the API (4997471)
$(eval $(call SetupRMICompilation,RMI_SRC, \
CLASSES := $(JMAN_RMI_CLASSES), \
CLASSES := $(JMX_RMI_CLASSES), \
CLASSES_DIR := $(CLASSES_DIR), \
STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \
RUN_V12 := true, \

View File

@ -29,6 +29,7 @@ include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include NativeCompilation.gmk
include TextFileProcessing.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk

View File

@ -102,7 +102,7 @@ TOOL_JDWPGEN = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
# TODO: Lots of files in jdk/make/tools/CharsetMapping dir
TOOL_CHARSETMAPPING = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.charsetmapping.Main
build.tools.charsetmapping.Main $(LOG_INFO)
TOOL_SPP = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
@ -122,12 +122,12 @@ TOOL_OSX_TOBIN = $(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses
TOOL_CLDRCONVERTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.cldrconverter.CLDRConverter
TOOL_CHECKDEPS = $(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
TOOL_CHECKDEPS = $(JAVA) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
-cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
build.tools.deps.CheckDeps
TOOL_ADDTORESTRICTEDPKGS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
##########################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 2014, 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
@ -34,11 +34,6 @@
# compared to the charsets packaged in "ExtendedCharsets" provider,
# which is lazy initialized.
# This year should only change if the generated source is modified.
copyright 2000, 2007,
package sun.nio.cs
class StandardCharsets
charset US-ASCII US_ASCII
# IANA aliases

View File

@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2013h
tzdata2013i

View File

@ -500,14 +500,13 @@ Rule Libya 1997 only - Apr 4 0:00 1:00 S
Rule Libya 1997 only - Oct 4 0:00 0 -
Rule Libya 2013 only - Mar lastFri 1:00 1:00 S
Rule Libya 2013 only - Oct lastFri 2:00 0 -
# The 1996 and 1997 entries are from Shanks & Pottenger;
# the IATA SSIM data contain some obvious errors.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Tripoli 0:52:44 - LMT 1920
1:00 Libya CE%sT 1959
2:00 - EET 1982
1:00 Libya CE%sT 1990 May 4
# The 1996 and 1997 entries are from Shanks & Pottenger;
# the IATA SSIM data contain some obvious errors.
2:00 - EET 1996 Sep 30
1:00 Libya CE%sT 1997 Oct 4
2:00 - EET 2012 Nov 10 2:00

View File

@ -1403,12 +1403,22 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
# 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 (2013-09-21):
# It's looking like this change will be permanent; see
# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20)
# <http://www.albawaba.com/business/jordan-winter-electricity--472005>.
# So move Jordan to UTC+3 as of the abovementioned date.
# From Steffen Thorsen (2013-12-11):
# Jordan Times and other sources say that Jordan is going back to
# UTC+2 on 2013-12-19 at midnight:
# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime
# Official, in Arabic:
# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14
# ... Our background/permalink about it
# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
# ...
# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P
# ... says midnight for the coming one and 1:00 for the ones in the future
# (and they will use DST again next year, using the normal schedule).
# From Paul Eggert (2013-12-11):
# As Steffen suggested, consider the past 21-month experiment to be DST.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Jordan 1973 only - Jun 6 0:00 1:00 S
@ -1438,11 +1448,13 @@ Rule Jordan 2002 2012 - Mar lastThu 24:00 1:00 S
Rule Jordan 2003 only - Oct 24 0:00s 0 -
Rule Jordan 2004 only - Oct 15 0:00s 0 -
Rule Jordan 2005 only - Sep lastFri 0:00s 0 -
Rule Jordan 2006 2012 - Oct lastFri 0:00s 0 -
Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 -
Rule Jordan 2013 only - Dec 20 0:00 0 -
Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S
Rule Jordan 2014 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 2012 Oct 26 0:00s
3:00 - AST
2:00 Jordan EE%sT
# Kazakhstan

View File

@ -2688,6 +2688,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1890 # San Jose
# to DST--and one more hour on 1999-04-04--when the announcers will have
# returned to Baltimore, which switches on that date.)
# From Steffen Thorsen (2013-11-11):
# DST start in Cuba in 2004 ... does not follow the same rules as the
# years before. The correct date should be Sunday 2004-03-28 00:00 ...
# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html
# From Evert van der Veer via Steffen Thorsen (2004-10-28):
# Cuba is not going back to standard time this year.
# From Paul Eggert (2006-03-22):
@ -2877,7 +2882,8 @@ Rule Cuba 1996 only - Oct 6 0:00s 0 S
Rule Cuba 1997 only - Oct 12 0:00s 0 S
Rule Cuba 1998 1999 - Mar lastSun 0:00s 1:00 D
Rule Cuba 1998 2003 - Oct lastSun 0:00s 0 S
Rule Cuba 2000 2004 - Apr Sun>=1 0:00s 1:00 D
Rule Cuba 2000 2003 - Apr Sun>=1 0:00s 1:00 D
Rule Cuba 2004 only - Mar lastSun 0:00s 1:00 D
Rule Cuba 2006 2010 - Oct lastSun 0:00s 0 S
Rule Cuba 2007 only - Mar Sun>=8 0:00s 1:00 D
Rule Cuba 2008 only - Mar Sun>=15 0:00s 1:00 D

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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,80 +25,151 @@
GENSRC_CHARSETMAPPING :=
GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
GENSRC_DATA := $(JDK_TOPDIR)/make/data/charsetmapping
GENSRC_JAVA_SRC := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
GENSRC_TEMPLATES := $(GENSRC_DATA)/SingleByte-X.java.template $(GENSRC_DATA)/DoubleByte-X.java.template
CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
###
$(GENSRC_TMP)/_the.charsetmapping.dir:
$(ECHO) Generating charsetmapping classes
$(MKDIR) -p $(GENSRC_DST)/ext
$(TOUCH) $@
### Generate files using the charsetmapping tool
###
GENSRC_SB := $(GENSRC_TMP)/_the.charsetmapping.sbcs
CHARSET_GENSRC_JAVA_DIR := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
CHARSET_DONE := $(CHARSET_GENSRC_JAVA_DIR)/_the.charsetmapping
CHARSET_COPYRIGHT_HEADER_BASE := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
CHARSET_TEMPLATES := \
$(CHARSET_DATA_DIR)/SingleByte-X.java.template \
$(CHARSET_DATA_DIR)/DoubleByte-X.java.template
$(GENSRC_SB): $(GENSRC_DATA)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.charsetmapping.dir
$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_DATA) $(GENSRC_DST) sbcs
$(TOUCH) $@
# This target should be referenced using the order-only operator (|)
$(CHARSET_GENSRC_JAVA_DIR)/ext:
$(ECHO) "Generating charset mappings"
$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR)/ext
GENSRC_CHARSETMAPPING += $(GENSRC_SB)
$(CHARSET_DONE)-sbcs: $(CHARSET_DATA_DIR)/sbcs \
$(CHARSET_TEMPLATES) $(BUILD_TOOLS) | $(CHARSET_GENSRC_JAVA_DIR)/ext
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR) sbcs
$(TOUCH) '$@'
$(CHARSET_DONE)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs \
$(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext extsbcs
$(TOUCH) '$@'
$(CHARSET_DONE)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
$(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext dbcs
$(TOUCH) '$@'
$(CHARSET_DONE)-hkscs: $(CHARSET_COPYRIGHT_HEADER_BASE)/HKSCS.java \
$(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext hkscs '$<'
$(TOUCH) '$@'
$(CHARSET_DONE)-euctw: $(CHARSET_COPYRIGHT_HEADER_BASE)/EUC_TW.java \
$(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext euctw '$<'
$(TOUCH) '$@'
$(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
$(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
GENSRC_CHARSETMAPPING += \
$(CHARSET_DONE)-sbcs \
$(CHARSET_DONE)-extsbcs \
$(CHARSET_DONE)-dbcs \
$(CHARSET_DONE)-hkscs \
$(CHARSET_DONE)-euctw \
$(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat \
#
###
$(GENSRC_DST)/ext/sjis0213.dat: $(GENSRC_DATA)/sjis0213.map $(GENSRC_SB)
$(TOOL_CHARSETMAPPING) $(LOG_INFO) $< $@ sjis0213
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/sjis0213.dat
### Generate the sun/nio/cs/StandardCharsets.java file
###
$(GENSRC_DST)/ext/EUC_TWMapping.java: $(GENSRC_JAVA_SRC)/EUC_TW.java $(GENSRC_SB)
$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_DATA) $(GENSRC_DST)/ext euctw $(GENSRC_JAVA_SRC)/EUC_TW.java
CHARSET_STANDARD_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/standardcharsets
CHARSET_STANDARD_DATA := $(CHARSET_DATA_DIR)/standard-charsets
CHARSET_STANDARD_JAVA := sun/nio/cs/StandardCharsets.java
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/EUC_TWMapping.java
CHARSET_ALIASES_TABLES_AWK := ' \
BEGIN { n = 1; m = 1; } \
/^[ \t]*charset / { \
csn = $$2; cln = $$3; \
lcsn = tolower(csn); \
lcsns[n++] = lcsn; \
csns[lcsn] = csn; \
classMap[lcsn] = cln; \
if (n > 2) \
printf " };\n\n"; \
printf " static final String[] aliases_%s = new String[] {\n", cln; \
} \
/^[ \t]*alias / { \
acsns[m++] = tolower($$2); \
aliasMap[tolower($$2)] = lcsn; \
printf " \"%s\",\n", $$2; \
} \
END { \
printf " };\n\n"; \
} '
###
CHARSET_ALIASES_MAP_AWK := ' \
/^[ \t]*charset / { \
csn = $$2; \
lcsn = tolower(csn); \
} \
/^[ \t]*alias / { \
an = tolower($$2); \
printf "%-20s \"%s\"\n", an, lcsn; \
} '
$(GENSRC_DST)/ext/HKSCSMapping.java: $(GENSRC_JAVA_SRC)/HKSCS.java $(GENSRC_SB)
$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_DATA) $(GENSRC_DST)/ext hkscs $(GENSRC_JAVA_SRC)/HKSCS.java
CHARSET_CLASSES_MAP_AWK := ' \
/^[ \t]*charset / { \
csn = $$2; cln = $$3; \
lcsn = tolower(csn); \
printf "%-20s \"%s\"\n", lcsn, cln; \
} '
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/HKSCSMapping.java
# This target should be referenced using the order-only operator (|)
$(CHARSET_STANDARD_GENSRC_DIR):
$(MKDIR) -p '$@'
###
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet: $(CHARSET_STANDARD_DATA) \
| $(CHARSET_STANDARD_GENSRC_DIR)
$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_TABLES_AWK)
$(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs: $(GENSRC_DATA)/extsbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
$(TOOL_CHARSETMAPPING) $(GENSRC_DATA) $(LOG_INFO) $(GENSRC_DST)/ext extsbcs
$(TOUCH) $@
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map: $(CHARSET_STANDARD_DATA) \
| $(CHARSET_STANDARD_GENSRC_DIR)
$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_MAP_AWK)
GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map: $(CHARSET_STANDARD_DATA) \
| $(CHARSET_STANDARD_GENSRC_DIR)
$(NAWK) < '$<' > '$@' $(CHARSET_CLASSES_MAP_AWK)
###
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map \
$(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
$(TOOL_HASHER) -i Aliases < '$<' > '$@'
$(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs: $(GENSRC_DATA)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
$(TOOL_CHARSETMAPPING) $(GENSRC_DATA) $(LOG_INFO) $(GENSRC_DST)/ext dbcs
$(TOUCH) $@
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
$(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
$(TOOL_HASHER) -i Classes < '$<' > '$@'
GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs
$(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
$(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
$(TOOL_HASHER) -i -e Cache -t Charset < '$<' > '$@'
###
$(eval $(call SetupTextFileProcessing, BUILD_CHARSET_STANDARD, \
SOURCE_FILES := $(JDK_TOPDIR)/src/share/classes/$(CHARSET_STANDARD_JAVA).template, \
OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/$(CHARSET_STANDARD_JAVA), \
INCLUDES := \
_INCLUDE_ALIASES_TABLES_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet ; \
_INCLUDE_ALIASES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet ; \
_INCLUDE_CLASSES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet ; \
_INCLUDE_CACHE_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet ; , \
))
GENSRC_CHARSET_PROVIDER_CMD := $(JDK_TOPDIR)/make/scripts/genCharsetProvider.sh
# Processing of template depends on the snippets being generated first
$(BUILD_CHARSET_STANDARD): \
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet \
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet \
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet \
$(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet
$(GENSRC_DST)/StandardCharsets.java: $(JDK_TOPDIR)/src/share/classes/sun/nio/cs/standard-charsets \
$(GENSRC_CHARSET_PROVIDER_CMD) \
$(GENSRC_TMP)/_the.charsetmapping.dir
NAWK="$(NAWK)" TEMPDIR="$(GENSRC_TMP)" SH="$(SH)" \
HASHER="$(TOOL_HASHER)" \
SCRIPTS="$(JDK_TOPDIR)/make/scripts" \
$(SH) -e $(GENSRC_CHARSET_PROVIDER_CMD) $(LOG_INFO) $< $(@D)
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/StandardCharsets.java
$(GENSRC_CHARSETMAPPING): $(BUILD_TOOLS)
GENSRC_CHARSETMAPPING += $(BUILD_CHARSET_STANDARD)

View File

@ -109,17 +109,16 @@ $(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir
ifeq ($(OPENJDK_TARGET_OS), macosx)
GENSRC_OSX_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_OSX_ICONS_DST := $(GENSRC_OSX_ICONS_TMP)/sun/osxapp
GENSRC_OSX_ICONS_DST := $(JDK_OUTPUTDIR)/gensrc_headers_icons
GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
ifdef OPENJDK
GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/data/macosxicons/JavaApp.icns
else
GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/closed/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/closed/data/macosxicons/JavaApp.icns
endif
$(GENSRC_OSX_ICONS_DST)/AWTIconData.h: $(GENSRC_OSX_ICONS_SRC)
$(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC)
$(RM) $@ $@.tmp
$(MKDIR) -p $(dir $@)
$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp

View File

@ -1,112 +0,0 @@
#
# 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
# 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.
#
GENSRC_JOBJC :=
JOBJC_FRAMEWORKS := Foundation CoreFoundation AppKit
FRAMEWORKS_DIR := /System/Library/Frameworks
GBM := /usr/bin/gen_bridge_metadata
JOBJC_SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc
JOBJC_TMP := $(JDK_OUTPUTDIR)/gensrc_jobjc
JOBJC_DST := $(JDK_OUTPUTDIR)/gensrc_jobjc/src
#
# Build generator
#
$(eval $(call SetupJavaCompilation,BUILD_JOBJC_PRIMITIVE_CODER, \
SETUP := GENERATE_OLDBYTECODE, \
DISABLE_SJAVAC := true, \
INCLUDES := core/java \
com/apple, \
SRC := $(JOBJC_SRC)/src \
$(JOBJC_SRC)/src/generator/java, \
BIN := $(JOBJC_TMP)/bin))
GENSRC_JOBJC += $(BUILD_JOBJC_PRIMITIVE_CODER)
#
# Generate bridge support for select frameworks
#
BRIDGESUPPORT := $(addprefix $(JOBJC_TMP)/bridge/, $(addsuffix Full.bridgesupport, $(JOBJC_FRAMEWORKS)))
#
# Define macro for rules to create bridge support
# Not sure why, but if the system has this framework bridge support,
# we appear to copy that, otherwise we run GBM which can be very slow.
#
define CreateBridgeSupport # Framework
$(RM) $@ $@.tmp
$(MKDIR) -p $(@D)
if [ -f $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) ]; then \
$(CP) $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) $@.tmp ; \
else \
$(GBM) $(LOG_INFO) -F complete --framework $1 -o $@.tmp ; \
fi
$(MV) $@.tmp $@
endef
#
# Currently 3 frameworks, avoid pattern rule due to the names being conflicting
#
$(JOBJC_TMP)/bridge/FoundationFull.bridgesupport: \
$(wildcard $(FRAMEWORKS_DIR)/Foundation.framework/Headers/*.h)
$(call CreateBridgeSupport,Foundation)
$(JOBJC_TMP)/bridge/CoreFoundationFull.bridgesupport: \
$(wildcard $(FRAMEWORKS_DIR)/CoreFoundation.framework/Headers/*.h)
$(call CreateBridgeSupport,CoreFoundation)
$(JOBJC_TMP)/bridge/AppKitFull.bridgesupport: \
$(wildcard $(FRAMEWORKS_DIR)/AppKit.framework/Headers/*.h)
$(call CreateBridgeSupport,AppKit)
#
# Find Xbootclasspath, for some reason, this involves firing up Java just
# so we can get the boot classpath, so we can remove anything in that
# classpath that ends with "JObjC.jar", and emit the new bootclasspath.
#
$(JOBJC_TMP)/_the.generator_bootclasspath: $(BUILD_JOBJC_PRIMITIVE_CODER)
$(ECHO) Generating jobjc framework bridge
$(RM) $@
$(JAVA) $(LOG_INFO) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
$(MV) $@.tmp $@
#
# Run generator
# Now we use bootclasspath to run java again, with the bridge support to
# generate more source.
#
$(JOBJC_TMP)/_the.generator: $(JOBJC_TMP)/_the.generator_bootclasspath $(BRIDGESUPPORT)
$(RM) $@
$(JAVA) $(LOG_INFO) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
$(TOUCH) $@
# The generator delets all files in the target dir so it has to work in its
# own dir and have the files copied over to gensrc aftewards.
$(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files: $(JOBJC_TMP)/_the.generator
$(MKDIR) -p $(@D)
$(CP) -rp $(JOBJC_DST)/* $(@D)
$(TOUCH) $@
GENSRC_JOBJC += $(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files

View File

@ -53,8 +53,8 @@ endif
# The EN locales
EN_LOCALES := en%
# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
ALL_NON_EN_LOCALES := ja-JP-JP th-TH-TH
# Locales that don't have any resource files should be included here.
ALL_NON_EN_LOCALES := ja-JP-JP nb-NO nn-NO th-TH-TH
SED_ARGS := -e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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
@ -792,9 +792,9 @@ else
endif
BUILD_LIBFONTMANAGER_CFLAGS_COMMON := \
$(FONT_HEADERS) \
$(X_CFLAGS) \
-DLE_STANDALONE -DHEADLESS \
$(FONT_HEADERS) \
-I$(JDK_TOPDIR)/src/share/native/sun/font \
-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \

View File

@ -123,15 +123,16 @@ LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/l
$(JDK_TOPDIR)/src/share/native/java/security \
$(JDK_TOPDIR)/src/share/native/common \
$(JDK_TOPDIR)/src/share/native/sun/misc \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/misc \
$(JDK_TOPDIR)/src/share/native/sun/reflect \
$(JDK_TOPDIR)/src/share/native/java/util \
$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
ifneq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
else
else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
endif
@ -187,7 +188,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LIBRARY := java, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVA_SRC_DIRS), \
EXCLUDES := fdlibm/src zip, \
EXCLUDES := fdlibm/src zip prefs, \
EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
@ -285,6 +286,41 @@ BUILD_LIBRARIES += $(BUILD_LIBZIP)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/macosx/native/java/util/prefs
else
LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util/prefs
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
LIBRARY := prefs, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBPREF_SRC_DIRS), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lc, \
LDFLAGS_SUFFIX_aix := -ljvm -ljava, \
LDFLAGS_SUFFIX_windows := advapi32.lib, \
LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=prefs.dll" \
-D "JDK_INTERNAL_NAME=prefs" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libprefs, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBPREFS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBPREFS)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LIBRARY := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \

View File

@ -63,7 +63,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \
-I$(JDK_OUTPUTDIR)/gensrc_headers_icons \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@ -95,7 +95,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSX_DIRS := \
$(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
$(JDK_TOPDIR)/src/macosx/native/java/util \
$(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
$(JDK_TOPDIR)/src/macosx/native/apple/security \
$(JDK_TOPDIR)/src/macosx/native/apple/launcher

View File

@ -128,8 +128,13 @@ ifneq ($(BUILD_CRYPTO), no)
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
else ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBKRB5_NAME := osxkrb5
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := -framework Kerberos
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
$(JDK_TOPDIR)/src/macosx/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework Cocoa \
-framework SystemConfiguration \
-framework Kerberos
endif
ifneq ($(BUILD_LIBKRB5_NAME), )
@ -140,8 +145,9 @@ ifneq ($(BUILD_CRYPTO), no)
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5, \
-I$(JDK_TOPDIR)/src/share/native/sun/security/krb5, \
CFLAGS_windows := -I$(JDK_TOPDIR)/src/windows/native/sun/security/krb5, \
CFLAGS_macosx := -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \

View File

@ -79,7 +79,7 @@ SUNWprivate_1.1 {
Java_java_io_FileInputStream_close0;
Java_java_io_FileInputStream_initIDs;
Java_java_io_FileInputStream_open;
Java_java_io_FileInputStream_read;
Java_java_io_FileInputStream_read0;
Java_java_io_FileInputStream_readBytes;
Java_java_io_FileInputStream_skip;
Java_java_io_FileOutputStream_close0;
@ -98,11 +98,11 @@ SUNWprivate_1.1 {
Java_java_io_RandomAccessFile_initIDs;
Java_java_io_RandomAccessFile_length;
Java_java_io_RandomAccessFile_open;
Java_java_io_RandomAccessFile_read;
Java_java_io_RandomAccessFile_read0;
Java_java_io_RandomAccessFile_readBytes;
Java_java_io_RandomAccessFile_seek0;
Java_java_io_RandomAccessFile_setLength;
Java_java_io_RandomAccessFile_write;
Java_java_io_RandomAccessFile_write0;
Java_java_io_RandomAccessFile_writeBytes;
Java_java_io_UnixFileSystem_canonicalize0;
Java_java_io_UnixFileSystem_checkAccess;
@ -236,10 +236,6 @@ SUNWprivate_1.1 {
Java_java_util_TimeZone_getSystemTimeZoneID;
Java_java_util_TimeZone_getSystemGMTOffsetID;
Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8;
Java_java_util_prefs_FileSystemPreferences_chmod;
Java_java_util_prefs_FileSystemPreferences_lockFile0;
Java_java_util_prefs_FileSystemPreferences_unlockFile0;
Java_java_util_logging_FileHandler_isSetUID;
Java_sun_misc_MessageUtils_toStderr;
Java_sun_misc_MessageUtils_toStdout;
Java_sun_misc_NativeSignalHandler_handle0;
@ -274,19 +270,13 @@ SUNWprivate_1.1 {
Java_sun_misc_Version_getJvmVersionInfo;
Java_sun_misc_Version_getJvmSpecialVersion;
Java_sun_misc_VM_latestUserDefinedLoader;
Java_sun_misc_VM_isSetUID;
Java_sun_misc_VM_initialize;
Java_sun_misc_VMSupport_initAgentProperties;
# ZipFile.c needs this one
throwFileNotFoundException;
# Java_sun_misc_VM_getState; threads.c
# Java_sun_misc_VM_threadsSuspended; threads.c
# Java_sun_misc_VM_unsuspendSomeThreads; threads.c
# Java_sun_misc_VM_unsuspendThreads; threads.c
Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getPattern;
# Outcalls from libjvm done using dlsym().
VerifyClassCodes;

View File

@ -34,6 +34,7 @@ SUNWprivate_1.1 {
Java_oracle_jrockit_jfr_VMJFR_getPeriod;
Java_oracle_jrockit_jfr_VMJFR_descriptors;
Java_oracle_jrockit_jfr_VMJFR_redefineClass0;
Java_oracle_jrockit_jfr_VMJFR_retransformClasses0;
JNI_OnLoad;
local:
*;

View File

@ -105,6 +105,7 @@ SUNWprivate_1.1 {
NET_MapSocketOption;
NET_Wait;
ipv6_available;
initInetAddressIDs;
local:
*;

View File

@ -0,0 +1,36 @@
#
# Copyright (c) 2014, 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.
#
# Define public interface.
SUNWprivate_1.1 {
global:
Java_java_util_prefs_FileSystemPreferences_chmod;
Java_java_util_prefs_FileSystemPreferences_lockFile0;
Java_java_util_prefs_FileSystemPreferences_unlockFile0;
local:
*;
};

View File

@ -130,6 +130,7 @@ PROFILE_3_JRE_LIB_FILES := \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)prefs$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \
jvm.hprof.txt \
management-agent.jar \

View File

@ -1,131 +0,0 @@
#! /bin/sh
#
# 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
# 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.
#
# Generate a charset provider class
# Required environment variables
# NAWK awk tool
# TEMPDIR temporary directory
# HASHER Hasher program
SPEC=$1; shift
DST=$1; shift
eval `$NAWK <$SPEC '
/^[ \t]*copyright / { printf "COPYRIGHT_YEARS=\"%s %s\"\n", $2, $3; }
/^[ \t]*package / { printf "PKG=%s\n", $2; }
/^[ \t]*class / { printf "CLASS=%s\n", $2; }
'`
OUT=$DST/$CLASS.java
echo '-->' $OUT
# Header
#
$SH ${SCRIPTS}/addNotices.sh "$COPYRIGHT_YEARS" > $OUT
cat <<__END__ >>$OUT
// -- This file was mechanically generated: Do not edit! -- //
package $PKG;
import java.nio.charset.*;
public class $CLASS
extends FastCharsetProvider
{
__END__
# Alias tables
#
$NAWK <$SPEC >>$OUT '
BEGIN { n = 1; m = 1; }
/^[ \t]*charset / {
csn = $2; cln = $3;
lcsn = tolower(csn);
lcsns[n++] = lcsn;
csns[lcsn] = csn;
classMap[lcsn] = cln;
if (n > 2)
printf " };\n\n";
printf " static final String[] aliases_%s = new String[] {\n", cln;
}
/^[ \t]*alias / {
acsns[m++] = tolower($2);
aliasMap[tolower($2)] = lcsn;
printf " \"%s\",\n", $2;
}
END {
printf " };\n\n";
}
'
# Prehashed alias and class maps
#
$NAWK <$SPEC >$TEMPDIR/aliases '
/^[ \t]*charset / {
csn = $2;
lcsn = tolower(csn);
}
/^[ \t]*alias / {
an = tolower($2);
printf "%-20s \"%s\"\n", an, lcsn;
}
'
$NAWK <$SPEC >$TEMPDIR/classes '
/^[ \t]*charset / {
csn = $2; cln = $3;
lcsn = tolower(csn);
printf "%-20s \"%s\"\n", lcsn, cln;
}
'
${HASHER} -i Aliases <$TEMPDIR/aliases >>$OUT
${HASHER} -i Classes <$TEMPDIR/classes >>$OUT
${HASHER} -i -e Cache -t Charset <$TEMPDIR/classes >>$OUT
# Constructor
#
cat <<__END__ >>$OUT
public $CLASS() {
super("$PKG", new Aliases(), new Classes(), new Cache());
}
}
__END__

View File

@ -43,9 +43,6 @@ import java.util.*;
public class Hasher {
// This class cannot, sadly, make use of 1.5 features since it must be
// compiled and run with the bootstrap JDK, which is 1.4.2.
static final PrintStream out = System.out;
static final PrintStream err = System.err;
@ -184,11 +181,13 @@ public class Hasher {
if (md <= maxDepth) {
// Success
out.flush();
if (cln != null)
err.print(cln + ": ");
err.println("Table size " + (1 << nb) + " (" + nb + " bits)"
+ ", shift " + shift
+ ", max chain depth " + md);
if (verbose) {
if (cln != null)
err.print(cln + ": ");
err.println("Table size " + (1 << nb) + " (" + nb + " bits)"
+ ", shift " + shift
+ ", max chain depth " + md);
}
return this;
}
}

View File

@ -43,7 +43,7 @@ class AixNativeDispatcher extends UnixNativeDispatcher {
static native UnixMountEntry[] getmntctl() throws UnixException;
// initialize
private static native int init();
private static native void init();
static {
AccessController.doPrivileged(new PrivilegedAction<Void>() {

View File

@ -56,23 +56,26 @@ static void throwUnixException(JNIEnv* env, int errnum) {
/**
* Initialization
*/
JNIEXPORT jint JNICALL
JNIEXPORT void JNICALL
Java_sun_nio_fs_AixNativeDispatcher_init(JNIEnv* env, jclass this)
{
jint flags = 0;
jclass clazz;
clazz = (*env)->FindClass(env, "sun/nio/fs/UnixMountEntry");
if (clazz == NULL) {
return 0;
}
CHECK_NULL(clazz);
entry_name = (*env)->GetFieldID(env, clazz, "name", "[B");
CHECK_NULL(entry_name);
entry_dir = (*env)->GetFieldID(env, clazz, "dir", "[B");
CHECK_NULL(entry_dir);
entry_fstype = (*env)->GetFieldID(env, clazz, "fstype", "[B");
CHECK_NULL(entry_fstype);
entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B");
CHECK_NULL(entry_options);
entry_cls = (*env)->NewGlobalRef(env, clazz);
return 0;
if (entry_cls == NULL) {
JNU_ThrowOutOfMemoryError(env, NULL);
return;
}
}
/**

View File

@ -82,7 +82,7 @@ class MacOSXPreferencesFile {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
System.loadLibrary("osx");
System.loadLibrary("prefs");
return null;
}
});

View File

@ -24,6 +24,7 @@
*/
#include "sun_util_locale_provider_HostLocaleProviderAdapterImpl.h"
#include "jni_util.h"
#include <CoreFoundation/CoreFoundation.h>
#include <stdio.h>
@ -63,6 +64,10 @@ JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapte
localeString = getMacOSXLocale(posixCat);
if (localeString == NULL) {
localeString = getPosixLocale(posixCat);
if (localeString == NULL) {
JNU_ThrowOutOfMemoryError(env, NULL);
return NULL;
}
}
ret = (*env)->NewStringUTF(env, localeString);
free(localeString);
@ -127,6 +132,7 @@ JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapte
JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getAmPmStrings
(JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray ampms) {
CFLocaleRef cflocale = CFLocaleCopyCurrent();
jstring tmp_string;
if (cflocale != NULL) {
CFDateFormatterRef df = CFDateFormatterCreate(kCFAllocatorDefault,
cflocale,
@ -138,13 +144,18 @@ JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderA
if (amStr != NULL) {
CFStringGetCString(amStr, buf, BUFLEN, kCFStringEncodingUTF8);
CFRelease(amStr);
(*env)->SetObjectArrayElement(env, ampms, 0, (*env)->NewStringUTF(env, buf));
tmp_string = (*env)->NewStringUTF(env, buf);
if (tmp_string != NULL) {
(*env)->SetObjectArrayElement(env, ampms, 0, tmp_string);
}
}
CFStringRef pmStr = CFDateFormatterCopyProperty(df, kCFDateFormatterPMSymbol);
if (pmStr != NULL) {
CFStringGetCString(pmStr, buf, BUFLEN, kCFStringEncodingUTF8);
CFRelease(pmStr);
(*env)->SetObjectArrayElement(env, ampms, 1, (*env)->NewStringUTF(env, buf));
if (!(*env)->ExceptionCheck(env)){
CFStringRef pmStr = CFDateFormatterCopyProperty(df, kCFDateFormatterPMSymbol);
if (pmStr != NULL) {
CFStringGetCString(pmStr, buf, BUFLEN, kCFStringEncodingUTF8);
CFRelease(pmStr);
(*env)->SetObjectArrayElement(env, ampms, 1, (*env)->NewStringUTF(env, buf));
}
}
CFRelease(df);
}
@ -647,10 +658,16 @@ static CFNumberFormatterStyle convertNumberFormatterStyle(jint javaStyle) {
static void copyArrayElements(JNIEnv *env, CFArrayRef cfarray, jobjectArray jarray, CFIndex sindex, int dindex, int count) {
char buf[BUFLEN];
jstring tmp_string;
for (; count > 0; sindex++, dindex++, count--) {
CFStringGetCString(CFArrayGetValueAtIndex(cfarray, sindex), buf, BUFLEN, kCFStringEncodingUTF8);
(*env)->SetObjectArrayElement(env, jarray, dindex, (*env)->NewStringUTF(env, buf));
tmp_string = (*env)->NewStringUTF(env, buf);
if (tmp_string != NULL) {
(*env)->SetObjectArrayElement(env, jarray, dindex, tmp_string);
} else {
break;
}
}
}

View File

@ -112,7 +112,7 @@ writeNewObjectArray(JNIEnv *env, PacketOutputStream *out,
WITH_LOCAL_REFS(env, 1) {
jarray array;
jclass componentClass;
jclass componentClass = NULL;
jdwpError serror;
serror = getComponentClass(env, arrayClass,

View File

@ -140,7 +140,7 @@ jdiAssertionFailed(char *fileName, int lineNumber, char *msg)
const char *
jvmtiErrorText(jvmtiError error)
{
switch (error) {
switch ((int)error) {
CASE_RETURN_TEXT(JVMTI_ERROR_NONE)
CASE_RETURN_TEXT(JVMTI_ERROR_INVALID_THREAD)
CASE_RETURN_TEXT(JVMTI_ERROR_INVALID_THREAD_GROUP)

View File

@ -2122,7 +2122,7 @@ jvmti2EventIndex(jvmtiEvent kind)
jdwpError
map2jdwpError(jvmtiError error)
{
switch ( error ) {
switch ( (int)error ) {
case JVMTI_ERROR_NONE:
return JDWP_ERROR(NONE);
case AGENT_ERROR_INVALID_THREAD:

View File

@ -345,10 +345,10 @@ JLI_Launch(int argc, char ** argv, /* main argc, argc */
} \
} while (JNI_FALSE)
#define CHECK_EXCEPTION_RETURN(CER_return_value) \
#define CHECK_EXCEPTION_RETURN() \
do { \
if ((*env)->ExceptionOccurred(env)) { \
return CER_return_value; \
return; \
} \
} while (JNI_FALSE)
@ -1258,7 +1258,6 @@ static jclass
GetApplicationClass(JNIEnv *env)
{
jmethodID mid;
jobject result;
jclass cls = GetLauncherHelperClass(env);
NULL_CHECK0(cls);
NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls,

View File

@ -233,7 +233,7 @@ compute_cen(int fd, Byte *bp)
jlong base_offset;
jlong offset;
char buffer[MINREAD];
p = buffer;
p = (Byte*) buffer;
/*
* Read the END Header, which is the starting point for ZIP files.
* (Clearly designed to make writing a zip file easier than reading
@ -276,7 +276,7 @@ compute_cen(int fd, Byte *bp)
if (JLI_Lseek(fd, offset, SEEK_SET) < (jlong)0) {
return (-1);
}
p = buffer;
p = (Byte*) buffer;
base_offset = base_offset - ZIP64_ENDSIZ(p) - ZIP64_ENDOFF(p) - ZIP64_ENDHDR;
} else {
base_offset = base_offset - ENDSIZ(p) - ENDOFF(p);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, 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,6 +31,7 @@ import java.awt.color.ColorSpace;
* A dummy <code>ColorSpace</code> to enable <code>ColorModel</code>
* for image data which do not have an innate color representation.
*/
@SuppressWarnings("serial") // JDK-implementation class
public class BogusColorSpace extends ColorSpace {
/**
* Return the type given the number of components.

View File

@ -558,6 +558,7 @@ class JFIFMarkerSegment extends MarkerSegment {
// Could put reason codes in here to be parsed in writeJFXXSegment
// in order to provide more meaningful warnings.
@SuppressWarnings("serial") // JDK-implementation class
private class IllegalThumbException extends Exception {}
/**

View File

@ -47,6 +47,7 @@ package java.awt.color;
*/
public class CMMException extends java.lang.RuntimeException {
private static final long serialVersionUID = 5775558044142994965L;
/**
* Constructs a CMMException with the specified detail message.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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,6 +31,7 @@ package java.awt.color;
*/
public class ProfileDataException extends java.lang.RuntimeException {
private static final long serialVersionUID = 7286140888240322498L;
/**
* Constructs a ProfileDataException with the specified detail message.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, 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
@ -38,6 +38,8 @@ import java.util.EventObject;
* @since 1.5
*/
public class FlavorEvent extends EventObject {
private static final long serialVersionUID = -5842664112252414548L;
/**
* Constructs a <code>FlavorEvent</code> object.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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 @@ package java.awt.geom;
*/
public class IllegalPathStateException extends RuntimeException {
private static final long serialVersionUID = -5158084205220481094L;
/**
* Constructs an <code>IllegalPathStateException</code> with no
* detail message.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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 @@ package java.awt.geom;
*/
public class NoninvertibleTransformException extends java.lang.Exception {
private static final long serialVersionUID = 6137225240503990466L;
/**
* Constructs an instance of
* <code>NoninvertibleTransformException</code>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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,6 +87,7 @@ public class InputContext {
/**
* Returns a new InputContext instance.
* @return a new InputContext instance
*/
public static InputContext getInstance() {
return new sun.awt.im.InputMethodContext();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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
@ -157,6 +157,7 @@ public class InputMethodHighlight {
/**
* Returns whether the text range is selected.
* @return whether the text range is selected
*/
public boolean isSelected() {
return selected;
@ -174,6 +175,7 @@ public class InputMethodHighlight {
/**
* Returns the variation of the text range.
* @return the variation of the text range
*/
public int getVariation() {
return variation;
@ -181,6 +183,7 @@ public class InputMethodHighlight {
/**
* Returns the rendering style attributes for the text range, or null.
* @return the rendering style attributes for the text range, or null
* @since 1.3
*/
public Map<TextAttribute,?> getStyle() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2014, 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
@ -52,6 +52,14 @@ public interface InputMethodContext extends InputMethodRequests {
* Creates an input method event from the arguments given
* and dispatches it to the client component. For arguments,
* see {@link java.awt.event.InputMethodEvent#InputMethodEvent}.
* @param id the event type
* @param text the combined committed and composed text
* @param committedCharacterCount the number of committed characters in the text
* @param caret the caret (a.k.a. insertion point); null if
* there's no caret within current composed text
* @param visiblePosition the position that's most important to be
* visible; null if there's no recommendation for a visible
* position within current composed text
*/
public void dispatchInputMethodEvent(int id,
AttributedCharacterIterator text, int committedCharacterCount,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2014, 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
@ -72,6 +72,8 @@ public interface InputMethodDescriptor {
* Returns whether the list of available locales can change
* at runtime. This may be the case, for example, for adapters
* that access real input methods over the network.
* @return whether the list of available locales can change at
* runtime
*/
boolean hasDynamicLocaleList();
@ -92,6 +94,9 @@ public interface InputMethodDescriptor {
*
* @param inputLocale the locale for which text input is supported, or null
* @param displayLanguage the language in which the name will be displayed
* @return the user-visible name of the corresponding input method
* for the given input locale in the language in which the name
* will be displayed
*/
String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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
@ -32,6 +32,7 @@ package java.awt.image;
* process the image.
*/
public class ImagingOpException extends java.lang.RuntimeException {
private static final long serialVersionUID = 8026288481846276658L;
/**
* Constructs an <code>ImagingOpException</code> object with the

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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,6 +31,7 @@ package java.awt.image;
* invalid layout information in the {@link Raster}.
*/
public class RasterFormatException extends java.lang.RuntimeException {
private static final long serialVersionUID = 96598996116164315L;
/**
* Constructs a new <code>RasterFormatException</code> with the

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2014, 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
@ -93,6 +93,8 @@ import java.util.Vector;
* </pre>
* */
public class ParameterBlock implements Cloneable, Serializable {
private static final long serialVersionUID = -7577115551785240750L;
/** A Vector of sources, stored as arbitrary Objects. */
protected Vector<Object> sources = new Vector<Object>();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2014, 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,8 @@ public interface CanvasPeer extends ComponentPeer {
* from the requested GC passed as the argument to this method. This method
* must return a non-null value (given the argument is non-null as well).
*
* @param gc the requested graphics configuration
* @return a graphics configuration that best suits this Canvas
* @since 1.7
*/
GraphicsConfiguration getAppropriateGraphicsConfiguration(

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2014, 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
@ -516,6 +516,7 @@ public interface ComponentPeer {
/**
* Applies the shape to the native component window.
* @param shape the shape to apply
* @since 1.7
*
* @see Component#applyCompoundShape
@ -525,12 +526,13 @@ public interface ComponentPeer {
/**
* Lowers this component at the bottom of the above HW peer. If the above parameter
* is null then the method places this component at the top of the Z-order.
* @param above the peer to lower this component with respect to
*/
void setZOrder(ComponentPeer above);
/**
* Updates internal data structures related to the component's GC.
*
* @param gc the reference graphics configuration
* @return if the peer needs to be recreated for the changes to take effect
* @since 1.7
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, 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,6 +55,10 @@ public interface MouseInfoPeer {
* is located.
* See java.awt.GraphicsConfiguration documentation for more
* details about virtual screen devices.
* @param point holder for the current coordinates of the mouse
* cursor
* @return the number of the screen device where the pointer is
* located
*/
int fillPointWithCoords(Point point);
@ -63,6 +67,9 @@ public interface MouseInfoPeer {
* pointer. The window is considered to be under the mouse pointer
* if it is showing on the screen, and the mouse pointer is above
* the part of the window that is not obscured by any other windows.
* @param w the window to check
* @return whether or not the window is located under the mouse
* pointer
*/
boolean isWindowUnderMouse(Window w);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2014, 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
@ -94,14 +94,15 @@ public interface WindowPeer extends ContainerPeer {
/**
* Sets the level of opacity for the window.
*
* @param opacity the level of opacity
* @see Window#setOpacity(float)
*/
void setOpacity(float opacity);
/**
* Enables the per-pixel alpha support for the window.
*
* @param isOpaque whether or not per-pixel alpha support is
* enabled
* @see Window#setBackground(Color)
*/
void setOpaque(boolean isOpaque);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@ package java.awt.print;
*/
public class PrinterAbortException extends PrinterException {
private static final long serialVersionUID = 4725169026278854136L;
/**
* Constructs a new <code>PrinterAbortException</code> with no

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2014, 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
@ -32,6 +32,7 @@ package java.awt.print;
*/
public class PrinterException extends Exception {
private static final long serialVersionUID = -3757589981158265819L;
/**
* Constructs a new <code>PrinterException</code> object

View File

@ -51,6 +51,12 @@ class FileInputStream extends InputStream
/* File Descriptor - handle to the open file */
private final FileDescriptor fd;
/**
* The path of the referenced file
* (null if the stream is created with a file descriptor)
*/
private final String path;
private FileChannel channel = null;
private final Object closeLock = new Object();
@ -128,6 +134,7 @@ class FileInputStream extends InputStream
}
fd = new FileDescriptor();
fd.attach(this);
path = name;
open(name);
}
@ -164,6 +171,7 @@ class FileInputStream extends InputStream
security.checkRead(fdObj);
}
fd = fdObj;
path = null;
/*
* FileDescriptor is being shared by streams.
@ -186,7 +194,11 @@ class FileInputStream extends InputStream
* file is reached.
* @exception IOException if an I/O error occurs.
*/
public native int read() throws IOException;
public int read() throws IOException {
return read0();
}
private native int read0() throws IOException;
/**
* Reads a subarray as a sequence of bytes.
@ -345,7 +357,7 @@ class FileInputStream extends InputStream
public FileChannel getChannel() {
synchronized (this) {
if (channel == null) {
channel = FileChannelImpl.open(fd, true, false, this);
channel = FileChannelImpl.open(fd, path, true, false, this);
}
return channel;
}

View File

@ -67,6 +67,12 @@ class FileOutputStream extends OutputStream
*/
private FileChannel channel;
/**
* The path of the referenced file
* (null if the stream is created with a file descriptor)
*/
private final String path;
private final Object closeLock = new Object();
private volatile boolean closed = false;
@ -202,6 +208,7 @@ class FileOutputStream extends OutputStream
this.fd = new FileDescriptor();
fd.attach(this);
this.append = append;
this.path = name;
open(name, append);
}
@ -239,6 +246,7 @@ class FileOutputStream extends OutputStream
}
this.fd = fdObj;
this.append = false;
this.path = null;
fd.attach(this);
}
@ -376,7 +384,7 @@ class FileOutputStream extends OutputStream
public FileChannel getChannel() {
synchronized (this) {
if (channel == null) {
channel = FileChannelImpl.open(fd, false, true, append, this);
channel = FileChannelImpl.open(fd, path, false, true, append, this);
}
return channel;
}

View File

@ -39,7 +39,6 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicBoolean;
import static java.io.ObjectStreamClass.processQueue;
import sun.reflect.misc.ReflectUtil;
@ -534,7 +533,7 @@ public class ObjectInputStream
if (ctx == null) {
throw new NotActiveException("not in call to readObject");
}
Object curObj = ctx.getObj();
ctx.checkAndSetUsed();
ObjectStreamClass curDesc = ctx.getDesc();
bin.setBlockDataMode(false);
GetFieldImpl getField = new GetFieldImpl(curDesc);
@ -1597,7 +1596,7 @@ public class ObjectInputStream
int descHandle = handles.assign(unshared ? unsharedMarker : desc);
passHandle = NULL_HANDLE;
ObjectStreamClass readDesc = null;
ObjectStreamClass readDesc;
try {
readDesc = readClassDescriptor();
} catch (ClassNotFoundException ex) {
@ -1976,29 +1975,34 @@ public class ObjectInputStream
}
int primDataSize = desc.getPrimDataSize();
if (primVals == null || primVals.length < primDataSize) {
primVals = new byte[primDataSize];
}
bin.readFully(primVals, 0, primDataSize, false);
if (obj != null) {
desc.setPrimFieldValues(obj, primVals);
}
int objHandle = passHandle;
ObjectStreamField[] fields = desc.getFields(false);
Object[] objVals = new Object[desc.getNumObjFields()];
int numPrimFields = fields.length - objVals.length;
for (int i = 0; i < objVals.length; i++) {
ObjectStreamField f = fields[numPrimFields + i];
objVals[i] = readObject0(f.isUnshared());
if (f.getField() != null) {
handles.markDependency(objHandle, passHandle);
if (primDataSize > 0) {
if (primVals == null || primVals.length < primDataSize) {
primVals = new byte[primDataSize];
}
bin.readFully(primVals, 0, primDataSize, false);
if (obj != null) {
desc.setPrimFieldValues(obj, primVals);
}
}
if (obj != null) {
desc.setObjFieldValues(obj, objVals);
int numObjFields = desc.getNumObjFields();
if (numObjFields > 0) {
int objHandle = passHandle;
ObjectStreamField[] fields = desc.getFields(false);
Object[] objVals = new Object[numObjFields];
int numPrimFields = fields.length - objVals.length;
for (int i = 0; i < objVals.length; i++) {
ObjectStreamField f = fields[numPrimFields + i];
objVals[i] = readObject0(f.isUnshared());
if (f.getField() != null) {
handles.markDependency(objHandle, passHandle);
}
}
if (obj != null) {
desc.setObjFieldValues(obj, objVals);
}
passHandle = objHandle;
}
passHandle = objHandle;
}
/**

View File

@ -35,7 +35,6 @@ import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import static java.io.ObjectStreamClass.processQueue;
import java.io.SerialCallbackContext;
import sun.reflect.misc.ReflectUtil;
/**
@ -458,7 +457,7 @@ public class ObjectOutputStream
if (ctx == null) {
throw new NotActiveException("not in call to writeObject");
}
Object curObj = ctx.getObj();
ctx.checkAndSetUsed();
ObjectStreamClass curDesc = ctx.getDesc();
curPut = new PutFieldImpl(curDesc);
}
@ -1527,29 +1526,34 @@ public class ObjectOutputStream
desc.checkDefaultSerialize();
int primDataSize = desc.getPrimDataSize();
if (primVals == null || primVals.length < primDataSize) {
primVals = new byte[primDataSize];
}
desc.getPrimFieldValues(obj, primVals);
bout.write(primVals, 0, primDataSize, false);
ObjectStreamField[] fields = desc.getFields(false);
Object[] objVals = new Object[desc.getNumObjFields()];
int numPrimFields = fields.length - objVals.length;
desc.getObjFieldValues(obj, objVals);
for (int i = 0; i < objVals.length; i++) {
if (extendedDebugInfo) {
debugInfoStack.push(
"field (class \"" + desc.getName() + "\", name: \"" +
fields[numPrimFields + i].getName() + "\", type: \"" +
fields[numPrimFields + i].getType() + "\")");
if (primDataSize > 0) {
if (primVals == null || primVals.length < primDataSize) {
primVals = new byte[primDataSize];
}
try {
writeObject0(objVals[i],
fields[numPrimFields + i].isUnshared());
} finally {
desc.getPrimFieldValues(obj, primVals);
bout.write(primVals, 0, primDataSize, false);
}
int numObjFields = desc.getNumObjFields();
if (numObjFields > 0) {
ObjectStreamField[] fields = desc.getFields(false);
Object[] objVals = new Object[numObjFields];
int numPrimFields = fields.length - objVals.length;
desc.getObjFieldValues(obj, objVals);
for (int i = 0; i < objVals.length; i++) {
if (extendedDebugInfo) {
debugInfoStack.pop();
debugInfoStack.push(
"field (class \"" + desc.getName() + "\", name: \"" +
fields[numPrimFields + i].getName() + "\", type: \"" +
fields[numPrimFields + i].getType() + "\")");
}
try {
writeObject0(objVals[i],
fields[numPrimFields + i].isUnshared());
} finally {
if (extendedDebugInfo) {
debugInfoStack.pop();
}
}
}
}
@ -2464,7 +2468,9 @@ public class ObjectOutputStream
StringBuilder buffer = new StringBuilder();
if (!stack.isEmpty()) {
for(int i = stack.size(); i > 0; i-- ) {
buffer.append(stack.get(i-1) + ((i != 1) ? "\n" : ""));
buffer.append(stack.get(i - 1));
if (i != 1)
buffer.append('\n');
}
}
return buffer.toString();

View File

@ -1471,43 +1471,56 @@ public class ObjectStreamClass implements Serializable {
return name1.equals(name2);
}
/**
* Returns JVM type signature for given primitive.
*/
private static String getPrimitiveSignature(Class<?> cl) {
if (cl == Integer.TYPE)
return "I";
else if (cl == Byte.TYPE)
return "B";
else if (cl == Long.TYPE)
return "J";
else if (cl == Float.TYPE)
return "F";
else if (cl == Double.TYPE)
return "D";
else if (cl == Short.TYPE)
return "S";
else if (cl == Character.TYPE)
return "C";
else if (cl == Boolean.TYPE)
return "Z";
else if (cl == Void.TYPE)
return "V";
else
throw new InternalError();
}
/**
* Returns JVM type signature for given class.
*/
private static String getClassSignature(Class<?> cl) {
StringBuilder sbuf = new StringBuilder();
while (cl.isArray()) {
sbuf.append('[');
cl = cl.getComponentType();
}
if (cl.isPrimitive()) {
if (cl == Integer.TYPE) {
sbuf.append('I');
} else if (cl == Byte.TYPE) {
sbuf.append('B');
} else if (cl == Long.TYPE) {
sbuf.append('J');
} else if (cl == Float.TYPE) {
sbuf.append('F');
} else if (cl == Double.TYPE) {
sbuf.append('D');
} else if (cl == Short.TYPE) {
sbuf.append('S');
} else if (cl == Character.TYPE) {
sbuf.append('C');
} else if (cl == Boolean.TYPE) {
sbuf.append('Z');
} else if (cl == Void.TYPE) {
sbuf.append('V');
} else {
throw new InternalError();
}
} else {
sbuf.append('L' + cl.getName().replace('.', '/') + ';');
}
return sbuf.toString();
static String getClassSignature(Class<?> cl) {
if (cl.isPrimitive())
return getPrimitiveSignature(cl);
else
return appendClassSignature(new StringBuilder(), cl).toString();
}
private static StringBuilder appendClassSignature(StringBuilder sbuf, Class<?> cl) {
while (cl.isArray()) {
sbuf.append('[');
cl = cl.getComponentType();
}
if (cl.isPrimitive())
sbuf.append(getPrimitiveSignature(cl));
else
sbuf.append('L').append(cl.getName().replace('.', '/')).append(';');
return sbuf;
}
/**
* Returns JVM type signature for given list of parameters and return type.
*/
@ -1517,10 +1530,10 @@ public class ObjectStreamClass implements Serializable {
StringBuilder sbuf = new StringBuilder();
sbuf.append('(');
for (int i = 0; i < paramTypes.length; i++) {
sbuf.append(getClassSignature(paramTypes[i]));
appendClassSignature(sbuf, paramTypes[i]);
}
sbuf.append(')');
sbuf.append(getClassSignature(retType));
appendClassSignature(sbuf, retType);
return sbuf.toString();
}

View File

@ -91,7 +91,7 @@ public class ObjectStreamField
this.name = name;
this.type = type;
this.unshared = unshared;
signature = getClassSignature(type).intern();
signature = ObjectStreamClass.getClassSignature(type).intern();
field = null;
}
@ -137,7 +137,7 @@ public class ObjectStreamField
name = field.getName();
Class<?> ftype = field.getType();
type = (showType || ftype.isPrimitive()) ? ftype : Object.class;
signature = getClassSignature(ftype).intern();
signature = ObjectStreamClass.getClassSignature(ftype).intern();
}
/**
@ -286,41 +286,4 @@ public class ObjectStreamField
String getSignature() {
return signature;
}
/**
* Returns JVM type signature for given class.
*/
private static String getClassSignature(Class<?> cl) {
StringBuilder sbuf = new StringBuilder();
while (cl.isArray()) {
sbuf.append('[');
cl = cl.getComponentType();
}
if (cl.isPrimitive()) {
if (cl == Integer.TYPE) {
sbuf.append('I');
} else if (cl == Byte.TYPE) {
sbuf.append('B');
} else if (cl == Long.TYPE) {
sbuf.append('J');
} else if (cl == Float.TYPE) {
sbuf.append('F');
} else if (cl == Double.TYPE) {
sbuf.append('D');
} else if (cl == Short.TYPE) {
sbuf.append('S');
} else if (cl == Character.TYPE) {
sbuf.append('C');
} else if (cl == Boolean.TYPE) {
sbuf.append('Z');
} else if (cl == Void.TYPE) {
sbuf.append('V');
} else {
throw new InternalError();
}
} else {
sbuf.append('L' + cl.getName().replace('.', '/') + ';');
}
return sbuf.toString();
}
}

View File

@ -62,6 +62,12 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
private FileChannel channel = null;
private boolean rw;
/**
* The path of the referenced file
* (null if the stream is created with a file descriptor)
*/
private final String path;
private Object closeLock = new Object();
private volatile boolean closed = false;
@ -233,6 +239,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
}
fd = new FileDescriptor();
fd.attach(this);
path = name;
open(name, imode);
}
@ -272,7 +279,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
public final FileChannel getChannel() {
synchronized (this) {
if (channel == null) {
channel = FileChannelImpl.open(fd, true, rw, this);
channel = FileChannelImpl.open(fd, path, true, rw, this);
}
return channel;
}
@ -309,7 +316,11 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @exception IOException if an I/O error occurs. Not thrown if
* end-of-file has been reached.
*/
public native int read() throws IOException;
public int read() throws IOException {
return read0();
}
private native int read0() throws IOException;
/**
* Reads a sub array as a sequence of bytes.
@ -457,7 +468,11 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @param b the {@code byte} to be written.
* @exception IOException if an I/O error occurs.
*/
public native void write(int b) throws IOException;
public void write(int b) throws IOException {
write0(b);
}
private native void write0(int b) throws IOException;
/**
* Writes a sub array as a sequence of bytes.

View File

@ -60,7 +60,7 @@ final class SerialCallbackContext {
return desc;
}
private void checkAndSetUsed() throws NotActiveException {
public void checkAndSetUsed() throws NotActiveException {
if (thread != Thread.currentThread()) {
throw new NotActiveException(
"not in readObject invocation or fields already read");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2014, 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,6 @@
package java.lang;
import sun.misc.FloatingDecimal;
import sun.misc.FpUtils;
import sun.misc.DoubleConsts;
/**

View File

@ -2549,87 +2549,88 @@ public final class String
if (locale == null) {
throw new NullPointerException();
}
int firstUpper;
int first;
boolean hasSurr = false;
final int len = value.length;
/* Now check if there are any characters that need to be changed. */
scan: {
for (firstUpper = 0 ; firstUpper < len; ) {
char c = value[firstUpper];
if ((c >= Character.MIN_HIGH_SURROGATE)
&& (c <= Character.MAX_HIGH_SURROGATE)) {
int supplChar = codePointAt(firstUpper);
if (supplChar != Character.toLowerCase(supplChar)) {
break scan;
}
firstUpper += Character.charCount(supplChar);
} else {
if (c != Character.toLowerCase(c)) {
break scan;
}
firstUpper++;
}
// Now check if there are any characters that need to be changed, or are surrogate
for (first = 0 ; first < len; first++) {
int cp = (int)value[first];
if (Character.isSurrogate((char)cp)) {
hasSurr = true;
break;
}
if (cp != Character.toLowerCase(cp)) { // no need to check Character.ERROR
break;
}
return this;
}
if (first == len)
return this;
char[] result = new char[len];
int resultOffset = 0; /* result may grow, so i+resultOffset
* is the write location in result */
/* Just copy the first few lowerCase characters. */
System.arraycopy(value, 0, result, 0, firstUpper);
System.arraycopy(value, 0, result, 0, first); // Just copy the first few
// lowerCase characters.
String lang = locale.getLanguage();
boolean localeDependent =
(lang == "tr" || lang == "az" || lang == "lt");
char[] lowerCharArray;
int lowerChar;
int srcChar;
if (lang == "tr" || lang == "az" || lang == "lt") {
return toLowerCaseEx(result, first, locale, true);
}
if (hasSurr) {
return toLowerCaseEx(result, first, locale, false);
}
for (int i = first; i < len; i++) {
int cp = (int)value[i];
if (cp == '\u03A3') { // GREEK CAPITAL LETTER SIGMA
return toLowerCaseEx(result, i, locale, false);
}
cp = Character.toLowerCase(cp);
if (!Character.isBmpCodePoint(cp)) {
return toLowerCaseEx(result, i, locale, false);
}
result[i] = (char)cp;
}
return new String(result, true);
}
private String toLowerCaseEx(char[] result, int first, Locale locale, boolean localeDependent) {
int resultOffset = first;
int srcCount;
for (int i = firstUpper; i < len; i += srcCount) {
srcChar = (int)value[i];
if ((char)srcChar >= Character.MIN_HIGH_SURROGATE
&& (char)srcChar <= Character.MAX_HIGH_SURROGATE) {
for (int i = first; i < value.length; i += srcCount) {
int srcChar = (int)value[i];
int lowerChar;
char[] lowerCharArray;
srcCount = 1;
if (Character.isSurrogate((char)srcChar)) {
srcChar = codePointAt(i);
srcCount = Character.charCount(srcChar);
} else {
srcCount = 1;
}
if (localeDependent || srcChar == '\u03A3') { // GREEK CAPITAL LETTER SIGMA
lowerChar = ConditionalSpecialCasing.toLowerCaseEx(this, i, locale);
} else {
lowerChar = Character.toLowerCase(srcChar);
}
if ((lowerChar == Character.ERROR)
|| (lowerChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
if (Character.isBmpCodePoint(lowerChar)) { // Character.ERROR is not a bmp
result[resultOffset++] = (char)lowerChar;
} else {
if (lowerChar == Character.ERROR) {
lowerCharArray =
ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
lowerCharArray = ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
} else if (srcCount == 2) {
resultOffset += Character.toChars(lowerChar, result, i + resultOffset) - srcCount;
resultOffset += Character.toChars(lowerChar, result, resultOffset);
continue;
} else {
lowerCharArray = Character.toChars(lowerChar);
}
/* Grow result if needed */
int mapLen = lowerCharArray.length;
if (mapLen > srcCount) {
char[] result2 = new char[result.length + mapLen - srcCount];
System.arraycopy(result, 0, result2, 0, i + resultOffset);
System.arraycopy(result, 0, result2, 0, resultOffset);
result = result2;
}
for (int x = 0; x < mapLen; ++x) {
result[i + resultOffset + x] = lowerCharArray[x];
result[resultOffset++] = lowerCharArray[x];
}
resultOffset += (mapLen - srcCount);
} else {
result[i + resultOffset] = (char)lowerChar;
}
}
return new String(result, 0, len + resultOffset);
return new String(result, 0, resultOffset);
}
/**
@ -2707,92 +2708,91 @@ public final class String
if (locale == null) {
throw new NullPointerException();
}
int firstLower;
int first;
boolean hasSurr = false;
final int len = value.length;
/* Now check if there are any characters that need to be changed. */
scan: {
for (firstLower = 0 ; firstLower < len; ) {
int c = (int)value[firstLower];
int srcCount;
if ((c >= Character.MIN_HIGH_SURROGATE)
&& (c <= Character.MAX_HIGH_SURROGATE)) {
c = codePointAt(firstLower);
srcCount = Character.charCount(c);
} else {
srcCount = 1;
}
int upperCaseChar = Character.toUpperCaseEx(c);
if ((upperCaseChar == Character.ERROR)
|| (c != upperCaseChar)) {
break scan;
}
firstLower += srcCount;
// Now check if there are any characters that need to be changed, or are surrogate
for (first = 0 ; first < len; first++ ) {
int cp = (int)value[first];
if (Character.isSurrogate((char)cp)) {
hasSurr = true;
break;
}
if (cp != Character.toUpperCaseEx(cp)) { // no need to check Character.ERROR
break;
}
}
if (first == len) {
return this;
}
/* result may grow, so i+resultOffset is the write location in result */
int resultOffset = 0;
char[] result = new char[len]; /* may grow */
/* Just copy the first few upperCase characters. */
System.arraycopy(value, 0, result, 0, firstLower);
char[] result = new char[len];
System.arraycopy(value, 0, result, 0, first); // Just copy the first few
// upperCase characters.
String lang = locale.getLanguage();
boolean localeDependent =
(lang == "tr" || lang == "az" || lang == "lt");
char[] upperCharArray;
int upperChar;
int srcChar;
if (lang == "tr" || lang == "az" || lang == "lt") {
return toUpperCaseEx(result, first, locale, true);
}
if (hasSurr) {
return toUpperCaseEx(result, first, locale, false);
}
for (int i = first; i < len; i++) {
int cp = Character.toUpperCaseEx((int)value[i]);
if (!Character.isBmpCodePoint(cp)) { // Character.ERROR is not bmp
return toUpperCaseEx(result, i, locale, false);
}
result[i] = (char)cp;
}
return new String(result, true);
}
private String toUpperCaseEx(char[] result, int first, Locale locale,
boolean localeDependent) {
int resultOffset = first;
int srcCount;
for (int i = firstLower; i < len; i += srcCount) {
srcChar = (int)value[i];
if ((char)srcChar >= Character.MIN_HIGH_SURROGATE &&
(char)srcChar <= Character.MAX_HIGH_SURROGATE) {
for (int i = first; i < value.length; i += srcCount) {
int srcChar = (int)value[i];
int upperChar;
char[] upperCharArray;
srcCount = 1;
if (Character.isSurrogate((char)srcChar)) {
srcChar = codePointAt(i);
srcCount = Character.charCount(srcChar);
} else {
srcCount = 1;
}
if (localeDependent) {
upperChar = ConditionalSpecialCasing.toUpperCaseEx(this, i, locale);
} else {
upperChar = Character.toUpperCaseEx(srcChar);
}
if ((upperChar == Character.ERROR)
|| (upperChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
if (Character.isBmpCodePoint(upperChar)) {
result[resultOffset++] = (char)upperChar;
} else {
if (upperChar == Character.ERROR) {
if (localeDependent) {
upperCharArray =
ConditionalSpecialCasing.toUpperCaseCharArray(this, i, locale);
ConditionalSpecialCasing.toUpperCaseCharArray(this, i, locale);
} else {
upperCharArray = Character.toUpperCaseCharArray(srcChar);
}
} else if (srcCount == 2) {
resultOffset += Character.toChars(upperChar, result, i + resultOffset) - srcCount;
resultOffset += Character.toChars(upperChar, result, resultOffset);
continue;
} else {
upperCharArray = Character.toChars(upperChar);
}
/* Grow result if needed */
int mapLen = upperCharArray.length;
if (mapLen > srcCount) {
char[] result2 = new char[result.length + mapLen - srcCount];
System.arraycopy(result, 0, result2, 0, i + resultOffset);
System.arraycopy(result, 0, result2, 0, resultOffset);
result = result2;
}
for (int x = 0; x < mapLen; ++x) {
result[i + resultOffset + x] = upperCharArray[x];
}
resultOffset += (mapLen - srcCount);
} else {
result[i + resultOffset] = (char)upperChar;
}
for (int x = 0; x < mapLen; ++x) {
result[resultOffset++] = upperCharArray[x];
}
}
}
return new String(result, 0, len + resultOffset);
return new String(result, 0, resultOffset);
}
/**

View File

@ -226,6 +226,13 @@ import static sun.invoke.util.Wrapper.isWrapperType;
String.format("Invalid receiver type %s; not a subtype of implementation type %s",
receiverClass, implDefiningClass));
}
Class<?> implReceiverClass = implMethod.type().parameterType(0);
if (implReceiverClass != implDefiningClass && !implReceiverClass.isAssignableFrom(receiverClass)) {
throw new LambdaConversionException(
String.format("Invalid receiver type %s; not a subtype of implementation receiver type %s",
receiverClass, implReceiverClass));
}
} else {
// no receiver
capturedStart = 0;

View File

@ -31,8 +31,6 @@ import sun.invoke.util.*;
import sun.misc.Unsafe;
import static java.lang.invoke.MethodHandleStatics.*;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* A method handle is a typed, directly executable reference to an underlying method,

View File

@ -27,8 +27,6 @@ package java.lang.invoke;
import static java.lang.invoke.LambdaForm.*;
import static java.lang.invoke.MethodHandleNatives.Constants.*;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* A method handle whose behavior is determined only by its LambdaForm.

View File

@ -111,7 +111,7 @@ public abstract class Reference<T> {
* therefore critical that any code holding this lock complete as quickly
* as possible, allocate no new objects, and avoid calling user code.
*/
static private class Lock { };
static private class Lock { }
private static Lock lock = new Lock();
@ -126,6 +126,22 @@ public abstract class Reference<T> {
*/
private static class ReferenceHandler extends Thread {
private static void ensureClassInitialized(Class<?> clazz) {
try {
Class.forName(clazz.getName(), true, clazz.getClassLoader());
} catch (ClassNotFoundException e) {
throw (Error) new NoClassDefFoundError(e.getMessage()).initCause(e);
}
}
static {
// pre-load and initialize InterruptedException and Cleaner classes
// so that we don't get into trouble later in the run loop if there's
// memory shortage while loading/initializing them lazily.
ensureClassInitialized(InterruptedException.class);
ensureClassInitialized(Cleaner.class);
}
ReferenceHandler(ThreadGroup g, String name) {
super(g, name);
}
@ -133,37 +149,40 @@ public abstract class Reference<T> {
public void run() {
for (;;) {
Reference<Object> r;
synchronized (lock) {
if (pending != null) {
r = pending;
pending = r.discovered;
r.discovered = null;
} else {
// The waiting on the lock may cause an OOME because it may try to allocate
// exception objects, so also catch OOME here to avoid silent exit of the
// reference handler thread.
//
// Explicitly define the order of the two exceptions we catch here
// when waiting for the lock.
//
// We do not want to try to potentially load the InterruptedException class
// (which would be done if this was its first use, and InterruptedException
// were checked first) in this situation.
//
// This may lead to the VM not ever trying to load the InterruptedException
// class again.
try {
try {
lock.wait();
} catch (OutOfMemoryError x) { }
} catch (InterruptedException x) { }
continue;
Cleaner c;
try {
synchronized (lock) {
if (pending != null) {
r = pending;
// 'instanceof' might throw OutOfMemoryError sometimes
// so do this before un-linking 'r' from the 'pending' chain...
c = r instanceof Cleaner ? (Cleaner) r : null;
// unlink 'r' from 'pending' chain
pending = r.discovered;
r.discovered = null;
} else {
// The waiting on the lock may cause an OutOfMemoryError
// because it may try to allocate exception objects.
lock.wait();
continue;
}
}
} catch (OutOfMemoryError x) {
// Give other threads CPU time so they hopefully drop some live references
// and GC reclaims some space.
// Also prevent CPU intensive spinning in case 'r instanceof Cleaner' above
// persistently throws OOME for some time...
Thread.yield();
// retry
continue;
} catch (InterruptedException x) {
// retry
continue;
}
// Fast path for cleaners
if (r instanceof Cleaner) {
((Cleaner)r).clean();
if (c != null) {
c.clean();
continue;
}

View File

@ -235,13 +235,11 @@ public final class SocketPermission extends Permission
private static Debug debug = null;
private static boolean debugInit = false;
// ephemeral port range for this system
private static final int ephemeralLow = initEphemeralPorts(
"low", DEF_EPH_LOW
);
private static final int ephemeralHigh = initEphemeralPorts(
"high", PORT_MAX
);
// lazy initializer
private static class EphemeralRange {
static final int low = initEphemeralPorts("low", DEF_EPH_LOW);
static final int high = initEphemeralPorts("high", PORT_MAX);
};
static {
Boolean tmp = java.security.AccessController.doPrivileged(
@ -1235,6 +1233,9 @@ public final class SocketPermission extends Permission
int policyLow, int policyHigh, int targetLow, int targetHigh
)
{
final int ephemeralLow = EphemeralRange.low;
final int ephemeralHigh = EphemeralRange.high;
if (targetLow == 0) {
// check policy includes ephemeral range
if (!inRange(policyLow, policyHigh, ephemeralLow, ephemeralHigh)) {

View File

@ -104,7 +104,7 @@ import java.util.TimeZone;
* resolution clock if one is available.
*
* @implSpec
* This abstract class must be implemented with care to ensure other operate correctly.
* This abstract class must be implemented with care to ensure other classes operate correctly.
* All implementations that can be instantiated must be final, immutable and thread-safe.
* <p>
* The principal methods are defined to allow the throwing of an exception.

View File

@ -100,11 +100,6 @@ import java.util.Objects;
* This class models a single instantaneous point on the time-line.
* This might be used to record event time-stamps in the application.
* <p>
* For practicality, the instant is stored with some constraints.
* The measurable time-line is restricted to the number of seconds that can be held
* in a {@code long}. This is greater than the current estimated age of the universe.
* The instant is stored to nanosecond resolution.
* <p>
* The range of an instant requires the storage of a number larger than a {@code long}.
* To achieve this, the class stores a {@code long} representing epoch-seconds and an
* {@code int} representing nanosecond-of-second, which will always be between 0 and 999,999,999.

View File

@ -344,10 +344,7 @@ import java.util.Set;
* <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
* The nano-of-second value has nine digits, thus the count of pattern letters
* is from 1 to 9. If it is less than 9, then the nano-of-second value is
* truncated, with only the most significant digits being output. When parsing
* in strict mode, the number of parsed digits must match the count of pattern
* letters. When parsing in lenient mode, the number of parsed digits must be at
* least the count of pattern letters, up to 9 digits.
* truncated, with only the most significant digits being output.
* <p>
* <b>Year</b>: The count of letters determines the minimum field width below
* which padding is used. If the count of letters is two, then a

View File

@ -217,7 +217,7 @@ public interface TemporalAccessor {
default int get(TemporalField field) {
ValueRange range = range(field);
if (range.isIntValue() == false) {
throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead");
throw new UnsupportedTemporalTypeException("Invalid field " + field + " for get() method, use getLong() instead");
}
long value = getLong(field);
if (range.isValidValue(value) == false) {

View File

@ -50,7 +50,7 @@ import java.util.stream.StreamSupport;
* if the specified array reference is null, except where noted.
*
* <p>The documentation for the methods contained in this class includes
* briefs description of the <i>implementations</i>. Such descriptions should
* brief descriptions of the <i>implementations</i>. Such descriptions should
* be regarded as <i>implementation notes</i>, rather than parts of the
* <i>specification</i>. Implementors should feel free to substitute other
* algorithms, so long as the specification itself is adhered to. (For

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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
@ -235,7 +235,7 @@ public interface Comparator<T> {
* @see #thenComparing(Comparator)
* @since 1.8
*/
default <U extends Comparable<? super U>> Comparator<T> thenComparing(
default <U> Comparator<T> thenComparing(
Function<? super T, ? extends U> keyExtractor,
Comparator<? super U> keyComparator)
{

View File

@ -41,20 +41,20 @@ import sun.util.calendar.Gregorian;
import sun.util.calendar.ZoneInfo;
/**
* The class <code>Date</code> represents a specific instant
* The class {@code Date} represents a specific instant
* in time, with millisecond precision.
* <p>
* Prior to JDK&nbsp;1.1, the class <code>Date</code> had two additional
* Prior to JDK&nbsp;1.1, the class {@code Date} had two additional
* functions. It allowed the interpretation of dates as year, month, day, hour,
* minute, and second values. It also allowed the formatting and parsing
* of date strings. Unfortunately, the API for these functions was not
* amenable to internationalization. As of JDK&nbsp;1.1, the
* <code>Calendar</code> class should be used to convert between dates and time
* fields and the <code>DateFormat</code> class should be used to format and
* {@code Calendar} class should be used to convert between dates and time
* fields and the {@code DateFormat} class should be used to format and
* parse date strings.
* The corresponding methods in <code>Date</code> are deprecated.
* The corresponding methods in {@code Date} are deprecated.
* <p>
* Although the <code>Date</code> class is intended to reflect
* Although the {@code Date} class is intended to reflect
* coordinated universal time (UTC), it may not do so exactly,
* depending on the host environment of the Java Virtual Machine.
* Nearly all modern operating systems assume that 1&nbsp;day&nbsp;=
@ -93,12 +93,12 @@ import sun.util.calendar.ZoneInfo;
* <a href=http://tycho.usno.navy.mil/systime.html>http://tycho.usno.navy.mil/systime.html</a>
* </pre></blockquote>
* <p>
* In all methods of class <code>Date</code> that accept or return
* In all methods of class {@code Date} that accept or return
* year, month, date, hours, minutes, and seconds values, the
* following representations are used:
* <ul>
* <li>A year <i>y</i> is represented by the integer
* <i>y</i>&nbsp;<code>-&nbsp;1900</code>.
* <i>y</i>&nbsp;{@code - 1900}.
* <li>A month is represented by an integer from 0 to 11; 0 is January,
* 1 is February, and so forth; thus 11 is December.
* <li>A date (day of month) is represented by an integer from 1 to 31
@ -155,7 +155,7 @@ public class Date
private static final long serialVersionUID = 7523967970034938905L;
/**
* Allocates a <code>Date</code> object and initializes it so that
* Allocates a {@code Date} object and initializes it so that
* it represents the time at which it was allocated, measured to the
* nearest millisecond.
*
@ -166,7 +166,7 @@ public class Date
}
/**
* Allocates a <code>Date</code> object and initializes it to
* Allocates a {@code Date} object and initializes it to
* represent the specified number of milliseconds since the
* standard base time known as "the epoch", namely January 1,
* 1970, 00:00:00 GMT.
@ -179,18 +179,18 @@ public class Date
}
/**
* Allocates a <code>Date</code> object and initializes it so that
* Allocates a {@code Date} object and initializes it so that
* it represents midnight, local time, at the beginning of the day
* specified by the <code>year</code>, <code>month</code>, and
* <code>date</code> arguments.
* specified by the {@code year}, {@code month}, and
* {@code date} arguments.
*
* @param year the year minus 1900.
* @param month the month between 0-11.
* @param date the day of the month between 1-31.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(year + 1900, month, date)</code>
* or <code>GregorianCalendar(year + 1900, month, date)</code>.
* replaced by {@code Calendar.set(year + 1900, month, date)}
* or {@code GregorianCalendar(year + 1900, month, date)}.
*/
@Deprecated
public Date(int year, int month, int date) {
@ -198,10 +198,10 @@ public class Date
}
/**
* Allocates a <code>Date</code> object and initializes it so that
* Allocates a {@code Date} object and initializes it so that
* it represents the instant at the start of the minute specified by
* the <code>year</code>, <code>month</code>, <code>date</code>,
* <code>hrs</code>, and <code>min</code> arguments, in the local
* the {@code year}, {@code month}, {@code date},
* {@code hrs}, and {@code min} arguments, in the local
* time zone.
*
* @param year the year minus 1900.
@ -211,9 +211,8 @@ public class Date
* @param min the minutes between 0-59.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(year + 1900, month, date,
* hrs, min)</code> or <code>GregorianCalendar(year + 1900,
* month, date, hrs, min)</code>.
* replaced by {@code Calendar.set(year + 1900, month, date, hrs, min)}
* or {@code GregorianCalendar(year + 1900, month, date, hrs, min)}.
*/
@Deprecated
public Date(int year, int month, int date, int hrs, int min) {
@ -221,10 +220,10 @@ public class Date
}
/**
* Allocates a <code>Date</code> object and initializes it so that
* Allocates a {@code Date} object and initializes it so that
* it represents the instant at the start of the second specified
* by the <code>year</code>, <code>month</code>, <code>date</code>,
* <code>hrs</code>, <code>min</code>, and <code>sec</code> arguments,
* by the {@code year}, {@code month}, {@code date},
* {@code hrs}, {@code min}, and {@code sec} arguments,
* in the local time zone.
*
* @param year the year minus 1900.
@ -235,9 +234,8 @@ public class Date
* @param sec the seconds between 0-59.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(year + 1900, month, date,
* hrs, min, sec)</code> or <code>GregorianCalendar(year + 1900,
* month, date, hrs, min, sec)</code>.
* replaced by {@code Calendar.set(year + 1900, month, date, hrs, min, sec)}
* or {@code GregorianCalendar(year + 1900, month, date, hrs, min, sec)}.
*/
@Deprecated
public Date(int year, int month, int date, int hrs, int min, int sec) {
@ -258,16 +256,16 @@ public class Date
}
/**
* Allocates a <code>Date</code> object and initializes it so that
* Allocates a {@code Date} object and initializes it so that
* it represents the date and time indicated by the string
* <code>s</code>, which is interpreted as if by the
* {@code s}, which is interpreted as if by the
* {@link Date#parse} method.
*
* @param s a string representation of the date.
* @see java.text.DateFormat
* @see java.util.Date#parse(java.lang.String)
* @deprecated As of JDK version 1.1,
* replaced by <code>DateFormat.parse(String s)</code>.
* replaced by {@code DateFormat.parse(String s)}.
*/
@Deprecated
public Date(String s) {
@ -292,7 +290,7 @@ public class Date
* Determines the date and time based on the arguments. The
* arguments are interpreted as a year, month, day of the month,
* hour of the day, minute within the hour, and second within the
* minute, exactly as for the <tt>Date</tt> constructor with six
* minute, exactly as for the {@code Date} constructor with six
* arguments, except that the arguments are interpreted relative
* to UTC rather than to the local time zone. The time indicated is
* returned represented as the distance, measured in milliseconds,
@ -308,10 +306,9 @@ public class Date
* the date and time specified by the arguments.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(year + 1900, month, date,
* hrs, min, sec)</code> or <code>GregorianCalendar(year + 1900,
* month, date, hrs, min, sec)</code>, using a UTC
* <code>TimeZone</code>, followed by <code>Calendar.getTime().getTime()</code>.
* replaced by {@code Calendar.set(year + 1900, month, date, hrs, min, sec)}
* or {@code GregorianCalendar(year + 1900, month, date, hrs, min, sec)}, using a UTC
* {@code TimeZone}, followed by {@code Calendar.getTime().getTime()}.
*/
@Deprecated
public static long UTC(int year, int month, int date,
@ -338,12 +335,12 @@ public class Date
}
/**
* Attempts to interpret the string <tt>s</tt> as a representation
* Attempts to interpret the string {@code s} as a representation
* of a date and time. If the attempt is successful, the time
* indicated is returned represented as the distance, measured in
* milliseconds, of that time from the epoch (00:00:00 GMT on
* January 1, 1970). If the attempt fails, an
* <tt>IllegalArgumentException</tt> is thrown.
* {@code IllegalArgumentException} is thrown.
* <p>
* It accepts many syntaxes; in particular, it recognizes the IETF
* standard date syntax: "Sat, 12 Aug 1995 13:30:00 GMT". It also
@ -353,11 +350,11 @@ public class Date
* meridian). If no time zone is specified, the local time zone is
* assumed. GMT and UTC are considered equivalent.
* <p>
* The string <tt>s</tt> is processed from left to right, looking for
* data of interest. Any material in <tt>s</tt> that is within the
* ASCII parenthesis characters <tt>(</tt> and <tt>)</tt> is ignored.
* The string {@code s} is processed from left to right, looking for
* data of interest. Any material in {@code s} that is within the
* ASCII parenthesis characters {@code (} and {@code )} is ignored.
* Parentheses may be nested. Otherwise, the only characters permitted
* within <tt>s</tt> are these ASCII characters:
* within {@code s} are these ASCII characters:
* <blockquote><pre>
* abcdefghijklmnopqrstuvwxyz
* ABCDEFGHIJKLMNOPQRSTUVWXYZ
@ -365,18 +362,18 @@ public class Date
* and whitespace characters.<p>
* A consecutive sequence of decimal digits is treated as a decimal
* number:<ul>
* <li>If a number is preceded by <tt>+</tt> or <tt>-</tt> and a year
* <li>If a number is preceded by {@code +} or {@code -} and a year
* has already been recognized, then the number is a time-zone
* offset. If the number is less than 24, it is an offset measured
* in hours. Otherwise, it is regarded as an offset in minutes,
* expressed in 24-hour time format without punctuation. A
* preceding <tt>-</tt> means a westward offset. Time zone offsets
* preceding {@code -} means a westward offset. Time zone offsets
* are always relative to UTC (Greenwich). Thus, for example,
* <tt>-5</tt> occurring in the string would mean "five hours west
* of Greenwich" and <tt>+0430</tt> would mean "four hours and
* {@code -5} occurring in the string would mean "five hours west
* of Greenwich" and {@code +0430} would mean "four hours and
* thirty minutes east of Greenwich." It is permitted for the
* string to specify <tt>GMT</tt>, <tt>UT</tt>, or <tt>UTC</tt>
* redundantly-for example, <tt>GMT-5</tt> or <tt>utc+0430</tt>.
* string to specify {@code GMT}, {@code UT}, or {@code UTC}
* redundantly-for example, {@code GMT-5} or {@code utc+0430}.
* <li>The number is regarded as a year number if one of the
* following conditions is true:
* <ul>
@ -399,8 +396,8 @@ public class Date
* unless an hour has already been recognized, in which case it is
* regarded as a minute.
* <li>If the number is followed by a slash, it is regarded as a month
* (it is decreased by 1 to produce a number in the range <tt>0</tt>
* to <tt>11</tt>), unless a month has already been recognized, in
* (it is decreased by 1 to produce a number in the range {@code 0}
* to {@code 11}), unless a month has already been recognized, in
* which case it is regarded as a day of the month.
* <li>If the number is followed by whitespace, a comma, a hyphen, or
* end of string, then if an hour has been recognized but not a
@ -409,31 +406,31 @@ public class Date
* otherwise, it is regarded as a day of the month. </ul><p>
* A consecutive sequence of letters is regarded as a word and treated
* as follows:<ul>
* <li>A word that matches <tt>AM</tt>, ignoring case, is ignored (but
* <li>A word that matches {@code AM}, ignoring case, is ignored (but
* the parse fails if an hour has not been recognized or is less
* than <tt>1</tt> or greater than <tt>12</tt>).
* <li>A word that matches <tt>PM</tt>, ignoring case, adds <tt>12</tt>
* than {@code 1} or greater than {@code 12}).
* <li>A word that matches {@code PM}, ignoring case, adds {@code 12}
* to the hour (but the parse fails if an hour has not been
* recognized or is less than <tt>1</tt> or greater than <tt>12</tt>).
* <li>Any word that matches any prefix of <tt>SUNDAY, MONDAY, TUESDAY,
* WEDNESDAY, THURSDAY, FRIDAY</tt>, or <tt>SATURDAY</tt>, ignoring
* case, is ignored. For example, <tt>sat, Friday, TUE</tt>, and
* <tt>Thurs</tt> are ignored.
* <li>Otherwise, any word that matches any prefix of <tt>JANUARY,
* recognized or is less than {@code 1} or greater than {@code 12}).
* <li>Any word that matches any prefix of {@code SUNDAY, MONDAY, TUESDAY,
* WEDNESDAY, THURSDAY, FRIDAY}, or {@code SATURDAY}, ignoring
* case, is ignored. For example, {@code sat, Friday, TUE}, and
* {@code Thurs} are ignored.
* <li>Otherwise, any word that matches any prefix of {@code JANUARY,
* FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER,
* OCTOBER, NOVEMBER</tt>, or <tt>DECEMBER</tt>, ignoring case, and
* OCTOBER, NOVEMBER}, or {@code DECEMBER}, ignoring case, and
* considering them in the order given here, is recognized as
* specifying a month and is converted to a number (<tt>0</tt> to
* <tt>11</tt>). For example, <tt>aug, Sept, april</tt>, and
* <tt>NOV</tt> are recognized as months. So is <tt>Ma</tt>, which
* is recognized as <tt>MARCH</tt>, not <tt>MAY</tt>.
* <li>Any word that matches <tt>GMT, UT</tt>, or <tt>UTC</tt>, ignoring
* specifying a month and is converted to a number ({@code 0} to
* {@code 11}). For example, {@code aug, Sept, april}, and
* {@code NOV} are recognized as months. So is {@code Ma}, which
* is recognized as {@code MARCH}, not {@code MAY}.
* <li>Any word that matches {@code GMT, UT}, or {@code UTC}, ignoring
* case, is treated as referring to UTC.
* <li>Any word that matches <tt>EST, CST, MST</tt>, or <tt>PST</tt>,
* <li>Any word that matches {@code EST, CST, MST}, or {@code PST},
* ignoring case, is recognized as referring to the time zone in
* North America that is five, six, seven, or eight hours west of
* Greenwich, respectively. Any word that matches <tt>EDT, CDT,
* MDT</tt>, or <tt>PDT</tt>, ignoring case, is recognized as
* Greenwich, respectively. Any word that matches {@code EDT, CDT,
* MDT}, or {@code PDT}, ignoring case, is recognized as
* referring to the same time zone, respectively, during daylight
* saving time.</ul><p>
* Once the entire string s has been scanned, it is converted to a time
@ -448,7 +445,7 @@ public class Date
* represented by the string argument.
* @see java.text.DateFormat
* @deprecated As of JDK version 1.1,
* replaced by <code>DateFormat.parse(String s)</code>.
* replaced by {@code DateFormat.parse(String s)}.
*/
@Deprecated
public static long parse(String s) {
@ -638,13 +635,13 @@ public class Date
/**
* Returns a value that is the result of subtracting 1900 from the
* year that contains or begins with the instant in time represented
* by this <code>Date</code> object, as interpreted in the local
* by this {@code Date} object, as interpreted in the local
* time zone.
*
* @return the year represented by this date, minus 1900.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.get(Calendar.YEAR) - 1900</code>.
* replaced by {@code Calendar.get(Calendar.YEAR) - 1900}.
*/
@Deprecated
public int getYear() {
@ -652,8 +649,8 @@ public class Date
}
/**
* Sets the year of this <tt>Date</tt> object to be the specified
* value plus 1900. This <code>Date</code> object is modified so
* Sets the year of this {@code Date} object to be the specified
* value plus 1900. This {@code Date} object is modified so
* that it represents a point in time within the specified year,
* with the month, date, hour, minute, and second the same as
* before, as interpreted in the local time zone. (Of course, if
@ -664,7 +661,7 @@ public class Date
* @param year the year value.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(Calendar.YEAR, year + 1900)</code>.
* replaced by {@code Calendar.set(Calendar.YEAR, year + 1900)}.
*/
@Deprecated
public void setYear(int year) {
@ -673,14 +670,14 @@ public class Date
/**
* Returns a number representing the month that contains or begins
* with the instant in time represented by this <tt>Date</tt> object.
* The value returned is between <code>0</code> and <code>11</code>,
* with the value <code>0</code> representing January.
* with the instant in time represented by this {@code Date} object.
* The value returned is between {@code 0} and {@code 11},
* with the value {@code 0} representing January.
*
* @return the month represented by this date.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.get(Calendar.MONTH)</code>.
* replaced by {@code Calendar.get(Calendar.MONTH)}.
*/
@Deprecated
public int getMonth() {
@ -689,7 +686,7 @@ public class Date
/**
* Sets the month of this date to the specified value. This
* <tt>Date</tt> object is modified so that it represents a point
* {@code Date} object is modified so that it represents a point
* in time within the specified month, with the year, date, hour,
* minute, and second the same as before, as interpreted in the
* local time zone. If the date was October 31, for example, and
@ -699,7 +696,7 @@ public class Date
* @param month the month value between 0-11.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(Calendar.MONTH, int month)</code>.
* replaced by {@code Calendar.set(Calendar.MONTH, int month)}.
*/
@Deprecated
public void setMonth(int month) {
@ -719,16 +716,16 @@ public class Date
}
/**
* Returns the day of the month represented by this <tt>Date</tt> object.
* The value returned is between <code>1</code> and <code>31</code>
* Returns the day of the month represented by this {@code Date} object.
* The value returned is between {@code 1} and {@code 31}
* representing the day of the month that contains or begins with the
* instant in time represented by this <tt>Date</tt> object, as
* instant in time represented by this {@code Date} object, as
* interpreted in the local time zone.
*
* @return the day of the month represented by this date.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.get(Calendar.DAY_OF_MONTH)</code>.
* replaced by {@code Calendar.get(Calendar.DAY_OF_MONTH)}.
* @deprecated
*/
@Deprecated
@ -737,8 +734,8 @@ public class Date
}
/**
* Sets the day of the month of this <tt>Date</tt> object to the
* specified value. This <tt>Date</tt> object is modified so that
* Sets the day of the month of this {@code Date} object to the
* specified value. This {@code Date} object is modified so that
* it represents a point in time within the specified day of the
* month, with the year, month, hour, minute, and second the same
* as before, as interpreted in the local time zone. If the date
@ -749,7 +746,7 @@ public class Date
* @param date the day of the month value between 1-31.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(Calendar.DAY_OF_MONTH, int date)</code>.
* replaced by {@code Calendar.set(Calendar.DAY_OF_MONTH, int date)}.
*/
@Deprecated
public void setDate(int date) {
@ -758,17 +755,17 @@ public class Date
/**
* Returns the day of the week represented by this date. The
* returned value (<tt>0</tt> = Sunday, <tt>1</tt> = Monday,
* <tt>2</tt> = Tuesday, <tt>3</tt> = Wednesday, <tt>4</tt> =
* Thursday, <tt>5</tt> = Friday, <tt>6</tt> = Saturday)
* returned value ({@code 0} = Sunday, {@code 1} = Monday,
* {@code 2} = Tuesday, {@code 3} = Wednesday, {@code 4} =
* Thursday, {@code 5} = Friday, {@code 6} = Saturday)
* represents the day of the week that contains or begins with
* the instant in time represented by this <tt>Date</tt> object,
* the instant in time represented by this {@code Date} object,
* as interpreted in the local time zone.
*
* @return the day of the week represented by this date.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.get(Calendar.DAY_OF_WEEK)</code>.
* replaced by {@code Calendar.get(Calendar.DAY_OF_WEEK)}.
*/
@Deprecated
public int getDay() {
@ -776,16 +773,16 @@ public class Date
}
/**
* Returns the hour represented by this <tt>Date</tt> object. The
* returned value is a number (<tt>0</tt> through <tt>23</tt>)
* Returns the hour represented by this {@code Date} object. The
* returned value is a number ({@code 0} through {@code 23})
* representing the hour within the day that contains or begins
* with the instant in time represented by this <tt>Date</tt>
* with the instant in time represented by this {@code Date}
* object, as interpreted in the local time zone.
*
* @return the hour represented by this date.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.get(Calendar.HOUR_OF_DAY)</code>.
* replaced by {@code Calendar.get(Calendar.HOUR_OF_DAY)}.
*/
@Deprecated
public int getHours() {
@ -793,8 +790,8 @@ public class Date
}
/**
* Sets the hour of this <tt>Date</tt> object to the specified value.
* This <tt>Date</tt> object is modified so that it represents a point
* Sets the hour of this {@code Date} object to the specified value.
* This {@code Date} object is modified so that it represents a point
* in time within the specified hour of the day, with the year, month,
* date, minute, and second the same as before, as interpreted in the
* local time zone.
@ -802,7 +799,7 @@ public class Date
* @param hours the hour value.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(Calendar.HOUR_OF_DAY, int hours)</code>.
* replaced by {@code Calendar.set(Calendar.HOUR_OF_DAY, int hours)}.
*/
@Deprecated
public void setHours(int hours) {
@ -812,12 +809,12 @@ public class Date
/**
* Returns the number of minutes past the hour represented by this date,
* as interpreted in the local time zone.
* The value returned is between <code>0</code> and <code>59</code>.
* The value returned is between {@code 0} and {@code 59}.
*
* @return the number of minutes past the hour represented by this date.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.get(Calendar.MINUTE)</code>.
* replaced by {@code Calendar.get(Calendar.MINUTE)}.
*/
@Deprecated
public int getMinutes() {
@ -825,8 +822,8 @@ public class Date
}
/**
* Sets the minutes of this <tt>Date</tt> object to the specified value.
* This <tt>Date</tt> object is modified so that it represents a point
* Sets the minutes of this {@code Date} object to the specified value.
* This {@code Date} object is modified so that it represents a point
* in time within the specified minute of the hour, with the year, month,
* date, hour, and second the same as before, as interpreted in the
* local time zone.
@ -834,7 +831,7 @@ public class Date
* @param minutes the value of the minutes.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(Calendar.MINUTE, int minutes)</code>.
* replaced by {@code Calendar.set(Calendar.MINUTE, int minutes)}.
*/
@Deprecated
public void setMinutes(int minutes) {
@ -843,14 +840,14 @@ public class Date
/**
* Returns the number of seconds past the minute represented by this date.
* The value returned is between <code>0</code> and <code>61</code>. The
* values <code>60</code> and <code>61</code> can only occur on those
* The value returned is between {@code 0} and {@code 61}. The
* values {@code 60} and {@code 61} can only occur on those
* Java Virtual Machines that take leap seconds into account.
*
* @return the number of seconds past the minute represented by this date.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.get(Calendar.SECOND)</code>.
* replaced by {@code Calendar.get(Calendar.SECOND)}.
*/
@Deprecated
public int getSeconds() {
@ -858,8 +855,8 @@ public class Date
}
/**
* Sets the seconds of this <tt>Date</tt> to the specified value.
* This <tt>Date</tt> object is modified so that it represents a
* Sets the seconds of this {@code Date} to the specified value.
* This {@code Date} object is modified so that it represents a
* point in time within the specified second of the minute, with
* the year, month, date, hour, and minute the same as before, as
* interpreted in the local time zone.
@ -867,7 +864,7 @@ public class Date
* @param seconds the seconds value.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(Calendar.SECOND, int seconds)</code>.
* replaced by {@code Calendar.set(Calendar.SECOND, int seconds)}.
*/
@Deprecated
public void setSeconds(int seconds) {
@ -876,7 +873,7 @@ public class Date
/**
* Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT
* represented by this <tt>Date</tt> object.
* represented by this {@code Date} object.
*
* @return the number of milliseconds since January 1, 1970, 00:00:00 GMT
* represented by this date.
@ -893,8 +890,8 @@ public class Date
}
/**
* Sets this <code>Date</code> object to represent a point in time that is
* <code>time</code> milliseconds after January 1, 1970 00:00:00 GMT.
* Sets this {@code Date} object to represent a point in time that is
* {@code time} milliseconds after January 1, 1970 00:00:00 GMT.
*
* @param time the number of milliseconds.
*/
@ -907,11 +904,11 @@ public class Date
* Tests if this date is before the specified date.
*
* @param when a date.
* @return <code>true</code> if and only if the instant of time
* represented by this <tt>Date</tt> object is strictly
* earlier than the instant represented by <tt>when</tt>;
* <code>false</code> otherwise.
* @exception NullPointerException if <code>when</code> is null.
* @return {@code true} if and only if the instant of time
* represented by this {@code Date} object is strictly
* earlier than the instant represented by {@code when};
* {@code false} otherwise.
* @exception NullPointerException if {@code when} is null.
*/
public boolean before(Date when) {
return getMillisOf(this) < getMillisOf(when);
@ -921,11 +918,11 @@ public class Date
* Tests if this date is after the specified date.
*
* @param when a date.
* @return <code>true</code> if and only if the instant represented
* by this <tt>Date</tt> object is strictly later than the
* instant represented by <tt>when</tt>;
* <code>false</code> otherwise.
* @exception NullPointerException if <code>when</code> is null.
* @return {@code true} if and only if the instant represented
* by this {@code Date} object is strictly later than the
* instant represented by {@code when};
* {@code false} otherwise.
* @exception NullPointerException if {@code when} is null.
*/
public boolean after(Date when) {
return getMillisOf(this) > getMillisOf(when);
@ -933,17 +930,17 @@ public class Date
/**
* Compares two dates for equality.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> and is a <code>Date</code> object that
* The result is {@code true} if and only if the argument is
* not {@code null} and is a {@code Date} object that
* represents the same point in time, to the millisecond, as this object.
* <p>
* Thus, two <code>Date</code> objects are equal if and only if the
* <code>getTime</code> method returns the same <code>long</code>
* Thus, two {@code Date} objects are equal if and only if the
* {@code getTime} method returns the same {@code long}
* value for both.
*
* @param obj the object to compare with.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.util.Date#getTime()
*/
public boolean equals(Object obj) {
@ -951,7 +948,7 @@ public class Date
}
/**
* Returns the millisecond value of this <code>Date</code> object
* Returns the millisecond value of this {@code Date} object
* without affecting its internal state.
*/
static final long getMillisOf(Date date) {
@ -965,13 +962,13 @@ public class Date
/**
* Compares two Dates for ordering.
*
* @param anotherDate the <code>Date</code> to be compared.
* @return the value <code>0</code> if the argument Date is equal to
* this Date; a value less than <code>0</code> if this Date
* @param anotherDate the {@code Date} to be compared.
* @return the value {@code 0} if the argument Date is equal to
* this Date; a value less than {@code 0} if this Date
* is before the Date argument; and a value greater than
* <code>0</code> if this Date is after the Date argument.
* {@code 0} if this Date is after the Date argument.
* @since 1.2
* @exception NullPointerException if <code>anotherDate</code> is null.
* @exception NullPointerException if {@code anotherDate} is null.
*/
public int compareTo(Date anotherDate) {
long thisTime = getMillisOf(this);
@ -981,7 +978,7 @@ public class Date
/**
* Returns a hash code value for this object. The result is the
* exclusive OR of the two halves of the primitive <tt>long</tt>
* exclusive OR of the two halves of the primitive {@code long}
* value returned by the {@link Date#getTime}
* method. That is, the hash code is the value of the expression:
* <blockquote><pre>{@code
@ -996,29 +993,29 @@ public class Date
}
/**
* Converts this <code>Date</code> object to a <code>String</code>
* Converts this {@code Date} object to a {@code String}
* of the form:
* <blockquote><pre>
* dow mon dd hh:mm:ss zzz yyyy</pre></blockquote>
* where:<ul>
* <li><tt>dow</tt> is the day of the week (<tt>Sun, Mon, Tue, Wed,
* Thu, Fri, Sat</tt>).
* <li><tt>mon</tt> is the month (<tt>Jan, Feb, Mar, Apr, May, Jun,
* Jul, Aug, Sep, Oct, Nov, Dec</tt>).
* <li><tt>dd</tt> is the day of the month (<tt>01</tt> through
* <tt>31</tt>), as two decimal digits.
* <li><tt>hh</tt> is the hour of the day (<tt>00</tt> through
* <tt>23</tt>), as two decimal digits.
* <li><tt>mm</tt> is the minute within the hour (<tt>00</tt> through
* <tt>59</tt>), as two decimal digits.
* <li><tt>ss</tt> is the second within the minute (<tt>00</tt> through
* <tt>61</tt>, as two decimal digits.
* <li><tt>zzz</tt> is the time zone (and may reflect daylight saving
* <li>{@code dow} is the day of the week ({@code Sun, Mon, Tue, Wed,
* Thu, Fri, Sat}).
* <li>{@code mon} is the month ({@code Jan, Feb, Mar, Apr, May, Jun,
* Jul, Aug, Sep, Oct, Nov, Dec}).
* <li>{@code dd} is the day of the month ({@code 01} through
* {@code 31}), as two decimal digits.
* <li>{@code hh} is the hour of the day ({@code 00} through
* {@code 23}), as two decimal digits.
* <li>{@code mm} is the minute within the hour ({@code 00} through
* {@code 59}), as two decimal digits.
* <li>{@code ss} is the second within the minute ({@code 00} through
* {@code 61}, as two decimal digits.
* <li>{@code zzz} is the time zone (and may reflect daylight saving
* time). Standard time zone abbreviations include those
* recognized by the method <tt>parse</tt>. If time zone
* information is not available, then <tt>zzz</tt> is empty -
* recognized by the method {@code parse}. If time zone
* information is not available, then {@code zzz} is empty -
* that is, it consists of no characters at all.
* <li><tt>yyyy</tt> is the year, as four decimal digits.
* <li>{@code yyyy} is the year, as four decimal digits.
* </ul>
*
* @return a string representation of this date.
@ -1053,7 +1050,7 @@ public class Date
/**
* Converts the given name to its 3-letter abbreviation (e.g.,
* "monday" -> "Mon") and stored the abbreviation in the given
* <code>StringBuilder</code>.
* {@code StringBuilder}.
*/
private static final StringBuilder convertToAbbr(StringBuilder sb, String name) {
sb.append(Character.toUpperCase(name.charAt(0)));
@ -1062,11 +1059,11 @@ public class Date
}
/**
* Creates a string representation of this <tt>Date</tt> object in an
* Creates a string representation of this {@code Date} object in an
* implementation-dependent form. The intent is that the form should
* be familiar to the user of the Java application, wherever it may
* happen to be running. The intent is comparable to that of the
* "<code>%c</code>" format supported by the <code>strftime()</code>
* "{@code %c}" format supported by the {@code strftime()}
* function of ISO&nbsp;C.
*
* @return a string representation of this date, using the locale
@ -1075,7 +1072,7 @@ public class Date
* @see java.util.Date#toString()
* @see java.util.Date#toGMTString()
* @deprecated As of JDK version 1.1,
* replaced by <code>DateFormat.format(Date date)</code>.
* replaced by {@code DateFormat.format(Date date)}.
*/
@Deprecated
public String toLocaleString() {
@ -1084,23 +1081,23 @@ public class Date
}
/**
* Creates a string representation of this <tt>Date</tt> object of
* Creates a string representation of this {@code Date} object of
* the form:
* <blockquote><pre>
* d mon yyyy hh:mm:ss GMT</pre></blockquote>
* where:<ul>
* <li><i>d</i> is the day of the month (<tt>1</tt> through <tt>31</tt>),
* <li><i>d</i> is the day of the month ({@code 1} through {@code 31}),
* as one or two decimal digits.
* <li><i>mon</i> is the month (<tt>Jan, Feb, Mar, Apr, May, Jun, Jul,
* Aug, Sep, Oct, Nov, Dec</tt>).
* <li><i>mon</i> is the month ({@code Jan, Feb, Mar, Apr, May, Jun, Jul,
* Aug, Sep, Oct, Nov, Dec}).
* <li><i>yyyy</i> is the year, as four decimal digits.
* <li><i>hh</i> is the hour of the day (<tt>00</tt> through <tt>23</tt>),
* <li><i>hh</i> is the hour of the day ({@code 00} through {@code 23}),
* as two decimal digits.
* <li><i>mm</i> is the minute within the hour (<tt>00</tt> through
* <tt>59</tt>), as two decimal digits.
* <li><i>ss</i> is the second within the minute (<tt>00</tt> through
* <tt>61</tt>), as two decimal digits.
* <li><i>GMT</i> is exactly the ASCII letters "<tt>GMT</tt>" to indicate
* <li><i>mm</i> is the minute within the hour ({@code 00} through
* {@code 59}), as two decimal digits.
* <li><i>ss</i> is the second within the minute ({@code 00} through
* {@code 61}), as two decimal digits.
* <li><i>GMT</i> is exactly the ASCII letters "{@code GMT}" to indicate
* Greenwich Mean Time.
* </ul><p>
* The result does not depend on the local time zone.
@ -1111,8 +1108,8 @@ public class Date
* @see java.util.Date#toString()
* @see java.util.Date#toLocaleString()
* @deprecated As of JDK version 1.1,
* replaced by <code>DateFormat.format(Date date)</code>, using a
* GMT <code>TimeZone</code>.
* replaced by {@code DateFormat.format(Date date)}, using a
* GMT {@code TimeZone}.
*/
@Deprecated
public String toGMTString() {
@ -1135,7 +1132,7 @@ public class Date
/**
* Returns the offset, measured in minutes, for the local time zone
* relative to UTC that is appropriate for the time represented by
* this <code>Date</code> object.
* this {@code Date} object.
* <p>
* For example, in Massachusetts, five time zones west of Greenwich:
* <blockquote><pre>
@ -1161,8 +1158,8 @@ public class Date
* @see java.util.Calendar#DST_OFFSET
* @see java.util.TimeZone#getDefault
* @deprecated As of JDK version 1.1,
* replaced by <code>-(Calendar.get(Calendar.ZONE_OFFSET) +
* Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000)</code>.
* replaced by {@code -(Calendar.get(Calendar.ZONE_OFFSET) +
* Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000)}.
*/
@Deprecated
public int getTimezoneOffset() {
@ -1313,7 +1310,7 @@ public class Date
/**
* Save the state of this object to a stream (i.e., serialize it).
*
* @serialData The value returned by <code>getTime()</code>
* @serialData The value returned by {@code getTime()}
* is emitted (long). This represents the offset from
* January 1, 1970, 00:00:00 GMT in milliseconds.
*/
@ -1336,7 +1333,7 @@ public class Date
* Obtains an instance of {@code Date} from an {@code Instant} object.
* <p>
* {@code Instant} uses a precision of nanoseconds, whereas {@code Date}
* uses a precision of milliseconds. The conversion will trancate any
* uses a precision of milliseconds. The conversion will truncate any
* excess precision information as though the amount in nanoseconds was
* subject to integer division by one million.
* <p>

View File

@ -1400,7 +1400,7 @@ public class CopyOnWriteArrayList<E>
lock.lock();
try {
checkForComodification();
if (fromIndex < 0 || toIndex > size)
if (fromIndex < 0 || toIndex > size || fromIndex > toIndex)
throw new IndexOutOfBoundsException();
return new COWSubList<E>(l, fromIndex + offset,
toIndex + offset);

View File

@ -535,7 +535,7 @@ public class FileHandler extends StreamHandler {
continue;
} else if (ch2 == 'h') {
file = new File(System.getProperty("user.home"));
if (isSetUID()) {
if (sun.misc.VM.isSetUID()) {
// Ok, we are in a set UID program. For safety's sake
// we disallow attempts to open files relative to %h.
throw new IOException("can't use %h in set UID program");
@ -669,9 +669,4 @@ public class FileHandler extends StreamHandler {
lastException = ex;
}
}
/**
* check if we are in a set UID program.
*/
private static native boolean isSetUID();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, 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
@ -40,6 +40,7 @@ import java.io.IOException;
*
*/
public class IIOException extends IOException {
private static final long serialVersionUID = -3216210718638985251L;
/**
* Constructs an <code>IIOException</code> with a given message

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, 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,6 +44,7 @@ import org.w3c.dom.Node;
*
*/
public class IIOInvalidTreeException extends IIOException {
private static final long serialVersionUID = -1314083172544132777L;
/**
* The <code>Node</code> that led to the parsing error, or

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, 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
@ -41,6 +41,7 @@ import org.w3c.dom.UserDataHandler;
class IIODOMException extends DOMException {
private static final long serialVersionUID = -4369510142067447468L;
public IIODOMException(short code, String message) {
super(code, message);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, 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
@ -40,6 +40,7 @@ import java.util.Set;
*
*/
class DigraphNode implements Cloneable, Serializable {
private static final long serialVersionUID = 5308261378582246841L;
/** The data associated with this node. */
protected Object data;

View File

@ -123,15 +123,6 @@ public class ServiceRegistry {
}
}
// The following two methods expose functionality from
// sun.misc.Service. If that class is made public, they may be
// removed.
//
// The sun.misc.ServiceConfigurationError class may also be
// exposed, in which case the references to 'an
// <code>Error</code>' below should be changed to 'a
// <code>ServiceConfigurationError</code>'.
/**
* Searches for implementations of a particular service class
* using the given class loader.

View File

@ -1045,6 +1045,7 @@ public class DocFlavor implements Serializable, Cloneable {
* @author Alan Kaminsky
*/
public static class URL extends DocFlavor {
private static final long serialVersionUID = 2936725788144902062L;
/**
* Constructs a new doc flavor with the given MIME type and a print

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, 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,7 +33,7 @@ package javax.print;
*
*/
public class PrintException extends Exception {
private static final long serialVersionUID = -5932531546705242471L;
/**
* Construct a print exception with no detail message.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, 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
@ -77,6 +77,7 @@ public final class AttributeSetUtilities {
*/
private static class UnmodifiableAttributeSet
implements AttributeSet, Serializable {
private static final long serialVersionUID = -6131802583863447813L;
private AttributeSet attrset;
@ -147,6 +148,7 @@ public final class AttributeSetUtilities {
private static class UnmodifiableDocAttributeSet
extends UnmodifiableAttributeSet
implements DocAttributeSet, Serializable {
private static final long serialVersionUID = -6349408326066898956L;
public UnmodifiableDocAttributeSet(DocAttributeSet attributeSet) {
@ -161,6 +163,7 @@ public final class AttributeSetUtilities {
extends UnmodifiableAttributeSet
implements PrintRequestAttributeSet, Serializable
{
private static final long serialVersionUID = 7799373532614825073L;
public UnmodifiablePrintRequestAttributeSet
(PrintRequestAttributeSet attributeSet) {
@ -175,6 +178,7 @@ public final class AttributeSetUtilities {
extends UnmodifiableAttributeSet
implements PrintJobAttributeSet, Serializable
{
private static final long serialVersionUID = -8002245296274522112L;
public UnmodifiablePrintJobAttributeSet
(PrintJobAttributeSet attributeSet) {
@ -189,6 +193,7 @@ public final class AttributeSetUtilities {
extends UnmodifiableAttributeSet
implements PrintServiceAttributeSet, Serializable
{
private static final long serialVersionUID = -7112165137107826819L;
public UnmodifiablePrintServiceAttributeSet
(PrintServiceAttributeSet attributeSet) {
@ -291,6 +296,7 @@ public final class AttributeSetUtilities {
*/
private static class SynchronizedAttributeSet
implements AttributeSet, Serializable {
private static final long serialVersionUID = 8365731020128564925L;
private AttributeSet attrset;
@ -357,6 +363,7 @@ public final class AttributeSetUtilities {
private static class SynchronizedDocAttributeSet
extends SynchronizedAttributeSet
implements DocAttributeSet, Serializable {
private static final long serialVersionUID = 6455869095246629354L;
public SynchronizedDocAttributeSet(DocAttributeSet attributeSet) {
super(attributeSet);
@ -369,6 +376,7 @@ public final class AttributeSetUtilities {
private static class SynchronizedPrintRequestAttributeSet
extends SynchronizedAttributeSet
implements PrintRequestAttributeSet, Serializable {
private static final long serialVersionUID = 5671237023971169027L;
public SynchronizedPrintRequestAttributeSet
(PrintRequestAttributeSet attributeSet) {
@ -382,6 +390,7 @@ public final class AttributeSetUtilities {
private static class SynchronizedPrintJobAttributeSet
extends SynchronizedAttributeSet
implements PrintJobAttributeSet, Serializable {
private static final long serialVersionUID = 2117188707856965749L;
public SynchronizedPrintJobAttributeSet
(PrintJobAttributeSet attributeSet) {
@ -395,6 +404,8 @@ public final class AttributeSetUtilities {
private static class SynchronizedPrintServiceAttributeSet
extends SynchronizedAttributeSet
implements PrintServiceAttributeSet, Serializable {
private static final long serialVersionUID = -2830705374001675073L;
public SynchronizedPrintServiceAttributeSet
(PrintServiceAttributeSet attributeSet) {
super(attributeSet);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2014, 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 @@ package javax.print.attribute;
* @since 1.4
*/
public class UnmodifiableSetException extends RuntimeException {
private static final long serialVersionUID = 2255250308571511731L;
/**
* Constructs an UnsupportedOperationException with no detail message.
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, 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,6 +39,7 @@ package javax.sound.midi;
* @author Kara Kytle
*/
public class InvalidMidiDataException extends Exception {
private static final long serialVersionUID = 2780771756789932067L;
/**
* Constructs an <code>InvalidMidiDataException</code> with
@ -49,7 +50,6 @@ public class InvalidMidiDataException extends Exception {
super();
}
/**
* Constructs an <code>InvalidMidiDataException</code> with the
* specified detail message.

View File

@ -1475,7 +1475,7 @@ public class MidiSystem {
/**
* Obtains the set of services currently installed on the system
* using sun.misc.Service, the SPI mechanism in 1.3.
* using the SPI mechanism in 1.3.
* @return a List of instances of providers for the requested service.
* If no providers are available, a List of length 0 will be returned.
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, 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,6 +39,7 @@ package javax.sound.midi;
* @author Kara Kytle
*/
public class MidiUnavailableException extends Exception {
private static final long serialVersionUID = 6093809578628944323L;
/**
* Constructs a <code>MidiUnavailableException</code> that has
@ -49,7 +50,6 @@ public class MidiUnavailableException extends Exception {
super();
}
/**
* Constructs a <code>MidiUnavailableException</code> with the
* specified detail message.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, 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,6 @@ package javax.sound.sampled;
import java.security.BasicPermission;
/**
* The <code>AudioPermission</code> class represents access rights to the audio
* system resources. An <code>AudioPermission</code> contains a target name
@ -76,134 +75,8 @@ import java.security.BasicPermission;
* @author Kara Kytle
* @since 1.3
*/
/*
* (OLD PERMISSIONS TAKEN OUT FOR 1.2 BETA)
*
* <tr>
* <td>playback device access</td>
* <td>Direct access to the audio playback device(s), including configuration of the
* playback format, volume, and balance, explicit opening and closing of the device,
* etc.</td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* <tr>
* <td>playback device override</td>
* <td>Manipulation of the audio playback device(s) in a way that directly conflicts
* with use by other applications. This includes closing the device while it is in
* use by another application, changing the device format while another application
* is using it, etc. </td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* <tr>
* <td>record device access</td>
* <td>Direct access to the audio recording device(s), including configuration of the
* the record format, volume, and balance, explicit opening and closing of the device,
* etc.</td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* <tr>
* <td>record device override</td>
* <td>Manipulation of the audio recording device(s) in a way that directly conflicts
* with use by other applications. This includes closing the device while it is in
* use by another application, changing the device format while another application
* is using it, etc. </td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* </table>
*<p>
*
* @author Kara Kytle
* @since 1.3
*/
/*
* The <code>AudioPermission</code> class represents access rights to the audio
* system resources. An <code>AudioPermission</code> contains a target name
* but no actions list; you either have the named permission or you don't.
* <p>
* The target name is the name of the audio permission (see the table below).
* The names follow the hierarchical property-naming convention. Also, an asterisk
* can be used to represent all the audio permissions.
* <p>
* The following table lists all the possible AudioPermission target names.
* For each name, the table provides a description of exactly what that permission
* allows, as well as a discussion of the risks of granting code the permission.
* <p>
*
* <table border=1 cellpadding=5>
* <tr>
* <th>Permission Target Name</th>
* <th>What the Permission Allows</th>
* <th>Risks of Allowing this Permission</th>
* </tr>
*
* <tr>
* <td>play</td>
* <td>Audio playback through the audio device or devices on the system.</td>
* <td>Allows the application to use a system device. Can affect other applications,
* because the result will be mixed with other audio being played on the system.</td>
*</tr>
*
* <tr>
* <td>record</td>
* <td>Recording audio from the audio device or devices on the system,
* commonly through a microphone.</td>
* <td>Can enable an applet or application to eavesdrop on a user.</td>
* </tr>
*
* <tr>
* <td>playback device access</td>
* <td>Direct access to the audio playback device(s), including configuration of the
* playback format, volume, and balance, explicit opening and closing of the device,
* etc.</td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* <tr>
* <td>playback device override</td>
* <td>Manipulation of the audio playback device(s) in a way that directly conflicts
* with use by other applications. This includes closing the device while it is in
* use by another application, changing the device format while another application
* is using it, etc. </td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* <tr>
* <td>record device access</td>
* <td>Direct access to the audio recording device(s), including configuration of the
* the record format, volume, and balance, explicit opening and closing of the device,
* etc.</td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* <tr>
* <td>record device override</td>
* <td>Manipulation of the audio recording device(s) in a way that directly conflicts
* with use by other applications. This includes closing the device while it is in
* use by another application, changing the device format while another application
* is using it, etc. </td>
* <td>Changes the properties of a shared system device and therefore
* can affect other applications.</td>
* </tr>
*
* </table>
*<p>
*
* @author Kara Kytle
*/
public class AudioPermission extends BasicPermission {
private static final long serialVersionUID = -5518053473477801126L;
/**
* Creates a new <code>AudioPermission</code> object that has the specified

View File

@ -1622,7 +1622,7 @@ public class AudioSystem {
/**
* Obtains the set of services currently installed on the system
* using sun.misc.Service, the SPI mechanism in 1.3.
* using the SPI mechanism in 1.3.
* @return a List of instances of providers for the requested service.
* If no providers are available, a vector of length 0 will be returned.
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, 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
@ -46,6 +46,7 @@ package javax.sound.sampled;
* @serial exclude
*/
public class LineEvent extends java.util.EventObject {
private static final long serialVersionUID = -1274246333383880410L;
// INSTANCE VARIABLES

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, 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,6 +44,7 @@ package javax.sound.sampled;
*/
public class LineUnavailableException extends Exception {
private static final long serialVersionUID = -2046718279487432130L;
/**
* Constructs a <code>LineUnavailableException</code> that has
@ -54,7 +55,6 @@ public class LineUnavailableException extends Exception {
super();
}
/**
* Constructs a <code>LineUnavailableException</code> that has
* the specified detail message.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, 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,15 +33,8 @@ package javax.sound.sampled;
* @author Kara Kytle
* @since 1.3
*/
/*
* An <code>UnsupportedAudioFileException</code> is an exception indicating that an
* operation failed because a file did not contain valid data of a recognized file
* type and format.
*
* @author Kara Kytle
*/
public class UnsupportedAudioFileException extends Exception {
private static final long serialVersionUID = -139127412623160368L;
/**
* Constructs a <code>UnsupportedAudioFileException</code> that has
@ -52,7 +45,6 @@ public class UnsupportedAudioFileException extends Exception {
super();
}
/**
* Constructs a <code>UnsupportedAudioFileException</code> that has
* the specified detail message.

View File

@ -31,7 +31,6 @@ import java.net.URL;
import java.net.MalformedURLException;
import java.awt.*;
import java.applet.*;
import sun.tools.jar.*;
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@ import java.awt.image.*;
*
* @author ThomasBall
*/
@SuppressWarnings("serial") // JDK-implementation class
public abstract class CustomCursor extends Cursor {
protected Image image;

View File

@ -2109,6 +2109,7 @@ public abstract class FontConfiguration {
return ret;
}
@SuppressWarnings("serial") // JDK-implementation class
class FontProperties extends Properties {
public synchronized Object put(Object k, Object v) {
parseProperty((String)k, (String)v);

Some files were not shown because too many files have changed in this diff Show More