This commit is contained in:
Lana Steuck 2015-05-07 20:50:07 -07:00
commit 8bfa00092c
840 changed files with 12319 additions and 9493 deletions
jdk
make
src/java.base/share/classes
com/sun/crypto/provider
java
sun

@ -32,11 +32,11 @@ include MakeBase.gmk
# Put the libraries here. Different locations for different target OS types.
ifneq ($(OPENJDK_TARGET_OS), windows)
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent$(OPENJDK_TARGET_CPU_LIBDIR)
else
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/bin
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/bin
BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent
endif
@ -80,11 +80,11 @@ SA_TARGETS := $(COPY_HOTSPOT_SA)
################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
$(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
$(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
else
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
$(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
$(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
endif
ifneq ($(OPENJDK_TARGET_OS), windows)

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

@ -342,35 +342,29 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
# above) says DST had no affect on electricity consumption. There is
# no information about when DST will end this fall. See:
# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833
# From Steffen Thorsen (2015-04-08):
# Egypt will start DST on midnight after Thursday, April 30, 2015.
# This is based on a law (no 35) from May 15, 2014 saying it starts the last
# Thursday of April.... Clocks will still be turned back for Ramadan, but
# dates not yet announced....
# http://almogaz.com/news/weird-news/2015/04/05/1947105 ...
# http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html
# From Ahmed Nazmy (2015-04-20):
# Egypt's ministers cabinet just announced ... that it will cancel DST at
# least for 2015.
#
# For now, guess that later spring and fall transitions will use
# 2010's rules, and guess that Egypt will switch to standard time at
# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the
# first Friday after Ramadan. To implement this,
# transition dates for 2015 through 2037 were determined by running
# the following program under GNU Emacs 24.3, with the results integrated
# by hand into the table below. Ramadan again intrudes on the guessed
# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff.
# (let ((islamic-year 1436))
# (while (< islamic-year 1460)
# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year)))
# (b (calendar-islamic-to-absolute (list 10 1 islamic-year)))
# (friday 5))
# (while (/= friday (mod a 7))
# (setq a (1- a)))
# (while (/= friday (mod b 7))
# (setq b (1+ b)))
# (setq a (1- a))
# (setq b (1- b))
# (setq a (calendar-gregorian-from-absolute a))
# (setq b (calendar-gregorian-from-absolute b))
# (insert
# (format
# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n"
# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n")
# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a))
# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
# (setq islamic-year (+ 1 islamic-year))))
# From Tim Parenti (2015-04-20):
# http://english.ahram.org.eg/WriterArticles/NewsContentP/1/128195/Egypt/No-daylight-saving-this-summer-Egypts-prime-minist.aspx
# "Egypt's cabinet agreed on Monday not to switch clocks for daylight saving
# time this summer, and carry out studies on the possibility of canceling the
# practice altogether in future years."
#
# From Paul Eggert (2015-04-20):
# For now, assume DST will be canceled. Any resumption would likely
# use different rules anyway.
Rule Egypt 2008 only - Aug lastThu 24:00 0 -
Rule Egypt 2009 only - Aug 20 24:00 0 -
Rule Egypt 2010 only - Aug 10 24:00 0 -
@ -379,22 +373,7 @@ Rule Egypt 2010 only - Sep lastThu 24:00 0 -
Rule Egypt 2014 only - May 15 24:00 1:00 S
Rule Egypt 2014 only - Jun 26 24:00 0 -
Rule Egypt 2014 only - Jul 31 24:00 1:00 S
Rule Egypt 2014 max - Sep lastThu 24:00 0 -
Rule Egypt 2015 2019 - Apr lastFri 0:00s 1:00 S
Rule Egypt 2015 only - Jun 11 24:00 0 -
Rule Egypt 2015 only - Jul 23 24:00 1:00 S
Rule Egypt 2016 only - Jun 2 24:00 0 -
Rule Egypt 2016 only - Jul 7 24:00 1:00 S
Rule Egypt 2017 only - May 25 24:00 0 -
Rule Egypt 2017 only - Jun 29 24:00 1:00 S
Rule Egypt 2018 only - May 10 24:00 0 -
Rule Egypt 2018 only - Jun 14 24:00 1:00 S
Rule Egypt 2019 only - May 2 24:00 0 -
Rule Egypt 2019 only - Jun 6 24:00 1:00 S
Rule Egypt 2020 only - May 28 24:00 1:00 S
Rule Egypt 2021 only - May 13 24:00 1:00 S
Rule Egypt 2022 only - May 5 24:00 1:00 S
Rule Egypt 2023 max - Apr lastFri 0:00s 1:00 S
Rule Egypt 2014 only - Sep lastThu 24:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Cairo 2:05:09 - LMT 1900 Oct

@ -38,41 +38,6 @@
# I made up all time zone abbreviations mentioned here; corrections welcome!
# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
# These rules are stolen from the 'southamerica' file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule ArgAQ 1964 1966 - Mar 1 0:00 0 -
Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S
Rule ArgAQ 1967 only - Apr 2 0:00 0 -
Rule ArgAQ 1967 1968 - Oct Sun>=1 0:00 1:00 S
Rule ArgAQ 1968 1969 - Apr Sun>=1 0:00 0 -
Rule ArgAQ 1974 only - Jan 23 0:00 1:00 S
Rule ArgAQ 1974 only - May 1 0:00 0 -
Rule ChileAQ 1972 1986 - Mar Sun>=9 3:00u 0 -
Rule ChileAQ 1974 1987 - Oct Sun>=9 4:00u 1:00 S
Rule ChileAQ 1987 only - Apr 12 3:00u 0 -
Rule ChileAQ 1988 1989 - Mar Sun>=9 3:00u 0 -
Rule ChileAQ 1988 only - Oct Sun>=1 4:00u 1:00 S
Rule ChileAQ 1989 only - Oct Sun>=9 4:00u 1:00 S
Rule ChileAQ 1990 only - Mar 18 3:00u 0 -
Rule ChileAQ 1990 only - Sep 16 4:00u 1:00 S
Rule ChileAQ 1991 1996 - Mar Sun>=9 3:00u 0 -
Rule ChileAQ 1991 1997 - Oct Sun>=9 4:00u 1:00 S
Rule ChileAQ 1997 only - Mar 30 3:00u 0 -
Rule ChileAQ 1998 only - Mar Sun>=9 3:00u 0 -
Rule ChileAQ 1998 only - Sep 27 4:00u 1:00 S
Rule ChileAQ 1999 only - Apr 4 3:00u 0 -
Rule ChileAQ 1999 2010 - Oct Sun>=9 4:00u 1:00 S
Rule ChileAQ 2000 2007 - Mar Sun>=9 3:00u 0 -
# N.B.: the end of March 29 in Chile is March 30 in Universal time,
# which is used below in specifying the transition.
Rule ChileAQ 2008 only - Mar 30 3:00u 0 -
Rule ChileAQ 2009 only - Mar Sun>=9 3:00u 0 -
Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 -
Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 -
Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S
Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 -
Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S
# Argentina - year-round bases
# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
@ -367,21 +332,7 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec 1
# USA - year-round bases
#
# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968)
#
# From Ethan Dicks (1996-10-06):
# It keeps the same time as Punta Arenas, Chile, because, just like us
# and the South Pole, that's the other end of their supply line....
# I verified with someone who was there that since 1980,
# Palmer has followed Chile. Prior to that, before the Falklands War,
# Palmer used to be supplied from Argentina.
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Antarctica/Palmer 0 - zzz 1965
-4:00 ArgAQ AR%sT 1969 Oct 5
-3:00 ArgAQ AR%sT 1982 May
-4:00 ChileAQ CL%sT 2015 Apr 26 3:00u
-3:00 - CLT
#
# See 'southamerica' for Antarctica/Palmer, since it uses South American DST.
#
# McMurdo Station, Ross Island, since 1955-12
# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20

@ -43,6 +43,7 @@ Link America/Argentina/Jujuy America/Jujuy
Link America/Indiana/Knox America/Knox_IN
Link America/Kentucky/Louisville America/Louisville
Link America/Argentina/Mendoza America/Mendoza
Link America/Toronto America/Montreal
Link America/Rio_Branco America/Porto_Acre
Link America/Argentina/Cordoba America/Rosario
Link America/Denver America/Shiprock

@ -99,7 +99,7 @@
# 1:00:14 SET Swedish (1879-1899)*
# 2:00 EET EEST Eastern Europe
# 3:00 FET Further-eastern Europe (2011-2014)*
# 3:00 MSK MSD MSM* Moscow
# 3:00 MSK MSD MSM* Minsk, Moscow
# From Peter Ilieve (1994-12-04),
# The original six [EU members]: Belgium, France, (West) Germany, Italy,

@ -250,9 +250,14 @@ Zone PST8PDT -8:00 US P%sT
# The law doesn't give abbreviations.
#
# From Paul Eggert (2000-01-08), following a heads-up from Rives McDow:
# Public law 106-564 (2000-12-23) introduced the abbreviation
# "Chamorro Standard Time" for time in Guam and the Northern Marianas.
# See the file "australasia".
# Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time"
# for time in Guam and the Northern Marianas. See the file "australasia".
#
# From Paul Eggert (2015-04-17):
# HST and HDT are standardized abbreviations for Hawaii-Aleutian
# standard and daylight times. See section 9.47 (p 234) of the
# U.S. Government Printing Office Style Manual (2008)
# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
# From Arthur David Olson, 2005-08-09
# The following was signed into law on 2005-08-08.
@ -559,7 +564,7 @@ Zone America/Adak 12:13:21 - LMT 1867 Oct 18
-11:00 - BST 1969
-11:00 US B%sT 1983 Oct 30 2:00
-10:00 US AH%sT 1983 Nov 30
-10:00 US HA%sT
-10:00 US H%sT
# The following switches don't quite make our 1970 cutoff.
#
# Shanks writes that part of southwest Alaska (e.g. Aniak)
@ -1354,14 +1359,9 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
# Quebec
# From Paul Eggert (2013-08-30):
# Since 1970 most of Quebec has been like Toronto.
# However, because earlier versions of the tz database mistakenly relied on data
# from Shanks & Pottenger saying that Quebec differed from Ontario after 1970,
# a separate entry was created for most of Quebec. We're loath to lose
# its pre-1970 info, even though the tz database is normally limited to
# zones that differ after 1970, so keep this otherwise out-of-scope entry.
# From Paul Eggert (2015-03-24):
# See America/Toronto for most of Quebec, including Montreal.
#
# Matthews and Vincent (1998) also write that Quebec east of the -63
# meridian is supposed to observe AST, but residents as far east as
# Natashquan use EST/EDT, and residents east of Natashquan use AST.
@ -1375,39 +1375,10 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
# For lack of better info, guess this practice began around 1970, contra to
# Shanks & Pottenger who have this region observing AST/ADT.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mont 1917 only - Mar 25 2:00 1:00 D
Rule Mont 1917 only - Apr 24 0:00 0 S
Rule Mont 1919 only - Mar 31 2:30 1:00 D
Rule Mont 1919 only - Oct 25 2:30 0 S
Rule Mont 1920 only - May 2 2:30 1:00 D
Rule Mont 1920 1922 - Oct Sun>=1 2:30 0 S
Rule Mont 1921 only - May 1 2:00 1:00 D
Rule Mont 1922 only - Apr 30 2:00 1:00 D
Rule Mont 1924 only - May 17 2:00 1:00 D
Rule Mont 1924 1926 - Sep lastSun 2:30 0 S
Rule Mont 1925 1926 - May Sun>=1 2:00 1:00 D
Rule Mont 1927 1937 - Apr lastSat 24:00 1:00 D
Rule Mont 1927 1937 - Sep lastSat 24:00 0 S
Rule Mont 1938 1940 - Apr lastSun 0:00 1:00 D
Rule Mont 1938 1939 - Sep lastSun 0:00 0 S
Rule Mont 1946 1973 - Apr lastSun 2:00 1:00 D
Rule Mont 1945 1948 - Sep lastSun 2:00 0 S
Rule Mont 1949 1950 - Oct lastSun 2:00 0 S
Rule Mont 1951 1956 - Sep lastSun 2:00 0 S
Rule Mont 1957 1973 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Blanc-Sablon -3:48:28 - LMT 1884
-4:00 Canada A%sT 1970
-4:00 - AST
Zone America/Montreal -4:54:16 - LMT 1884
-5:00 Mont E%sT 1918
-5:00 Canada E%sT 1919
-5:00 Mont E%sT 1942 Feb 9 2:00s
-5:00 Canada E%sT 1946
-5:00 Mont E%sT 1974
-5:00 Canada E%sT
# Ontario
@ -1898,17 +1869,115 @@ Zone America/Creston -7:46:04 - LMT 1884
# Dawson switched to PST in 1973. Inuvik switched to MST in 1979.
# Mathew Englander (1996-10-07) gives the following refs:
# * 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68,
# c. 7 defines Yukon standard time as UTC-9. This is still valid;
# c. 7 defines Yukon standard time as UTC-9....
# see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1).
# [http://canlii.ca/t/7vhg]
# * C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00.
# * O.I.C. 1980/02 established DST.
# * O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00.
# Shanks & Pottenger say Yukon's 1973-10-28 switch was at 2:00; go
# with Englander.
# From Chris Walton (2006-06-26):
# Here is a link to the old daylight saving portion of the interpretation
# act which was last updated in 1987:
# http://www.gov.yk.ca/legislation/regs/oic1987_056.pdf
# From Brian Inglis (2015-04-14):
#
# I tried to trace the history of Yukon time and found the following
# regulations, giving the reference title and URL if found, regulation name,
# and relevant quote if available. Each regulation specifically revokes its
# predecessor. The final reference is to the current Interpretation Act
# authorizing and resulting from these regulatory changes.
#
# Only recent regulations were retrievable via Yukon government site search or
# index, and only some via Canadian legal sources. Other sources used include
# articles titled "Standard Time and Time Zones in Canada" from JRASC via ADS
# Abstracts, cited by ADO for 1932 ..., and updated versions from 1958 and
# 1970 quoted below; each article includes current extracts from provincial
# and territorial ST and DST regulations at the end, summaries and details of
# standard times and daylight saving time at many locations across Canada,
# with time zone maps, tables and calculations for Canadian Sunrise, Sunset,
# and LMST; they also cover many countries and global locations, with a chart
# and table showing current Universal Time offsets, and may be useful as
# another source of information for 1970 and earlier.
#
# * Standard Time and Time Zones in Canada; Smith, C.C.; JRASC, Vol. 26,
# pp.49-77; February 1932; SAO/NASA Astrophysics Data System (ADS)
# http://adsabs.harvard.edu/abs/1932JRASC..26...49S from p.75:
# Yukon Interpretation Ordinance
# Yukon standard time is the local mean time at the one hundred and
# thirty-fifth meridian.
#
# * Standard Time and Time Zones in Canada; Smith, C.C.; Thomson, Malcolm M.;
# JRASC, Vol. 52, pp.193-223; October 1958; SAO/NASA Astrophysics Data System
# (ADS) http://adsabs.harvard.edu/abs/1958JRASC..52..193S from pp.220-1:
# Yukon Interpretation Ordinance, 1955, Chap. 16.
#
# (1) Subject to this section, standard time shall be reckoned as nine
# hours behind Greenwich Time and called Yukon Standard Time.
#
# (2) Notwithstanding subsection (1), the Commissioner may make regulations
# varying the manner of reckoning standard time.
#
# * Yukon Territory Commissioner's Order 1966-20 Interpretation Ordinance
# http://? - no online source found
#
# * Standard Time and Time Zones in Canada; Thomson, Malcolm M.; JRASC,
# Vol. 64, pp.129-162; June 1970; SAO/NASA Astrophysics Data System (ADS)
# http://adsabs.harvard.edu/abs/1970JRASC..64..129T from p.156: Yukon
# Territory Commissioner's Order 1967-59 Interpretation Ordinance ...
#
# 1. Commissioner's Order 1966-20 dated at Whitehorse in the Yukon
# Territory on 27th January, 1966, is hereby revoked.
#
# 2. Yukon (East) Standard Time as defined by section 36 of the
# Interpretation Ordinance from and after mid-night on the 28th day of May,
# 1967 shall be reckoned in the same manner as Pacific Standard Time, that
# is to say, eight hours behind Greenwich Time in the area of the Yukon
# Territory lying east of the 138th degree longitude west.
#
# 3. In the remainder of the Territory, lying west of the 138th degree
# longitude west, Yukon (West) Standard Time shall be reckoned as nine
# hours behind Greenwich Time.
#
# * Yukon Standard Time defined as Pacific Standard Time, YCO 1973/214
# http://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html
# C.O. 1973/214 INTERPRETATION ACT ...
#
# 1. Effective October 28, 1973 Commissioner's Order 1967/59 is hereby
# revoked.
#
# 2. Yukon Standard Time as defined by section 36 of the Interpretation
# Act from and after midnight on the twenty-eighth day of October, 1973
# shall be reckoned in the same manner as Pacific Standard Time, that is
# to say eight hours behind Greenwich Time.
#
# * O.I.C. 1980/02 INTERPRETATION ACT
# http://? - no online source found
#
# * Yukon Daylight Saving Time, YOIC 1987/56
# http://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
# O.I.C. 1987/056 INTERPRETATION ACT ...
#
# In every year between
# (a) two o'clock in the morning in the first Sunday in April, and
# (b) two o'clock in the morning in the last Sunday in October,
# Standard Time shall be reckoned as seven hours behind Greenwich Time and
# called Yukon Daylight Saving Time.
# ...
# Dated ... 9th day of March, A.D., 1987.
#
# * Yukon Daylight Saving Time 2006, YOIC 2006/127
# http://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html
# O.I.C. 2006/127 INTERPRETATION ACT ...
#
# 1. In Yukon each year the time for general purposes shall be 7 hours
# behind Greenwich mean time during the period commencing at two o'clock
# in the forenoon on the second Sunday of March and ending at two o'clock
# in the forenoon on the first Sunday of November and shall be called
# Yukon Daylight Saving Time.
#
# 2. Order-in-Council 1987/56 is revoked.
#
# 3. This order comes into force January 1, 2007.
#
# * Interpretation Act, RSY 2002, c 125
# http://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
# From Rives McDow (1999-09-04):
# Nunavut ... moved ... to incorporate the whole territory into one time zone.
@ -2134,7 +2203,7 @@ Zone America/Inuvik 0 - zzz 1953 # Inuvik founded
-7:00 NT_YK M%sT 1980
-7:00 Canada M%sT
Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20
-9:00 NT_YK Y%sT 1966 Jul 1 2:00
-9:00 NT_YK Y%sT 1967 May 28 0:00
-8:00 NT_YK P%sT 1980
-8:00 Canada P%sT
Zone America/Dawson -9:17:40 - LMT 1900 Aug 20

@ -1121,6 +1121,60 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# Chile
# From Paul Eggert (2015-04-03):
# Shanks & Pottenger says America/Santiago introduced standard time in
# 1890 and rounds its UTC offset to 70W40; guess that in practice this
# was the same offset as in 1916-1919. It also says Pacific/Easter
# standardized on 109W22 in 1890; assume this didn't change the clocks.
#
# Dates for America/Santiago from 1910 to 2004 are primarily from
# the following source, cited by Oscar van Vlijmen (2006-10-08):
# [1] Chile Law
# http://www.webexhibits.org/daylightsaving/chile.html
# This contains a copy of a this official table:
# Cambios en la hora oficial de Chile desde 1900 (retrieved 2008-03-30)
# http://web.archive.org/web/20080330200901/http://www.horaoficial.cl/cambio.htm
# [1] needs several corrections, though.
#
# The first set of corrections is from:
# [2] History of the Official Time of Chile
# http://www.horaoficial.cl/ing/horaof_ing.html (retrieved 2012-03-06). See:
# http://web.archive.org/web/20120306042032/http://www.horaoficial.cl/ing/horaof_ing.html
# This is an English translation of:
# Historia de la hora oficial de Chile (retrieved 2012-10-24). See:
# http://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm
# A fancier Spanish version (requiring mouse-clicking) is at:
# http://www.horaoficial.cl/historia_hora.html
# Conflicts between [1] and [2] were resolved as follows:
#
# - [1] says the 1910 transition was Jan 1, [2] says Jan 10 and cites
# Boletín Nº 1, Aviso Nº 1 (1910). Go with [2].
#
# - [1] says SMT was -4:42:45, [2] says Chile's official time from
# 1916 to 1919 was -4:42:46.3, the meridian of Chile's National
# Astronomical Observatory (OAN), then located in what is now
# Quinta Normal in Santiago. Go with [2], rounding it to -4:42:46.
#
# - [1] says the 1918 transition was Sep 1, [2] says Sep 10 and cites
# Boletín Nº 22, Aviso Nº 129/1918 (1918-08-23). Go with [2].
#
# - [1] does not give times for transitions; assume they occur
# at midnight mainland time, the current common practice. However,
# go with [2]'s specification of 23:00 for the 1947-05-21 transition.
#
# Another correction to [1] is from Jesper Nørgaard Welen, who
# wrote (2006-10-08), "I think that there are some obvious mistakes in
# the suggested link from Oscar van Vlijmen,... for instance entry 66
# says that GMT-4 ended 1990-09-12 while entry 67 only begins GMT-3 at
# 1990-09-15 (they should have been 1990-09-15 and 1990-09-16
# respectively), but anyhow it clears up some doubts too."
#
# Data for Pacific/Easter from 1910 through 1967 come from Shanks &
# Pottenger. After that, for lack of better info assume
# Pacific/Easter is always two hours behind America/Santiago;
# this is known to work for DST transitions starting in 2008 and
# may well be true for earlier transitions.
# From Eduardo Krell (1995-10-19):
# The law says to switch to DST at midnight [24:00] on the second SATURDAY
# of October.... The law is the same for March and October.
@ -1133,78 +1187,35 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# Because of the same drought, the government decided to end DST later,
# on April 3, (one-time change).
# From Oscar van Vlijmen (2006-10-08):
# http://www.horaoficial.cl/cambio.htm
# From Jesper Nørgaard Welen (2006-10-08):
# I think that there are some obvious mistakes in the suggested link
# from Oscar van Vlijmen,... for instance entry 66 says that GMT-4
# ended 1990-09-12 while entry 67 only begins GMT-3 at 1990-09-15
# (they should have been 1990-09-15 and 1990-09-16 respectively), but
# anyhow it clears up some doubts too.
# From Paul Eggert (2014-08-12):
# The following data entries for Chile and America/Santiago are from
# <http://www.horaoficial.cl/horaof.htm> (2006-09-20), transcribed by
# Jesper Nørgaard Welen. The data entries for Pacific/Easter are from Shanks
# & Pottenger, except with DST transitions after 1932 cloned from
# America/Santiago. The pre-1980 Pacific/Easter data entries are dubious,
# but we have no other source.
# From Germán Poo-Caamaño (2008-03-03):
# Due to drought, Chile extends Daylight Time in three weeks. This
# is one-time change (Saturday 3/29 at 24:00 for America/Santiago
# and Saturday 3/29 at 22:00 for Pacific/Easter)
# The Supreme Decree is located at
# http://www.shoa.cl/servicios/supremo316.pdf
# and the instructions for 2008 are located in:
# http://www.horaoficial.cl/cambio.htm
#
# From José Miguel Garrido (2008-03-05):
# ...
# You could see the announces of the change on
# http://www.shoa.cl/noticias/2008/04hora/hora.htm
# From Angel Chiang (2010-03-04):
# Subject: DST in Chile exceptionally extended to 3 April due to earthquake
# http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098
# (in Spanish, last paragraph).
#
# This is breaking news. There should be more information available later.
# From Arthur David Olson (2010-03-06):
# Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch.
# From Glenn Eychaner (2011-03-02):
# It appears that the Chilean government has decided to postpone the
# change from summer time to winter time again, by three weeks to April
# 2nd:
# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
#
# This is not yet reflected in the official "cambio de hora" site, but
# probably will be soon:
# http://www.horaoficial.cl/cambio.htm
# From Arthur David Olson (2011-03-02):
# The emol.com article mentions a water shortage as the cause of the
# postponement, which may mean that it's not a permanent change.
# From Glenn Eychaner (2011-03-28):
# The article:
# http://diario.elmercurio.com/2011/03/28/_portada/_portada/noticias/7565897A-CA86-49E6-9E03-660B21A4883E.htm?id=3D{7565897A-CA86-49E6-9E03-660B21A4883E}
#
# In English:
# Chile's clocks will go back an hour this year on the 7th of May instead
# of this Saturday. They will go forward again the 3rd Saturday in
# August, not in October as they have since 1968. This is a pilot plan
# which will be reevaluated in 2012.
# August, not in October as they have since 1968.
# From Mauricio Parada (2012-02-22), translated by Glenn Eychaner (2012-02-23):
# As stated in the website of the Chilean Energy Ministry
# http://www.minenergia.cl/ministerio/noticias/generales/gobierno-anuncia-fechas-de-cambio-de.html
# The Chilean Government has decided to postpone the entrance into winter time
# (to leave DST) from March 11 2012 to April 28th 2012. The decision has not
# been yet formalized but it will within the next days.
# (to leave DST) from March 11 2012 to April 28th 2012....
# Quote from the website communication:
#
# 6. For the year 2012, the dates of entry into winter time will be as follows:
@ -1237,17 +1248,9 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# From Paul Eggert (2015-03-03):
# For now, assume that the extension will persist indefinitely.
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Chile 1927 1932 - Sep 1 0:00 1:00 S
Rule Chile 1927 1931 - Sep 1 0:00 1:00 S
Rule Chile 1928 1932 - Apr 1 0:00 0 -
Rule Chile 1942 only - Jun 1 4:00u 0 -
Rule Chile 1942 only - Aug 1 5:00u 1:00 S
Rule Chile 1946 only - Jul 15 4:00u 1:00 S
Rule Chile 1946 only - Sep 1 3:00u 0:00 -
Rule Chile 1947 only - Apr 1 4:00u 0 -
Rule Chile 1968 only - Nov 3 4:00u 1:00 S
Rule Chile 1969 only - Mar 30 3:00u 0 -
Rule Chile 1969 only - Nov 23 4:00u 1:00 S
@ -1258,10 +1261,8 @@ Rule Chile 1972 1986 - Mar Sun>=9 3:00u 0 -
Rule Chile 1973 only - Sep 30 4:00u 1:00 S
Rule Chile 1974 1987 - Oct Sun>=9 4:00u 1:00 S
Rule Chile 1987 only - Apr 12 3:00u 0 -
Rule Chile 1988 1989 - Mar Sun>=9 3:00u 0 -
Rule Chile 1988 only - Oct Sun>=1 4:00u 1:00 S
Rule Chile 1989 only - Oct Sun>=9 4:00u 1:00 S
Rule Chile 1990 only - Mar 18 3:00u 0 -
Rule Chile 1988 1990 - Mar Sun>=9 3:00u 0 -
Rule Chile 1988 1989 - Oct Sun>=9 4:00u 1:00 S
Rule Chile 1990 only - Sep 16 4:00u 1:00 S
Rule Chile 1991 1996 - Mar Sun>=9 3:00u 0 -
Rule Chile 1991 1997 - Oct Sun>=9 4:00u 1:00 S
@ -1284,15 +1285,21 @@ Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S
# (1996-09) says 1998-03-08. Ignore these.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Santiago -4:42:46 - LMT 1890
-4:42:46 - SMT 1910 # Santiago Mean Time
-4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time
-5:00 - CLT 1916 Jul 1 # Chile Time
-4:42:46 - SMT 1918 Sep 1 # Santiago Mean Time
-4:00 - CLT 1919 Jul 1 # Chile Time
-4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time
-5:00 Chile CL%sT 1947 May 22 # Chile Time
-4:42:46 - SMT 1918 Sep 10
-4:00 - CLT 1919 Jul 1
-4:42:46 - SMT 1927 Sep 1
-5:00 Chile CL%sT 1932 Sep 1
-4:00 - CLT 1942 Jun 1
-5:00 - CLT 1942 Aug 1
-4:00 - CLT 1946 Jul 15
-4:00 1:00 CLST 1946 Sep 1 # central Chile
-4:00 - CLT 1947 Apr 1
-5:00 - CLT 1947 May 21 23:00
-4:00 Chile CL%sT 2015 Apr 26 3:00u
-3:00 - CLT
Zone Pacific/Easter -7:17:44 - LMT 1890
Zone Pacific/Easter -7:17:28 - LMT 1890
-7:17:28 - EMT 1932 Sep # Easter Mean Time
-7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time
-6:00 Chile EAS%sT 2015 Apr 26 3:00u
@ -1302,6 +1309,25 @@ Zone Pacific/Easter -7:17:44 - LMT 1890
# Other Chilean locations, including Juan Fernández Is, Desventuradas Is,
# and Antarctic bases, are like America/Santiago.
# Antarctic base using South American rules
# (See the file 'antarctica' for more.)
#
# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968)
#
# From Ethan Dicks (1996-10-06):
# It keeps the same time as Punta Arenas, Chile, because, just like us
# and the South Pole, that's the other end of their supply line....
# I verified with someone who was there that since 1980,
# Palmer has followed Chile. Prior to that, before the Falklands War,
# Palmer used to be supplied from Argentina.
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Antarctica/Palmer 0 - zzz 1965
-4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1982 May
-4:00 Chile CL%sT 2015 Apr 26 3:00u
-3:00 - CLT
# Colombia
# Milne gives 4:56:16.4 for Bogotá time in 1899; round to nearest. He writes,

@ -827,7 +827,7 @@ ifndef BUILD_HEADLESS_ONLY
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/macosx/native/libsplashscreen
endif
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0 \
$(addprefix -I, $(LIBSPLASHSCREEN_DIRS)) \
$(LIBJAVA_HEADER_FLAGS) \
#

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2015, 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,6 +25,9 @@
include LibCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, lib/Lib-java.instrument.gmk))
################################################################################
LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/java.instrument/share/native/libinstrument \

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -30,33 +30,14 @@ $(eval $(call IncludeCustomExtension, jdk, lib/Lib-java.management.gmk))
################################################################################
BUILD_LIBMANAGEMENT_SRC += $(JDK_TOPDIR)/src/java.management/share/native/libmanagement \
LIBMANAGEMENT_SRC += $(JDK_TOPDIR)/src/java.management/share/native/libmanagement \
$(JDK_TOPDIR)/src/java.management/$(OPENJDK_TARGET_OS_TYPE)/native/libmanagement
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \
$(addprefix -I,$(BUILD_LIBMANAGEMENT_SRC)) \
LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \
$(addprefix -I,$(LIBMANAGEMENT_SRC)) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.management \
$(LIBJAVA_HEADER_FLAGS) \
#
# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
# a binary that is compatible with windows versions older than 7/2008R2.
# See MSDN documentation for GetProcessMemoryInfo for more information.
BUILD_LIBMANAGEMENT_CFLAGS += -DPSAPI_VERSION=1
BUILD_LIBMANAGEMENT_EXCLUDES :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
endif
LIBMANAGEMENT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
@ -64,17 +45,13 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
endif
endif
# Make it possible to override this variable
LIBMANAGEMENT_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBRARY := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMANAGEMENT_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
SRC := $(LIBMANAGEMENT_SRC), \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \
MAPFILE := $(LIBMANAGEMENT_MAPFILE), \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(LIBMANAGEMENT_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -lkstat, \

@ -49,6 +49,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
CFLAGS_windows := -D_WINSOCK_DEPRECATED_NO_WARNINGS, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

@ -0,0 +1,80 @@
#
# Copyright (c) 2015, 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.
#
include LibCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, lib/Lib-jdk.management.gmk))
################################################################################
LIBMANAGEMENT_EXT_SRC += $(JDK_TOPDIR)/src/jdk.management/share/native/libmanagement_ext \
$(JDK_TOPDIR)/src/jdk.management/$(OPENJDK_TARGET_OS_TYPE)/native/libmanagement_ext \
$(JDK_TOPDIR)/src/jdk.management/$(OPENJDK_TARGET_OS)/native/libmanagement_ext
LIBMANAGEMENT_EXT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \
$(addprefix -I,$(LIBMANAGEMENT_EXT_SRC)) \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.management \
$(LIBJAVA_HEADER_FLAGS) \
#
# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
# a binary that is compatible with windows versions older than 7/2008R2.
# See MSDN documentation for GetProcessMemoryInfo for more information.
BUILD_LIBMANAGEMENT_EXT_CFLAGS += -DPSAPI_VERSION=1
LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_EXT_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_EXT, \
LIBRARY := management_ext, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBMANAGEMENT_EXT_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(LIBMANAGEMENT_EXT_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement_ext/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -lkstat, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
LDFLAGS_SUFFIX_aix := -lperfstat,\
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management_ext.dll" \
-D "JDK_INTERNAL_NAME=management_ext" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement_ext, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBMANAGEMENT_EXT): $(call FindLib, java.base, java)
TARGETS += $(BUILD_LIBMANAGEMENT_EXT)
################################################################################

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2015, 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,37 +27,10 @@
SUNWprivate_1.1 {
global:
Java_sun_management_OperatingSystemImpl_getCommittedVirtualMemorySize0;
Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize0;
Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize0;
Java_sun_management_OperatingSystemImpl_getMaxFileDescriptorCount0;
Java_sun_management_OperatingSystemImpl_getOpenFileDescriptorCount0;
Java_sun_management_OperatingSystemImpl_getProcessCpuLoad0;
Java_sun_management_OperatingSystemImpl_getProcessCpuTime0;
Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0;
Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize0;
Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize0;
Java_sun_management_OperatingSystemImpl_initialize0;
Java_sun_management_ClassLoadingImpl_setVerboseClass;
Java_sun_management_DiagnosticCommandImpl_executeDiagnosticCommand;
Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommands;
Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommandInfo;
Java_sun_management_DiagnosticCommandImpl_setNotificationEnabled;
Java_sun_management_FileSystemImpl_isAccessUserOnly0;
Java_sun_management_Flag_getAllFlagNames;
Java_sun_management_Flag_getFlags;
Java_sun_management_Flag_getInternalFlagCount;
Java_sun_management_Flag_initialize;
Java_sun_management_Flag_setLongValue;
Java_sun_management_Flag_setBooleanValue;
Java_sun_management_Flag_setStringValue;
Java_sun_management_GarbageCollectorImpl_getCollectionCount;
Java_sun_management_FileSystemImpl_isAccessUserOnly0;
Java_sun_management_GarbageCollectorImpl_getCollectionCount;
Java_sun_management_GarbageCollectorImpl_getCollectionTime;
Java_sun_management_GarbageCollectorImpl_setNotificationEnabled;
Java_sun_management_GcInfoBuilder_fillGcAttributeInfo;
Java_sun_management_GcInfoBuilder_getLastGcInfo0;
Java_sun_management_GcInfoBuilder_getNumGcExtAttributes;
Java_sun_management_HotSpotDiagnostic_dumpHeap0;
Java_sun_management_HotspotThread_getInternalThreadCount;
Java_sun_management_HotspotThread_getInternalThreadTimes0;
Java_sun_management_MemoryImpl_getMemoryManagers0;

@ -0,0 +1,60 @@
#
# Copyright (c) 2015, 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 library interface.
SUNWprivate_1.1 {
global:
Java_com_sun_management_internal_OperatingSystemImpl_getCommittedVirtualMemorySize0;
Java_com_sun_management_internal_OperatingSystemImpl_getFreePhysicalMemorySize0;
Java_com_sun_management_internal_OperatingSystemImpl_getFreeSwapSpaceSize0;
Java_com_sun_management_internal_OperatingSystemImpl_getMaxFileDescriptorCount0;
Java_com_sun_management_internal_OperatingSystemImpl_getOpenFileDescriptorCount0;
Java_com_sun_management_internal_OperatingSystemImpl_getProcessCpuLoad0;
Java_com_sun_management_internal_OperatingSystemImpl_getProcessCpuTime0;
Java_com_sun_management_internal_OperatingSystemImpl_getSystemCpuLoad0;
Java_com_sun_management_internal_OperatingSystemImpl_getTotalPhysicalMemorySize0;
Java_com_sun_management_internal_OperatingSystemImpl_getTotalSwapSpaceSize0;
Java_com_sun_management_internal_OperatingSystemImpl_initialize0;
Java_com_sun_management_internal_DiagnosticCommandImpl_executeDiagnosticCommand;
Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommands;
Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommandInfo;
Java_com_sun_management_internal_DiagnosticCommandImpl_setNotificationEnabled;
Java_com_sun_management_internal_Flag_getAllFlagNames;
Java_com_sun_management_internal_Flag_getFlags;
Java_com_sun_management_internal_Flag_getInternalFlagCount;
Java_com_sun_management_internal_Flag_initialize;
Java_com_sun_management_internal_Flag_setLongValue;
Java_com_sun_management_internal_Flag_setBooleanValue;
Java_com_sun_management_internal_Flag_setStringValue;
Java_com_sun_management_internal_GarbageCollectorExtImpl_setNotificationEnabled;
Java_com_sun_management_internal_GcInfoBuilder_fillGcAttributeInfo;
Java_com_sun_management_internal_GcInfoBuilder_getLastGcInfo0;
Java_com_sun_management_internal_GcInfoBuilder_getNumGcExtAttributes;
Java_com_sun_management_internal_HotSpotDiagnostic_dumpHeap0;
JNI_OnLoad;
local:
*;
};

@ -22,6 +22,7 @@ jdk.deploy.osx
jdk.hprof.agent
jdk.httpserver
jdk.jfr
jdk.management
jdk.management.cmm
jdk.naming.rmi
jdk.sctp

@ -38,7 +38,17 @@ import static com.sun.crypto.provider.AESConstants.AES_BLOCK_SIZE;
* under section 6.5. It needs to be constructed w/ an initialized
* cipher object, and initial counter block(ICB). Given an input X
* of arbitrary length, it processes and returns an output which has
* the same length as X.
* the same length as X. The invariants of this class are:
*
* (1) The length of intialCounterBlk (and also of its clones, e.g.,
* fields counter and counterSave) is equal to AES_BLOCK_SIZE.
*
* (2) After construction, the field counter never becomes null, it
* always contains a byte array of length AES_BLOCK_SIZE.
*
* If any invariant is broken, failures can occur because the
* AESCrypt.encryptBlock method can be intrinsified on the HotSpot VM
* (see JDK-8067648 for details).
*
* <p>This function is used in the implementation of GCM mode.
*
@ -59,6 +69,10 @@ final class GCTR {
// NOTE: cipher should already be initialized
GCTR(SymmetricCipher cipher, byte[] initialCounterBlk) {
this.aes = cipher;
if (initialCounterBlk.length != AES_BLOCK_SIZE) {
throw new RuntimeException("length of initial counter block (" + initialCounterBlk.length +
") not equal to AES_BLOCK_SIZE (" + AES_BLOCK_SIZE + ")");
}
this.icb = initialCounterBlk;
this.counter = icb.clone();
}
@ -137,6 +151,8 @@ final class GCTR {
* Restores the content of this object to the previous saved one.
*/
void restore() {
this.counter = this.counterSave;
if (this.counterSave != null) {
this.counter = this.counterSave;
}
}
}

@ -1312,7 +1312,7 @@ public final class Class<T> implements java.io.Serializable,
// e) Anonymous classes
// JVM Spec 4.8.6: A class must have an EnclosingMethod
// JVM Spec 4.7.7: A class must have an EnclosingMethod
// attribute if and only if it is a local class or an
// anonymous class.
EnclosingMethodInfo enclosingInfo = getEnclosingMethodInfo();
@ -1357,28 +1357,7 @@ public final class Class<T> implements java.io.Serializable,
simpleName = getName();
return simpleName.substring(simpleName.lastIndexOf('.')+1); // strip the package name
}
// According to JLS3 "Binary Compatibility" (13.1) the binary
// name of non-package classes (not top level) is the binary
// name of the immediately enclosing class followed by a '$' followed by:
// (for nested and inner classes): the simple name.
// (for local classes): 1 or more digits followed by the simple name.
// (for anonymous classes): 1 or more digits.
// Since getSimpleBinaryName() will strip the binary name of
// the immediately enclosing class, we are now looking at a
// string that matches the regular expression "\$[0-9]*"
// followed by a simple name (considering the simple of an
// anonymous class to be the empty string).
// Remove leading "\$[0-9]*" from the name
int length = simpleName.length();
if (length < 1 || simpleName.charAt(0) != '$')
throw new InternalError("Malformed class name");
int index = 1;
while (index < length && isAsciiDigit(simpleName.charAt(index)))
index++;
// Eventually, this is the empty string iff this is an anonymous class
return simpleName.substring(index);
return simpleName;
}
/**
@ -1489,20 +1468,20 @@ public final class Class<T> implements java.io.Serializable,
Class<?> enclosingClass = getEnclosingClass();
if (enclosingClass == null) // top level class
return null;
// Otherwise, strip the enclosing class' name
try {
return getName().substring(enclosingClass.getName().length());
} catch (IndexOutOfBoundsException ex) {
throw new InternalError("Malformed class name", ex);
}
String name = getSimpleBinaryName0();
if (name == null) // anonymous class
return "";
return name;
}
private native String getSimpleBinaryName0();
/**
* Returns {@code true} if this is a local class or an anonymous
* class. Returns {@code false} otherwise.
*/
private boolean isLocalOrAnonymousClass() {
// JVM Spec 4.8.6: A class must have an EnclosingMethod
// JVM Spec 4.7.7: A class must have an EnclosingMethod
// attribute if and only if it is a local class or an
// anonymous class.
return getEnclosingMethodInfo() != null;

@ -333,6 +333,19 @@ import java.util.StringTokenizer;
* "../../../technotes/guides/plugin/developer_guide/rsa_how.html#use">
* usePolicy Permission</a>.</td>
* </tr>
*
* <tr>
* <td>localeServiceProvider</td>
* <td>This {@code RuntimePermission} is required to be granted to
* classes which subclass and implement
* {@code java.util.spi.LocaleServiceProvider}. The permission is
* checked during invocation of the abstract base class constructor.
* This permission ensures trust in classes which implement this
* security-sensitive provider mechanism. </td>
* <td>See <a href= "../util/spi/LocaleServiceProvider.html">
* {@code java.util.spi.LocaleServiceProvider}</a> for more
* information.</td>
* </tr>
* </table>
*
* @see java.security.BasicPermission

@ -25,9 +25,10 @@
package java.lang.invoke;
import sun.invoke.empty.Empty;
import static java.lang.invoke.MethodHandleStatics.*;
import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
import java.lang.reflect.Field;
import sun.misc.Cleaner;
/**
* A {@code CallSite} is a holder for a variable {@link MethodHandle},
@ -135,6 +136,50 @@ public class CallSite {
this.target = boundTarget;
}
/**
* {@code CallSite} dependency context.
* VM uses context class to store nmethod dependencies on the call site target.
* Can be in 2 states: (a) null; or (b) {@code Cleaner} instance pointing to some Class instance.
* Lazily initialized when CallSite instance is linked to some indy call site or VM needs
* it to store dependencies. As a corollary, "null" context means there are no dependencies
* registered yet. {@code Cleaner} is used in 2 roles:
* (a) context class access for VM;
* (b) stale context class cleanup.
* {@code Cleaner} holds the context class until cleanup action is finished (see {@code PhantomReference}).
* Though it's impossible to get the context class using {@code Reference.get()}, VM extracts it directly
* from {@code Reference.referent} field.
*/
private volatile Cleaner context = null;
/**
* Default context.
* VM uses it to initialize non-linked CallSite context.
*/
private static class DefaultContext {}
private static final Cleaner DEFAULT_CONTEXT = makeContext(DefaultContext.class, null);
private static Cleaner makeContext(Class<?> referent, final CallSite holder) {
return Cleaner.create(referent,
new Runnable() {
@Override public void run() {
MethodHandleNatives.invalidateDependentNMethods(holder);
}
});
}
/** Initialize context class used for nmethod dependency tracking */
/*package-private*/
void initContext(Class<?> newContext) {
// If there are concurrent actions, exactly one succeeds.
if (context == null) {
UNSAFE.compareAndSwapObject(this, CONTEXT_OFFSET, /*expected=*/null, makeContext(newContext, this));
// No need to care about failed CAS attempt.
// Since initContext is called from indy call site linkage in newContext class, there's no risk
// that the context class becomes dead while corresponding context cleaner is alive (causing cleanup
// action in the wrong context).
}
}
/**
* Returns the type of this call site's target.
* Although targets may change, any call site's type is permanent, and can never change to an unequal type.
@ -246,11 +291,13 @@ public class CallSite {
}
// unsafe stuff:
private static final long TARGET_OFFSET;
private static final long TARGET_OFFSET;
private static final long CONTEXT_OFFSET;
static {
try {
TARGET_OFFSET = UNSAFE.objectFieldOffset(CallSite.class.getDeclaredField("target"));
} catch (Exception ex) { throw new Error(ex); }
TARGET_OFFSET = UNSAFE.objectFieldOffset(CallSite.class.getDeclaredField("target"));
CONTEXT_OFFSET = UNSAFE.objectFieldOffset(CallSite.class.getDeclaredField("context"));
} catch (Exception ex) { throw newInternalError(ex); }
}
/*package-private*/

@ -691,10 +691,4 @@ class DirectMethodHandle extends MethodHandle {
}
}
}
@Override
void customize() {
assert(form.customized == null);
// No need to customize DMHs.
}
}

@ -847,11 +847,7 @@ class InvokerBytecodeGenerator {
refKind = REF_invokeVirtual;
}
if (member.getDeclaringClass().isInterface() && refKind == REF_invokeVirtual) {
// Methods from Object declared in an interface can be resolved by JVM to invokevirtual kind.
// Need to convert it back to invokeinterface to pass verification and make the invocation works as expected.
refKind = REF_invokeInterface;
}
assert(!(member.getDeclaringClass().isInterface() && refKind == REF_invokeVirtual));
// push arguments
emitPushArguments(name);

@ -281,7 +281,7 @@ class Invokers {
outArgs[0] = names[CHECK_TYPE];
}
if (CHECK_CUSTOM != -1) {
names[CHECK_CUSTOM] = new Name(NF_checkCustomized, names[CALL_MH]);
names[CHECK_CUSTOM] = new Name(NF_checkCustomized, outArgs[0]);
}
names[LINKER_CALL] = new Name(outCallType, outArgs);
lform = new LambdaForm(debugName, INARG_LIMIT, names);
@ -394,6 +394,7 @@ class Invokers {
@ForceInline
void checkCustomized(Object o) {
MethodHandle mh = (MethodHandle)o;
if (MethodHandleImpl.isCompileConstant(mh)) return;
if (mh.form.customized == null) {
maybeCustomize(mh);
}

@ -722,6 +722,13 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
return result;
}
// Intrinsified by C2. Returns true if obj is a compile-time constant.
@LambdaForm.Hidden
static
boolean isCompileConstant(Object obj) {
return false;
}
static
MethodHandle makeGuardWithTest(MethodHandle test,
MethodHandle target,

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2015, 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,121 +55,42 @@ class MethodHandleNatives {
static native Object staticFieldBase(MemberName self); // e.g., returns clazz
static native Object getMemberVMInfo(MemberName self); // returns {vmindex,vmtarget}
/// MethodHandle support
/** Fetch MH-related JVM parameter.
* which=0 retrieves MethodHandlePushLimit
* which=1 retrieves stack slot push size (in address units)
*/
static native int getConstant(int which);
static final boolean COUNT_GWT;
/// CallSite support
/** Tell the JVM that we need to change the target of a CallSite. */
static native void setCallSiteTargetNormal(CallSite site, MethodHandle target);
static native void setCallSiteTargetVolatile(CallSite site, MethodHandle target);
/** Invalidate CallSite context: clean up dependent nmethods and reset call site context to initial state (null). */
static native void invalidateDependentNMethods(CallSite site);
private static native void registerNatives();
static {
registerNatives();
COUNT_GWT = getConstant(Constants.GC_COUNT_GWT) != 0;
// The JVM calls MethodHandleNatives.<clinit>. Cascade the <clinit> calls as needed:
MethodHandleImpl.initStatics();
}
// All compile-time constants go here.
// There is an opportunity to check them against the JVM's idea of them.
/**
* Compile-time constants go here. This collection exists not only for
* reference from clients, but also for ensuring the VM and JDK agree on the
* values of these constants (see {@link #verifyConstants()}).
*/
static class Constants {
Constants() { } // static only
// MethodHandleImpl
static final int // for getConstant
GC_COUNT_GWT = 4,
GC_LAMBDA_SUPPORT = 5;
// MemberName
// The JVM uses values of -2 and above for vtable indexes.
// Field values are simple positive offsets.
// Ref: src/share/vm/oops/methodOop.hpp
// This value is negative enough to avoid such numbers,
// but not too negative.
static final int
MN_IS_METHOD = 0x00010000, // method (not constructor)
MN_IS_CONSTRUCTOR = 0x00020000, // constructor
MN_IS_FIELD = 0x00040000, // field
MN_IS_TYPE = 0x00080000, // nested type
MN_CALLER_SENSITIVE = 0x00100000, // @CallerSensitive annotation detected
MN_REFERENCE_KIND_SHIFT = 24, // refKind
MN_REFERENCE_KIND_MASK = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
// The SEARCH_* bits are not for MN.flags but for the matchFlags argument of MHN.getMembers:
MN_SEARCH_SUPERCLASSES = 0x00100000,
MN_SEARCH_INTERFACES = 0x00200000;
/**
* Basic types as encoded in the JVM. These code values are not
* intended for use outside this class. They are used as part of
* a private interface between the JVM and this class.
*/
static final int
T_BOOLEAN = 4,
T_CHAR = 5,
T_FLOAT = 6,
T_DOUBLE = 7,
T_BYTE = 8,
T_SHORT = 9,
T_INT = 10,
T_LONG = 11,
T_OBJECT = 12,
//T_ARRAY = 13
T_VOID = 14,
//T_ADDRESS = 15
T_ILLEGAL = 99;
/**
* Constant pool entry types.
*/
static final byte
CONSTANT_Utf8 = 1,
CONSTANT_Integer = 3,
CONSTANT_Float = 4,
CONSTANT_Long = 5,
CONSTANT_Double = 6,
CONSTANT_Class = 7,
CONSTANT_String = 8,
CONSTANT_Fieldref = 9,
CONSTANT_Methodref = 10,
CONSTANT_InterfaceMethodref = 11,
CONSTANT_NameAndType = 12,
CONSTANT_MethodHandle = 15, // JSR 292
CONSTANT_MethodType = 16, // JSR 292
CONSTANT_InvokeDynamic = 18,
CONSTANT_LIMIT = 19; // Limit to tags found in classfiles
/**
* Access modifier flags.
*/
static final char
ACC_PUBLIC = 0x0001,
ACC_PRIVATE = 0x0002,
ACC_PROTECTED = 0x0004,
ACC_STATIC = 0x0008,
ACC_FINAL = 0x0010,
ACC_SYNCHRONIZED = 0x0020,
ACC_VOLATILE = 0x0040,
ACC_TRANSIENT = 0x0080,
ACC_NATIVE = 0x0100,
ACC_INTERFACE = 0x0200,
ACC_ABSTRACT = 0x0400,
ACC_STRICT = 0x0800,
ACC_SYNTHETIC = 0x1000,
ACC_ANNOTATION = 0x2000,
ACC_ENUM = 0x4000,
// aliases:
ACC_SUPER = ACC_SYNCHRONIZED,
ACC_BRIDGE = ACC_VOLATILE,
ACC_VARARGS = ACC_TRANSIENT;
MN_IS_METHOD = 0x00010000, // method (not constructor)
MN_IS_CONSTRUCTOR = 0x00020000, // constructor
MN_IS_FIELD = 0x00040000, // field
MN_IS_TYPE = 0x00080000, // nested type
MN_CALLER_SENSITIVE = 0x00100000, // @CallerSensitive annotation detected
MN_REFERENCE_KIND_SHIFT = 24, // refKind
MN_REFERENCE_KIND_MASK = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
// The SEARCH_* bits are not for MN.flags but for the matchFlags argument of MHN.getMembers:
MN_SEARCH_SUPERCLASSES = 0x00100000,
MN_SEARCH_INTERFACES = 0x00200000;
/**
* Constant pool reference-kind codes, as used by CONSTANT_MethodHandle CP entries.
@ -314,6 +235,7 @@ class MethodHandleNatives {
return Invokers.linkToTargetMethod(type);
} else {
appendixResult[0] = callSite;
callSite.initContext(caller);
return Invokers.linkToCallSiteMethod(type);
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2015, 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
@ -567,32 +567,13 @@ class Bits { // package-private
// -- Processor and memory-system properties --
private static final ByteOrder byteOrder;
private static final ByteOrder byteOrder
= unsafe.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
static ByteOrder byteOrder() {
if (byteOrder == null)
throw new Error("Unknown byte order");
return byteOrder;
}
static {
long a = unsafe.allocateMemory(8);
try {
unsafe.putLong(a, 0x0102030405060708L);
byte b = unsafe.getByte(a);
switch (b) {
case 0x01: byteOrder = ByteOrder.BIG_ENDIAN; break;
case 0x08: byteOrder = ByteOrder.LITTLE_ENDIAN; break;
default:
assert false;
byteOrder = null;
}
} finally {
unsafe.freeMemory(a);
}
}
private static int pageSize = -1;
static int pageSize() {
@ -605,17 +586,9 @@ class Bits { // package-private
return (int)(size + (long)pageSize() - 1L) / pageSize();
}
private static boolean unaligned;
private static boolean unalignedKnown = false;
private static boolean unaligned = unsafe.unalignedAccess();
static boolean unaligned() {
if (unalignedKnown)
return unaligned;
String arch = AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("os.arch"));
unaligned = arch.equals("i386") || arch.equals("x86")
|| arch.equals("amd64") || arch.equals("x86_64");
unalignedKnown = true;
return unaligned;
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,7 @@
package java.nio;
import sun.misc.Unsafe;
/**
#if[rw]
@ -52,6 +53,16 @@ class Heap$Type$Buffer$RW$
#end[rw]
*/
#if[byte]
// Cached unsafe-access object
private static final Unsafe unsafe = Bits.unsafe();
// Cached array base offset
private static final long arrayBaseOffset = unsafe.arrayBaseOffset($type$[].class);
#end[byte]
Heap$Type$Buffer$RW$(int cap, int lim) { // package-private
#if[rw]
super(-1, 0, lim, cap, new $type$[cap], 0);
@ -131,6 +142,12 @@ class Heap$Type$Buffer$RW$
return i + offset;
}
#if[byte]
private long byteOffset(long i) {
return arrayBaseOffset + i + offset;
}
#end[byte]
public $type$ get() {
return hb[ix(nextGetIndex())];
}
@ -256,18 +273,18 @@ class Heap$Type$Buffer$RW$
#if[rw]
public char getChar() {
return Bits.getChar(this, ix(nextGetIndex(2)), bigEndian);
return unsafe.getCharUnaligned(hb, byteOffset(nextGetIndex(2)), bigEndian);
}
public char getChar(int i) {
return Bits.getChar(this, ix(checkIndex(i, 2)), bigEndian);
return unsafe.getCharUnaligned(hb, byteOffset(checkIndex(i, 2)), bigEndian);
}
#end[rw]
public $Type$Buffer putChar(char x) {
#if[rw]
Bits.putChar(this, ix(nextPutIndex(2)), x, bigEndian);
unsafe.putCharUnaligned(hb, byteOffset(nextPutIndex(2)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -276,7 +293,7 @@ class Heap$Type$Buffer$RW$
public $Type$Buffer putChar(int i, char x) {
#if[rw]
Bits.putChar(this, ix(checkIndex(i, 2)), x, bigEndian);
unsafe.putCharUnaligned(hb, byteOffset(checkIndex(i, 2)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -307,18 +324,18 @@ class Heap$Type$Buffer$RW$
#if[rw]
public short getShort() {
return Bits.getShort(this, ix(nextGetIndex(2)), bigEndian);
return unsafe.getShortUnaligned(hb, byteOffset(nextGetIndex(2)), bigEndian);
}
public short getShort(int i) {
return Bits.getShort(this, ix(checkIndex(i, 2)), bigEndian);
return unsafe.getShortUnaligned(hb, byteOffset(checkIndex(i, 2)), bigEndian);
}
#end[rw]
public $Type$Buffer putShort(short x) {
#if[rw]
Bits.putShort(this, ix(nextPutIndex(2)), x, bigEndian);
unsafe.putShortUnaligned(hb, byteOffset(nextPutIndex(2)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -327,7 +344,7 @@ class Heap$Type$Buffer$RW$
public $Type$Buffer putShort(int i, short x) {
#if[rw]
Bits.putShort(this, ix(checkIndex(i, 2)), x, bigEndian);
unsafe.putShortUnaligned(hb, byteOffset(checkIndex(i, 2)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -358,18 +375,18 @@ class Heap$Type$Buffer$RW$
#if[rw]
public int getInt() {
return Bits.getInt(this, ix(nextGetIndex(4)), bigEndian);
return unsafe.getIntUnaligned(hb, byteOffset(nextGetIndex(4)), bigEndian);
}
public int getInt(int i) {
return Bits.getInt(this, ix(checkIndex(i, 4)), bigEndian);
return unsafe.getIntUnaligned(hb, byteOffset(checkIndex(i, 4)), bigEndian);
}
#end[rw]
public $Type$Buffer putInt(int x) {
#if[rw]
Bits.putInt(this, ix(nextPutIndex(4)), x, bigEndian);
unsafe.putIntUnaligned(hb, byteOffset(nextPutIndex(4)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -378,7 +395,7 @@ class Heap$Type$Buffer$RW$
public $Type$Buffer putInt(int i, int x) {
#if[rw]
Bits.putInt(this, ix(checkIndex(i, 4)), x, bigEndian);
unsafe.putIntUnaligned(hb, byteOffset(checkIndex(i, 4)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -409,18 +426,18 @@ class Heap$Type$Buffer$RW$
#if[rw]
public long getLong() {
return Bits.getLong(this, ix(nextGetIndex(8)), bigEndian);
return unsafe.getLongUnaligned(hb, byteOffset(nextGetIndex(8)), bigEndian);
}
public long getLong(int i) {
return Bits.getLong(this, ix(checkIndex(i, 8)), bigEndian);
return unsafe.getLongUnaligned(hb, byteOffset(checkIndex(i, 8)), bigEndian);
}
#end[rw]
public $Type$Buffer putLong(long x) {
#if[rw]
Bits.putLong(this, ix(nextPutIndex(8)), x, bigEndian);
unsafe.putLongUnaligned(hb, byteOffset(nextPutIndex(8)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -429,7 +446,7 @@ class Heap$Type$Buffer$RW$
public $Type$Buffer putLong(int i, long x) {
#if[rw]
Bits.putLong(this, ix(checkIndex(i, 8)), x, bigEndian);
unsafe.putLongUnaligned(hb, byteOffset(checkIndex(i, 8)), x, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -460,18 +477,21 @@ class Heap$Type$Buffer$RW$
#if[rw]
public float getFloat() {
return Bits.getFloat(this, ix(nextGetIndex(4)), bigEndian);
int x = unsafe.getIntUnaligned(hb, byteOffset(nextPutIndex(4)), bigEndian);
return Float.intBitsToFloat(x);
}
public float getFloat(int i) {
return Bits.getFloat(this, ix(checkIndex(i, 4)), bigEndian);
int x = unsafe.getIntUnaligned(hb, byteOffset(checkIndex(i, 4)), bigEndian);
return Float.intBitsToFloat(x);
}
#end[rw]
public $Type$Buffer putFloat(float x) {
#if[rw]
Bits.putFloat(this, ix(nextPutIndex(4)), x, bigEndian);
int y = Float.floatToRawIntBits(x);
unsafe.putIntUnaligned(hb, byteOffset(nextPutIndex(4)), y, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -480,7 +500,8 @@ class Heap$Type$Buffer$RW$
public $Type$Buffer putFloat(int i, float x) {
#if[rw]
Bits.putFloat(this, ix(checkIndex(i, 4)), x, bigEndian);
int y = Float.floatToRawIntBits(x);
unsafe.putIntUnaligned(hb, byteOffset(checkIndex(i, 4)), y, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -511,18 +532,21 @@ class Heap$Type$Buffer$RW$
#if[rw]
public double getDouble() {
return Bits.getDouble(this, ix(nextGetIndex(8)), bigEndian);
long x = unsafe.getLongUnaligned(hb, byteOffset(nextGetIndex(8)), bigEndian);
return Double.longBitsToDouble(x);
}
public double getDouble(int i) {
return Bits.getDouble(this, ix(checkIndex(i, 8)), bigEndian);
long x = unsafe.getLongUnaligned(hb, byteOffset(checkIndex(i, 8)), bigEndian);
return Double.longBitsToDouble(x);
}
#end[rw]
public $Type$Buffer putDouble(double x) {
#if[rw]
Bits.putDouble(this, ix(nextPutIndex(8)), x, bigEndian);
long y = Double.doubleToRawLongBits(x);
unsafe.putLongUnaligned(hb, byteOffset(nextPutIndex(8)), y, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();
@ -531,7 +555,8 @@ class Heap$Type$Buffer$RW$
public $Type$Buffer putDouble(int i, double x) {
#if[rw]
Bits.putDouble(this, ix(checkIndex(i, 8)), x, bigEndian);
long y = Double.doubleToRawLongBits(x);
unsafe.putLongUnaligned(hb, byteOffset(checkIndex(i, 8)), y, bigEndian);
return this;
#else[rw]
throw new ReadOnlyBufferException();

@ -2851,7 +2851,10 @@ public final class Files {
* @throws SecurityException
* In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkWrite(String) checkWrite}
* method is invoked to check write access to the file.
* method is invoked to check write access to the file. The {@link
* SecurityManager#checkDelete(String) checkDelete} method is
* invoked to check delete access if the file is opened with the
* {@code DELETE_ON_CLOSE} option.
*
* @see #write(Path,Iterable,Charset,OpenOption[])
*/
@ -2893,7 +2896,10 @@ public final class Files {
* @throws SecurityException
* In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkWrite(String) checkWrite}
* method is invoked to check write access to the file.
* method is invoked to check write access to the file. The {@link
* SecurityManager#checkDelete(String) checkDelete} method is
* invoked to check delete access if the file is opened with the
* {@code DELETE_ON_CLOSE} option.
*
* @since 1.8
*/
@ -3290,7 +3296,10 @@ public final class Files {
* @throws SecurityException
* In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkWrite(String) checkWrite}
* method is invoked to check write access to the file.
* method is invoked to check write access to the file. The {@link
* SecurityManager#checkDelete(String) checkDelete} method is
* invoked to check delete access if the file is opened with the
* {@code DELETE_ON_CLOSE} option.
*/
public static Path write(Path path, byte[] bytes, OpenOption... options)
throws IOException
@ -3350,7 +3359,10 @@ public final class Files {
* @throws SecurityException
* In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkWrite(String) checkWrite}
* method is invoked to check write access to the file.
* method is invoked to check write access to the file. The {@link
* SecurityManager#checkDelete(String) checkDelete} method is
* invoked to check delete access if the file is opened with the
* {@code DELETE_ON_CLOSE} option.
*/
public static Path write(Path path, Iterable<? extends CharSequence> lines,
Charset cs, OpenOption... options)
@ -3398,7 +3410,10 @@ public final class Files {
* @throws SecurityException
* In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkWrite(String) checkWrite}
* method is invoked to check write access to the file.
* method is invoked to check write access to the file. The {@link
* SecurityManager#checkDelete(String) checkDelete} method is
* invoked to check delete access if the file is opened with the
* {@code DELETE_ON_CLOSE} option.
*
* @since 1.8
*/

@ -103,6 +103,10 @@ public final class ZoneOffsetTransition
* Serialization version.
*/
private static final long serialVersionUID = -6946044323557704546L;
/**
* The transition epoch-second.
*/
private final long epochSecond;
/**
* The local transition date-time at the transition.
*/
@ -152,6 +156,7 @@ public final class ZoneOffsetTransition
* @param offsetAfter the offset at and after the transition, not null
*/
ZoneOffsetTransition(LocalDateTime transition, ZoneOffset offsetBefore, ZoneOffset offsetAfter) {
this.epochSecond = transition.toEpochSecond(offsetBefore);
this.transition = transition;
this.offsetBefore = offsetBefore;
this.offsetAfter = offsetAfter;
@ -165,6 +170,7 @@ public final class ZoneOffsetTransition
* @param offsetAfter the offset at and after the transition, not null
*/
ZoneOffsetTransition(long epochSecond, ZoneOffset offsetBefore, ZoneOffset offsetAfter) {
this.epochSecond = epochSecond;
this.transition = LocalDateTime.ofEpochSecond(epochSecond, 0, offsetBefore);
this.offsetBefore = offsetBefore;
this.offsetAfter = offsetAfter;
@ -209,7 +215,7 @@ public final class ZoneOffsetTransition
* @throws IOException if an error occurs
*/
void writeExternal(DataOutput out) throws IOException {
Ser.writeEpochSec(toEpochSecond(), out);
Ser.writeEpochSec(epochSecond, out);
Ser.writeOffset(offsetBefore, out);
Ser.writeOffset(offsetAfter, out);
}
@ -253,7 +259,7 @@ public final class ZoneOffsetTransition
* @return the transition epoch second
*/
public long toEpochSecond() {
return transition.toEpochSecond(offsetBefore);
return epochSecond;
}
//-------------------------------------------------------------------------
@ -397,7 +403,13 @@ public final class ZoneOffsetTransition
*/
@Override
public int compareTo(ZoneOffsetTransition transition) {
return this.getInstant().compareTo(transition.getInstant());
if (epochSecond < transition.epochSecond) {
return -1;
} else if (epochSecond > transition.epochSecond) {
return 1;
} else {
return this.getInstant().compareTo(transition.getInstant());
}
}
//-----------------------------------------------------------------------
@ -416,7 +428,8 @@ public final class ZoneOffsetTransition
}
if (other instanceof ZoneOffsetTransition) {
ZoneOffsetTransition d = (ZoneOffsetTransition) other;
return transition.equals(d.transition) &&
return epochSecond == d.epochSecond &&
transition.equals(d.transition) &&
offsetBefore.equals(d.offsetBefore) && offsetAfter.equals(d.offsetAfter);
}
return false;

@ -183,7 +183,7 @@ public final class Unsafe {
* <p>
* Unless the reference {@code x} being stored is either null
* or matches the field type, the results are undefined.
* If the reference {@code o} is non-null, car marks or
* If the reference {@code o} is non-null, card marks or
* other store barriers for that object (if the VM requires them)
* are updated.
* @see #putInt(Object, long, int)
@ -219,6 +219,35 @@ public final class Unsafe {
/** @see #putInt(Object, long, int) */
public native void putDouble(Object o, long offset, double x);
// These read VM internal data.
/**
* Fetches an uncompressed reference value from a given native variable
* ignoring the VM's compressed references mode.
*
* @param address a memory address locating the variable
* @return the value fetched from the indicated native variable
*/
public native Object getUncompressedObject(long address);
/**
* Fetches the {@link java.lang.Class} Java mirror for the given native
* metaspace {@code Klass} pointer.
*
* @param metaspaceKlass a native metaspace {@code Klass} pointer
* @return the {@link java.lang.Class} Java mirror
*/
public native Class<?> getJavaMirror(long metaspaceKlass);
/**
* Fetches a native metaspace {@code Klass} pointer for the given Java
* object.
*
* @param o Java heap object for which to fetch the class pointer
* @return a native metaspace {@code Klass} pointer
*/
public native long getKlassPointer(Object o);
// These work on values in the C heap.
/**
@ -934,4 +963,347 @@ public final class Unsafe {
private static void throwIllegalAccessError() {
throw new IllegalAccessError();
}
/**
* @return Returns true if the native byte ordering of this
* platform is big-endian, false if it is little-endian.
*/
public final boolean isBigEndian() { return BE; }
/**
* @return Returns true if this platform is capable of performing
* accesses at addresses which are not aligned for the type of the
* primitive type being accessed, false otherwise.
*/
public final boolean unalignedAccess() { return unalignedAccess; }
/**
* Fetches a value at some byte offset into a given Java object.
* More specifically, fetches a value within the given object
* <code>o</code> at the given offset, or (if <code>o</code> is
* null) from the memory address whose numerical value is the
* given offset. <p>
*
* The specification of this method is the same as {@link
* #getLong(Object, long)} except that the offset does not need to
* have been obtained from {@link #objectFieldOffset} on the
* {@link java.lang.reflect.Field} of some Java field. The value
* in memory is raw data, and need not correspond to any Java
* variable. Unless <code>o</code> is null, the value accessed
* must be entirely within the allocated object. The endianness
* of the value in memory is the endianness of the native platform.
*
* <p> The read will be atomic with respect to the largest power
* of two that divides the GCD of the offset and the storage size.
* For example, getLongUnaligned will make atomic reads of 2-, 4-,
* or 8-byte storage units if the offset is zero mod 2, 4, or 8,
* respectively. There are no other guarantees of atomicity.
* <p>
* 8-byte atomicity is only guaranteed on platforms on which
* support atomic accesses to longs.
*
* @param o Java heap object in which the value resides, if any, else
* null
* @param offset The offset in bytes from the start of the object
* @return the value fetched from the indicated object
* @throws RuntimeException No defined exceptions are thrown, not even
* {@link NullPointerException}
* @since 1.9
*/
public final long getLongUnaligned(Object o, long offset) {
if ((offset & 7) == 0) {
return getLong(o, offset);
} else if ((offset & 3) == 0) {
return makeLong(getInt(o, offset),
getInt(o, offset + 4));
} else if ((offset & 1) == 0) {
return makeLong(getShort(o, offset),
getShort(o, offset + 2),
getShort(o, offset + 4),
getShort(o, offset + 6));
} else {
return makeLong(getByte(o, offset),
getByte(o, offset + 1),
getByte(o, offset + 2),
getByte(o, offset + 3),
getByte(o, offset + 4),
getByte(o, offset + 5),
getByte(o, offset + 6),
getByte(o, offset + 7));
}
}
/**
* As {@link #getLongUnaligned(Object, long)} but with an
* additional argument which specifies the endianness of the value
* as stored in memory.
*
* @param o Java heap object in which the variable resides
* @param offset The offset in bytes from the start of the object
* @param bigEndian The endianness of the value
* @return the value fetched from the indicated object
* @since 1.9
*/
public final long getLongUnaligned(Object o, long offset, boolean bigEndian) {
return convEndian(bigEndian, getLongUnaligned(o, offset));
}
/** @see #getLongUnaligned(Object, long) */
public final int getIntUnaligned(Object o, long offset) {
if ((offset & 3) == 0) {
return getInt(o, offset);
} else if ((offset & 1) == 0) {
return makeInt(getShort(o, offset),
getShort(o, offset + 2));
} else {
return makeInt(getByte(o, offset),
getByte(o, offset + 1),
getByte(o, offset + 2),
getByte(o, offset + 3));
}
}
/** @see #getLongUnaligned(Object, long, boolean) */
public final int getIntUnaligned(Object o, long offset, boolean bigEndian) {
return convEndian(bigEndian, getIntUnaligned(o, offset));
}
/** @see #getLongUnaligned(Object, long) */
public final short getShortUnaligned(Object o, long offset) {
if ((offset & 1) == 0) {
return getShort(o, offset);
} else {
return makeShort(getByte(o, offset),
getByte(o, offset + 1));
}
}
/** @see #getLongUnaligned(Object, long, boolean) */
public final short getShortUnaligned(Object o, long offset, boolean bigEndian) {
return convEndian(bigEndian, getShortUnaligned(o, offset));
}
/** @see #getLongUnaligned(Object, long) */
public final char getCharUnaligned(Object o, long offset) {
return (char)getShortUnaligned(o, offset);
}
/** @see #getLongUnaligned(Object, long, boolean) */
public final char getCharUnaligned(Object o, long offset, boolean bigEndian) {
return convEndian(bigEndian, getCharUnaligned(o, offset));
}
/**
* Stores a value at some byte offset into a given Java object.
* <p>
* The specification of this method is the same as {@link
* #getLong(Object, long)} except that the offset does not need to
* have been obtained from {@link #objectFieldOffset} on the
* {@link java.lang.reflect.Field} of some Java field. The value
* in memory is raw data, and need not correspond to any Java
* variable. The endianness of the value in memory is the
* endianness of the native platform.
* <p>
* The write will be atomic with respect to the largest power of
* two that divides the GCD of the offset and the storage size.
* For example, putLongUnaligned will make atomic writes of 2-, 4-,
* or 8-byte storage units if the offset is zero mod 2, 4, or 8,
* respectively. There are no other guarantees of atomicity.
* <p>
* 8-byte atomicity is only guaranteed on platforms on which
* support atomic accesses to longs.
* <p>
*
* @param o Java heap object in which the value resides, if any, else
* null
* @param offset The offset in bytes from the start of the object
* @param x the value to store
* @throws RuntimeException No defined exceptions are thrown, not even
* {@link NullPointerException}
* @since 1.9
*/
public final void putLongUnaligned(Object o, long offset, long x) {
if ((offset & 7) == 0) {
putLong(o, offset, x);
} else if ((offset & 3) == 0) {
putLongParts(o, offset,
(int)(x >> 0),
(int)(x >>> 32));
} else if ((offset & 1) == 0) {
putLongParts(o, offset,
(short)(x >>> 0),
(short)(x >>> 16),
(short)(x >>> 32),
(short)(x >>> 48));
} else {
putLongParts(o, offset,
(byte)(x >>> 0),
(byte)(x >>> 8),
(byte)(x >>> 16),
(byte)(x >>> 24),
(byte)(x >>> 32),
(byte)(x >>> 40),
(byte)(x >>> 48),
(byte)(x >>> 56));
}
}
/**
* As {@link #putLongUnaligned(Object, long, long)} but with an additional
* argument which specifies the endianness of the value as stored in memory.
* @param o Java heap object in which the value resides
* @param offset The offset in bytes from the start of the object
* @param x the value to store
* @param bigEndian The endianness of the value
* @throws RuntimeException No defined exceptions are thrown, not even
* {@link NullPointerException}
* @since 1.9
*/
public final void putLongUnaligned(Object o, long offset, long x, boolean bigEndian) {
putLongUnaligned(o, offset, convEndian(bigEndian, x));
}
/** @see #putLongUnaligned(Object, long, long) */
public final void putIntUnaligned(Object o, long offset, int x) {
if ((offset & 3) == 0) {
putInt(o, offset, x);
} else if ((offset & 1) == 0) {
putIntParts(o, offset,
(short)(x >> 0),
(short)(x >>> 16));
} else {
putIntParts(o, offset,
(byte)(x >>> 0),
(byte)(x >>> 8),
(byte)(x >>> 16),
(byte)(x >>> 24));
}
}
/** @see #putLongUnaligned(Object, long, long, boolean) */
public final void putIntUnaligned(Object o, long offset, int x, boolean bigEndian) {
putIntUnaligned(o, offset, convEndian(bigEndian, x));
}
/** @see #putLongUnaligned(Object, long, long) */
public final void putShortUnaligned(Object o, long offset, short x) {
if ((offset & 1) == 0) {
putShort(o, offset, x);
} else {
putShortParts(o, offset,
(byte)(x >>> 0),
(byte)(x >>> 8));
}
}
/** @see #putLongUnaligned(Object, long, long, boolean) */
public final void putShortUnaligned(Object o, long offset, short x, boolean bigEndian) {
putShortUnaligned(o, offset, convEndian(bigEndian, x));
}
/** @see #putLongUnaligned(Object, long, long) */
public final void putCharUnaligned(Object o, long offset, char x) {
putShortUnaligned(o, offset, (short)x);
}
/** @see #putLongUnaligned(Object, long, long, boolean) */
public final void putCharUnaligned(Object o, long offset, char x, boolean bigEndian) {
putCharUnaligned(o, offset, convEndian(bigEndian, x));
}
// JVM interface methods
private native boolean unalignedAccess0();
private native boolean isBigEndian0();
// BE is true iff the native endianness of this platform is big.
private static final boolean BE = theUnsafe.isBigEndian0();
// unalignedAccess is true iff this platform can perform unaligned accesses.
private static final boolean unalignedAccess = theUnsafe.unalignedAccess0();
private static int pickPos(int top, int pos) { return BE ? top - pos : pos; }
// These methods construct integers from bytes. The byte ordering
// is the native endianness of this platform.
private static long makeLong(byte i0, byte i1, byte i2, byte i3, byte i4, byte i5, byte i6, byte i7) {
return ((toUnsignedLong(i0) << pickPos(56, 0))
| (toUnsignedLong(i1) << pickPos(56, 8))
| (toUnsignedLong(i2) << pickPos(56, 16))
| (toUnsignedLong(i3) << pickPos(56, 24))
| (toUnsignedLong(i4) << pickPos(56, 32))
| (toUnsignedLong(i5) << pickPos(56, 40))
| (toUnsignedLong(i6) << pickPos(56, 48))
| (toUnsignedLong(i7) << pickPos(56, 56)));
}
private static long makeLong(short i0, short i1, short i2, short i3) {
return ((toUnsignedLong(i0) << pickPos(48, 0))
| (toUnsignedLong(i1) << pickPos(48, 16))
| (toUnsignedLong(i2) << pickPos(48, 32))
| (toUnsignedLong(i3) << pickPos(48, 48)));
}
private static long makeLong(int i0, int i1) {
return (toUnsignedLong(i0) << pickPos(32, 0))
| (toUnsignedLong(i1) << pickPos(32, 32));
}
private static int makeInt(short i0, short i1) {
return (toUnsignedInt(i0) << pickPos(16, 0))
| (toUnsignedInt(i1) << pickPos(16, 16));
}
private static int makeInt(byte i0, byte i1, byte i2, byte i3) {
return ((toUnsignedInt(i0) << pickPos(24, 0))
| (toUnsignedInt(i1) << pickPos(24, 8))
| (toUnsignedInt(i2) << pickPos(24, 16))
| (toUnsignedInt(i3) << pickPos(24, 24)));
}
private static short makeShort(byte i0, byte i1) {
return (short)((toUnsignedInt(i0) << pickPos(8, 0))
| (toUnsignedInt(i1) << pickPos(8, 8)));
}
private static byte pick(byte le, byte be) { return BE ? be : le; }
private static short pick(short le, short be) { return BE ? be : le; }
private static int pick(int le, int be) { return BE ? be : le; }
// These methods write integers to memory from smaller parts
// provided by their caller. The ordering in which these parts
// are written is the native endianness of this platform.
private void putLongParts(Object o, long offset, byte i0, byte i1, byte i2, byte i3, byte i4, byte i5, byte i6, byte i7) {
putByte(o, offset + 0, pick(i0, i7));
putByte(o, offset + 1, pick(i1, i6));
putByte(o, offset + 2, pick(i2, i5));
putByte(o, offset + 3, pick(i3, i4));
putByte(o, offset + 4, pick(i4, i3));
putByte(o, offset + 5, pick(i5, i2));
putByte(o, offset + 6, pick(i6, i1));
putByte(o, offset + 7, pick(i7, i0));
}
private void putLongParts(Object o, long offset, short i0, short i1, short i2, short i3) {
putShort(o, offset + 0, pick(i0, i3));
putShort(o, offset + 2, pick(i1, i2));
putShort(o, offset + 4, pick(i2, i1));
putShort(o, offset + 6, pick(i3, i0));
}
private void putLongParts(Object o, long offset, int i0, int i1) {
putInt(o, offset + 0, pick(i0, i1));
putInt(o, offset + 4, pick(i1, i0));
}
private void putIntParts(Object o, long offset, short i0, short i1) {
putShort(o, offset + 0, pick(i0, i1));
putShort(o, offset + 2, pick(i1, i0));
}
private void putIntParts(Object o, long offset, byte i0, byte i1, byte i2, byte i3) {
putByte(o, offset + 0, pick(i0, i3));
putByte(o, offset + 1, pick(i1, i2));
putByte(o, offset + 2, pick(i2, i1));
putByte(o, offset + 3, pick(i3, i0));
}
private void putShortParts(Object o, long offset, byte i0, byte i1) {
putByte(o, offset + 0, pick(i0, i1));
putByte(o, offset + 1, pick(i1, i0));
}
// Zero-extend an integer
private static int toUnsignedInt(byte n) { return n & 0xff; }
private static int toUnsignedInt(short n) { return n & 0xffff; }
private static long toUnsignedLong(byte n) { return n & 0xffl; }
private static long toUnsignedLong(short n) { return n & 0xffffl; }
private static long toUnsignedLong(int n) { return n & 0xffffffffl; }
// Maybe byte-reverse an integer
private static char convEndian(boolean big, char n) { return big == BE ? n : Character.reverseBytes(n); }
private static short convEndian(boolean big, short n) { return big == BE ? n : Short.reverseBytes(n) ; }
private static int convEndian(boolean big, int n) { return big == BE ? n : Integer.reverseBytes(n) ; }
private static long convEndian(boolean big, long n) { return big == BE ? n : Long.reverseBytes(n) ; }
}

@ -33,7 +33,7 @@ package sun.security.action;
* <code>AccessController.doPrivileged</code>.
*
* <p>The following code retrieves the boolean value of the system
* property named <code>"prop"</code> as a privileged action: <p>
* property named <code>"prop"</code> as a privileged action:
*
* <pre>
* boolean b = java.security.AccessController.doPrivileged

@ -35,7 +35,7 @@ import java.security.Security;
* <code>AccessController.doPrivileged</code>.
*
* <p>The following code retrieves the boolean value of the security
* property named <code>"prop"</code> as a privileged action: <p>
* property named <code>"prop"</code> as a privileged action:
*
* <pre>
* boolean b = java.security.AccessController.doPrivileged

@ -36,7 +36,7 @@ package sun.security.action;
* property named <code>"prop"</code> as a privileged action. Since it does
* not pass a default value to be used in case the property
* <code>"prop"</code> is not defined, it has to check the result for
* <code>null</code>: <p>
* <code>null</code>:
*
* <pre>
* Integer tmp = java.security.AccessController.doPrivileged
@ -50,7 +50,7 @@ package sun.security.action;
* <p>The following code retrieves the integer value of the system
* property named <code>"prop"</code> as a privileged action, and also passes
* a default value to be used in case the property <code>"prop"</code> is not
* defined: <p>
* defined:
*
* <pre>
* int i = ((Integer)java.security.AccessController.doPrivileged(
@ -84,7 +84,7 @@ public class GetIntegerAction
* value of that property.
*
* @param theProp the name of the system property.
* @param defaulVal the default value.
* @param defaultVal the default value.
*/
public GetIntegerAction(String theProp, int defaultVal) {
this.theProp = theProp;

@ -36,7 +36,7 @@ package sun.security.action;
* property named <code>"prop"</code> as a privileged action. Since it does
* not pass a default value to be used in case the property
* <code>"prop"</code> is not defined, it has to check the result for
* <code>null</code>: <p>
* <code>null</code>:
*
* <pre>
* Long tmp = java.security.AccessController.doPrivileged
@ -50,7 +50,7 @@ package sun.security.action;
* <p>The following code retrieves the <code>Long</code> value of the system
* property named <code>"prop"</code> as a privileged action, and also passes
* a default value to be used in case the property <code>"prop"</code> is not
* defined: <p>
* defined:
*
* <pre>
* long l = java.security.AccessController.doPrivileged
@ -83,7 +83,7 @@ public class GetLongAction implements java.security.PrivilegedAction<Long> {
* value of that property.
*
* @param theProp the name of the system property.
* @param defaulVal the default value.
* @param defaultVal the default value.
*/
public GetLongAction(String theProp, long defaultVal) {
this.theProp = theProp;

@ -33,7 +33,7 @@ package sun.security.action;
* <code>AccessController.doPrivileged</code>.
*
* <p>The following code retrieves the value of the system
* property named <code>"prop"</code> as a privileged action: <p>
* property named <code>"prop"</code> as a privileged action:
*
* <pre>
* String s = java.security.AccessController.doPrivileged
@ -66,7 +66,7 @@ public class GetPropertyAction
* value of that property.
*
* @param theProp the name of the system property.
* @param defaulVal the default value.
* @param defaultVal the default value.
*/
public GetPropertyAction(String theProp, String defaultVal) {
this.theProp = theProp;

@ -117,7 +117,7 @@ public class GetInstance {
/**
* This method exists for compatibility with JCE only. It will be removed
* once JCE has been changed to use the replacement method.
* @deprecated use getServices(List<ServiceId>) instead
* @deprecated use {@code getServices(List<ServiceId>)} instead
*/
@Deprecated
public static List<Service> getServices(String type,

@ -353,7 +353,7 @@ public final class ProviderList {
/**
* This method exists for compatibility with JCE only. It will be removed
* once JCE has been changed to use the replacement method.
* @deprecated use getServices(List<ServiceId>) instead
* @deprecated use {@code getServices(List<ServiceId>)} instead
*/
@Deprecated
public List<Service> getServices(String type, List<String> algorithms) {

@ -51,7 +51,6 @@ import sun.misc.HexDumpEncoder;
* in string form, its value is a (single-valued)
* byte array that is the SET's encoding.
*
* <P>
* <TABLE BORDER CELLPADDING=8 ALIGN=CENTER>
*
* <TR>
@ -476,7 +475,7 @@ public class PKCS9Attribute implements DerEncoder {
* Construct a PKCS9Attribute from its encoding on an input
* stream.
*
* @param val the DerValue representing the DER encoding of the attribute.
* @param derVal the DerValue representing the DER encoding of the attribute.
* @exception IOException on parsing error.
*/
public PKCS9Attribute(DerValue derVal) throws IOException {

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2015, 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
@ -1642,23 +1642,22 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
Entry entry = entries.get(alias);
// certificate chain
int chainLen = 1;
Certificate[] certs = null;
Certificate[] certs;
if (entry instanceof PrivateKeyEntry) {
PrivateKeyEntry keyEntry = (PrivateKeyEntry) entry;
if (keyEntry.chain == null) {
chainLen = 0;
} else {
chainLen = keyEntry.chain.length;
}
certs = keyEntry.chain;
if (keyEntry.chain != null) {
certs = keyEntry.chain;
} else {
certs = new Certificate[0];
}
} else if (entry instanceof CertEntry) {
certs = new Certificate[]{((CertEntry) entry).cert};
certs = new Certificate[]{((CertEntry) entry).cert};
} else {
certs = new Certificate[0];
}
for (int i = 0; i < chainLen; i++) {
for (int i = 0; i < certs.length; i++) {
// create SafeBag of Type CertBag
DerOutputStream safeBag = new DerOutputStream();
safeBag.putOID(CertBag_OID);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2015, 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
@ -88,13 +88,8 @@ final class ByteArrayAccess {
// Return whether this platform supports full speed int/long memory access
// at unaligned addresses.
// This code was copied from java.nio.Bits because there is no equivalent
// public API.
private static boolean unaligned() {
String arch = java.security.AccessController.doPrivileged
(new sun.security.action.GetPropertyAction("os.arch", ""));
return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64")
|| arch.equals("x86_64");
return unsafe.unalignedAccess();
}
/**

@ -186,7 +186,7 @@ import sun.net.www.ParseUtil;
* <p> Case is unimportant for the identifiers (<code>permission</code>,
* <code>signedBy</code>, <code>codeBase</code>, etc.) but is
* significant for the <i>Type</i>
* or for any string that is passed in as a value. <p>
* or for any string that is passed in as a value.
*
* <p> An example of two entries in a policy configuration file is
* <pre>
@ -212,7 +212,7 @@ import sun.net.www.ParseUtil;
* with one or more Principal class/name pairs. The exact
* replacement performed depends upon the contents of the
* grant clause to which the permission belongs.
*<p>
* <p>
*
* If the grant clause does not contain any principal information,
* the permission will be ignored (permissions containing
@ -220,11 +220,11 @@ import sun.net.www.ParseUtil;
* of a principal-based grant clause). For example, BarPermission
* will always be ignored in the following grant clause:
*
*<pre>
* <pre>
* grant codebase "www.foo.com", signedby "duke" {
* permission BarPermission "... ${{self}} ...";
* };
*</pre>
* </pre>
*
* If the grant clause contains principal information, <b>${{self}}</b>
* will be replaced with that same principal information.
@ -389,7 +389,7 @@ public class PolicyFile extends java.security.Policy {
* <p>Case is unimportant for the identifiers (<code>permission</code>,
* <code>signedBy</code>, <code>codeBase</code>, etc.) but is
* significant for the <i>Type</i>
* or for any string that is passed in as a value. <p>
* or for any string that is passed in as a value.
*
* <p>An example of two entries in a policy configuration file is
* <pre>
@ -399,7 +399,7 @@ public class PolicyFile extends java.security.Policy {
* grant signedBy "Duke" {
* permission java.io.FilePermission "/tmp/*", "read,write";
* };
* <p>
*
* // grant everyone the following permission
*
* grant {
@ -1044,8 +1044,8 @@ public class PolicyFile extends java.security.Policy {
* the ProtectionDomain and tests whether the permission is
* granted.
*
* @param domain the ProtectionDomain to test
* @param permission the Permission object to be tested for implication.
* @param pd the ProtectionDomain to test
* @param p the Permission object to be tested for implication.
*
* @return true if "permission" is a proper subset of a permission
* granted to this ProtectionDomain.
@ -1093,8 +1093,6 @@ public class PolicyFile extends java.security.Policy {
* originally granted permission, as well as the Class and name
* for the respective <code>Principal</code>.
*
* <p>
*
* @param domain the Permissions granted to this
* <code>ProtectionDomain</code> are returned.
*
@ -1131,7 +1129,7 @@ public class PolicyFile extends java.security.Policy {
* Examines this Policy and creates a PermissionCollection object with
* the set of permissions for the specified CodeSource.
*
* @param CodeSource the codesource associated with the caller.
* @param codesource the CodeSource associated with the caller.
* This encapsulates the original location of the code (where the code
* came from) and the public key(s) of its signer.
*
@ -1430,9 +1428,7 @@ public class PolicyFile extends java.security.Policy {
}
/**
* <p>
*
* @param sp the SelfPermission that needs to be expanded <p>
* @param sp the SelfPermission that needs to be expanded.
*
* @param entryPs list of principals for the Policy entry.
*

@ -45,19 +45,19 @@ import sun.security.util.ResourcesMgr;
* is represented as a separate
* persistent configuration. The configuration may be stored as a
* flat ASCII file, as a serialized binary file of
* the Policy class, or as a database. <p>
* the Policy class, or as a database.
*
* <p>The Java runtime creates one global Policy object, which is used to
* represent the static policy configuration file. It is consulted by
* a ProtectionDomain when the protection domain initializes its set of
* permissions. <p>
* permissions.
*
* <p>The Policy <code>init</code> method parses the policy
* configuration file, and then
* populates the Policy object. The Policy object is agnostic in that
* it is not involved in making policy decisions. It is merely the
* Java runtime representation of the persistent policy configuration
* file. <p>
* file.
*
* <p>When a protection domain needs to initialize its set of
* permissions, it executes code such as the following
@ -842,8 +842,7 @@ public class PolicyParser {
/**
* Each grant entry in the policy configuration file is
* represented by a
* GrantEntry object. <p>
* represented by a GrantEntry object.
*
* <p>
* For example, the entry
@ -1094,7 +1093,7 @@ public class PolicyParser {
/**
* Each permission entry in the policy configuration file is
* represented by a
* PermissionEntry object. <p>
* PermissionEntry object.
*
* <p>
* For example, the entry

@ -208,7 +208,7 @@ implements java.io.Serializable {
/**
* Generates a user-specified number of random bytes.
*
* @param bytes the array to be filled in with random bytes.
* @param result the array to be filled in with random bytes.
*/
@Override
public synchronized void engineNextBytes(byte[] result) {

@ -41,7 +41,7 @@ import java.util.Base64;
import sun.security.pkcs.ParsingException;
/**
* This class defines a certificate factory for X.509 v3 certificates &
* This class defines a certificate factory for X.509 v3 certificates {@literal &}
* certification paths, and X.509 v2 certificate revocation lists (CRLs).
*
* @author Jan Luehe
@ -536,7 +536,7 @@ public class X509Factory extends CertificateFactorySpi {
* after the newline character after the -----END SOMETHING----- line.
*
* @param is the InputStream
* @returns byte block or null if end of stream
* @return byte block or null if end of stream
* @throws IOException If any parsing error
*/
private static byte[] readOneBlock(InputStream is) throws IOException {
@ -664,7 +664,7 @@ public class X509Factory extends CertificateFactorySpi {
* @param is Read from this InputStream
* @param bout Write into this OutputStream
* @param tag Tag already read (-1 mean not read)
* @returns The current tag, used to check EOC in indefinite-length BER
* @return The current tag, used to check EOC in indefinite-length BER
* @throws IOException Any parsing error
*/
private static int readBERInternal(InputStream is,

@ -75,10 +75,10 @@ import java.util.List;
* values <code>SUCCEED</code> and <code>FAIL</code> mean that we've come to
* the end of the build process, and there will not be any more entries in
* the list.
* <p>
*
* @see sun.security.provider.certpath.BuildStep
* @see sun.security.provider.certpath.Vertex
* <p>
*
* @author seth proctor
* @since 1.4
*/

@ -93,7 +93,7 @@ public class BuildStep {
/**
* return vertex description for this build step
*
* @returns Vertex
* @return Vertex
*/
public Vertex getVertex() {
return vertex;
@ -102,7 +102,7 @@ public class BuildStep {
/**
* return the certificate associated with this build step
*
* @returns X509Certificate
* @return X509Certificate
*/
public X509Certificate getCertificate() {
return cert;
@ -112,7 +112,7 @@ public class BuildStep {
* return string form of issuer name from certificate associated with this
* build step
*
* @returns String form of issuer name or null, if no certificate.
* @return String form of issuer name or null, if no certificate.
*/
public String getIssuerName() {
return getIssuerName(null);
@ -125,7 +125,7 @@ public class BuildStep {
*
* @param defaultName name to use as default if unable to return an issuer
* name from the certificate, or if no certificate.
* @returns String form of issuer name or defaultName, if no certificate or
* @return String form of issuer name or defaultName, if no certificate or
* exception received while trying to extract issuer name from certificate.
*/
public String getIssuerName(String defaultName) {
@ -137,7 +137,7 @@ public class BuildStep {
* return string form of subject name from certificate associated with this
* build step.
*
* @returns String form of subject name or null, if no certificate.
* @return String form of subject name or null, if no certificate.
*/
public String getSubjectName() {
return getSubjectName(null);
@ -151,7 +151,7 @@ public class BuildStep {
*
* @param defaultName name to use as default if unable to return a subject
* name from the certificate, or if no certificate.
* @returns String form of subject name or defaultName, if no certificate or
* @return String form of subject name or defaultName, if no certificate or
* if an exception was received while attempting to extract the subject name
* from the certificate.
*/
@ -163,7 +163,7 @@ public class BuildStep {
/**
* return the exception associated with this build step.
*
* @returns Throwable
* @return Throwable
*/
public Throwable getThrowable() {
return throwable;
@ -173,7 +173,7 @@ public class BuildStep {
* return the result code associated with this build step. The result codes
* are POSSIBLE, FOLLOW, BACK, FAIL, SUCCEED.
*
* @returns int result code
* @return int result code
*/
public int getResult() {
return result;
@ -184,7 +184,7 @@ public class BuildStep {
* with this build step.
*
* @param res result code
* @returns String string representing meaning of the result code
* @return String string representing meaning of the result code
*/
public String resultToString(int res) {
String resultString = "";
@ -216,7 +216,7 @@ public class BuildStep {
* return a string representation of this build step, showing minimal
* detail.
*
* @returns String
* @return String
*/
@Override
public String toString() {
@ -243,7 +243,7 @@ public class BuildStep {
* the vertex state appropriate to the result of this build step, and the
* certificate contents.
*
* @returns String
* @return String
*/
public String verboseToString() {
String out = resultToString(getResult());
@ -269,7 +269,7 @@ public class BuildStep {
* return a string representation of this build step, including all possible
* detail of the vertex state, but not including the certificate contents.
*
* @returns String
* @return String
*/
public String fullToString() {
return resultToString(getResult()) + vertex.toString();

@ -849,7 +849,7 @@ class PolicyChecker extends PKIXCertPathChecker {
* @param initPolicies the Set of policies required by the user
* @param currCertPolicies the CertificatePoliciesExtension of the
* certificate being processed
* @returns the root node of the valid policy tree after modification
* @return the root node of the valid policy tree after modification
* @exception CertPathValidatorException Exception thrown if error occurs.
*/
private static PolicyNodeImpl removeInvalidNodes(PolicyNodeImpl rootNode,
@ -909,7 +909,7 @@ class PolicyChecker extends PKIXCertPathChecker {
* valid policy tree is null. Marks each node of the returned tree
* immutable and thread-safe.
*
* @returns the root node of the valid policy tree, or null if
* @return the root node of the valid policy tree, or null if
* the valid policy tree is null
*/
PolicyNode getPolicyTree() {

@ -67,7 +67,7 @@ public class Vertex {
/**
* return the certificate for this vertex
*
* @returns X509Certificate
* @return X509Certificate
*/
public X509Certificate getCertificate() {
return cert;
@ -78,7 +78,7 @@ public class Vertex {
* adjacency list that contains certificates that could follow this
* certificate.
*
* @returns int index for this vertex, or -1 if no following certificates.
* @return int index for this vertex, or -1 if no following certificates.
*/
public int getIndex() {
return index;
@ -99,7 +99,7 @@ public class Vertex {
* return the throwable associated with this vertex;
* returns null if none.
*
* @returns Throwable
* @return Throwable
*/
public Throwable getThrowable() {
return throwable;
@ -118,7 +118,7 @@ public class Vertex {
/**
* Return full string representation of vertex
*
* @returns String representation of vertex
* @return String representation of vertex
*/
@Override
public String toString() {
@ -129,7 +129,7 @@ public class Vertex {
* Return string representation of this vertex's
* certificate information.
*
* @returns String representation of certificate info
* @return String representation of certificate info
*/
public String certToString() {
StringBuilder sb = new StringBuilder();
@ -197,7 +197,7 @@ public class Vertex {
* return Vertex throwable as String compatible with
* the way toString returns other information
*
* @returns String form of exception (or "none")
* @return String form of exception (or "none")
*/
public String throwableToString() {
StringBuilder sb = new StringBuilder("Exception: ");
@ -214,7 +214,7 @@ public class Vertex {
* the way other Vertex.xToString() methods display
* information.
*
* @returns String form of index as "Last cert? [Yes/No]
* @return String form of index as "Last cert? [Yes/No]
*/
public String moreToString() {
StringBuilder sb = new StringBuilder("Last cert? ");
@ -227,7 +227,7 @@ public class Vertex {
* return Vertex index as String compatible with
* the way other Vertex.xToString() methods displays other information.
*
* @returns String form of index as "Index: [numeric index]"
* @return String form of index as "Index: [numeric index]"
*/
public String indexToString() {
return "Index: " + index + "\n";

@ -133,7 +133,7 @@ public final class RSAKeyFactory extends KeyFactorySpi {
*
* @param modulusLen the bit length of the RSA modulus.
* @param exponent the RSA exponent
* @param minModulusLen if > 0, check to see if modulusLen is at
* @param minModulusLen if {@literal > 0}, check to see if modulusLen is at
* least this long, otherwise unused.
* @param maxModulusLen caller will allow this max number of bits.
* Allow the smaller of the system-defined maximum and this param.

@ -39,11 +39,13 @@ import java.security.CryptoPrimitive;
*
* Checks for a particular version number should generally take this form:
*
* <pre>{@code
* if (protocolVersion.v >= ProtocolVersion.TLS10) {
* // TLS 1.0 code goes here
* } else {
* // SSL 3.0 code here
* }
* }</pre>
*
* @author Andreas Sterbenz
* @since 1.4.1

@ -68,7 +68,7 @@ public class HttpTimestamper implements Timestamper {
/**
* Creates a timestamper that connects to the specified TSA.
*
* @param tsa The location of the TSA. It must be an HTTP or HTTPS URI.
* @param tsaURI The location of the TSA. It must be an HTTP or HTTPS URI.
* @throws IllegalArgumentException if tsaURI is not an HTTP or HTTPS URI
*/
public HttpTimestamper(URI tsaURI) {

@ -112,7 +112,7 @@ public class TSRequest {
/**
* Sets an object identifier for the Time-Stamp Protocol policy.
*
* @param version The policy object identifier.
* @param policyId The policy object identifier.
*/
public void setPolicyId(String policyId) {
this.policyId = policyId;

@ -83,8 +83,8 @@ public class TimestampToken {
/**
* Constructs an object to store a timestamp token.
*
* @param status A buffer containing the ASN.1 BER encoding of the
* TSTInfo element defined in RFC 3161.
* @param timestampTokenInfo A buffer containing the ASN.1 BER encoding of the
* TSTInfo element defined in RFC 3161.
*/
public TimestampToken(byte[] timestampTokenInfo) throws IOException {
if (timestampTokenInfo == null) {

@ -42,7 +42,7 @@ public class PathList {
* Utility method for appending path from pathFrom to pathTo.
*
* @param pathTo the target path
* @param pathSource the path to be appended to pathTo
* @param pathFrom the path to be appended to pathTo
* @return the resulting path
*/
public static String appendPath(String pathTo, String pathFrom) {

@ -1887,7 +1887,7 @@ public final class Main {
/**
* Load the srckeystore from a stream, used in -importkeystore
* @returns the src KeyStore
* @return the src KeyStore
*/
KeyStore loadSourceKeyStore() throws Exception {
boolean isPkcs11 = false;
@ -2005,7 +2005,7 @@ public final class Main {
/**
* Import a single entry named alias from srckeystore
* @returns 1 if the import action succeed
* @return 1 if the import action succeed
* 0 if user choose to ignore an alias-dumplicated entry
* 2 if setEntry throws Exception
*/
@ -2836,7 +2836,7 @@ public final class Main {
/**
* Prompts user for alias name.
* @param prompt the {0} of "Enter {0} alias name: " in prompt line
* @returns the string entered by the user, without the \n at the end
* @return the string entered by the user, without the \n at the end
*/
private String getAlias(String prompt) throws Exception {
if (prompt != null) {
@ -2854,7 +2854,7 @@ public final class Main {
/**
* Prompts user for an input string from the command line (System.in)
* @prompt the prompt string printed
* @returns the string entered by the user, without the \n at the end
* @return the string entered by the user, without the \n at the end
*/
private String inputStringFromStdin(String prompt) throws Exception {
System.err.print(prompt);

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_de extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_es extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_fr extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_it extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_ja extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_ko extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_pt_BR extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_sv extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -420,8 +420,6 @@ public class Resources_zh_HK extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -26,7 +26,7 @@
package sun.security.tools.keytool;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for the keytool.
*
*/
@ -433,8 +433,6 @@ public class Resources_zh_TW extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -66,10 +66,10 @@ public class BitArray {
/**
* Creates a BitArray of the specified size, initialized from the
* specified byte array. The most significant bit of a[0] gets
* specified byte array. The most significant bit of {@code a[0]} gets
* index zero in the BitArray. The array a must be large enough
* to specify a value for every bit in the BitArray. In other words,
* 8*a.length <= length.
* {@code 8*a.length <= length}.
*/
public BitArray(int length, byte[] a) throws IllegalArgumentException {

@ -44,8 +44,9 @@ public class ByteArrayLexOrder implements Comparator<byte[]> {
*
* @param bytes1 first byte array to compare.
* @param bytes2 second byte array to compare.
* @return negative number if bytes1 < bytes2, 0 if bytes1 == bytes2,
* positive number if bytes1 > bytes2.
* @return negative number if {@code bytes1 < bytes2},
* 0 if {@code bytes1 == bytes2},
* positive number if {@code bytes1 > bytes2}.
*
* @exception <code>ClassCastException</code>
* if either argument is not a byte array.

@ -44,8 +44,9 @@ public class ByteArrayTagOrder implements Comparator<byte[]> {
*
* @param bytes1 first byte array to compare.
* @param bytes2 second byte array to compare.
* @return negative number if bytes1 < bytes2, 0 if bytes1 == bytes2,
* positive number if bytes1 > bytes2.
* @return negative number if {@code bytes1 < bytes2},
* 0 if {@code bytes1 == bytes2},
* positive number if {@code bytes1 > bytes2}.
*
* @exception <code>ClassCastException</code>
* if either argument is not a byte array.

@ -103,7 +103,7 @@ extends ByteArrayOutputStream implements DerEncoder {
* @param tag the DER value of the context-specific tag that replaces
* original tag of the value in the output, such as in
* <pre>
* <em> <field> [N] IMPLICIT <type></em>
* <em> {@code <field> [N] IMPLICIT <type>}</em>
* </pre>
* For example, <em>FooLength [1] IMPLICIT INTEGER</em>, with value=4;
* would be encoded as "81 01 04" whereas in explicit
@ -245,7 +245,7 @@ extends ByteArrayOutputStream implements DerEncoder {
* Marshals a DER bit string on the output stream.
* The bit strings need not be byte-aligned.
*
* @param bits the bit string, MSB first
* @param ba the bit string, MSB first
*/
public void putUnalignedBitString(BitArray ba) throws IOException {
byte[] bits = ba.toByteArray();
@ -260,7 +260,7 @@ extends ByteArrayOutputStream implements DerEncoder {
* Marshals a truncated DER bit string on the output stream.
* The bit strings need not be byte-aligned.
*
* @param bits the bit string, MSB first
* @param ba the bit string, MSB first
*/
public void putTruncatedUnalignedBitString(BitArray ba) throws IOException {
putUnalignedBitString(ba.truncate());
@ -516,7 +516,7 @@ extends ByteArrayOutputStream implements DerEncoder {
/**
* Put the encoding of the length in the stream.
*
* @params len the length of the attribute.
* @param len the length of the attribute.
* @exception IOException on writing errors.
*/
public void putLength(int len) throws IOException {
@ -550,11 +550,11 @@ extends ByteArrayOutputStream implements DerEncoder {
/**
* Put the tag of the attribute in the stream.
*
* @params class the tag class type, one of UNIVERSAL, CONTEXT,
* APPLICATION or PRIVATE
* @params form if true, the value is constructed, otherwise it is
* @param tagClass the tag class type, one of UNIVERSAL, CONTEXT,
* APPLICATION or PRIVATE
* @param form if true, the value is constructed, otherwise it is
* primitive.
* @params val the tag value
* @param val the tag value
*/
public void putTag(byte tagClass, boolean form, byte val) {
byte tag = (byte)(tagClass | val);

@ -301,7 +301,7 @@ public class DerValue {
*
* @param buf the buffer
* @param offset start point of the single DER-encoded dataum
* @param length how many bytes are in the encoded datum
* @param len how many bytes are in the encoded datum
*/
public DerValue(byte[] buf, int offset, int len) throws IOException {
data = init(true, new ByteArrayInputStream(buf, offset, len));
@ -594,7 +594,7 @@ public class DerValue {
* Returns an ASN.1 BIT STRING value, with the tag assumed implicit
* based on the parameter. The bit string must be byte-aligned.
*
* @params tagImplicit if true, the tag is assumed implicit.
* @param tagImplicit if true, the tag is assumed implicit.
* @return the bit string held in this value
*/
public byte[] getBitString(boolean tagImplicit) throws IOException {
@ -610,7 +610,7 @@ public class DerValue {
* Returns an ASN.1 BIT STRING value, with the tag assumed implicit
* based on the parameter. The bit string need not be byte-aligned.
*
* @params tagImplicit if true, the tag is assumed implicit.
* @param tagImplicit if true, the tag is assumed implicit.
* @return the bit string held in this value
*/
public BitArray getUnalignedBitString(boolean tagImplicit)
@ -750,7 +750,7 @@ public class DerValue {
* encoding, so that bitwise equality of the encoded values is an
* efficient way to establish equivalence of the unencoded values.
*
* @param other the object being compared with this one
* @param o the object being compared with this one
*/
@Override
public boolean equals(Object o) {
@ -892,11 +892,11 @@ public class DerValue {
/**
* Create the tag of the attribute.
*
* @params class the tag class type, one of UNIVERSAL, CONTEXT,
* @param tagClass the tag class type, one of UNIVERSAL, CONTEXT,
* APPLICATION or PRIVATE
* @params form if true, the value is constructed, otherwise it
* @param form if true, the value is constructed, otherwise it
* is primitive.
* @params val the tag value
* @param val the tag value
*/
public static byte createTag(byte tagClass, boolean form, byte val) {
byte tag = (byte)(tagClass | val);
@ -910,7 +910,7 @@ public class DerValue {
* Set the tag of the attribute. Commonly used to reset the
* tag value used for IMPLICIT encodings.
*
* @params tag the tag value
* @param tag the tag value
*/
public void resetTag(byte tag) {
this.tag = tag;

@ -100,11 +100,10 @@ public final class KeyUtil {
* <P>
* Note that this method is only apply to DHPublicKey at present.
*
* @param publicKey
* the key object, cannot be null
* @param key the key object, cannot be null
*
* @throws NullPointerException if {@code publicKey} is null
* @throws InvalidKeyException if {@code publicKey} is invalid
* @throws NullPointerException if {@code key} is null
* @throws InvalidKeyException if {@code key} is invalid
*/
public static final void validate(Key key)
throws InvalidKeyException {
@ -165,7 +164,8 @@ public final class KeyUtil {
* version numbers in a manner indistinguishable from correctly
* formatted RSA blocks.
*
* RFC 5246 describes the approach as :
* RFC 5246 describes the approach as:
* <pre>{@literal
*
* 1. Generate a string R of 48 random bytes
*
@ -183,6 +183,7 @@ public final class KeyUtil {
* premaster secret = M
*
* Note that #2 should have completed before the call to this method.
* }</pre>
*
* @param clientVersion the version of the TLS protocol by which the
* client wishes to communicate during this session
@ -190,7 +191,7 @@ public final class KeyUtil {
* contains the lower of that suggested by the client in the client
* hello and the highest supported by the server.
* @param encoded the encoded key in its "RAW" encoding format
* @param isFailover whether or not the previous decryption of the
* @param isFailOver whether or not the previous decryption of the
* encrypted PreMasterSecret message run into problem
* @return the polished PreMasterSecret key in its "RAW" encoding format
*/

@ -59,7 +59,7 @@ public class ManifestDigester {
*
* @pos set by
*
* @returns false if end of bytes has been reached, otherwise returns
* @return false if end of bytes has been reached, otherwise returns
* true
*/
@SuppressWarnings("fallthrough")

@ -47,8 +47,6 @@ public class PendingException extends RuntimeException {
* A detail message is a String that describes this particular
* exception.
*
* <p>
*
* @param msg the detail message.
*/
public PendingException(String msg) {

@ -26,7 +26,7 @@
package sun.security.util;
/**
* <p> This class represents the <code>ResourceBundle</code>
* This class represents the <code>ResourceBundle</code>
* for javax.security.auth and sun.security.
*
*/
@ -160,8 +160,6 @@ public class Resources extends java.util.ListResourceBundle {
/**
* Returns the contents of this <code>ResourceBundle</code>.
*
* <p>
*
* @return the contents of this <code>ResourceBundle</code>.
*/
@Override

@ -159,7 +159,7 @@ public class SignatureFileVerifier {
* unknown signature related files (those starting with SIG- with
* an optional [A-Z0-9]{1,3} extension right inside META-INF).
*
* @param s file name
* @param name file name
* @return true if the input file name is signature related
*/
public static boolean isSigningRelated(String name) {

@ -36,7 +36,7 @@ import sun.security.provider.certpath.AlgorithmChecker;
/**
* Validator implementation built on the PKIX CertPath API. This
* implementation will be emphasized going forward.<p>
* implementation will be emphasized going forward.
* <p>
* Note that the validate() implementation tries to use a PKIX validator
* if that appears possible and a PKIX builder otherwise. This increases

@ -228,7 +228,7 @@ public abstract class Validator {
* used (see JSSE X509TrustManager specification). In the future, it
* could be used to pass in a PKCS#7 object for code signing to check time
* stamps.
* <p>
*
* @return a non-empty chain that was used to validate the path. The
* end entity cert is at index 0, the trust anchor at index n-1.
*/

@ -39,7 +39,7 @@ import sun.security.util.*;
* NIST/IETF standard DER encoding. These are used to implement the Digital
* Signature Standard (DSS), FIPS 186.
*
* <P><em><b>NOTE:</b> DSS/DSA Algorithm IDs may be created without these
* <P><em><b>NOTE:</b></em> DSS/DSA Algorithm IDs may be created without these
* parameters. Use of DSS/DSA in modes where parameters are
* either implicit (e.g. a default applicable to a site or a larger scope),
* or are derived from some Certificate Authority's DSS certificate, is
@ -49,8 +49,8 @@ import sun.security.util.*;
* that we have a certificate called <code>currentCert</code> which doesn't
* contain DSS/DSA parameters and we need to derive DSS/DSA parameters
* from a CA's certificate called <code>caCert</code>.
* <p>
* <code><pre>
*
* <pre>{@code
* // key containing parameters to use
* DSAPublicKey cAKey = (DSAPublicKey)(caCert.getPublicKey());
* // key without parameters
@ -63,7 +63,7 @@ import sun.security.util.*;
* cAKeyParams.getQ(),
* cAKeyParams.getG());
* DSAPublicKey usableKey = kf.generatePublic(ks);
* </pre></code>
* }</pre>
*
* @see java.security.interfaces.DSAParams
* @see java.security.interfaces.DSAPublicKey

@ -58,7 +58,7 @@ import sun.security.util.DerValue;
* accessMethod OBJECT IDENTIFIER,
* accessLocation GeneralName }
* </pre>
* <p>
*
* @see Extension
* @see CertAttrSet
*/

@ -117,17 +117,17 @@ implements CertAttrSet<String> {
* The default constructor for this extension. Null parameters make
* the element optional (not present).
*
* @param id the KeyIdentifier associated with this extension.
* @param kid the KeyIdentifier associated with this extension.
* @param names the GeneralNames associated with this extension
* @param serialNum the CertificateSerialNumber associated with
* this extension.
* @param sn the CertificateSerialNumber associated with
* this extension.
* @exception IOException on error.
*/
public AuthorityKeyIdentifierExtension(KeyIdentifier kid, GeneralNames name,
public AuthorityKeyIdentifierExtension(KeyIdentifier kid, GeneralNames names,
SerialNumber sn)
throws IOException {
this.id = kid;
this.names = name;
this.names = names;
this.serialNum = sn;
this.extensionId = PKIXExtensions.AuthorityKey_Id;

@ -71,7 +71,7 @@ import sun.security.util.ObjectIdentifier;
*
* CRLDistPointsSyntax ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint
* </pre>
* <p>
*
* @author Anne Anderson
* @author Andreas Sterbenz
* @since 1.4.2

@ -57,7 +57,7 @@ public class CertificateSerialNumber implements CertAttrSet<String> {
/**
* Default constructor for the certificate attribute.
*
* @param serial the serial number for the certificate.
* @param num the serial number for the certificate.
*/
public CertificateSerialNumber(BigInteger num) {
this.serial = new SerialNumber(num);
@ -66,7 +66,7 @@ public class CertificateSerialNumber implements CertAttrSet<String> {
/**
* Default constructor for the certificate attribute.
*
* @param serial the serial number for the certificate.
* @param num the serial number for the certificate.
*/
public CertificateSerialNumber(int num) {
this.serial = new SerialNumber(num);

@ -44,7 +44,7 @@ import sun.security.util.*;
* the DNS representation for Internet mail addresses (wpolk.nist.gov
* instead of wpolk@nist.gov) is not permitted; such identities are to
* be encoded as rfc822Name.
* <p>
*
* @author Amit Kapoor
* @author Hemma Prafullchandra
*/
@ -186,9 +186,9 @@ public class DNSName implements GeneralNameInterface {
* domain name comparisons for all present domain functions are done in a
* case-insensitive manner, assuming an ASCII character set, and a high
* order zero bit.
* <p>
*
* @param inputName to be checked for being constrained
* @returns constraint type above
* @return constraint type above
* @throws UnsupportedOperationException if name is not exact match, but narrowing and widening are
* not supported for this name type.
*/
@ -228,7 +228,7 @@ public class DNSName implements GeneralNameInterface {
* NameConstraints minimum and maximum bounds and for calculating
* path lengths in name subtrees.
*
* @returns distance of name from root
* @return distance of name from root
* @throws UnsupportedOperationException if not supported for this name type
*/
public int subtreeDepth() throws UnsupportedOperationException {

@ -143,9 +143,9 @@ public class DistributionPoint {
* Constructor for the class using GeneralNames for DistributionPointName
*
* @param fullName the GeneralNames of the distribution point; may be null
* @param reasons the CRL reasons included in the CRL at this distribution
* @param reasonFlags the CRL reasons included in the CRL at this distribution
* point; may be null
* @param issuer the name(s) of the CRL issuer for the CRL at this
* @param crlIssuer the name(s) of the CRL issuer for the CRL at this
* distribution point; may be null
*/
public DistributionPoint(GeneralNames fullName, boolean[] reasonFlags,
@ -165,9 +165,9 @@ public class DistributionPoint {
*
* @param relativeName the RelativeDistinguishedName of the distribution
* point; may not be null
* @param reasons the CRL reasons included in the CRL at this distribution
* @param reasonFlags the CRL reasons included in the CRL at this distribution
* point; may be null
* @param issuer the name(s) of the CRL issuer for the CRL at this
* @param crlIssuer the name(s) of the CRL issuer for the CRL at this
* distribution point; may not be null or empty.
*/
public DistributionPoint(RDN relativeName, boolean[] reasonFlags,

@ -146,7 +146,7 @@ public class EDIPartyName implements GeneralNameInterface {
/**
* Return the assignerName
*
* @returns String assignerName
* @return String assignerName
*/
public String getAssignerName() {
return assigner;
@ -155,7 +155,7 @@ public class EDIPartyName implements GeneralNameInterface {
/**
* Return the partyName
*
* @returns String partyName
* @return String partyName
*/
public String getPartyName() {
return party;
@ -166,7 +166,7 @@ public class EDIPartyName implements GeneralNameInterface {
* comparison without regard to type of the partyName and
* the assignerName.
*
* @returns true if the two names match
* @return true if the two names match
*/
public boolean equals(Object other) {
if (!(other instanceof EDIPartyName))
@ -226,7 +226,7 @@ public class EDIPartyName implements GeneralNameInterface {
* certification path verification.
*
* @param inputName to be checked for being constrained
* @returns constraint type above
* @return constraint type above
* @throws UnsupportedOperationException if name is same type, but comparison operations are
* not supported for this name type.
*/
@ -247,7 +247,7 @@ public class EDIPartyName implements GeneralNameInterface {
* NameConstraints minimum and maximum bounds and for calculating
* path lengths in name subtrees.
*
* @returns distance of name from root
* @return distance of name from root
* @throws UnsupportedOperationException if not supported for this name type
*/
public int subtreeDepth() throws UnsupportedOperationException {

@ -75,7 +75,7 @@ import sun.security.util.ObjectIdentifier;
* processed independently and the certificate MUST only be used for a
* purpose consistent with both fields. If there is no purpose
* consistent with both fields, then the certificate MUST NOT be used
* for any purpose.<p>
* for any purpose.
*
* @since 1.4
*/

@ -50,11 +50,11 @@ import sun.security.util.*;
* }
* </pre>
* All subclasses need to implement a constructor of the form
* <pre>
* <pre>{@code
* <subclass> (Boolean, Object)
* </pre>
* }</pre>
* where the Object is typically an array of DER encoded bytes.
* <p>
*
* @author Amit Kapoor
* @author Hemma Prafullchandra
*/

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2015, 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
@ -116,6 +116,15 @@ public class GeneralName {
}
break;
case GeneralNameInterface.NAME_X400:
if (encName.isContextSpecific() && encName.isConstructed()) {
encName.resetTag(DerValue.tag_IA5String);
name = new X400Address(encName);
} else {
throw new IOException("Invalid encoding of X400Address name");
}
break;
case GeneralNameInterface.NAME_URI:
if (encName.isContextSpecific() && !encName.isConstructed()) {
encName.resetTag(DerValue.tag_IA5String);
@ -193,7 +202,7 @@ public class GeneralName {
* Compare this GeneralName with another
*
* @param other GeneralName to compare to this
* @returns true if match
* @return true if match
*/
public boolean equals(Object other) {
if (this == other) {

@ -85,7 +85,7 @@ public interface GeneralNameInterface {
* certification path verification.
*
* @param inputName to be checked for being constrained
* @returns constraint type above
* @return constraint type above
* @throws UnsupportedOperationException if name is same type, but comparison operations are
* not supported for this name type.
*/
@ -96,7 +96,7 @@ public interface GeneralNameInterface {
* NameConstraints minimum and maximum bounds and for calculating
* path lengths in name subtrees.
*
* @returns distance of name from root
* @return distance of name from root
* @throws UnsupportedOperationException if not supported for this name type
*/
int subtreeDepth() throws UnsupportedOperationException;

@ -126,7 +126,7 @@ public class GeneralNames {
/**
* compare this GeneralNames to other object for equality
*
* @returns true iff this equals other
* @return true if this equals obj
*/
public boolean equals(Object obj) {
if (this == obj) {

@ -56,9 +56,9 @@ public class GeneralSubtree {
/**
* The default constructor for the class.
*
* @params name the GeneralName
* @params min the minimum BaseDistance
* @params max the maximum BaseDistance
* @param name the GeneralName
* @param min the minimum BaseDistance
* @param max the maximum BaseDistance
*/
public GeneralSubtree(GeneralName name, int min, int max) {
this.name = name;
@ -142,7 +142,7 @@ public class GeneralSubtree {
* Compare this GeneralSubtree with another
*
* @param other GeneralSubtree to compare to this
* @returns true if match
* @return true if match
*/
public boolean equals(Object other) {
if (!(other instanceof GeneralSubtree))
@ -187,7 +187,7 @@ public class GeneralSubtree {
/**
* Encode the GeneralSubtree.
*
* @params out the DerOutputStream to encode this object to.
* @param out the DerOutputStream to encode this object to.
*/
public void encode(DerOutputStream out) throws IOException {
DerOutputStream seq = new DerOutputStream();

@ -37,7 +37,6 @@ import sun.security.util.*;
* <pre>
* GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
* </pre>
* </p>
*
*
* @author Amit Kapoor
@ -132,7 +131,7 @@ public class GeneralSubtrees implements Cloneable {
/**
* Encode the GeneralSubtrees.
*
* @params out the DerOutputStrean to encode this object to.
* @param out the DerOutputStrean to encode this object to.
*/
public void encode(DerOutputStream out) throws IOException {
DerOutputStream seq = new DerOutputStream();
@ -147,8 +146,8 @@ public class GeneralSubtrees implements Cloneable {
* Compare two general subtrees by comparing the subtrees
* of each.
*
* @param other GeneralSubtrees to compare to this
* @returns true if match
* @param obj GeneralSubtrees to compare to this
* @return true if match
*/
public boolean equals(Object obj) {
if (this == obj) {
@ -236,8 +235,8 @@ public class GeneralSubtrees implements Cloneable {
* create a subtree containing an instance of the input
* name type that widens all other names of that type.
*
* @params name GeneralNameInterface name
* @returns GeneralSubtree containing widest name of that type
* @param name GeneralNameInterface name
* @return GeneralSubtree containing widest name of that type
* @throws RuntimeException on error (should not occur)
*/
private GeneralSubtree createWidestSubtree(GeneralNameInterface name) {
@ -309,10 +308,10 @@ public class GeneralSubtrees implements Cloneable {
* the result contains the name in other. This means that
* the name is now constrained in some way, whereas before it was
* completely permitted.
* <ul>
* </ul>
*
* @param other GeneralSubtrees to be intersected with this
* @returns GeneralSubtrees to be merged with excluded; these are
* @return GeneralSubtrees to be merged with excluded; these are
* empty-valued name types corresponding to entries that were
* of the same type but did not share the same subtree between
* this and other. Returns null if no such.

@ -75,7 +75,7 @@ public class IPAddressName implements GeneralNameInterface {
/**
* Create the IPAddressName object from the passed encoded Der value.
*
* @params derValue the encoded DER IPAddressName.
* @param derValue the encoded DER IPAddressName.
* @exception IOException on error.
*/
public IPAddressName(DerValue derValue) throws IOException {
@ -85,7 +85,7 @@ public class IPAddressName implements GeneralNameInterface {
/**
* Create the IPAddressName object with the specified octets.
*
* @params address the IP address
* @param address the IP address
* @throws IOException if address is not a valid IPv4 or IPv6 address
*/
public IPAddressName(byte[] address) throws IOException {
@ -106,7 +106,7 @@ public class IPAddressName implements GeneralNameInterface {
/**
* Create an IPAddressName from a String.
* [IETF RFC1338 Supernetting & IETF RFC1519 Classless Inter-Domain
* [IETF RFC1338 Supernetting {@literal &} IETF RFC1519 Classless Inter-Domain
* Routing (CIDR)] For IPv4 addresses, the forms are
* "b1.b2.b3.b4" or "b1.b2.b3.b4/m1.m2.m3.m4", where b1 - b4 are decimal
* byte values 0-255 and m1 - m4 are decimal mask values
@ -118,7 +118,7 @@ public class IPAddressName implements GeneralNameInterface {
* of the address. If /n is used, n is a decimal number indicating how many
* of the leftmost contiguous bits of the address comprise the prefix for
* this subnet. Internally, a mask value is created using the prefix length.
* <p>
*
* @param name String form of IPAddressName
* @throws IOException if name can not be converted to a valid IPv4 or IPv6
* address
@ -224,7 +224,7 @@ public class IPAddressName implements GeneralNameInterface {
/**
* Encode the IPAddress name into the DerOutputStream.
*
* @params out the DER stream to encode the IPAddressName to.
* @param out the DER stream to encode the IPAddressName to.
* @exception IOException on encoding errors.
*/
public void encode(DerOutputStream out) throws IOException {
@ -384,9 +384,9 @@ public class IPAddressName implements GeneralNameInterface {
* constraint for "class C" subnet 10.9.8.0 shall be represented as the
* octets 0A 09 08 00 FF FF FF 00, representing the CIDR notation
* 10.9.8.0/255.255.255.0.
* <p>
*
* @param inputName to be checked for being constrained
* @returns constraint type above
* @return constraint type above
* @throws UnsupportedOperationException if name is not exact match, but
* narrowing and widening are not supported for this name type.
*/
@ -479,7 +479,7 @@ public class IPAddressName implements GeneralNameInterface {
* NameConstraints minimum and maximum bounds and for calculating
* path lengths in name subtrees.
*
* @returns distance of name from root
* @return distance of name from root
* @throws UnsupportedOperationException if not supported for this name type
*/
public int subtreeDepth() throws UnsupportedOperationException {

@ -50,13 +50,13 @@ import sun.security.util.ObjectIdentifier;
* This extension MUST be critical.
* <p>
* The ASN.1 syntax for this extension is:
* <code><pre>
* <pre>{@code
* id-ce-inhibitAnyPolicy OBJECT IDENTIFIER ::= { id-ce 54 }
*
* InhibitAnyPolicy ::= SkipCerts
*
* SkipCerts ::= INTEGER (0..MAX)
* </pre></code>
* }</pre>
* @author Anne Anderson
* @see CertAttrSet
* @see Extension
@ -211,7 +211,7 @@ implements CertAttrSet<String> {
* Get the attribute value.
*
* @param name name of attribute to get. Must be SKIP_CERTS.
* @returns value of the attribute. In this case it will be of type
* @return value of the attribute. In this case it will be of type
* Integer.
* @throws IOException on error
*/
@ -244,7 +244,7 @@ implements CertAttrSet<String> {
* Return an enumeration of names of attributes existing within this
* attribute.
*
* @returns enumeration of elements
* @return enumeration of elements
*/
public Enumeration<String> getElements() {
AttributeNameEnumeration elements = new AttributeNameEnumeration();
@ -255,7 +255,7 @@ implements CertAttrSet<String> {
/**
* Return the name of this attribute.
*
* @returns name of attribute.
* @return name of attribute.
*/
public String getName() {
return (NAME);

@ -69,7 +69,7 @@ public class KeyIdentifier {
* <li>The keyIdentifier is composed of the 160-bit SHA-1 hash of the
* value of the BIT STRING subjectPublicKey (excluding the tag,
* length, and number of unused bits).
* <p>
*
* <li>The keyIdentifier is composed of a four bit type field with
* the value 0100 followed by the least significant 60 bits of the
* SHA-1 hash of the value of the BIT STRING subjectPublicKey.

@ -328,7 +328,7 @@ implements CertAttrSet<String>, Cloneable {
* (k) If excludedSubtrees is present in the certificate, set the
* excluded subtrees state variable to the union of its previous
* value and the value indicated in the extension field.
* <p>
*
* @param newConstraints additional NameConstraints to be applied
* @throws IOException on error
*/
@ -406,7 +406,7 @@ implements CertAttrSet<String>, Cloneable {
* the excluded subtrees state variables.
*
* @param cert X509Certificate to be verified
* @returns true if certificate verifies successfully
* @return true if certificate verifies successfully
* @throws IOException on error
*/
public boolean verify(X509Certificate cert) throws IOException {
@ -484,7 +484,7 @@ implements CertAttrSet<String>, Cloneable {
* permitted and excluded subtrees variables.
*
* @param name GeneralNameInterface name to be verified
* @returns true if certificate verifies successfully
* @return true if certificate verifies successfully
* @throws IOException on error
*/
public boolean verify(GeneralNameInterface name) throws IOException {
@ -566,7 +566,7 @@ implements CertAttrSet<String>, Cloneable {
* NameConstraints.
*
* @param subject the certificate's subject name
* @returns true if certificate verifies successfully
* @return true if certificate verifies successfully
* @throws IOException on error
*/
public boolean verifyRFC822SpecialCase(X500Name subject) throws IOException {

@ -33,8 +33,8 @@ import java.security.cert.CertificateException;
import sun.security.util.*;
/**
* This class defines the mapping from OID & name to classes and vice
* versa. Used by CertificateExtensions & PKCS10 to get the java
* This class defines the mapping from OID {@literal &} name to classes and vice
* versa. Used by CertificateExtensions {@literal &} PKCS10 to get the java
* classes associated with a particular OID/name.
*
* @author Amit Kapoor

@ -55,7 +55,7 @@ public class OIDName implements GeneralNameInterface {
/**
* Create the OIDName object with the specified name.
*
* @param name the OIDName.
* @param oid the OIDName.
*/
public OIDName(ObjectIdentifier oid) {
this.oid = oid;
@ -143,7 +143,7 @@ public class OIDName implements GeneralNameInterface {
* certification path verification.
*
* @param inputName to be checked for being constrained
* @returns constraint type above
* @return constraint type above
* @throws UnsupportedOperationException if name is not exact match, but narrowing and widening are
* not supported for this name type.
*/
@ -166,7 +166,7 @@ public class OIDName implements GeneralNameInterface {
* NameConstraints minimum and maximum bounds and for calculating
* path lengths in name subtrees.
*
* @returns distance of name from root
* @return distance of name from root
* @throws UnsupportedOperationException if not supported for this name type
*/
public int subtreeDepth() throws UnsupportedOperationException {

@ -237,7 +237,7 @@ public class OtherName implements GeneralNameInterface {
* certification path verification.
*
* @param inputName to be checked for being constrained
* @returns constraint type above
* @return constraint type above
* @throws UnsupportedOperationException if name is same type, but
* comparison operations are not supported for this name type.
*/
@ -258,7 +258,7 @@ public class OtherName implements GeneralNameInterface {
* Return subtree depth of this name for purposes of determining
* NameConstraints minimum and maximum bounds.
*
* @returns distance of name from root
* @return distance of name from root
* @throws UnsupportedOperationException if not supported for this name type
*/
public int subtreeDepth() {

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