提交 678d153a 编写于 作者: M mullan

Merge

......@@ -222,3 +222,4 @@ a2a2a91075ad85becbe10a39d7fd04ef9bea8df5 jdk8-b92
c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98
6a099a36589bd933957272ba63e5263bede29971 jdk8-b99
5be9c5bfcfe9b2a40412b4fb364377d49de014eb jdk8-b100
6901612328239fbd471d20823113c1cf3fdaebee jdk8-b101
......@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2013c
tzdata2013d
#
# 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.
......@@ -875,12 +875,18 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
# announced that year's Ramadan daylight-saving transitions would be
# 2012-07-20 and 2012-08-20; see
# <http://www.mmsp.gov.ma/fr/actualites.aspx?id=288>.
#
# From Andrew Paprocki (2013-07-02):
# Morocco announced that the year's Ramadan daylight-savings
# transitions would be 2013-07-07 and 2013-08-10; see:
# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
# From Paul Eggert (2013-07-03):
# To estimate what the Moroccan government will do in future years,
# transition dates for 2013 through 2021 were determined by running
# transition dates for 2014 through 2021 were determined by running
# the following program under GNU Emacs 24.3:
#
# (let ((islamic-year 1434))
# (let ((islamic-year 1435))
# (while (< islamic-year 1444)
# (let ((a
# (calendar-gregorian-from-absolute
......@@ -933,8 +939,8 @@ Rule Morocco 2012 2019 - Apr lastSun 2:00 1:00 S
Rule Morocco 2012 max - Sep lastSun 3:00 0 -
Rule Morocco 2012 only - Jul 20 3:00 0 -
Rule Morocco 2012 only - Aug 20 2:00 1:00 S
Rule Morocco 2013 only - Jul 9 3:00 0 -
Rule Morocco 2013 only - Aug 8 2:00 1:00 S
Rule Morocco 2013 only - Jul 7 3:00 0 -
Rule Morocco 2013 only - Aug 10 2:00 1:00 S
Rule Morocco 2014 only - Jun 29 3:00 0 -
Rule Morocco 2014 only - Jul 29 2:00 1:00 S
Rule Morocco 2015 only - Jun 18 3:00 0 -
......
#
# 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.
......
#
# 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.
......@@ -1235,39 +1235,21 @@ Rule Zion 2011 only - Oct 2 2:00 0 S
Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D
Rule Zion 2012 only - Sep 23 2:00 0 S
# From Ephraim Silverberg (2012-10-18):
# Yesterday, the Interior Ministry Committee, after more than a year
# past, approved sending the proposed June 2011 changes to the Time
# Decree Law back to the Knesset for second and third (final) votes
# before the upcoming elections on Jan. 22, 2013. Hence, although the
# changes are not yet law, they are expected to be so before February 2013.
# From Ephraim Silverberg (2013-06-27):
# On June 23, 2013, the Israeli government approved changes to the
# Time Decree Law. The next day, the changes passed the First Reading
# in the Knesset. The law is expected to pass the Second and Third
# (final) Readings by the beginning of September 2013.
#
# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March.
# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the
# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day
# later (i.e. at 02:00 the first Monday after October 2).
# [Rosh Hashana holidays are factored in until 2100.]
# From Ephraim Silverberg (2012-11-05):
# The Knesset passed today (in second and final readings) the amendment to the
# Time Decree Law making the changes ... law.
# As of 2013, DST starts at 02:00 on the Friday before the last Sunday
# in March. DST ends at 02:00 on the last Sunday of October.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D
Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S
Rule Zion 2027 only - Oct Mon>=3 2:00 0 S
Rule Zion 2028 max - Oct Sun>=2 2:00 0 S
# The following rules are commented out for now, as they break older
# versions of zic that support only signed 32-bit timestamps, i.e.,
# through 2038-01-19 03:14:07 UTC.
#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S
#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S
#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S
#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S
#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S
Rule Zion 2013 max - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Jerusalem 2:20:56 - LMT 1880
Zone Asia/Jerusalem 2:20:54 - LMT 1880
2:20:40 - JMT 1918 # Jerusalem Mean Time?
2:00 Zion I%sT
......@@ -2570,8 +2552,8 @@ Rule Syria 2006 only - Sep 22 0:00 0 -
Rule Syria 2007 only - Mar lastFri 0:00 1:00 S
# From Jesper Norgard (2007-10-27):
# The sister center ICARDA of my work CIMMYT is confirming that Syria DST will
# not take place 1.st November at 0:00 o'clock but 1.st November at 24:00 or
# rather Midnight between Thursday and Friday. This does make more sence than
# not take place 1st November at 0:00 o'clock but 1st November at 24:00 or
# rather Midnight between Thursday and Friday. This does make more sense than
# having it between Wednesday and Thursday (two workdays in Syria) since the
# weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
# it is implemented at midnight of the last workday before weekend...
......
#
# 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.
......@@ -253,10 +253,16 @@ Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb
# - Macquarie Island will stay on UTC+11 for winter and therefore not
# switch back from daylight savings time when other parts of Australia do
# on 4 April.
#
# From Arthur David Olson (2013-05-23):
# The 1919 transition is overspecified below so pre-2013 zics
# will produce a binary file with an EST-type as the first 32-bit type;
# this is required for correct handling of times before 1916 by
# pre-2013 versions of localtime.
Zone Antarctica/Macquarie 0 - zzz 1899 Nov
10:00 - EST 1916 Oct 1 2:00
10:00 1:00 EST 1917 Feb
10:00 Aus EST 1919 Apr
10:00 Aus EST 1919 Apr 1 0:00s
0 - zzz 1948 Mar 25
10:00 Aus EST 1967
10:00 AT EST 2010 Apr 4 3:00
......@@ -1498,12 +1504,12 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Paul Eggert (2000-01-08):
# IATA SSIM (1999-09) says DST ends 0100 local time. Go with McDow.
# From the BBC World Service (1998-10-31 11:32 UTC):
# From the BBC World Service in
# http://news.bbc.co.uk/2/hi/asia-pacific/205226.stm (1998-10-31 16:03 UTC):
# The Fijiian government says the main reasons for the time change is to
# improve productivity and reduce road accidents. But correspondents say it
# also hopes the move will boost Fiji's ability to compete with other pacific
# islands in the effort to attract tourists to witness the dawning of the new
# millenium.
# improve productivity and reduce road accidents.... [T]he move is also
# intended to boost Fiji's ability to attract tourists to witness the dawning
# of the new millennium.
# http://www.fiji.gov.fj/press/2000_09/2000_09_13-05.shtml (2000-09-13)
# reports that Fiji has discontinued DST.
......@@ -1648,7 +1654,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Shanks & Pottenger say the transition was on 1968-10-01; go with Mundell.
# From Eric Ulevik (1999-05-03):
# Tonga's director of tourism, who is also secretary of the National Millenium
# Tonga's director of tourism, who is also secretary of the National Millennium
# Committee, has a plan to get Tonga back in front.
# He has proposed a one-off move to tropical daylight saving for Tonga from
# October to March, which has won approval in principle from the Tongan
......
#
# 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.
......
#
# 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.
......
#
# 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.
......@@ -546,7 +546,7 @@ Rule C-Eur 1944 only - Oct 2 2:00s 0 -
# It seems that Paris, Monaco, Rule France, Rule Belgium all agree on
# 2:00 standard time, e.g. 3:00 local time. However there are no
# countries that use C-Eur rules in September 1945, so the only items
# affected are apparently these ficticious zones that translates acronyms
# affected are apparently these fictitious zones that translate acronyms
# CET and MET:
#
# Zone CET 1:00 C-Eur CE%sT
......@@ -2802,9 +2802,9 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# Ukraine
#
# From Igor Karpov, who works for the Ukranian Ministry of Justice,
# From Igor Karpov, who works for the Ukrainian Ministry of Justice,
# via Garrett Wollman (2003-01-27):
# BTW, I've found the official document on this matter. It's goverment
# BTW, I've found the official document on this matter. It's government
# regulations number 509, May 13, 1996. In my poor translation it says:
# "Time in Ukraine is set to second timezone (Kiev time). Each last Sunday
# of March at 3am the time is changing to 4am and each last Sunday of
......@@ -2838,7 +2838,7 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# time this year after all.
#
# From Udo Schwedt (2011-10-18):
# As far as I understand, the recent change to the Ukranian time zone
# As far as I understand, the recent change to the Ukrainian time zone
# (Europe/Kiev) to introduce permanent daylight saving time (similar
# to Russia) was reverted today:
#
......
#
# 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.
......
#
# 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.
#
# <pre>
# ISO 3166 alpha-2 country codes
#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# ISO 3166 alpha-2 country codes
#
# From Paul Eggert (2006-09-27):
# From Paul Eggert (2013-05-27):
#
# This file contains a table with the following columns:
# 1. ISO 3166-1 alpha-2 country code, current as of
# ISO 3166-1 Newsletter VI-1 (2007-09-21). See:
# <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
# ISO 3166 Maintenance agency (ISO 3166/MA)
# </a>.
# ISO 3166-1 Newsletter VI-15 (2013-05-10). See: Updates on ISO 3166
# http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
# 2. The usual English name for the country,
# chosen so that alphabetic sorting of subsets produces helpful lists.
# This is not the same as the English name in the ISO 3166 tables.
......@@ -43,8 +41,9 @@
#
# Lines beginning with `#' are comments.
#
# From Arthur David Olson (2011-08-17):
# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
# This table is intended as an aid for users, to help them select time
# zone data appropriate for their practical needs. It is not intended
# to take or endorse any position on legal or territorial claims.
#
#country-
#code country name
......@@ -77,7 +76,7 @@ BL St Barthelemy
BM Bermuda
BN Brunei
BO Bolivia
BQ Bonaire Sint Eustatius & Saba
BQ Bonaire, St Eustatius & Saba
BR Brazil
BS Bahamas
BT Bhutan
......@@ -258,7 +257,7 @@ SR Suriname
SS South Sudan
ST Sao Tome & Principe
SV El Salvador
SX Sint Maarten
SX St Maarten (Dutch part)
SY Syria
SZ Swaziland
TC Turks & Caicos Is
......
#
# 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.
......
#
# 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.
......
#
# 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.
......
#
# 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.
......
#
# 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.
......
#
# 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.
......
#
# 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.
......@@ -994,7 +994,7 @@ Rule Brazil 2007 only - Feb 25 0:00 0 -
# adopted by the same states as before.
Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S
# From Frederico A. C. Neves (2008-09-10):
# Acording to this decree
# According to this decree
# <a href="http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm">
# http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm
# </a>
......@@ -1226,7 +1226,7 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
# </a>
#
# This is not yet reflected in the offical "cambio de hora" site, but
# This is not yet reflected in the official "cambio de hora" site, but
# probably will be soon:
# <a href="http://www.horaoficial.cl/cambio.htm">
# http://www.horaoficial.cl/cambio.htm
......
#
# 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.
......
#
# 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.
#
# <pre>
# TZ zone descriptions
#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
# TZ zone descriptions
#
# From Paul Eggert (1996-08-05):
# From Paul Eggert (2013-05-27):
#
# This file contains a table with the following columns:
# 1. ISO 3166 2-character country code. See the file `iso3166.tab'.
# This identifies a country that overlaps the zone. The country may
# overlap other zones and the zone may overlap other countries.
# 2. Latitude and longitude of the zone's principal location
# in ISO 6709 sign-degrees-minutes-seconds format,
# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
# first latitude (+ is north), then longitude (+ is east).
# This location need not lie within the column-1 country.
# 3. Zone name used in value of TZ environment variable.
# Please see the 'Theory' file for how zone names are chosen.
# 4. Comments; present if and only if the country has multiple rows.
#
# Columns are separated by a single tab.
......@@ -45,6 +48,10 @@
#
# Lines beginning with `#' are comments.
#
# This table is intended as an aid for users, to help them select time
# zone data appropriate for their practical needs. It is not intended
# to take or endorse any position on legal or territorial claims.
#
#country-
#code coordinates TZ comments
AD +4230+00131 Europe/Andorra
......@@ -239,7 +246,7 @@ ID -0002+10920 Asia/Pontianak west & central Borneo
ID -0507+11924 Asia/Makassar east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas)
IE +5320-00615 Europe/Dublin
IL +3146+03514 Asia/Jerusalem
IL +314650+0351326 Asia/Jerusalem
IM +5409-00428 Europe/Isle_of_Man
IN +2232+08822 Asia/Kolkata
IO -0720+07225 Indian/Chagos
......
#
# Diff of
# b2c: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
# c2b: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.UPMAP100
#
# fullwidth form
0x4B U+FF0E
0x4C U+FF1C
0x4D U+FF08
0x4E U+FF0B
0x4F U+FF5C
0x50 U+FF06
0x5A U+FF01
0x5C U+FF0A
0x5D U+FF09
0x5E U+FF1B
0x60 U+FF0D
0x61 U+FF0F
0x62 U+FF41
0x63 U+FF42
0x64 U+FF43
0x65 U+FF44
0x66 U+FF45
0x67 U+FF46
0x68 U+FF47
0x69 U+FF48
0x6B U+FF0C
0x6C U+FF05
0x6D U+FF3F
0x6E U+FF1E
0x6F U+FF1F
0x70 U+FF3B
0x71 U+FF49
0x72 U+FF4A
0x73 U+FF4B
0x74 U+FF4C
0x75 U+FF4D
0x76 U+FF4E
0x77 U+FF4F
0x78 U+FF50
0x79 U+FF40
0x7A U+FF1A
0x7B U+FF03
0x7C U+FF20
0x7D U+FF07
0x7E U+FF1D
0x7F U+FF02
0x80 U+FF3D
0x8B U+FF51
0x9B U+FF52
0xA0 U+FF5E
0xAB U+FF53
0xB0 U+FF3E
0xB2 U+FF3C
0xB3 U+FF54
0xB4 U+FF55
0xB5 U+FF56
0xB6 U+FF57
0xB7 U+FF58
0xB8 U+FF59
0xB9 U+FF5A
0xC0 U+FF5B
0xC1 U+FF21
0xC2 U+FF22
0xC3 U+FF23
0xC4 U+FF24
0xC5 U+FF25
0xC6 U+FF26
0xC7 U+FF27
0xC8 U+FF28
0xC9 U+FF29
0xD0 U+FF5D
0xD1 U+FF2A
0xD2 U+FF2B
0xD3 U+FF2C
0xD4 U+FF2D
0xD5 U+FF2E
0xD6 U+FF2F
0xD7 U+FF30
0xD8 U+FF31
0xD9 U+FF32
0xE0 U+FF04
0xE2 U+FF33
0xE3 U+FF34
0xE4 U+FF35
0xE5 U+FF36
0xE6 U+FF37
0xE7 U+FF38
0xE8 U+FF39
0xE9 U+FF3A
0xF0 U+FF10
0xF1 U+FF11
0xF2 U+FF12
0xF3 U+FF13
0xF4 U+FF14
0xF5 U+FF15
0xF6 U+FF16
0xF7 U+FF17
0xF8 U+FF18
0xF9 U+FF19
#
# b2c mapping for IBM290, generated from
# cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
#
0x00 U+0000
0x01 U+0001
0x02 U+0002
0x03 U+0003
0x04 U+009C
0x05 U+0009
0x06 U+0086
0x07 U+007F
0x08 U+0097
0x09 U+008D
0x0A U+008E
0x0B U+000B
0x0C U+000C
0x0D U+000D
0x0E U+000E
0x0F U+000F
0x10 U+0010
0x11 U+0011
0x12 U+0012
0x13 U+0013
0x14 U+009D
0x15 U+0085
0x16 U+0008
0x17 U+0087
0x18 U+0018
0x19 U+0019
0x1A U+0092
0x1B U+008F
0x1C U+001C
0x1D U+001D
0x1E U+001E
0x1F U+001F
0x20 U+0080
0x21 U+0081
0x22 U+0082
0x23 U+0083
0x24 U+0084
0x25 U+000A
0x26 U+0017
0x27 U+001B
0x28 U+0088
0x29 U+0089
0x2A U+008A
0x2B U+008B
0x2C U+008C
0x2D U+0005
0x2E U+0006
0x2F U+0007
0x30 U+0090
0x31 U+0091
0x32 U+0016
0x33 U+0093
0x34 U+0094
0x35 U+0095
0x36 U+0096
0x37 U+0004
0x38 U+0098
0x39 U+0099
0x3A U+009A
0x3B U+009B
0x3C U+0014
0x3D U+0015
0x3E U+009E
0x3F U+001A
0x40 U+0020
0x41 U+FF61
0x42 U+FF62
0x43 U+FF63
0x44 U+FF64
0x45 U+FF65
0x46 U+FF66
0x47 U+FF67
0x48 U+FF68
0x49 U+FF69
0x4A U+00A3
0x4B U+002E
0x4C U+003C
0x4D U+0028
0x4E U+002B
0x4F U+007C
0x50 U+0026
0x51 U+FF6A
0x52 U+FF6B
0x53 U+FF6C
0x54 U+FF6D
0x55 U+FF6E
0x56 U+FF6F
0x58 U+FF70
0x5A U+0021
0x5B U+00A5
0x5C U+002A
0x5D U+0029
0x5E U+003B
0x5F U+00AC
0x60 U+002D
0x61 U+002F
0x62 U+0061
0x63 U+0062
0x64 U+0063
0x65 U+0064
0x66 U+0065
0x67 U+0066
0x68 U+0067
0x69 U+0068
0x6B U+002C
0x6C U+0025
0x6D U+005F
0x6E U+003E
0x6F U+003F
0x70 U+005B
0x71 U+0069
0x72 U+006A
0x73 U+006B
0x74 U+006C
0x75 U+006D
0x76 U+006E
0x77 U+006F
0x78 U+0070
0x79 U+0060
0x7A U+003A
0x7B U+0023
0x7C U+0040
0x7D U+0027
0x7E U+003D
0x7F U+0022
0x80 U+005D
0x81 U+FF71
0x82 U+FF72
0x83 U+FF73
0x84 U+FF74
0x85 U+FF75
0x86 U+FF76
0x87 U+FF77
0x88 U+FF78
0x89 U+FF79
0x8A U+FF7A
0x8B U+0071
0x8C U+FF7B
0x8D U+FF7C
0x8E U+FF7D
0x8F U+FF7E
0x90 U+FF7F
0x91 U+FF80
0x92 U+FF81
0x93 U+FF82
0x94 U+FF83
0x95 U+FF84
0x96 U+FF85
0x97 U+FF86
0x98 U+FF87
0x99 U+FF88
0x9A U+FF89
0x9B U+0072
0x9D U+FF8A
0x9E U+FF8B
0x9F U+FF8C
0xA0 U+007E
0xA1 U+203E
0xA2 U+FF8D
0xA3 U+FF8E
0xA4 U+FF8F
0xA5 U+FF90
0xA6 U+FF91
0xA7 U+FF92
0xA8 U+FF93
0xA9 U+FF94
0xAA U+FF95
0xAB U+0073
0xAC U+FF96
0xAD U+FF97
0xAE U+FF98
0xAF U+FF99
0xB0 U+005E
0xB1 U+00A2
0xB2 U+005C
0xB3 U+0074
0xB4 U+0075
0xB5 U+0076
0xB6 U+0077
0xB7 U+0078
0xB8 U+0079
0xB9 U+007A
0xBA U+FF9A
0xBB U+FF9B
0xBC U+FF9C
0xBD U+FF9D
0xBE U+FF9E
0xBF U+FF9F
0xC0 U+007B
0xC1 U+0041
0xC2 U+0042
0xC3 U+0043
0xC4 U+0044
0xC5 U+0045
0xC6 U+0046
0xC7 U+0047
0xC8 U+0048
0xC9 U+0049
0xD0 U+007D
0xD1 U+004A
0xD2 U+004B
0xD3 U+004C
0xD4 U+004D
0xD5 U+004E
0xD6 U+004F
0xD7 U+0050
0xD8 U+0051
0xD9 U+0052
0xE0 U+0024
0xE2 U+0053
0xE3 U+0054
0xE4 U+0055
0xE5 U+0056
0xE6 U+0057
0xE7 U+0058
0xE8 U+0059
0xE9 U+005A
0xF0 U+0030
0xF1 U+0031
0xF2 U+0032
0xF3 U+0033
0xF4 U+0034
0xF5 U+0035
0xF6 U+0036
0xF7 U+0037
0xF8 U+0038
0xF9 U+0039
0xFF U+009F
#
# Diff of
# b2c: cdctables.zip/Package2.zip/IBM-300.zip/012C34B0.TPMAP120
# c2b: cdctables.zip/Package2.zip/IBM-300.zip/012C34B0.UPMAP120
#
4260 2212
426A 00A6
43A1 301C
444A 2014
446E F86F
447C 2016
4C7D 9E7C
4EB3 9830
4F5E 5861
507F 91AC
5190 56CA
51F1 6805
51FA 91B1
5261 9EB4
52A1 881F
52C9 840A
52DA 7E61
52EC 4FE0
5353 8EC0
5373 7E6B
53B3 8346
53DA 9A52
53E8 87EC
53EE 7130
53F8 8523
5443 5C5B
5464 9DD7
547D 5699
5481 525D
54A3 6414
54A4 7626
54CA 7C1E
54CD 6451
54D4 555E
54FA 6F51
5550 7006
5553 79B1
555F 9EB5
55C0 5C62
55C1 985A
5B72 6522
5BFE 688E
60F1 7E48
61B0 8141
66C8 9839
此差异已折叠。
......@@ -15,6 +15,7 @@ PCK x-PCK PCK basic sun.nio.cs.ext true 0x81 0xfc 0x40
IBM1364 x-IBM1364 Cp1364 ebcdic sun.nio.cs.ext false 0x40 0xde 0x40 0xfe
IBM1381 x-IBM1381 Cp1381 basic sun.nio.cs.ext true 0x8c 0xf7 0xa1 0xfe
IBM1383 x-IBM1383 Cp1383 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
IBM300 x-IBM300 Cp300 dbcsonly sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM930 x-IBM930 Cp930 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM933 x-IBM933 Cp933 ebcdic sun.nio.cs.ext false 0x40 0xdd 0x40 0xfe
IBM935 x-IBM935 Cp935 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
......
......@@ -28,6 +28,7 @@ IBM278 IBM278 Cp278 false sun.nio.cs.ext
IBM280 IBM280 Cp280 false sun.nio.cs.ext
IBM284 IBM284 Cp284 false sun.nio.cs.ext
IBM285 IBM285 Cp285 false sun.nio.cs.ext
IBM290 IBM290 Cp290 false sun.nio.cs.ext
IBM297 IBM297 Cp297 false sun.nio.cs.ext
IBM420 IBM420 Cp420 false sun.nio.cs.ext
IBM424 IBM424 Cp424 false sun.nio.cs.ext
......
......@@ -196,11 +196,14 @@ public class DBCS {
// (5) c2b replacement, only used for JIs0208/0212, which
// are two pure db charsets so default '3f' does not work
// TBD: move this into configuration file
String c2bRepl = "";
if (clzName.startsWith("JIS_X_0208")) {
c2bRepl = "new byte[]{ (byte)0x21, (byte)0x29 },";
} else if (clzName.startsWith("JIS_X_0212")) {
c2bRepl = "new byte[]{ (byte)0x22, (byte)0x44 },";
} else if (clzName.startsWith("IBM300")) {
c2bRepl = "new byte[]{ (byte)0x42, (byte)0x6f },";
}
while (s.hasNextLine()) {
......
......@@ -605,7 +605,23 @@ public class CLDRConverter {
copyIfPresent(map, key, formatData);
}
}
// Workaround for islamic-umalqura name support (JDK-8015986)
switch (id) {
case "ar":
map.put(CLDRConverter.CALENDAR_NAME_PREFIX
+ CalendarType.ISLAMIC_UMALQURA.lname(),
// derived from CLDR 24 draft
"\u0627\u0644\u062a\u0642\u0648\u064a\u0645 "
+"\u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a "
+"[\u0623\u0645 \u0627\u0644\u0642\u0631\u0649]");
break;
case "en":
map.put(CLDRConverter.CALENDAR_NAME_PREFIX
+ CalendarType.ISLAMIC_UMALQURA.lname(),
// derived from CLDR 24 draft
"Islamic Calendar [Umm al-Qura]");
break;
}
// Copy available calendar names
for (String key : map.keySet()) {
if (key.startsWith(CLDRConverter.CALENDAR_NAME_PREFIX)) {
......
......@@ -31,7 +31,8 @@ import java.util.Locale;
* Constants for the Calendars supported by JRE.
*/
enum CalendarType {
GREGORIAN("gregory"), BUDDHIST, JAPANESE, ROC, ISLAMIC, ISLAMIC_CIVIL("islamicc");
GREGORIAN("gregory"), BUDDHIST, JAPANESE, ROC,
ISLAMIC, ISLAMIC_CIVIL("islamicc"), ISLAMIC_UMALQURA("islamic-umalqura");
private static final int[][] ERA_DATA = {
// start index, array length
......@@ -41,6 +42,7 @@ enum CalendarType {
{0, 2}, // roc (Minguo)
{0, 1}, // islamic (Hijrah)
{0, 1}, // islamicc (same as islamic)
{0, 1}, // islamic-umalqura
};
private final String lname; // lowercase name
......@@ -52,8 +54,8 @@ enum CalendarType {
private CalendarType(String uname) {
String lname = name().toLowerCase(Locale.ROOT);
if (lname.equals("islamic_civil")) {
lname = "islamic-civil";
if (lname.startsWith("islamic_")) {
lname = lname.replace('_', '-');
}
this.lname = lname;
this.uname = (uname != null) ? uname : lname;
......
......@@ -31,6 +31,7 @@ import java.awt.peer.MenuComponentPeer;
import javax.swing.*;
import javax.swing.plaf.MenuBarUI;
import com.apple.laf.ScreenMenuBar;
import sun.lwawt.macosx.CMenuBar;
import com.apple.laf.AquaMenuBarUI;
......@@ -72,12 +73,15 @@ class _AppMenuBarHandler {
// scan the current frames, and see if any are foreground
final Frame[] frames = Frame.getFrames();
for (final Frame frame : frames) {
if (frame.isVisible() && !isFrameMinimized(frame)) return;
if (frame.isVisible() && !isFrameMinimized(frame)) {
return;
}
}
// if we have no foreground frames, then we have to "kick" the menubar
final JFrame pingFrame = new JFrame();
pingFrame.getRootPane().putClientProperty("Window.alpha", new Float(0.0f));
pingFrame.setUndecorated(true);
pingFrame.setVisible(true);
pingFrame.toFront();
pingFrame.setVisible(false);
......@@ -101,7 +105,6 @@ class _AppMenuBarHandler {
// Aqua was not installed
throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel");
}
/* TODO: disabled until ScreenMenuBar is working
final AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui;
final ScreenMenuBar screenMenuBar = aquaUI.getScreenMenuBar();
......@@ -118,8 +121,7 @@ class _AppMenuBarHandler {
}
// grab the pointer to the CMenuBar, and retain it in native
nativeSetDefaultMenuBar(((CMenuBar)peer).getNativeMenuBarPeer());
*/
nativeSetDefaultMenuBar(((CMenuBar)peer).getModel());
}
void setAboutMenuItemVisible(final boolean present) {
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -31,7 +31,7 @@ import java.util.*;
import sun.awt.SunHints;
public class CStrike extends FontStrike {
public final class CStrike extends FontStrike {
// Creates the native strike
private static native long createNativeStrikePtr(long nativeFontPtr,
......@@ -68,10 +68,10 @@ public class CStrike extends FontStrike {
Rectangle2D.Float result,
double x, double y);
private CFont nativeFont;
private final CFont nativeFont;
private AffineTransform invDevTx;
private GlyphInfoCache glyphInfoCache;
private GlyphAdvanceCache glyphAdvanceCache;
private final GlyphInfoCache glyphInfoCache;
private final GlyphAdvanceCache glyphAdvanceCache;
private long nativeStrikePtr;
CStrike(final CFont font, final FontStrikeDesc inDesc) {
......@@ -84,11 +84,11 @@ public class CStrike extends FontStrike {
// Normally the device transform should be the identity transform
// for screen operations. The device transform only becomes
// interesting when we are outputting between different dpi surfaces,
// like when we are printing to postscript.
// like when we are printing to postscript or use retina.
if (inDesc.devTx != null && !inDesc.devTx.isIdentity()) {
try {
invDevTx = inDesc.devTx.createInverse();
} catch (NoninvertibleTransformException e) {
} catch (NoninvertibleTransformException ignored) {
// ignored, since device transforms should not be that
// complicated, and if they are - there is nothing we can do,
// so we won't worry about it.
......@@ -134,15 +134,13 @@ public class CStrike extends FontStrike {
nativeStrikePtr = 0;
}
// the fractional metrics default on our platform is OFF
private boolean useFractionalMetrics() {
return desc.fmHint == SunHints.INTVAL_FRACTIONALMETRICS_ON;
}
@Override
public int getNumGlyphs() {
return nativeFont.getNumGlyphs();
}
@Override
StrikeMetrics getFontMetrics() {
if (strikeMetrics == null) {
StrikeMetrics metrics = getFontMetrics(getNativeStrikePtr());
......@@ -155,74 +153,24 @@ public class CStrike extends FontStrike {
return strikeMetrics;
}
float getGlyphAdvance(int glyphCode) {
return getScaledAdvanceForAdvance(getCachedNativeGlyphAdvance(glyphCode));
}
float getCodePointAdvance(int cp) {
float advance = getCachedNativeGlyphAdvance(nativeFont.getMapper().charToGlyph(cp));
double glyphScaleX = desc.glyphTx.getScaleX();
double devScaleX = desc.devTx.getScaleX();
if (devScaleX == 0) {
glyphScaleX = Math.sqrt(desc.glyphTx.getDeterminant());
devScaleX = Math.sqrt(desc.devTx.getDeterminant());
}
if (devScaleX == 0) {
devScaleX = Double.NaN; // this an undefined graphics state
}
advance = (float) (advance * glyphScaleX / devScaleX);
return useFractionalMetrics() ? advance : Math.round(advance);
}
// calculate an advance, and round if not using fractional metrics
private float getScaledAdvanceForAdvance(float advance) {
if (invDevTx != null) {
advance *= invDevTx.getScaleX();
}
advance *= desc.glyphTx.getScaleX();
return useFractionalMetrics() ? advance : Math.round(advance);
}
Point2D.Float getCharMetrics(char ch) {
return getScaledPointForAdvance(getCachedNativeGlyphAdvance(nativeFont.getMapper().charToGlyph(ch)));
@Override
float getGlyphAdvance(final int glyphCode) {
return getCachedNativeGlyphAdvance(glyphCode);
}
Point2D.Float getGlyphMetrics(int glyphCode) {
return getScaledPointForAdvance(getCachedNativeGlyphAdvance(glyphCode));
@Override
float getCodePointAdvance(final int cp) {
return getGlyphAdvance(nativeFont.getMapper().charToGlyph(cp));
}
// calculate an advance point, and round if not using fractional metrics
private Point2D.Float getScaledPointForAdvance(float advance) {
Point2D.Float pt = new Point2D.Float(advance, 0);
if (!desc.glyphTx.isIdentity()) {
return scalePoint(pt);
}
if (!useFractionalMetrics()) {
pt.x = Math.round(pt.x);
}
return pt;
@Override
Point2D.Float getCharMetrics(final char ch) {
return getGlyphMetrics(nativeFont.getMapper().charToGlyph(ch));
}
private Point2D.Float scalePoint(Point2D.Float pt) {
if (invDevTx != null) {
// transform the point out of the device space first
invDevTx.transform(pt, pt);
}
desc.glyphTx.transform(pt, pt);
pt.x -= desc.glyphTx.getTranslateX();
pt.y -= desc.glyphTx.getTranslateY();
if (!useFractionalMetrics()) {
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
}
return pt;
@Override
Point2D.Float getGlyphMetrics(final int glyphCode) {
return new Point2D.Float(getGlyphAdvance(glyphCode), 0.0f);
}
Rectangle2D.Float getGlyphOutlineBounds(int glyphCode) {
......@@ -414,9 +362,7 @@ public class CStrike extends FontStrike {
private SparseBitShiftingTwoLayerArray secondLayerCache;
private HashMap<Integer, Long> generalCache;
public GlyphInfoCache(final Font2D nativeFont,
final FontStrikeDesc desc)
{
GlyphInfoCache(final Font2D nativeFont, final FontStrikeDesc desc) {
super(nativeFont, desc);
firstLayerCache = new long[FIRST_LAYER_SIZE];
}
......@@ -527,7 +473,7 @@ public class CStrike extends FontStrike {
final int shift;
final int secondLayerLength;
public SparseBitShiftingTwoLayerArray(final int size, final int shift) {
SparseBitShiftingTwoLayerArray(final int size, final int shift) {
this.shift = shift;
this.cache = new long[1 << shift][];
this.secondLayerLength = size >> shift;
......@@ -559,6 +505,12 @@ public class CStrike extends FontStrike {
private SparseBitShiftingTwoLayerArray secondLayerCache;
private HashMap<Integer, Float> generalCache;
// Empty non private constructor was added because access to this
// class shouldn't be emulated by a synthetic accessor method.
GlyphAdvanceCache() {
super();
}
public synchronized float get(final int index) {
if (index < 0) {
if (-index < SECOND_LAYER_SIZE) {
......@@ -609,9 +561,7 @@ public class CStrike extends FontStrike {
final int shift;
final int secondLayerLength;
public SparseBitShiftingTwoLayerArray(final int size,
final int shift)
{
SparseBitShiftingTwoLayerArray(final int size, final int shift) {
this.shift = shift;
this.cache = new float[1 << shift][];
this.secondLayerLength = size >> shift;
......
......@@ -182,7 +182,11 @@ public class CDataTransferer extends DataTransferer {
Long format = predefinedClipboardNameMap.get(str);
if (format == null) {
format = new Long(registerFormatWithPasteboard(str));
if (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance()) {
// Do not try to access native system for the unknown format
return -1L;
}
format = registerFormatWithPasteboard(str);
predefinedClipboardNameMap.put(str, format);
predefinedClipboardFormatMap.put(format, str);
}
......
......@@ -43,7 +43,7 @@ public abstract class CMenuComponent implements MenuComponentPeer {
return target;
}
long getModel() {
public long getModel() {
return modelPtr;
}
......
......@@ -47,7 +47,7 @@ import com.apple.laf.ClientPropertyApplicator.Property;
import com.sun.awt.AWTUtilities;
public class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
private native long nativeCreateNSWindow(long nsViewPtr, long styleBits, double x, double y, double w, double h);
private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h);
private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
......@@ -230,7 +230,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
contentView = createContentView();
contentView.initialize(peer, responder);
final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), styleBits, 0, 0, 0, 0);
final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L;
final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ownerPtr, styleBits, 0, 0, 0, 0);
setPtr(nativeWindowPtr);
if (target instanceof javax.swing.RootPaneContainer) {
......
......@@ -103,7 +103,6 @@ NSDictionary *realmConfigsForRealms(SCDynamicStoreRef store, NSArray *realms) {
CFTypeRef realmInfo = SCDynamicStoreCopyValue(store, (CFStringRef) [NSString stringWithFormat:@"Kerberos:%@", realm]);
if (CFGetTypeID(realmInfo) != CFDictionaryGetTypeID()) {
NSLog(@"Unexpected CFType for realm Info: %lu", CFGetTypeID(realmInfo));
return nil;
}
......@@ -140,7 +139,6 @@ JNF_COCOA_ENTER(env);
SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java"), _SCDynamicStoreCallBack, NULL);
if (store == NULL) {
NSLog(@"Unable to load SCDynamicStore to install NotificationCallback");
return;
}
......@@ -171,19 +169,11 @@ JNF_COCOA_ENTER(env);
SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java-kerberos"), NULL, NULL);
if (store == NULL) {
NSLog(@"Unable to load SCDynamicStore");
return NULL;
}
// Create the store if it is NULL and set it.
if (store == NULL) {
NSLog(@"Invalid value for SCDynamicStore");
return NULL;
}
CFTypeRef realms = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALMS);
if (realms == NULL || CFGetTypeID(realms) != CFArrayGetTypeID()) {
NSLog(@"Unable to load realm info from SCDynamicStore");
if (realms) CFRelease(realms);
CFRelease(store);
return NULL;
......@@ -192,7 +182,6 @@ JNF_COCOA_ENTER(env);
CFTypeRef realmMappings = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALM_MAPPINGS);
if (realmMappings == NULL || CFGetTypeID(realmMappings) != CFArrayGetTypeID()) {
NSLog(@"Unable to load realm mapping info from SCDynamicStore");
if (realmMappings) CFRelease(realmMappings);
CFRelease(realms);
CFRelease(store);
......
......@@ -44,6 +44,7 @@
jint styleBits;
BOOL isEnabled;
NSWindow *nsWindow;
AWTWindow *ownerWindow;
}
// An instance of either AWTWindow_Normal or AWTWindow_Panel
......@@ -51,12 +52,15 @@
@property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow;
@property (nonatomic, retain) CMenuBar *javaMenuBar;
@property (nonatomic, retain) AWTWindow *ownerWindow;
@property (nonatomic) NSSize javaMinSize;
@property (nonatomic) NSSize javaMaxSize;
@property (nonatomic) jint styleBits;
@property (nonatomic) BOOL isEnabled;
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
ownerWindow:owner
styleBits:(jint)styleBits
frameRect:(NSRect)frameRect
contentView:(NSView *)contentView;
......
......@@ -30,6 +30,7 @@
#import "sun_lwawt_macosx_CPlatformWindow.h"
#import "com_apple_eawt_event_GestureHandler.h"
#import "com_apple_eawt_FullScreenHandler.h"
#import "ApplicationDelegate.h"
#import "AWTWindow.h"
#import "AWTView.h"
......@@ -55,7 +56,7 @@ static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow");
// doesn't provide information about "opposite" window, so we
// have to do a bit of tracking. This variable points to a window
// which had been the key window just before a new key window
// was set. It would be nil if the new key window isn't an AWT
// was set. It would be nil if the new key window isn't an AWT
// window or the app currently has no key window.
static AWTWindow* lastKeyWindow = nil;
......@@ -120,6 +121,7 @@ AWT_NS_WINDOW_IMPLEMENTATION
@synthesize javaMaxSize;
@synthesize styleBits;
@synthesize isEnabled;
@synthesize ownerWindow;
- (void) updateMinMaxSize:(BOOL)resizable {
if (resizable) {
......@@ -201,6 +203,7 @@ AWT_NS_WINDOW_IMPLEMENTATION
}
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)platformWindow
ownerWindow:owner
styleBits:(jint)bits
frameRect:(NSRect)rect
contentView:(NSView *)view
......@@ -245,6 +248,7 @@ AWT_ASSERT_APPKIT_THREAD;
self.isEnabled = YES;
self.javaPlatformWindow = platformWindow;
self.styleBits = bits;
self.ownerWindow = owner;
[self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
return self;
......@@ -350,7 +354,7 @@ AWT_ASSERT_APPKIT_THREAD;
[self.javaPlatformWindow setJObject:nil withEnv:env];
self.nsWindow = nil;
self.ownerWindow = nil;
[super dealloc];
}
......@@ -539,11 +543,27 @@ AWT_ASSERT_APPKIT_THREAD;
AWT_ASSERT_APPKIT_THREAD;
[AWTToolkit eventCountPlusPlus];
AWTWindow *opposite = [AWTWindow lastKeyWindow];
if (!IS(self.styleBits, IS_DIALOG)) {
[CMenuBar activate:self.javaMenuBar modallyDisabled:NO];
} else if ((opposite != NULL) && IS(self.styleBits, IS_MODAL)) {
[CMenuBar activate:opposite->javaMenuBar modallyDisabled:YES];
// Finds appropriate menubar in our hierarchy,
AWTWindow *awtWindow = self;
while (awtWindow.ownerWindow != nil) {
awtWindow = awtWindow.ownerWindow;
}
CMenuBar *menuBar = nil;
BOOL isDisabled = NO;
if ([awtWindow.nsWindow isVisible]){
menuBar = awtWindow.javaMenuBar;
isDisabled = !awtWindow.isEnabled;
}
if (menuBar == nil) {
menuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
isDisabled = NO;
}
[CMenuBar activate:menuBar modallyDisabled:isDisabled];
[AWTWindow setLastKeyWindow:nil];
[self _deliverWindowFocusEvent:YES oppositeWindow: opposite];
......@@ -555,6 +575,14 @@ AWT_ASSERT_APPKIT_THREAD;
[AWTToolkit eventCountPlusPlus];
[self.javaMenuBar deactivate];
// In theory, this might cause flickering if the window gaining focus
// has its own menu. However, I couldn't reproduce it on practice, so
// perhaps this is a non issue.
CMenuBar* defaultMenu = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
if (defaultMenu != nil) {
[CMenuBar activate:defaultMenu modallyDisabled:NO];
}
// the new key window
NSWindow *keyWindow = [NSApp keyWindow];
AWTWindow *opposite = nil;
......@@ -741,7 +769,7 @@ AWT_ASSERT_APPKIT_THREAD;
* Signature: (JJIIII)J
*/
JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow
(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong ownerPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
{
__block AWTWindow *window = nil;
......@@ -750,13 +778,14 @@ JNF_COCOA_ENTER(env);
JNFWeakJObjectWrapper *platformWindow = [JNFWeakJObjectWrapper wrapperWithJObject:obj withEnv:env];
NSView *contentView = OBJC(contentViewPtr);
NSRect frameRect = NSMakeRect(x, y, w, h);
AWTWindow *owner = [OBJC(ownerPtr) delegate];
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
window = [[AWTWindow alloc] initWithPlatformWindow:platformWindow
styleBits:styleBits
frameRect:frameRect
contentView:contentView];
ownerWindow:owner
styleBits:styleBits
frameRect:frameRect
contentView:contentView];
// the window is released is CPlatformWindow.nativeDispose()
if (window) CFRetain(window.nsWindow);
......@@ -818,11 +847,19 @@ JNF_COCOA_ENTER(env);
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
if ([nsWindow isKeyWindow]) [window.javaMenuBar deactivate];
if ([nsWindow isKeyWindow]) {
[window.javaMenuBar deactivate];
}
window.javaMenuBar = menuBar;
CMenuBar* actualMenuBar = menuBar;
if (actualMenuBar == nil) {
actualMenuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
}
if ([nsWindow isKeyWindow]) {
[CMenuBar activate:window.javaMenuBar modallyDisabled:NO];
[CMenuBar activate:actualMenuBar modallyDisabled:NO];
}
}];
......
......@@ -63,7 +63,7 @@ static BOOL sSetupHelpMenu = NO;
if (excludingAppleMenu && ![currMenu isJavaMenu]) {
continue;
}
[currItem setSubmenu:nil];
[theMainMenu removeItemAtIndex:index];
}
......@@ -154,7 +154,10 @@ static BOOL sSetupHelpMenu = NO;
// Clean up extra items
NSUInteger removedIndex, removedCount = [removedMenuArray count];
for (removedIndex=removedCount; removedIndex > 0; removedIndex--) {
[theMainMenu removeItemAtIndex:[[removedMenuArray objectAtIndex:(removedIndex-1)] integerValue]];
NSUInteger index = [[removedMenuArray objectAtIndex:(removedIndex-1)] integerValue];
NSMenuItem *currItem = [theMainMenu itemAtIndex:index];
[currItem setSubmenu:nil];
[theMainMenu removeItemAtIndex:index];
}
i = cmenuIndex;
......
......@@ -70,9 +70,15 @@ AWT_ASSERT_APPKIT_THREAD;
JNIEnv *env = [ThreadUtilities getJNIEnv];
JNF_COCOA_ENTER(env);
// If we are called as a result of user pressing a shorcut, do nothing,
// If we are called as a result of user pressing a shortcut, do nothing,
// because AVTView has already sent corresponding key event to the Java
// layer from performKeyEquivalent
// layer from performKeyEquivalent.
// There is an exception from the rule above, though: if a window with
// a menu gets minimized by user and there are no other windows to take
// focus, the window's menu won't be removed from the global menu bar.
// However, the Java layer won't handle invocation by a shortcut coming
// from this "frameless" menu, because there are no active windows. This
// means we have to handle it here.
NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
if ([currEvent type] == NSKeyDown) {
NSString *menuKey = [sender keyEquivalent];
......@@ -91,7 +97,8 @@ JNF_COCOA_ENTER(env);
eventKey = [NSString stringWithCharacters: &newChar length: 1];
}
if ([menuKey isEqualToString:eventKey]) {
NSWindow *keyWindow = [NSApp keyWindow];
if ([menuKey isEqualToString:eventKey] && keyWindow != nil) {
return;
}
}
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -31,11 +31,12 @@
@interface AWTStrike : NSObject {
@public
AWTFont * fAWTFont;
CGFloat fSize;
CGFloat fSize;
JRSFontRenderingStyle fStyle;
jint fAAStyle;
jint fAAStyle;
CGAffineTransform fTx;
CGAffineTransform fDevTx;
CGAffineTransform fAltTx; // alternate strike tx used for Sun2D
CGAffineTransform fFontTx;
}
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, 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
......@@ -65,6 +65,7 @@ static CGAffineTransform sInverseTX = { 1, 0, 0, -1, 0, 0 };
invDevTx.b *= -1;
invDevTx.c *= -1;
fFontTx = CGAffineTransformConcat(CGAffineTransformConcat(tx, invDevTx), sInverseTX);
fDevTx = CGAffineTransformInvert(invDevTx);
// the "font size" is the square root of the determinant of the matrix
fSize = sqrt(abs(fFontTx.a * fFontTx.d - fFontTx.b * fFontTx.c));
......@@ -148,7 +149,8 @@ Java_sun_font_CStrike_getNativeGlyphAdvance
{
CGSize advance;
JNF_COCOA_ENTER(env);
AWTFont *awtFont = ((AWTStrike *)jlong_to_ptr(awtStrikePtr))->fAWTFont;
AWTStrike *awtStrike = (AWTStrike *)jlong_to_ptr(awtStrikePtr);
AWTFont *awtFont = awtStrike->fAWTFont;
// negative glyph codes are really unicodes, which were placed there by the mapper
// to indicate we should use CoreText to substitute the character
......@@ -156,6 +158,10 @@ JNF_COCOA_ENTER(env);
const CTFontRef fallback = CTS_CopyCTFallbackFontAndGlyphForJavaGlyphCode(awtFont, glyphCode, &glyph);
CTFontGetAdvancesForGlyphs(fallback, kCTFontDefaultOrientation, &glyph, &advance, 1);
CFRelease(fallback);
advance = CGSizeApplyAffineTransform(advance, awtStrike->fFontTx);
if (!JRSFontStyleUsesFractionalMetrics(awtStrike->fStyle)) {
advance.width = round(advance.width);
}
JNF_COCOA_EXIT(env);
return advance.width;
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, 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
......@@ -455,6 +455,7 @@ CGGI_ClearCanvas(CGGI_GlyphCanvas *canvas, GlyphInfo *info)
#define CGGI_GLYPH_BBOX_PADDING 2.0f
static inline GlyphInfo *
CGGI_CreateNewGlyphInfoFrom(CGSize advance, CGRect bbox,
const AWTStrike *strike,
const CGGI_RenderingMode *mode)
{
size_t pixelSize = mode->glyphDescriptor->pixelSize;
......@@ -477,6 +478,12 @@ CGGI_CreateNewGlyphInfoFrom(CGSize advance, CGRect bbox,
width = 1;
height = 1;
}
advance = CGSizeApplyAffineTransform(advance, strike->fFontTx);
if (!JRSFontStyleUsesFractionalMetrics(strike->fStyle)) {
advance.width = round(advance.width);
advance.height = round(advance.height);
}
advance = CGSizeApplyAffineTransform(advance, strike->fDevTx);
#ifdef USE_IMAGE_ALIGNED_MEMORY
// create separate memory
......@@ -564,10 +571,10 @@ CGGI_CreateImageForUnicode
JRSFontGetBoundingBoxesForGlyphsAndStyle(fallback, &tx, style, &glyph, 1, &bbox);
CGSize advance;
JRSFontGetAdvancesForGlyphsAndStyle(fallback, &tx, strike->fStyle, &glyph, 1, &advance);
CTFontGetAdvancesForGlyphs(fallback, kCTFontDefaultOrientation, &glyph, &advance, 1);
// create the Sun2D GlyphInfo we are going to strike into
GlyphInfo *info = CGGI_CreateNewGlyphInfoFrom(advance, bbox, mode);
GlyphInfo *info = CGGI_CreateNewGlyphInfoFrom(advance, bbox, strike, mode);
// fix the context size, just in case the substituted character is unexpectedly large
CGGI_SizeCanvas(canvas, info->width, info->height, mode->cgFontMode);
......@@ -715,7 +722,7 @@ CGGI_CreateGlyphInfos(jlong *glyphInfos, const AWTStrike *strike,
JRSFontRenderingStyle bboxCGMode = JRSFontAlignStyleForFractionalMeasurement(strike->fStyle);
JRSFontGetBoundingBoxesForGlyphsAndStyle((CTFontRef)font->fFont, &tx, bboxCGMode, glyphs, len, bboxes);
JRSFontGetAdvancesForGlyphsAndStyle((CTFontRef)font->fFont, &tx, strike->fStyle, glyphs, len, advances);
CTFontGetAdvancesForGlyphs((CTFontRef)font->fFont, kCTFontDefaultOrientation, glyphs, advances, len);
size_t maxWidth = 1;
size_t maxHeight = 1;
......@@ -732,7 +739,7 @@ CGGI_CreateGlyphInfos(jlong *glyphInfos, const AWTStrike *strike,
CGSize advance = advances[i];
CGRect bbox = bboxes[i];
GlyphInfo *glyphInfo = CGGI_CreateNewGlyphInfoFrom(advance, bbox, mode);
GlyphInfo *glyphInfo = CGGI_CreateNewGlyphInfoFrom(advance, bbox, strike, mode);
if (maxWidth < glyphInfo->width) maxWidth = glyphInfo->width;
if (maxHeight < glyphInfo->height) maxHeight = glyphInfo->height;
......
# Refer to the note in basic.properties for a description as to what
# the mnemonics correspond to and how to calculate them.
# GTK specific properties
# GTK color chooser properties:
GTKColorChooserPanel.textAndMnemonic=&GTK Color Chooser
# mnemonic as a VK_ constant
GTKColorChooserPanel.hue.textAndMnemonic=&Hue:
GTKColorChooserPanel.red.textAndMnemonic=R&ed:
GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation:
GTKColorChooserPanel.green.textAndMnemonic=&Green:
GTKColorChooserPanel.value.textAndMnemonic=&Value:
GTKColorChooserPanel.blue.textAndMnemonic=&Blue:
GTKColorChooserPanel.color.textAndMnemonic=Color &Name:
############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
FileChooser.newFolderButton.textAndMnemonic=&New Folder
FileChooser.newFolderDialog.textAndMnemonic=Folder name:
FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
FileChooser.deleteFileButton.textAndMnemonic=De&lete File
FileChooser.renameFileButton.textAndMnemonic=&Rename File
FileChooser.cancelButton.textAndMnemonic=&Cancel
FileChooser.saveButton.textAndMnemonic=&OK
FileChooser.openButton.textAndMnemonic=&OK
FileChooser.saveDialogTitle.textAndMnemonic=Save
FileChooser.openDialogTitle.textAndMnemonic=Open
FileChooser.pathLabel.textAndMnemonic=&Selection:
FileChooser.filterLabel.textAndMnemonic=Filter:
FileChooser.foldersLabel.textAndMnemonic=Fol&ders
FileChooser.filesLabel.textAndMnemonic=&Files
FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to
FileChooser.renameFileError.titleAndMnemonic=Error
FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}"
# Refer to the note in basic.properties for a description as to what
# the mnemonics correspond to and how to calculate them.
# GTK specific properties
# GTK color chooser properties:
GTKColorChooserPanel.textAndMnemonic=&GTK Color Chooser
# mnemonic as a VK_ constant
GTKColorChooserPanel.hue.textAndMnemonic=&Hue:
GTKColorChooserPanel.red.textAndMnemonic=R&ed:
GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation:
GTKColorChooserPanel.green.textAndMnemonic=&Green:
GTKColorChooserPanel.value.textAndMnemonic=&Value:
GTKColorChooserPanel.blue.textAndMnemonic=&Blue:
GTKColorChooserPanel.color.textAndMnemonic=Color &Name:
############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
FileChooser.newFolderButton.textAndMnemonic=&New Folder
FileChooser.newFolderDialog.textAndMnemonic=Folder name:
FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
FileChooser.deleteFileButton.textAndMnemonic=De&lete File
FileChooser.renameFileButton.textAndMnemonic=&Rename File
FileChooser.cancelButton.textAndMnemonic=&Cancel
FileChooser.saveButton.textAndMnemonic=&OK
FileChooser.openButton.textAndMnemonic=&OK
FileChooser.saveDialogTitle.textAndMnemonic=Save
FileChooser.openDialogTitle.textAndMnemonic=Open
FileChooser.pathLabel.textAndMnemonic=&Selection:
FileChooser.filterLabel.textAndMnemonic=Filter:
FileChooser.foldersLabel.textAndMnemonic=Fol&ders
FileChooser.filesLabel.textAndMnemonic=&Files
FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to
FileChooser.renameFileError.titleAndMnemonic=Error
FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}"
......@@ -499,7 +499,8 @@ public class WindowsComboBoxUI extends BasicComboBoxUI {
public void setItem(Object item) {
super.setItem(item);
if (editor.hasFocus()) {
Object focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
if ((focus == editor) || (focus == editor.getParent())) {
editor.selectAll();
}
}
......
......@@ -42,7 +42,7 @@ import org.w3c.dom.Element;
public class DEREncodedKeyValue extends Signature11ElementProxy implements KeyInfoContent {
/** JCA algorithm key types supported by this implementation. */
public static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"};
private static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"};
/**
* Constructor DEREncodedKeyValue
......
/*
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2013, 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
......@@ -47,6 +47,10 @@ import javax.security.auth.PrivateCredentialPermission;
import sun.security.util.PropertyExpander;
import sun.security.provider.PolicyParser.PrincipalEntry;
import sun.security.provider.PolicyParser.GrantEntry;
import sun.security.provider.PolicyParser.PermissionEntry;
/**
* This class represents a default implementation for
* <code>javax.security.auth.Policy</code>.
......@@ -469,7 +473,8 @@ public class PolicyFile extends javax.security.auth.Policy {
* @param policyFile the policy Reader object.
*/
private void init(URL policy) {
PolicyParser pp = new PolicyParser(expandProperties);
sun.security.provider.PolicyParser pp =
new sun.security.provider.PolicyParser(expandProperties);
try {
InputStreamReader isr
= new InputStreamReader(getInputStream(policy));
......@@ -477,12 +482,12 @@ public class PolicyFile extends javax.security.auth.Policy {
isr.close();
KeyStore keyStore = initKeyStore(policy, pp.getKeyStoreUrl(),
pp.getKeyStoreType());
Enumeration<PolicyParser.GrantEntry> enum_ = pp.grantElements();
Enumeration<GrantEntry> enum_ = pp.grantElements();
while (enum_.hasMoreElements()) {
PolicyParser.GrantEntry ge = enum_.nextElement();
GrantEntry ge = enum_.nextElement();
addGrantEntry(ge, keyStore);
}
} catch (PolicyParser.ParsingException pe) {
} catch (sun.security.provider.PolicyParser.ParsingException pe) {
System.err.println(AUTH_POLICY +
rb.getString(".error.parsing.") + policy);
System.err.println(AUTH_POLICY +
......@@ -521,8 +526,8 @@ public class PolicyFile extends javax.security.auth.Policy {
*
* @return null if signedBy alias is not recognized
*/
CodeSource getCodeSource(PolicyParser.GrantEntry ge, KeyStore keyStore)
throws java.net.MalformedURLException
CodeSource getCodeSource(GrantEntry ge, KeyStore keyStore)
throws java.net.MalformedURLException
{
Certificate[] certs = null;
if (ge.signedBy != null) {
......@@ -559,20 +564,18 @@ public class PolicyFile extends javax.security.auth.Policy {
/**
* Add one policy entry to the vector.
*/
private void addGrantEntry(PolicyParser.GrantEntry ge,
KeyStore keyStore) {
private void addGrantEntry(GrantEntry ge, KeyStore keyStore) {
if (debug != null) {
debug.println("Adding policy entry: ");
debug.println(" signedBy " + ge.signedBy);
debug.println(" codeBase " + ge.codeBase);
if (ge.principals != null && ge.principals.size() > 0) {
ListIterator<PolicyParser.PrincipalEntry> li =
ge.principals.listIterator();
ListIterator<PrincipalEntry> li = ge.principals.listIterator();
while (li.hasNext()) {
PolicyParser.PrincipalEntry pppe = li.next();
debug.println(" " + pppe.principalClass +
" " + pppe.principalName);
PrincipalEntry pppe = li.next();
debug.println(" " + pppe.getPrincipalClass() +
" " + pppe.getPrincipalName());
}
}
debug.println();
......@@ -584,10 +587,9 @@ public class PolicyFile extends javax.security.auth.Policy {
if (codesource == null) return;
PolicyEntry entry = new PolicyEntry(codesource);
Enumeration<PolicyParser.PermissionEntry> enum_ =
ge.permissionElements();
Enumeration<PermissionEntry> enum_ = ge.permissionElements();
while (enum_.hasMoreElements()) {
PolicyParser.PermissionEntry pe = enum_.nextElement();
PermissionEntry pe = enum_.nextElement();
try {
// XXX special case PrivateCredentialPermission-SELF
Permission perm;
......@@ -998,11 +1000,11 @@ public class PolicyFile extends javax.security.auth.Policy {
return true;
}
ListIterator<PolicyParser.PrincipalEntry> pli =
scs.getPrincipals().listIterator();
ListIterator<PrincipalEntry> pli =
scs.getPrincipals().listIterator();
while (pli.hasNext()) {
PolicyParser.PrincipalEntry principal = pli.next();
PrincipalEntry principal = pli.next();
// XXX
// if the Policy entry's Principal does not contain a
......@@ -1050,30 +1052,29 @@ public class PolicyFile extends javax.security.auth.Policy {
* if (y == 1), it's the principal name.
*/
private String[][] getPrincipalInfo
(PolicyParser.PrincipalEntry principal,
final CodeSource accCs) {
(PrincipalEntry principal, final CodeSource accCs) {
// there are 3 possibilities:
// 1) the entry's Principal class and name are not wildcarded
// 2) the entry's Principal name is wildcarded only
// 3) the entry's Principal class and name are wildcarded
if (!principal.principalClass.equals
(PolicyParser.PrincipalEntry.WILDCARD_CLASS) &&
!principal.principalName.equals
(PolicyParser.PrincipalEntry.WILDCARD_NAME)) {
if (!principal.getPrincipalClass().equals
(PrincipalEntry.WILDCARD_CLASS) &&
!principal.getPrincipalName().equals
(PrincipalEntry.WILDCARD_NAME)) {
// build a PrivateCredentialPermission for the principal
// from the Policy entry
String[][] info = new String[1][2];
info[0][0] = principal.principalClass;
info[0][1] = principal.principalName;
info[0][0] = principal.getPrincipalClass();
info[0][1] = principal.getPrincipalName();
return info;
} else if (!principal.principalClass.equals
(PolicyParser.PrincipalEntry.WILDCARD_CLASS) &&
principal.principalName.equals
(PolicyParser.PrincipalEntry.WILDCARD_NAME)) {
} else if (!principal.getPrincipalClass().equals
(PrincipalEntry.WILDCARD_CLASS) &&
principal.getPrincipalName().equals
(PrincipalEntry.WILDCARD_NAME)) {
// build a PrivateCredentialPermission for all
// the Subject's principals that are instances of principalClass
......@@ -1088,7 +1089,7 @@ public class PolicyFile extends javax.security.auth.Policy {
// If it doesn't, we should stop here with a ClassCastException.
@SuppressWarnings("unchecked")
Class<? extends Principal> pClass = (Class<? extends Principal>)
Class.forName(principal.principalClass, false,
Class.forName(principal.getPrincipalClass(), false,
ClassLoader.getSystemClassLoader());
principalSet = scs.getSubject().getPrincipals(pClass);
} catch (Exception e) {
......@@ -1387,6 +1388,7 @@ public class PolicyFile extends javax.security.auth.Policy {
}
}
@SuppressWarnings("deprecation")
class PolicyPermissions extends PermissionCollection {
private static final long serialVersionUID = -1954188373270545523L;
......
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -33,6 +33,7 @@ import java.security.cert.Certificate;
import java.lang.reflect.Constructor;
import javax.security.auth.Subject;
import sun.security.provider.PolicyParser.PrincipalEntry;
/**
* <p> This <code>SubjectCodeSource</code> class contains
......@@ -57,7 +58,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
});
private Subject subject;
private LinkedList<PolicyParser.PrincipalEntry> principals;
private LinkedList<PrincipalEntry> principals;
private static final Class[] PARAMS = { String.class };
private static final sun.security.util.Debug debug =
sun.security.util.Debug.getInstance("auth", "\t[Auth Access]");
......@@ -87,14 +88,14 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
* <code>SubjectCodeSource</code> <p>
*/
SubjectCodeSource(Subject subject,
LinkedList<PolicyParser.PrincipalEntry> principals,
LinkedList<PrincipalEntry> principals,
URL url, Certificate[] certs) {
super(url, certs);
this.subject = subject;
this.principals = (principals == null ?
new LinkedList<PolicyParser.PrincipalEntry>() :
new LinkedList<PolicyParser.PrincipalEntry>(principals));
new LinkedList<PrincipalEntry>() :
new LinkedList<PrincipalEntry>(principals));
sysClassLoader = java.security.AccessController.doPrivileged
(new java.security.PrivilegedAction<ClassLoader>() {
public ClassLoader run() {
......@@ -114,7 +115,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
* <code>SubjectCodeSource</code> as a <code>LinkedList</code>
* of <code>PolicyParser.PrincipalEntry</code> objects.
*/
LinkedList<PolicyParser.PrincipalEntry> getPrincipals() {
LinkedList<PrincipalEntry> getPrincipals() {
return principals;
}
......@@ -167,7 +168,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
*/
public boolean implies(CodeSource codesource) {
LinkedList<PolicyParser.PrincipalEntry> subjectList = null;
LinkedList<PrincipalEntry> subjectList = null;
if (codesource == null ||
!(codesource instanceof SubjectCodeSource) ||
......@@ -197,20 +198,19 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
return false;
}
ListIterator<PolicyParser.PrincipalEntry> li =
this.principals.listIterator(0);
ListIterator<PrincipalEntry> li = this.principals.listIterator(0);
while (li.hasNext()) {
PolicyParser.PrincipalEntry pppe = li.next();
PrincipalEntry pppe = li.next();
try {
// handle PrincipalComparators
Class<?> principalComparator = Class.forName(
pppe.principalClass, true, sysClassLoader);
pppe.getPrincipalClass(), true, sysClassLoader);
Constructor<?> c = principalComparator.getConstructor(PARAMS);
PrincipalComparator pc =
(PrincipalComparator)c.newInstance
(new Object[] { pppe.principalName });
(new Object[] { pppe.getPrincipalName() });
if (!pc.implies(that.getSubject())) {
if (debug != null)
......@@ -236,11 +236,10 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
Iterator<Principal> i =
that.getSubject().getPrincipals().iterator();
subjectList = new LinkedList<PolicyParser.PrincipalEntry>();
subjectList = new LinkedList<PrincipalEntry>();
while (i.hasNext()) {
Principal p = i.next();
PolicyParser.PrincipalEntry spppe =
new PolicyParser.PrincipalEntry
PrincipalEntry spppe = new PrincipalEntry
(p.getClass().getName(), p.getName());
subjectList.add(spppe);
}
......@@ -281,23 +280,19 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
* <i>pppe</i> argument.
*/
private boolean subjectListImpliesPrincipalEntry(
LinkedList<PolicyParser.PrincipalEntry> subjectList,
PolicyParser.PrincipalEntry pppe) {
LinkedList<PrincipalEntry> subjectList, PrincipalEntry pppe) {
ListIterator<PolicyParser.PrincipalEntry> li =
subjectList.listIterator(0);
ListIterator<PrincipalEntry> li = subjectList.listIterator(0);
while (li.hasNext()) {
PolicyParser.PrincipalEntry listPppe = li.next();
if (pppe.principalClass.equals
(PolicyParser.PrincipalEntry.WILDCARD_CLASS) ||
pppe.principalClass.equals
(listPppe.principalClass)) {
if (pppe.principalName.equals
(PolicyParser.PrincipalEntry.WILDCARD_NAME) ||
pppe.principalName.equals
(listPppe.principalName))
PrincipalEntry listPppe = li.next();
if (pppe.getPrincipalClass().equals
(PrincipalEntry.WILDCARD_CLASS) ||
pppe.getPrincipalClass().equals(listPppe.getPrincipalClass()))
{
if (pppe.getPrincipalName().equals
(PrincipalEntry.WILDCARD_NAME) ||
pppe.getPrincipalName().equals(listPppe.getPrincipalName()))
return true;
}
}
......@@ -390,13 +385,12 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
}
}
if (principals != null) {
ListIterator<PolicyParser.PrincipalEntry> li =
principals.listIterator();
ListIterator<PrincipalEntry> li = principals.listIterator();
while (li.hasNext()) {
PolicyParser.PrincipalEntry pppe = li.next();
PrincipalEntry pppe = li.next();
returnMe = returnMe + rb.getString("NEWLINE") +
pppe.principalClass + " " +
pppe.principalName;
pppe.getPrincipalClass() + " " +
pppe.getPrincipalName();
}
}
return returnMe;
......
# This properties file is used to create a PropertyResourceBundle
# It contains Locale specific strings used be the Synth Look and Feel.
# Currently, the following components need this for support:
#
# FileChooser
#
# When this file is read in, the strings are put into the
# defaults table. This is an implementation detail of the current
# workings of Swing. DO NOT DEPEND ON THIS.
# This may change in future versions of Swing as we improve localization
# support.
#
# Refer to the note in basic.properties for a description as to what
# the mnemonics correspond to and how to calculate them.
#
# @author Steve Wilson
############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabel.textAndMnemonic=Look &In:
FileChooser.saveInLabel.textAndMnemonic=Save In:
FileChooser.fileNameLabel.textAndMnemonic=File &Name:
FileChooser.folderNameLabel.textAndMnemonic=Folder &Name:
FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
FileChooser.upFolderAccessibleName=Up
FileChooser.homeFolderToolTip.textAndMnemonic=Home
FileChooser.homeFolderAccessibleName=Home
FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder
FileChooser.newFolderAccessibleName=New Folder
FileChooser.newFolderActionLabel.textAndMnemonic=New Folder
FileChooser.listViewButtonToolTip.textAndMnemonic=List
FileChooser.listViewButtonAccessibleName=List
FileChooser.listViewActionLabel.textAndMnemonic=List
FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details
FileChooser.detailsViewButtonAccessibleName=Details
FileChooser.detailsViewActionLabel.textAndMnemonic=Details
FileChooser.refreshActionLabel.textAndMnemonic=Refresh
FileChooser.viewMenuLabel.textAndMnemonic=View
FileChooser.fileNameHeader.textAndMnemonic=Name
FileChooser.fileSizeHeader.textAndMnemonic=Size
FileChooser.fileTypeHeader.textAndMnemonic=Type
FileChooser.fileDateHeader.textAndMnemonic=Modified
FileChooser.fileAttrHeader.textAndMnemonic=Attributes
# This properties file is used to create a PropertyResourceBundle
# It contains Locale specific strings used be the Synth Look and Feel.
# Currently, the following components need this for support:
#
# FileChooser
#
# When this file is read in, the strings are put into the
# defaults table. This is an implementation detail of the current
# workings of Swing. DO NOT DEPEND ON THIS.
# This may change in future versions of Swing as we improve localization
# support.
#
# Refer to the note in basic.properties for a description as to what
# the mnemonics correspond to and how to calculate them.
#
# @author Steve Wilson
############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabel.textAndMnemonic=Look &In:
FileChooser.saveInLabel.textAndMnemonic=Save In:
FileChooser.fileNameLabel.textAndMnemonic=File &Name:
FileChooser.folderNameLabel.textAndMnemonic=Folder &Name:
FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
FileChooser.upFolderAccessibleName=Up
FileChooser.homeFolderToolTip.textAndMnemonic=Home
FileChooser.homeFolderAccessibleName=Home
FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder
FileChooser.newFolderAccessibleName=New Folder
FileChooser.newFolderActionLabel.textAndMnemonic=New Folder
FileChooser.listViewButtonToolTip.textAndMnemonic=List
FileChooser.listViewButtonAccessibleName=List
FileChooser.listViewActionLabel.textAndMnemonic=List
FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details
FileChooser.detailsViewButtonAccessibleName=Details
FileChooser.detailsViewActionLabel.textAndMnemonic=Details
FileChooser.refreshActionLabel.textAndMnemonic=Refresh
FileChooser.viewMenuLabel.textAndMnemonic=View
FileChooser.fileNameHeader.textAndMnemonic=Name
FileChooser.fileSizeHeader.textAndMnemonic=Size
FileChooser.fileTypeHeader.textAndMnemonic=Type
FileChooser.fileDateHeader.textAndMnemonic=Modified
FileChooser.fileAttrHeader.textAndMnemonic=Attributes
......@@ -151,7 +151,7 @@ function JavaClassProto() {
while (tmp != null) {
res[res.length] = tmp;
tmp = tmp.superclass;
}
}
return res;
}
......@@ -263,16 +263,19 @@ function wrapJavaObject(thing) {
if (name == 'class') {
return wrapJavaValue(instance.clazz);
} else if (name == 'toString') {
return function() {
return instance.toString();
}
} else if (name == 'wrapped-object') {
return instance;
}
return undefined;
}
},
__call__: function(name) {
if (name == 'toString') {
return instance.toString();
} else {
return undefined;
}
}
}
}
......@@ -297,7 +300,7 @@ function wrapJavaObject(thing) {
return true;
}
}
return theJavaClassProto[name] != undefined;
return false;
},
__get__ : function(name) {
for (var i in fields) {
......@@ -305,7 +308,7 @@ function wrapJavaObject(thing) {
return wrapJavaValue(fields[i].value);
}
}
return theJavaClassProto[name];
return undefined;
}
}
......@@ -322,7 +325,12 @@ function wrapJavaObject(thing) {
this.name = jclass.name;
this.fields = jclass.fields;
this['wrapped-object'] = jclass;
this.__proto__ = this.statics;
}
for (var i in theJavaClassProto) {
if (typeof theJavaClassProto[i] == 'function') {
JavaClassWrapper.prototype[i] = theJavaClassProto[i];
}
}
// returns wrapper for Java object arrays
......@@ -334,32 +342,35 @@ function wrapJavaObject(thing) {
__getIds__ : function() {
var res = new Array(elements.length);
for (var i = 0; i < elements.length; i++) {
res[i] = i;
res[i] = String(i);
}
return res;
},
__has__: function(name) {
return (typeof(name) == 'number' &&
name >= 0 && name < elements.length) ||
return (name >= 0 && name < elements.length) ||
name == 'length' || name == 'class' ||
name == 'toString' || name == 'wrapped-object';
},
__get__ : function(name) {
if (typeof(name) == 'number' &&
name >= 0 && name < elements.length) {
if (name >= 0 && name < elements.length) {
return wrapJavaValue(elements[name]);
} else if (name == 'length') {
return elements.length;
} else if (name == 'class') {
return wrapJavaValue(array.clazz);
} else if (name == 'toString') {
return function() { return array.toString(); }
} else if (name == 'wrapped-object') {
return array;
} else {
return undefined;
}
}
},
__call__: function(name) {
if (name == 'toString') {
return array.toString();
} else {
return undefined;
}
}
}
}
......@@ -373,26 +384,22 @@ function wrapJavaObject(thing) {
__getIds__ : function() {
var r = new Array(array.length);
for (var i = 0; i < array.length; i++) {
r[i] = i;
r[i] = String(i);
}
return r;
},
__has__: function(name) {
return (typeof(name) == 'number' &&
name >= 0 && name < array.length) ||
return (name >= 0 && name < array.length) ||
name == 'length' || name == 'class' ||
name == 'toString' || name == 'wrapped-object';
},
__get__: function(name) {
if (typeof(name) == 'number' &&
name >= 0 && name < array.length) {
if (name >= 0 && name < array.length) {
return elements[name];
}
if (name == 'length') {
return array.length;
} else if (name == 'toString') {
return function() { return array.valueString(true); }
} else if (name == 'wrapped-object') {
return array;
} else if (name == 'class') {
......@@ -400,7 +407,14 @@ function wrapJavaObject(thing) {
} else {
return undefined;
}
}
},
__call__: function(name) {
if (name == 'toString') {
return array.valueString(true);
} else {
return undefined;
}
}
}
}
return javaObject(thing);
......@@ -673,34 +687,33 @@ function wrapHeapSnapshot(heap) {
__getIds__ : function() {
var res = new Array(path.length);
for (var i = 0; i < path.length; i++) {
res[i] = i;
res[i] = String(i);
}
return res;
},
__has__ : function (name) {
return (typeof(name) == 'number' &&
name >= 0 && name < path.length) ||
return (name >= 0 && name < path.length) ||
name == 'length' || name == 'toHtml' ||
name == 'toString';
},
__get__ : function(name) {
if (typeof(name) == 'number' &&
name >= 0 && name < path.length) {
if (name >= 0 && name < path.length) {
return path[name];
} else if (name == 'length') {
return path.length;
} else if (name == 'toHtml') {
return function() {
return computeDescription(true);
}
} else if (name == 'toString') {
return function() {
return computeDescription(false);
}
} else {
return undefined;
}
},
__call__: function(name) {
if (name == 'toHtml') {
return computeDescription(true);
} else if (name == 'toString') {
return computeDescription(false);
} else {
return undefined;
}
}
};
}
......@@ -1005,22 +1018,8 @@ function toHtml(obj) {
return "<a href='/object/" + id + "'>" +
name + "@" + id + "</a>";
}
} else if ((typeof(obj) == 'object') || (obj instanceof JSAdapter)) {
if (obj instanceof java.lang.Object) {
// script wrapped Java object
obj = wrapIterator(obj);
// special case for enumeration
if (obj instanceof java.util.Enumeration) {
var res = "[ ";
while (obj.hasMoreElements()) {
res += toHtml(obj.nextElement()) + ", ";
}
res += "]";
return res;
} else {
return obj;
}
} else if (obj instanceof Array) {
} else if (obj instanceof Object) {
if (Array.isArray(obj)) {
// script array
var res = "[ ";
for (var i in obj) {
......@@ -1047,8 +1046,19 @@ function toHtml(obj) {
}
}
} else {
// JavaScript primitive value
return obj;
// a Java object
obj = wrapIterator(obj);
// special case for enumeration
if (obj instanceof java.util.Enumeration) {
var res = "[ ";
while (obj.hasMoreElements()) {
res += toHtml(obj.nextElement()) + ", ";
}
res += "]";
return res;
} else {
return obj;
}
}
}
......
......@@ -79,7 +79,7 @@ bound to a JavaScript variable of the identifier name specified in <span class="
<li>select all Strings of length 100 or more
<pre>
<code>
select s from java.lang.String s where s.count >= 100
select s from java.lang.String s where s.value.length >= 100
</code>
</pre>
<li>select all int arrays of length 256 or more
......@@ -92,7 +92,7 @@ bound to a JavaScript variable of the identifier name specified in <span class="
<pre>
<code>
select s.value.toString() from java.lang.String s
where /java/(s.value.toString())
where /java/.test(s.value.toString())
</code>
</pre>
<li>show path value of all File objects
......@@ -219,7 +219,6 @@ Examples:
<pre>
<code>
select heap.findClass("java.lang.System").statics.props
select heap.findClass("java.lang.System").props
</code>
</pre>
<li>get number of fields of java.lang.String class
......@@ -237,7 +236,7 @@ Examples:
<li>select all classes that have name pattern java.net.*
<pre>
<code>
select <a href="#filter">filter</a>(heap.classes(), "/java.net./(it.name)")
select <a href="#filter">filter</a>(heap.classes(), "/java.net./.test(it.name)")
</code>
</pre>
</ul>
......@@ -536,7 +535,7 @@ refer to the following built-in variables.
Example: print number of classes that have specific name pattern
<pre>
<code>
select count(<a href="#classes">heap.classes()</a>, "/java.io./(it.name)")
select count(<a href="#classes">heap.classes()</a>, "/java.io./.test(it.name)")
</code>
</pre>
......@@ -559,14 +558,14 @@ Examples:
<li>show all classes that have java.io.* name pattern
<pre>
<code>
select filter(<a href="#classes">heap.classes</a>(), "/java.io./(it.name)")
select filter(<a href="#classes">heap.classes</a>(), "/java.io./.test(it.name)")
</code>
</pre>
<li> show all referrers of URL object where the referrer is not from
java.net package
<pre>
<code>
select filter(<a href="#referrers">referrers</a>(u), "! /java.net./(<a href="#classof">classof</a>(it).name)")
select filter(<a href="#referrers">referrers</a>(u), "! /java.net./.test(<a href="#classof">classof</a>(it).name)")
from java.net.URL u
</code>
</pre>
......@@ -619,13 +618,13 @@ Examples:
<li>find the maximum length of any String instance
<pre>
<code>
select max(map(heap.objects('java.lang.String', false), 'it.count'))
select max(map(heap.objects('java.lang.String', false), 'it.value.length'))
</code>
</pre>
<li>find string instance that has the maximum length
<pre>
<code>
select max(heap.objects('java.lang.String'), 'lhs.count > rhs.count')
select max(heap.objects('java.lang.String'), 'lhs.value.length > rhs.value.length')
</code>
</pre>
</ul>
......@@ -775,7 +774,7 @@ and walk until parent is null using the callback function to map call.
<pre>
<code>
select <a href="#map">map</a>(<a href="#filter">filter(<a href="#findClass">heap.findClass</a>('java.lang.System').props.table, 'it != null'),
select <a href="#map">map</a>(<a href="#filter">filter(<a href="#findClass">heap.findClass</a>('java.lang.System').statics.props.table, 'it != null'),
function (it) {
var res = "";
while (it != null) {
......
/*
* Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -56,7 +56,7 @@ public interface AppletContext {
/**
* Returns an <code>Image</code> object that can then be painted on
* the screen. The <code>url</code> argument<code> </code>that is
* the screen. The <code>url</code> argument that is
* passed as an argument must specify an absolute URL.
* <p>
* This method always returns immediately, whether or not the image
......@@ -157,7 +157,7 @@ public interface AppletContext {
* @param stream stream to be associated with the specified key. If this
* parameter is <code>null</code>, the specified key is removed
* in this applet context.
* @throws <code>IOException</code> if the stream size exceeds a certain
* @throws IOException if the stream size exceeds a certain
* size limit. Size limit is decided by the implementor of this
* interface.
* @since 1.4
......
/*
* Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,7 +26,7 @@ package java.awt;
/**
* Signals that an Absract Window Toolkit exception has occurred.
* Signals that an Abstract Window Toolkit exception has occurred.
*
* @author Arthur van Hoff
*/
......
/*
* Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -68,7 +68,6 @@ public interface AppletInitializer {
* the Applet with its Container during the subsequent invocation of its
* addChildren() method.
* </ol>
* </p>
*
* @param newAppletBean The newly instantiated JavaBean
* @param bCtxt The BeanContext intended for this Applet, or
......
/*
* Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, 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
......@@ -62,7 +62,7 @@ public class Beans {
* <p>
* Instantiate a JavaBean.
* </p>
*
* @return a JavaBean
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
* class-loader is used.
......@@ -82,6 +82,7 @@ public class Beans {
* <p>
* Instantiate a JavaBean.
* </p>
* @return a JavaBean
*
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
......@@ -137,6 +138,7 @@ public class Beans {
* the JDK appletviewer (for a reference browser environment) and the
* BDK BeanBox (for a reference bean container).
*
* @return a JavaBean
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
* class-loader is used.
......@@ -361,6 +363,8 @@ public class Beans {
* This method is provided in Beans 1.0 as a hook to allow the
* addition of more flexible bean behaviour in the future.
*
* @return an object representing a specified type view of the
* source object
* @param bean Object from which we want to obtain a view.
* @param targetType The type of view we'd like to get.
*
......@@ -384,7 +388,6 @@ public class Beans {
return Introspector.isSubclass(bean.getClass(), targetType);
}
/**
* Test if we are in design-mode.
*
......
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -61,7 +61,7 @@ import static java.lang.annotation.RetentionPolicy.*;
the {@code getY()} method. Since parameter names are not in
general available at runtime, without the annotation there would be
no way to know whether the parameters correspond to {@code getX()}
and {@code getY()} or the other way around.</p>
and {@code getY()} or the other way around.
@since 1.6
*/
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, 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
......@@ -382,6 +382,7 @@ public class DefaultPersistenceDelegate extends PersistenceDelegate {
* a class such that no property value depends on the value of
* a subsequent property.
*
* @param type the type of the instances
* @param oldInstance The instance to be copied.
* @param newInstance The instance that is to be modified.
* @param out The stream to which any initialization statements should be written.
......
/*
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, 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
......@@ -515,6 +515,7 @@ public class EventHandler implements InvocationHandler {
*</pre>
*</blockquote>
*
* @param <T> the type to create
* @param listenerInterface the listener interface to create a proxy for
* @param target the object that will perform the action
* @param action the name of a (possibly qualified) property or method on
......@@ -570,6 +571,7 @@ public class EventHandler implements InvocationHandler {
*</pre>
*</blockquote>
*
* @param <T> the type to create
* @param listenerInterface the listener interface to create a proxy for
* @param target the object that will perform the action
* @param action the name of a (possibly qualified) property or method on
......@@ -659,6 +661,7 @@ public class EventHandler implements InvocationHandler {
* </pre>
*</blockquote>
*
* @param <T> the type to create
* @param listenerInterface the listener interface to create a proxy for
* @param target the object that will perform the action
* @param action the name of a (possibly qualified) property or method on
......
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, 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
......@@ -139,7 +139,7 @@ public class Expression extends Statement {
* replaces this default value in the same way that any other value
* would, ensuring that expressions are never evaluated more than once.
* <p>
* See the <code>excecute</code> method for details on how
* See the <code>execute</code> method for details on how
* methods are chosen using the dynamic types of the target
* and arguments.
*
......@@ -147,6 +147,8 @@ public class Expression extends Statement {
* @see #setValue
*
* @return The result of applying this method to these arguments.
* @throws Exception if the method with the specified methodName
* throws an exception
*/
public Object getValue() throws Exception {
if (value == unbound) {
......
......@@ -207,6 +207,8 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
* Sets the method that should be used to read an indexed property value.
*
* @param readMethod The new indexed read method.
* @throws IntrospectionException if an exception occurs during
* introspection.
*/
public synchronized void setIndexedReadMethod(Method readMethod)
throws IntrospectionException {
......@@ -285,6 +287,8 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
* Sets the method that should be used to write an indexed property value.
*
* @param writeMethod The new indexed write method.
* @throws IntrospectionException if an exception occurs during
* introspection.
*/
public synchronized void setIndexedWriteMethod(Method writeMethod)
throws IntrospectionException {
......
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -93,8 +93,17 @@ import sun.reflect.misc.ReflectUtil;
public class Introspector {
// Flags that can be used to control getBeanInfo:
/**
* Flag to indicate to use of all beaninfo.
*/
public final static int USE_ALL_BEANINFO = 1;
/**
* Flag to indicate to ignore immediate beaninfo.
*/
public final static int IGNORE_IMMEDIATE_BEANINFO = 2;
/**
* Flag to indicate to ignore all beaninfo.
*/
public final static int IGNORE_ALL_BEANINFO = 3;
// Static Caches to speed up introspection.
......@@ -202,7 +211,7 @@ public class Introspector {
* If the BeanInfo class for a Java Bean has been previously Introspected
* based on the same arguments, then the BeanInfo class is retrieved
* from the BeanInfo cache.
*
* @return the BeanInfo for the bean
* @param beanClass The bean class to be analyzed.
* @param stopClass The baseclass at which to stop the analysis. Any
* methods/properties/events in the stopClass or in its baseclasses
......
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, 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
......@@ -197,6 +197,7 @@ public abstract class PersistenceDelegate {
* The default implementation, calls the <code>initialize</code>
* method of the type's superclass.
*
* @param type the type of the instances
* @param oldInstance The instance to be copied.
* @param newInstance The instance that is to be modified.
* @param out The stream to which any initialization statements should be written.
......
/*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, 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
......@@ -156,7 +156,7 @@ public class PropertyChangeSupport implements Serializable {
* <code>PropertyChangeListenerProxy</code>, perform the cast, and examine
* the parameter.
*
* <pre>
* <pre>{@code
* PropertyChangeListener[] listeners = bean.getPropertyChangeListeners();
* for (int i = 0; i < listeners.length; i++) {
* if (listeners[i] instanceof PropertyChangeListenerProxy) {
......@@ -168,7 +168,7 @@ public class PropertyChangeSupport implements Serializable {
* }
* }
* }
*</pre>
* }</pre>
*
* @see PropertyChangeListenerProxy
* @return all of the <code>PropertyChangeListeners</code> added or an
......
......@@ -243,6 +243,7 @@ public class PropertyDescriptor extends FeatureDescriptor {
* Sets the method that should be used to read the property value.
*
* @param readMethod The new read method.
* @throws IntrospectionException if the read method is invalid
*/
public synchronized void setReadMethod(Method readMethod)
throws IntrospectionException {
......@@ -313,6 +314,7 @@ public class PropertyDescriptor extends FeatureDescriptor {
* Sets the method that should be used to write the property value.
*
* @param writeMethod The new write method.
* @throws IntrospectionException if the write method is invalid
*/
public synchronized void setWriteMethod(Method writeMethod)
throws IntrospectionException {
......
/*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -40,7 +40,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* A {@code true} value for the "transient" attribute
* indicates to encoders derived from {@link Encoder}
* that this feature should be ignored.
* <p/>
* <p>
* The {@code Transient} annotation may be be used
* in any of the methods that are involved
* in a {@link FeatureDescriptor} subclass
......@@ -49,7 +49,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* to put the annotation and it is this declaration
* that takes precedence in the case of multiple annotations
* being defined for the same feature.
* <p/>
* <p>
* To declare a feature non-transient in a class
* whose superclass declares it transient,
* use {@code @Transient(false)}.
......@@ -64,5 +64,11 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD})
@Retention(RUNTIME)
public @interface Transient {
/**
* Returns whether or not the {@code Introspector} should
* construct artifacts for the annotated method.
* @return whether or not the {@code Introspector} should
* construct artifacts for the annotated method
*/
boolean value() default true;
}
/*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -42,7 +42,7 @@ import java.util.Map.Entry;
* <p>
* Here is an example of {@code VetoableChangeSupport} usage that follows
* the rules and recommendations laid out in the JavaBeans&trade; specification:
* <pre>
* <pre>{@code
* public class MyBean {
* private final VetoableChangeSupport vcs = new VetoableChangeSupport(this);
*
......@@ -68,7 +68,7 @@ import java.util.Map.Entry;
*
* [...]
* }
* </pre>
* }</pre>
* <p>
* A {@code VetoableChangeSupport} instance is thread-safe.
* <p>
......@@ -156,7 +156,7 @@ public class VetoableChangeSupport implements Serializable {
* <code>VetoableChangeListenerProxy</code>, perform the cast, and examine
* the parameter.
*
* <pre>
* <pre>{@code
* VetoableChangeListener[] listeners = bean.getVetoableChangeListeners();
* for (int i = 0; i < listeners.length; i++) {
* if (listeners[i] instanceof VetoableChangeListenerProxy) {
......@@ -168,7 +168,7 @@ public class VetoableChangeSupport implements Serializable {
* }
* }
* }
*</pre>
* }</pre>
*
* @see VetoableChangeListenerProxy
* @return all of the <code>VetoableChangeListeners</code> added or an
......
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, 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
......@@ -64,10 +64,12 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
* and is defined by the
* <code>java.beans.Beans.instantiate()</code> method.
*
* @return a javaBean named as a child of this
* <code>BeanContext</code>
* @param beanName The name of the JavaBean to instantiate
* as a child of this <code>BeanContext</code>
* @throws <code>IOException</code>
* @throws <code>ClassNotFoundException</code> if the class identified
* @throws IOException if an IO problem occurs
* @throws ClassNotFoundException if the class identified
* by the beanName parameter is not found
*/
Object instantiateChild(String beanName) throws IOException, ClassNotFoundException;
......@@ -83,7 +85,7 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
* @return an <code>InputStream</code> for reading the resource,
* or <code>null</code> if the resource could not
* be found.
* @throws <code>IllegalArgumentException</code> if
* @throws IllegalArgumentException if
* the resource is not valid
*/
InputStream getResourceAsStream(String name, BeanContextChild bcc) throws IllegalArgumentException;
......@@ -98,7 +100,7 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
* @param bcc the specified child
* @return a <code>URL</code> for the named
* resource for the specified child
* @throws <code>IllegalArgumentException</code>
* @throws IllegalArgumentException
* if the resource is not valid
*/
URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException;
......@@ -109,7 +111,7 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
* this <code>BeanContext</code> whenever it adds
* or removes a child <code>Component</code>(s).
*
* @param bcml the <code>BeanContextMembershipListener</code> to be added
* @param bcml the BeanContextMembershipListener to be added
*/
void addBeanContextMembershipListener(BeanContextMembershipListener bcml);
......
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, 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
......@@ -82,7 +82,7 @@ public interface BeanContextChild {
* </p>
* @param bc The <code>BeanContext</code> with which
* to associate this <code>BeanContextChild</code>.
* @throws <code>PropertyVetoException</code> if the
* @throws PropertyVetoException if the
* addition of the specified <code>BeanContext</code> is refused.
*/
void setBeanContext(BeanContext bc) throws PropertyVetoException;
......
......@@ -78,6 +78,7 @@ public class BeanContextChildSupport implements BeanContextChild, BeanContextSer
* construct a BeanContextChildSupport where the JavaBean component
* itself implements BeanContextChild, and encapsulates this, delegating
* that interface to this implementation
* @param bcc the underlying bean context child
*/
public BeanContextChildSupport(BeanContextChild bcc) {
......@@ -94,7 +95,7 @@ public class BeanContextChildSupport implements BeanContextChild, BeanContextSer
* this <code>BeanContextChildSupport</code>.
* @param bc the new value to be assigned to the <code>BeanContext</code>
* property
* @throws <code>PropertyVetoException</code> if the change is rejected
* @throws PropertyVetoException if the change is rejected
*/
public synchronized void setBeanContext(BeanContext bc) throws PropertyVetoException {
if (bc == beanContext) return;
......@@ -361,6 +362,9 @@ public class BeanContextChildSupport implements BeanContextChild, BeanContextSer
*/
protected VetoableChangeSupport vcSupport;
/**
* The bean context.
*/
protected transient BeanContext beanContext;
/**
......
/*
* Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, 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
......@@ -103,6 +103,7 @@ public class BeanContextMembershipEvent extends BeanContextEvent {
* Is the child specified affected by the event?
* @return <code>true</code> if affected, <code>false</code>
* if not
* @param child the object to check for being affected
*/
public boolean contains(Object child) {
return children.contains(child);
......
/*
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -60,6 +60,7 @@ public interface BeanContextServices extends BeanContext, BeanContextServicesLis
* @param serviceClass the service to add
* @param serviceProvider the <code>BeanContextServiceProvider</code>
* associated with the service
* @return true if the service was successful added, false otherwise
*/
boolean addService(Class serviceClass, BeanContextServiceProvider serviceProvider);
......@@ -108,7 +109,7 @@ public interface BeanContextServices extends BeanContext, BeanContextServicesLis
* @param bcsrl the
* <code>BeanContextServiceRevokedListener</code> to notify
* if the service should later become revoked
* @throws TooManyListenersException
* @throws TooManyListenersException if there are too many listeners
* @return a reference to this context's named
* Service as requested or <code>null</code>
*/
......
/*
* Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2013, 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
......@@ -603,12 +603,16 @@ public class BeanContextServicesSupport extends BeanContextSupport
serviceProvider = bcsp;
}
/**
* Returns the service provider.
* @return the service provider
*/
protected BeanContextServiceProvider getServiceProvider() {
return serviceProvider;
}
/*
* fields
/**
* The service provider.
*/
protected BeanContextServiceProvider serviceProvider;
......@@ -618,6 +622,9 @@ public class BeanContextServicesSupport extends BeanContextSupport
* subclasses can override this method to create new subclasses of
* BCSSServiceProvider without having to overrride addService() in
* order to instantiate.
* @param sc the class
* @param bcsp the service provider
* @return a service provider without overriding addService()
*/
protected BCSSServiceProvider createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp) {
......@@ -629,7 +636,7 @@ public class BeanContextServicesSupport extends BeanContextSupport
/**
* add a BeanContextServicesListener
*
* @throws NullPointerException
* @throws NullPointerException if the argument is null
*/
public void addBeanContextServicesListener(BeanContextServicesListener bcsl) {
......@@ -660,6 +667,8 @@ public class BeanContextServicesSupport extends BeanContextSupport
/**
* add a service
* @param serviceClass the service class
* @param bcsp the service provider
*/
public boolean addService(Class serviceClass, BeanContextServiceProvider bcsp) {
......@@ -668,6 +677,10 @@ public class BeanContextServicesSupport extends BeanContextSupport
/**
* add a service
* @param serviceClass the service class
* @param bcsp the service provider
* @param fireEvent whether or not an event should be fired
* @return true if the service was successfully added
*/
protected boolean addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent) {
......@@ -709,6 +722,9 @@ public class BeanContextServicesSupport extends BeanContextSupport
/**
* remove a service
* @param serviceClass the service class
* @param bcsp the service provider
* @param revokeCurrentServicesNow whether or not to revoke the service
*/
public void revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow) {
......@@ -1067,6 +1083,7 @@ public class BeanContextServicesSupport extends BeanContextSupport
/**
* Fires a <tt>BeanContextServiceEvent</tt> notifying of a new service.
* @param serviceClass the service class
*/
protected final void fireServiceAdded(Class serviceClass) {
BeanContextServiceAvailableEvent bcssae = new BeanContextServiceAvailableEvent(getBeanContextServicesPeer(), serviceClass);
......@@ -1109,6 +1126,8 @@ public class BeanContextServicesSupport extends BeanContextSupport
* Fires a <tt>BeanContextServiceRevokedEvent</tt>
* indicating that a particular service is
* no longer available.
* @param serviceClass the service class
* @param revokeNow whether or not the event should be revoked now
*/
protected final void fireServiceRevoked(Class serviceClass, boolean revokeNow) {
Object[] copy;
......
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, 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
......@@ -62,7 +62,6 @@ import java.util.Map;
/**
* This helper class provides a utility implementation of the
* java.beans.beancontext.BeanContext interface.
* </p>
* <p>
* Since this class directly implements the BeanContext interface, the class
* can, and is intended to be used either by subclassing this implementation,
......@@ -351,9 +350,8 @@ public class BeanContextSupport extends BeanContextChildSupport
* of Child without having to override add() or the other Collection
* methods that add children to the set.
* </p>
*
* @param targetChild the child to create the Child on behalf of
* @param peer the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy
* @param peer the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy * @return Subtype-specific subclass of Child without overriding collection methods
*/
protected BCSChild createBCSChild(Object targetChild, Object peer) {
......@@ -492,6 +490,7 @@ public class BeanContextSupport extends BeanContextChildSupport
* @param callChildSetBC used to indicate that
* the child should be notified that it is no
* longer nested in this <tt>BeanContext</tt>.
* @return whether or not was present before being removed
*/
protected boolean remove(Object targetChild, boolean callChildSetBC) {
......@@ -580,7 +579,8 @@ public class BeanContextSupport extends BeanContextChildSupport
/**
* add Collection to set of Children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
* @throws UnsupportedOperationException
* @throws UnsupportedOperationException thrown unconditionally by this implementation
* @return this implementation unconditionally throws {@code UnsupportedOperationException}
*/
public boolean addAll(Collection c) {
throw new UnsupportedOperationException();
......@@ -589,7 +589,9 @@ public class BeanContextSupport extends BeanContextChildSupport
/**
* remove all specified children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
* @throws UnsupportedOperationException
* @throws UnsupportedOperationException thrown unconditionally by this implementation
* @return this implementation unconditionally throws {@code UnsupportedOperationException}
*/
public boolean removeAll(Collection c) {
throw new UnsupportedOperationException();
......@@ -599,7 +601,8 @@ public class BeanContextSupport extends BeanContextChildSupport
/**
* retain only specified children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
* @throws UnsupportedOperationException
* @throws UnsupportedOperationException thrown unconditionally by this implementation
* @return this implementation unconditionally throws {@code UnsupportedOperationException}
*/
public boolean retainAll(Collection c) {
throw new UnsupportedOperationException();
......@@ -608,7 +611,7 @@ public class BeanContextSupport extends BeanContextChildSupport
/**
* clear the children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
* @throws UnsupportedOperationException
* @throws UnsupportedOperationException thrown unconditionally by this implementation
*/
public void clear() {
throw new UnsupportedOperationException();
......@@ -618,7 +621,7 @@ public class BeanContextSupport extends BeanContextChildSupport
* Adds a BeanContextMembershipListener
*
* @param bcml the BeanContextMembershipListener to add
* @throws NullPointerException
* @throws NullPointerException if the argument is null
*/
public void addBeanContextMembershipListener(BeanContextMembershipListener bcml) {
......@@ -636,7 +639,7 @@ public class BeanContextSupport extends BeanContextChildSupport
* Removes a BeanContextMembershipListener
*
* @param bcml the BeanContextMembershipListener to remove
* @throws NullPointerException
* @throws NullPointerException if the argument is null
*/
public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml) {
......@@ -655,7 +658,7 @@ public class BeanContextSupport extends BeanContextChildSupport
* @param bcc the child object making the request.
*
* @return the requested resource as an InputStream
* @throws NullPointerException
* @throws NullPointerException if the argument is null
*/
public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
......@@ -849,6 +852,8 @@ public class BeanContextSupport extends BeanContextChildSupport
*
* This method should not however be used by subclasses to replace their
* own implementation (if any) of writeObject().
* @param oos the {@code ObjectOutputStream} to use during serialization
* @throws IOException if serialization failed
*/
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException {
......@@ -864,6 +869,9 @@ public class BeanContextSupport extends BeanContextChildSupport
*
* This method should not however be used by subclasses to replace their
* own implementation (if any) of readObject().
* @param ois the {@code ObjectInputStream} to use during deserialization
* @throws IOException if deserialization failed
* @throws ClassNotFoundException if needed classes are not found
*/
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException {
......@@ -914,6 +922,8 @@ public class BeanContextSupport extends BeanContextChildSupport
* used by readObject to deserialize a collection.
* @param ois the ObjectInputStream to use
* @param coll the Collection
* @throws IOException if deserialization failed
* @throws ClassNotFoundException if needed classes are not found
*/
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException {
int count = 0;
......@@ -1005,6 +1015,9 @@ public class BeanContextSupport extends BeanContextChildSupport
* When an instance of this class is used as a delegate for the
* implementation of the BeanContext protocols (and its subprotocols)
* there exists a 'chicken and egg' problem during deserialization
* @param ois the ObjectInputStream to use
* @throws IOException if deserialization failed
* @throws ClassNotFoundException if needed classes are not found
*/
public final void readChildren(ObjectInputStream ois) throws IOException, ClassNotFoundException {
......@@ -1122,6 +1135,7 @@ public class BeanContextSupport extends BeanContextChildSupport
* immediately prior to their being added to the BeanContext.
* </p>
*
* @param targetChild the child to create the Child on behalf of
* @return true iff the child may be added to this BeanContext, otherwise false.
*/
......@@ -1136,6 +1150,7 @@ public class BeanContextSupport extends BeanContextChildSupport
* immediately prior to their being removed from the BeanContext.
* </p>
*
* @param targetChild the child to create the Child on behalf of
* @return true iff the child may be removed from this BeanContext, otherwise false.
*/
......@@ -1147,6 +1162,8 @@ public class BeanContextSupport extends BeanContextChildSupport
* subclasses may override this method to simply extend add() semantics
* after the child has been added and before the event notification has
* occurred. The method is called with the child synchronized.
* @param child the child
* @param bcsc the BCSChild
*/
protected void childJustAddedHook(Object child, BCSChild bcsc) {
......@@ -1156,6 +1173,8 @@ public class BeanContextSupport extends BeanContextChildSupport
* subclasses may override this method to simply extend remove() semantics
* after the child has been removed and before the event notification has
* occurred. The method is called with the child synchronized.
* @param child the child
* @param bcsc the BCSChild
*/
protected void childJustRemovedHook(Object child, BCSChild bcsc) {
......@@ -1254,6 +1273,7 @@ public class BeanContextSupport extends BeanContextChildSupport
/**
* Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
* @param bcme the event to fire
*/
protected final void fireChildrenAdded(BeanContextMembershipEvent bcme) {
......@@ -1267,6 +1287,7 @@ public class BeanContextSupport extends BeanContextChildSupport
/**
* Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
* @param bcme the event to fire
*/
protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme) {
......
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, 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
......@@ -103,17 +103,17 @@ class Authenticator {
* Sets the authenticator that will be used by the networking code
* when a proxy or an HTTP server asks for authentication.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("setDefaultAuthenticator")</code> permission.
* {@code NetPermission("setDefaultAuthenticator")} permission.
* This may result in a java.lang.SecurityException.
*
* @param a The authenticator to be set. If a is <code>null</code> then
* @param a The authenticator to be set. If a is {@code null} then
* any previously set authenticator is removed.
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* setting the default authenticator.
*
* @see SecurityManager#checkPermission
......@@ -134,9 +134,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param addr The InetAddress of the site requesting authorization,
......@@ -151,7 +151,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -193,9 +193,9 @@ class Authenticator {
* because the hostname can be provided in cases where the InetAddress
* is not available.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
......@@ -211,7 +211,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -254,9 +254,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
......@@ -275,7 +275,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -320,8 +320,8 @@ class Authenticator {
}
/**
* Gets the <code>hostname</code> of the
* site or proxy requesting authentication, or <code>null</code>
* Gets the {@code hostname} of the
* site or proxy requesting authentication, or {@code null}
* if not available.
*
* @return the hostname of the connection requiring authentication, or null
......@@ -333,8 +333,8 @@ class Authenticator {
}
/**
* Gets the <code>InetAddress</code> of the
* site requesting authorization, or <code>null</code>
* Gets the {@code InetAddress} of the
* site requesting authorization, or {@code null}
* if not available.
*
* @return the InetAddress of the site requesting authorization, or null
......@@ -346,7 +346,7 @@ class Authenticator {
/**
* Gets the port number for the requested connection.
* @return an <code>int</code> indicating the
* @return an {@code int} indicating the
* port for the requested connection.
*/
protected final int getRequestingPort() {
......
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,21 +28,21 @@ package java.net;
import java.io.IOException;
/**
* The abstract class <code>ContentHandler</code> is the superclass
* of all classes that read an <code>Object</code> from a
* <code>URLConnection</code>.
* The abstract class {@code ContentHandler} is the superclass
* of all classes that read an {@code Object} from a
* {@code URLConnection}.
* <p>
* An application does not generally call the
* <code>getContent</code> method in this class directly. Instead, an
* application calls the <code>getContent</code> method in class
* <code>URL</code> or in <code>URLConnection</code>.
* {@code getContent} method in this class directly. Instead, an
* application calls the {@code getContent} method in class
* {@code URL} or in {@code URLConnection}.
* The application's content handler factory (an instance of a class that
* implements the interface <code>ContentHandlerFactory</code> set
* up by a call to <code>setContentHandler</code>) is
* called with a <code>String</code> giving the MIME type of the
* implements the interface {@code ContentHandlerFactory} set
* up by a call to {@code setContentHandler}) is
* called with a {@code String} giving the MIME type of the
* object being received on the socket. The factory returns an
* instance of a subclass of <code>ContentHandler</code>, and its
* <code>getContent</code> method is called to create the object.
* instance of a subclass of {@code ContentHandler}, and its
* {@code getContent} method is called to create the object.
* <p>
* If no content handler could be found, URLConnection will
* look for a content handler in a user-defineable set of places.
......@@ -75,7 +75,7 @@ abstract public class ContentHandler {
* creates an object from it.
*
* @param urlc a URL connection.
* @return the object read by the <code>ContentHandler</code>.
* @return the object read by the {@code ContentHandler}.
* @exception IOException if an I/O error occurs while reading the object.
*/
abstract public Object getContent(URLConnection urlc) throws IOException;
......@@ -90,7 +90,7 @@ abstract public class ContentHandler {
*
* @param urlc a URL connection.
* @param classes an array of types requested
* @return the object read by the <code>ContentHandler</code> that is
* @return the object read by the {@code ContentHandler} that is
* the first match of the suggested types.
* null if none of the requested are supported.
* @exception IOException if an I/O error occurs while reading the object.
......
/*
* Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,10 +28,10 @@ package java.net;
/**
* This interface defines a factory for content handlers. An
* implementation of this interface should map a MIME type into an
* instance of <code>ContentHandler</code>.
* instance of {@code ContentHandler}.
* <p>
* This interface is used by the <code>URLStreamHandler</code> class
* to create a <code>ContentHandler</code> for a MIME type.
* This interface is used by the {@code URLStreamHandler} class
* to create a {@code ContentHandler} for a MIME type.
*
* @author James Gosling
* @see java.net.ContentHandler
......@@ -40,13 +40,13 @@ package java.net;
*/
public interface ContentHandlerFactory {
/**
* Creates a new <code>ContentHandler</code> to read an object from
* a <code>URLStreamHandler</code>.
* Creates a new {@code ContentHandler} to read an object from
* a {@code URLStreamHandler}.
*
* @param mimetype the MIME type for which a content handler is desired.
* @return a new <code>ContentHandler</code> to read an object from a
* <code>URLStreamHandler</code>.
* @return a new {@code ContentHandler} to read an object from a
* {@code URLStreamHandler}.
* @see java.net.ContentHandler
* @see java.net.URLStreamHandler
*/
......
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, 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
......@@ -66,7 +66,7 @@ public abstract class CookieHandler {
* there is no system-wide cookie handler currently set.
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("getCookieHandler")</tt>
* {@link NetPermission}{@code ("getCookieHandler")}
* @see #setDefault(CookieHandler)
*/
public synchronized static CookieHandler getDefault() {
......@@ -83,10 +83,10 @@ public abstract class CookieHandler {
* Note: non-standard http protocol handlers may ignore this setting.
*
* @param cHandler The HTTP cookie handler, or
* <code>null</code> to unset.
* {@code null} to unset.
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("setCookieHandler")</tt>
* {@link NetPermission}{@code ("setCookieHandler")}
* @see #getDefault()
*/
public synchronized static void setDefault(CookieHandler cHandler) {
......@@ -114,7 +114,7 @@ public abstract class CookieHandler {
* called after all request headers related to choosing cookies
* are added, and before the request is sent.</P>
*
* @param uri a <code>URI</code> representing the intended use for the
* @param uri a {@code URI} representing the intended use for the
* cookies
* @param requestHeaders - a Map from request header
* field names to lists of field values representing
......@@ -136,7 +136,7 @@ public abstract class CookieHandler {
* fields that are named Set-Cookie2, present in the response
* headers into a cookie cache.
*
* @param uri a <code>URI</code> where the cookies come from
* @param uri a {@code URI} where the cookies come from
* @param responseHeaders an immutable map from field names to
* lists of field values representing the response
* header fields returned
......
/*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, 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
......@@ -131,7 +131,7 @@ public class CookieManager extends CookieHandler
*
* <p>This constructor will create new cookie manager with default
* cookie store and accept policy. The effect is same as
* <tt>CookieManager(null, null)</tt>.
* {@code CookieManager(null, null)}.
*/
public CookieManager() {
this(null, null);
......@@ -141,12 +141,12 @@ public class CookieManager extends CookieHandler
/**
* Create a new cookie manager with specified cookie store and cookie policy.
*
* @param store a <tt>CookieStore</tt> to be used by cookie manager.
* if <tt>null</tt>, cookie manager will use a default one,
* @param store a {@code CookieStore} to be used by cookie manager.
* if {@code null}, cookie manager will use a default one,
* which is an in-memory CookieStore implmentation.
* @param cookiePolicy a <tt>CookiePolicy</tt> instance
* @param cookiePolicy a {@code CookiePolicy} instance
* to be used by cookie manager as policy callback.
* if <tt>null</tt>, ACCEPT_ORIGINAL_SERVER will
* if {@code null}, ACCEPT_ORIGINAL_SERVER will
* be used.
*/
public CookieManager(CookieStore store,
......@@ -170,11 +170,11 @@ public class CookieManager extends CookieHandler
/**
* To set the cookie policy of this cookie manager.
*
* <p> A instance of <tt>CookieManager</tt> will have
* <p> A instance of {@code CookieManager} will have
* cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always
* can call this method to set another cookie policy.
*
* @param cookiePolicy the cookie policy. Can be <tt>null</tt>, which
* @param cookiePolicy the cookie policy. Can be {@code null}, which
* has no effects on current cookie policy.
*/
public void setCookiePolicy(CookiePolicy cookiePolicy) {
......
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, 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
......@@ -71,8 +71,8 @@ public interface CookiePolicy {
*
* @param uri the URI to consult accept policy with
* @param cookie the HttpCookie object in question
* @return <tt>true</tt> if this cookie should be accepted;
* otherwise, <tt>false</tt>
* @return {@code true} if this cookie should be accepted;
* otherwise, {@code false}
*/
public boolean shouldAccept(URI uri, HttpCookie cookie);
}
......@@ -32,8 +32,8 @@ import java.util.Map;
* A CookieStore object represents a storage for cookie. Can store and retrieve
* cookies.
*
* <p>{@link CookieManager} will call <tt>CookieStore.add</tt> to save cookies
* for every incoming HTTP response, and call <tt>CookieStore.get</tt> to
* <p>{@link CookieManager} will call {@code CookieStore.add} to save cookies
* for every incoming HTTP response, and call {@code CookieStore.get} to
* retrieve cookie for every outgoing HTTP request. A CookieStore
* is responsible for removing HttpCookie instances which have expired.
*
......@@ -55,11 +55,11 @@ public interface CookieStore {
* then it is replaced with the new one.
*
* @param uri the uri this cookie associated with.
* if <tt>null</tt>, this cookie will not be associated
* if {@code null}, this cookie will not be associated
* with an URI
* @param cookie the cookie to store
*
* @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
* @throws NullPointerException if {@code cookie} is {@code null}
*
* @see #get
*
......@@ -77,7 +77,7 @@ public interface CookieStore {
*
* @param uri the uri associated with the cookies to be returned
*
* @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
* @throws NullPointerException if {@code uri} is {@code null}
*
* @see #add
*
......@@ -108,14 +108,14 @@ public interface CookieStore {
* Remove a cookie from store.
*
* @param uri the uri this cookie associated with.
* if <tt>null</tt>, the cookie to be removed is not associated
* with an URI when added; if not <tt>null</tt>, the cookie
* if {@code null}, the cookie to be removed is not associated
* with an URI when added; if not {@code null}, the cookie
* to be removed is associated with the given URI when added.
* @param cookie the cookie to remove
*
* @return <tt>true</tt> if this store contained the specified cookie
* @return {@code true} if this store contained the specified cookie
*
* @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
* @throws NullPointerException if {@code cookie} is {@code null}
*/
public boolean remove(URI uri, HttpCookie cookie);
......@@ -123,7 +123,7 @@ public interface CookieStore {
/**
* Remove all cookies in this cookie store.
*
* @return <tt>true</tt> if this store changed as a result of the call
* @return {@code true} if this store changed as a result of the call
*/
public boolean removeAll();
}
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -68,11 +68,11 @@ class DatagramPacket {
int port;
/**
* Constructs a <code>DatagramPacket</code> for receiving packets of
* length <code>length</code>, specifying an offset into the buffer.
* Constructs a {@code DatagramPacket} for receiving packets of
* length {@code length}, specifying an offset into the buffer.
* <p>
* The <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* The {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param offset the offset for the buffer
......@@ -87,11 +87,11 @@ class DatagramPacket {
}
/**
* Constructs a <code>DatagramPacket</code> for receiving packets of
* length <code>length</code>.
* Constructs a {@code DatagramPacket} for receiving packets of
* length {@code length}.
* <p>
* The <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* The {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param length the number of bytes to read.
......@@ -102,10 +102,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> with offset <code>ioffset</code>to the
* {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
......@@ -125,10 +125,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> with offset <code>ioffset</code>to the
* {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
......@@ -147,9 +147,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal
* to <code>buf.length</code>.
* {@code length} to the specified port number on the specified
* host. The {@code length} argument must be less than or equal
* to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
......@@ -164,9 +164,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal
* to <code>buf.length</code>.
* {@code length} to the specified port number on the specified
* host. The {@code length} argument must be less than or equal
* to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
......@@ -207,8 +207,8 @@ class DatagramPacket {
/**
* Returns the data buffer. The data received or the data to be sent
* starts from the <code>offset</code> in the buffer,
* and runs for <code>length</code> long.
* starts from the {@code offset} in the buffer,
* and runs for {@code length} long.
*
* @return the buffer used to receive or send data
* @see #setData(byte[], int, int)
......@@ -277,7 +277,7 @@ class DatagramPacket {
/**
* Sets the IP address of the machine to which this datagram
* is being sent.
* @param iaddr the <code>InetAddress</code>
* @param iaddr the {@code InetAddress}
* @since JDK1.1
* @see #getAddress()
*/
......@@ -303,7 +303,7 @@ class DatagramPacket {
* Sets the SocketAddress (usually IP address + port number) of the remote
* host to which this datagram is being sent.
*
* @param address the <code>SocketAddress</code>
* @param address the {@code SocketAddress}
* @throws IllegalArgumentException if address is null or is a
* SocketAddress subclass not supported by this socket
*
......@@ -324,7 +324,7 @@ class DatagramPacket {
* Gets the SocketAddress (usually IP address + port number) of the remote
* host that this packet is being sent to or is coming from.
*
* @return the <code>SocketAddress</code>
* @return the {@code SocketAddress}
* @since 1.4
* @see #setSocketAddress
*/
......@@ -335,7 +335,7 @@ class DatagramPacket {
/**
* Set the data buffer for this packet. With the offset of
* this DatagramPacket set to 0, and the length set to
* the length of <code>buf</code>.
* the length of {@code buf}.
*
* @param buf the buffer to set for this packet.
*
......
/*
* Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, 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
......@@ -101,7 +101,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
protected void disconnect() {}
/**
* Peek at the packet to see who it is from. Updates the specified <code>InetAddress</code>
* Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
* to the address which the packet came from.
* @param i an InetAddress object
* @return the port number which the packet came from.
......@@ -114,7 +114,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Peek at the packet to see who it is from. The data is copied into the specified
* <code>DatagramPacket</code>. The data is returned,
* {@code DatagramPacket}. The data is returned,
* but not consumed, so that a subsequent peekData/receive operation
* will see the same data.
* @param p the Packet Received.
......@@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Set the TTL (time-to-live) option.
* @param ttl an <tt>int</tt> specifying the time-to-live value
* @param ttl an {@code int} specifying the time-to-live value
* @exception IOException if an I/O exception occurs
* while setting the time-to-live option.
* @see #getTimeToLive()
......@@ -174,7 +174,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* Retrieve the TTL (time-to-live) option.
* @exception IOException if an I/O exception occurs
* while retrieving the time-to-live option
* @return an <tt>int</tt> representing the time-to-live value
* @return an {@code int} representing the time-to-live value
* @see #setTimeToLive(int)
*/
protected abstract int getTimeToLive() throws IOException;
......@@ -227,7 +227,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the local port.
* @return an <tt>int</tt> representing the local port value
* @return an {@code int} representing the local port value
*/
protected int getLocalPort() {
return localPort;
......@@ -235,7 +235,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the datagram socket file descriptor.
* @return a <tt>FileDescriptor</tt> object representing the datagram socket
* @return a {@code FileDescriptor} object representing the datagram socket
* file descriptor
*/
protected FileDescriptor getFileDescriptor() {
......
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,7 +27,7 @@ package java.net;
/**
* This interface defines a factory for datagram socket implementations. It
* is used by the classes <code>DatagramSocket</code> to create actual socket
* is used by the classes {@code DatagramSocket} to create actual socket
* implementations.
*
* @author Yingxian Wang
......@@ -37,9 +37,9 @@ package java.net;
public
interface DatagramSocketImplFactory {
/**
* Creates a new <code>DatagramSocketImpl</code> instance.
* Creates a new {@code DatagramSocketImpl} instance.
*
* @return a new instance of <code>DatagramSocketImpl</code>.
* @return a new instance of {@code DatagramSocketImpl}.
* @see java.net.DatagramSocketImpl
*/
DatagramSocketImpl createDatagramSocketImpl();
......
/*
* Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -37,7 +37,7 @@ public interface FileNameMap {
/**
* Gets the MIME type for the specified file name.
* @param fileName the specified file name
* @return a <code>String</code> indicating the MIME
* @return a {@code String} indicating the MIME
* type for the specified file name.
*/
public String getContentTypeFor(String fileName);
......
/*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, 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
......@@ -470,7 +470,7 @@ public final class HttpCookie implements Cloneable {
* protocol.
*
* @return {@code false} if the cookie can be sent over any standard
* protocol; otherwise, <code>true</code>
* protocol; otherwise, {@code true}
*
* @see #setSecure
*/
......
/*
* Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,7 +43,7 @@ class HttpRetryException extends IOException {
private String location;
/**
* Constructs a new <code>HttpRetryException</code> from the
* Constructs a new {@code HttpRetryException} from the
* specified response code and exception detail message
*
* @param detail the detail message.
......@@ -55,7 +55,7 @@ class HttpRetryException extends IOException {
}
/**
* Constructs a new <code>HttpRetryException</code> with detail message
* Constructs a new {@code HttpRetryException} with detail message
* responseCode and the contents of the Location response header field.
*
* @param detail the detail message.
......
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -76,14 +76,14 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* The chunk-length when using chunked encoding streaming mode for output.
* A value of <code>-1</code> means chunked encoding is disabled for output.
* A value of {@code -1} means chunked encoding is disabled for output.
* @since 1.5
*/
protected int chunkLength = -1;
/**
* The fixed content-length when using fixed-length streaming mode.
* A value of <code>-1</code> means fixed-length streaming mode is disabled
* A value of {@code -1} means fixed-length streaming mode is disabled
* for output.
*
* <P> <B>NOTE:</B> {@link #fixedContentLengthLong} is recommended instead
......@@ -103,15 +103,15 @@ abstract public class HttpURLConnection extends URLConnection {
protected long fixedContentLengthLong = -1;
/**
* Returns the key for the <code>n</code><sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup>
* Returns the key for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
* line, but <code>getHeaderFieldKey(0)</code> returns null.
* line, but {@code getHeaderFieldKey(0)} returns null.
*
* @param n an index, where {@code n >=0}.
* @return the key for the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the key does not exist.
* @return the key for the {@code n}<sup>th</sup> header field,
* or {@code null} if the key does not exist.
*/
public String getHeaderFieldKey (int n) {
return null;
......@@ -251,8 +251,8 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns the value for the <code>n</code><sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup>
* Returns the value for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server.
* <p>
......@@ -261,8 +261,8 @@ abstract public class HttpURLConnection extends URLConnection {
* the headers in the message.
*
* @param n an index, where {@code n>=0}.
* @return the value of the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the value does not exist.
* @return the value of the {@code n}<sup>th</sup> header field,
* or {@code null} if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {
......@@ -270,7 +270,7 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* An <code>int</code> representing the three digit HTTP Status-Code.
* An {@code int} representing the three digit HTTP Status-Code.
* <ul>
* <li> 1xx: Informational
* <li> 2xx: Success
......@@ -292,12 +292,12 @@ abstract public class HttpURLConnection extends URLConnection {
private static boolean followRedirects = true;
/**
* If <code>true</code>, the protocol will automatically follow redirects.
* If <code>false</code>, the protocol will not automatically follow
* If {@code true}, the protocol will automatically follow redirects.
* If {@code false}, the protocol will not automatically follow
* redirects.
* <p>
* This field is set by the <code>setInstanceFollowRedirects</code>
* method. Its value is returned by the <code>getInstanceFollowRedirects</code>
* This field is set by the {@code setInstanceFollowRedirects}
* method. Its value is returned by the {@code getInstanceFollowRedirects}
* method.
* <p>
* Its default value is based on the value of the static followRedirects
......@@ -328,14 +328,14 @@ abstract public class HttpURLConnection extends URLConnection {
* cannot change this variable.
* <p>
* If there is a security manager, this method first calls
* the security manager's <code>checkSetFactory</code> method
* the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @param set a <code>boolean</code> indicating whether or not
* @param set a {@code boolean} indicating whether or not
* to follow HTTP redirects.
* @exception SecurityException if a security manager exists and its
* <code>checkSetFactory</code> method doesn't
* {@code checkSetFactory} method doesn't
* allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFollowRedirects()
......@@ -350,12 +350,12 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns a <code>boolean</code> indicating
* Returns a {@code boolean} indicating
* whether or not HTTP redirects (3xx) should
* be automatically followed.
*
* @return <code>true</code> if HTTP redirects should
* be automatically followed, <tt>false</tt> if not.
* @return {@code true} if HTTP redirects should
* be automatically followed, {@code false} if not.
* @see #setFollowRedirects(boolean)
*/
public static boolean getFollowRedirects() {
......@@ -364,13 +364,13 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* Sets whether HTTP redirects (requests with response code 3xx) should
* be automatically followed by this <code>HttpURLConnection</code>
* be automatically followed by this {@code HttpURLConnection}
* instance.
* <p>
* The default value comes from followRedirects, which defaults to
* true.
*
* @param followRedirects a <code>boolean</code> indicating
* @param followRedirects a {@code boolean} indicating
* whether or not to follow HTTP redirects.
*
* @see java.net.HttpURLConnection#instanceFollowRedirects
......@@ -382,11 +382,11 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns the value of this <code>HttpURLConnection</code>'s
* <code>instanceFollowRedirects</code> field.
* Returns the value of this {@code HttpURLConnection}'s
* {@code instanceFollowRedirects} field.
*
* @return the value of this <code>HttpURLConnection</code>'s
* <code>instanceFollowRedirects</code> field.
* @return the value of this {@code HttpURLConnection}'s
* {@code instanceFollowRedirects} field.
* @see java.net.HttpURLConnection#instanceFollowRedirects
* @see #setInstanceFollowRedirects(boolean)
* @since 1.3
......@@ -540,7 +540,7 @@ abstract public class HttpURLConnection extends URLConnection {
* Returns null if none could be discerned from the responses
* (the result was not valid HTTP).
* @throws IOException if an error occurred connecting to the server.
* @return the HTTP response message, or <code>null</code>
* @return the HTTP response message, or {@code null}
*/
public String getResponseMessage() throws IOException {
getResponseCode();
......@@ -583,7 +583,7 @@ abstract public class HttpURLConnection extends URLConnection {
* @exception IOException if an error occurs while computing
* the permission.
*
* @return a <code>SocketPermission</code> object representing the
* @return a {@code SocketPermission} object representing the
* permission necessary to connect to the destination
* host and port.
*/
......
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, 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
......@@ -104,7 +104,7 @@ public final class IDN {
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
......@@ -130,13 +130,13 @@ public final class IDN {
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
* <blockquote><tt>
* <blockquote>
* {@link #toASCII(String, int) toASCII}(input,&nbsp;0);
* </tt></blockquote>
* </blockquote>
*
* @param input the string to be processed
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
......@@ -161,7 +161,7 @@ public final class IDN {
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*/
public static String toUnicode(String input, int flag) {
int p = 0, q = 0;
......@@ -184,13 +184,13 @@ public final class IDN {
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
* <blockquote><tt>
* <blockquote>
* {@link #toUnicode(String, int) toUnicode}(input,&nbsp;0);
* </tt></blockquote>
* </blockquote>
*
* @param input the string to be processed
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*/
public static String toUnicode(String input) {
return toUnicode(input, 0);
......
......@@ -42,10 +42,10 @@ import java.io.ObjectStreamException;
* takes one of the following forms:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>d.d.d.d</tt></td></tr>
* <tr><td><tt>d.d.d</tt></td></tr>
* <tr><td><tt>d.d</tt></td></tr>
* <tr><td><tt>d</tt></td></tr>
* <tr><td>{@code d.d.d.d}</td></tr>
* <tr><td>{@code d.d.d}</td></tr>
* <tr><td>{@code d.d}</td></tr>
* <tr><td>{@code d}</td></tr>
* </table></blockquote>
*
* <p> When four parts are specified, each is interpreted as a byte of
......@@ -153,7 +153,7 @@ class Inet4Address extends InetAddress {
* Utility routine to check if the InetAddress is an
* IP multicast address. IP multicast address is a Class D
* address i.e first four bits of the address are 1110.
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
......@@ -163,7 +163,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress in a wildcard address.
* @return a <code>boolean</code> indicating if the Inetaddress is
* @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
......@@ -174,7 +174,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a loopback address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
......@@ -187,7 +187,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is an link local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
......@@ -204,7 +204,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a site local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
......@@ -224,7 +224,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has global scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
......@@ -240,7 +240,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has node scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
......@@ -253,7 +253,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has link scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
......@@ -269,7 +269,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has site scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
......@@ -284,7 +284,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has organization scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
......@@ -299,9 +299,9 @@ class Inet4Address extends InetAddress {
}
/**
* Returns the raw IP address of this <code>InetAddress</code>
* Returns the raw IP address of this {@code InetAddress}
* object. The result is in network byte order: the highest order
* byte of the address is in <code>getAddress()[0]</code>.
* byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
......@@ -337,18 +337,18 @@ class Inet4Address extends InetAddress {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> and it represents the same IP address as
* The result is {@code true} if and only if the argument is
* not {@code null} and it represents the same IP address as
* this object.
* <p>
* Two instances of <code>InetAddress</code> represent the same IP
* Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
* <code>getAddress</code> is the same for both, and each of the
* {@code getAddress} is the same for both, and each of the
* array components is the same for the byte arrays.
*
* @param obj the object to compare against.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
......
......@@ -47,7 +47,7 @@ import java.util.Enumeration;
* address. This is the full form. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>1080:0:0:0:8:800:200C:417A</tt><td></tr>
* <tr><td>{@code 1080:0:0:0:8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <p> Note that it is not necessary to write the leading zeros in
......@@ -64,7 +64,7 @@ import java.util.Enumeration;
* zeros in an address. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>1080::8:800:200C:417A</tt><td></tr>
* <tr><td>{@code 1080::8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <li><p> An alternative form that is sometimes more convenient
......@@ -75,8 +75,8 @@ import java.util.Enumeration;
* standard IPv4 representation address, for example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:129.144.52.38</tt><td></tr>
* <tr><td><tt>::129.144.52.38</tt><td></tr>
* <tr><td>{@code ::FFFF:129.144.52.38}<td></tr>
* <tr><td>{@code ::129.144.52.38}<td></tr>
* </table></blockquote>
*
* <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
......@@ -85,23 +85,23 @@ import java.util.Enumeration;
* in the "d.d.d.d" form. The following forms are invalid:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:d.d.d</tt><td></tr>
* <tr><td><tt>::FFFF:d.d</tt><td></tr>
* <tr><td><tt>::d.d.d</tt><td></tr>
* <tr><td><tt>::d.d</tt><td></tr>
* <tr><td>{@code ::FFFF:d.d.d}<td></tr>
* <tr><td>{@code ::FFFF:d.d}<td></tr>
* <tr><td>{@code ::d.d.d}<td></tr>
* <tr><td>{@code ::d.d}<td></tr>
* </table></blockquote>
*
* <p> The following form:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:d</tt><td></tr>
* <tr><td>{@code ::FFFF:d}<td></tr>
* </table></blockquote>
*
* <p> is valid, however it is an unconventional representation of
* the IPv4-compatible IPv6 address,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::255.255.0.d</tt><td></tr>
* <tr><td>{@code ::255.255.0.d}<td></tr>
* </table></blockquote>
*
* <p> while "::d" corresponds to the general IPv6 address
......@@ -258,7 +258,7 @@ class Inet6Address extends InetAddress {
* Create an Inet6Address in the exact manner of {@link
* InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is
* set to the value corresponding to the given interface for the address
* type specified in <code>addr</code>. The call will fail with an
* type specified in {@code addr}. The call will fail with an
* UnknownHostException if the given interface does not have a numeric
* scope_id assigned for the given address type (eg. link-local or site-local).
* See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,7 +43,7 @@ import java.io.ObjectStreamField;
* as returned values.
* <p>
* The <i>wildcard</i> is a special local IP address. It usually means "any"
* and can only be used for <code>bind</code> operations.
* and can only be used for {@code bind} operations.
*
* @see java.net.Socket
* @see java.net.ServerSocket
......@@ -155,8 +155,8 @@ public class InetSocketAddress
* and the port number a specified value.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <p>
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified
......@@ -171,10 +171,10 @@ public class InetSocketAddress
* Creates a socket address from an IP address and a port number.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* A <code>null</code> address will assign the <i>wildcard</i> address.
* A {@code null} address will assign the <i>wildcard</i> address.
* <p>
* @param addr The IP address
* @param port The port number
......@@ -195,13 +195,13 @@ public class InetSocketAddress
* An attempt will be made to resolve the hostname into an InetAddress.
* If that attempt fails, the address will be flagged as <I>unresolved</I>.
* <p>
* If there is a security manager, its <code>checkConnect</code> method
* If there is a security manager, its {@code checkConnect} method
* is called with the host name as its argument to check the permissiom
* to resolve it. This could result in a SecurityException.
* <P>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* @param hostname the Host name
* @param port The port number
......@@ -237,8 +237,8 @@ public class InetSocketAddress
* The address will be flagged as <I>unresolved</I>.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* @param host the Host name
* @param port The port number
......@@ -246,7 +246,7 @@ public class InetSocketAddress
* the range of valid port values, or if the hostname
* parameter is <TT>null</TT>.
* @see #isUnresolved()
* @return a <code>InetSocketAddress</code> representing the unresolved
* @return a {@code InetSocketAddress} representing the unresolved
* socket address
* @since 1.5
*/
......@@ -326,16 +326,16 @@ public class InetSocketAddress
/**
*
* Gets the <code>InetAddress</code>.
* Gets the {@code InetAddress}.
*
* @return the InetAdress or <code>null</code> if it is unresolved.
* @return the InetAdress or {@code null} if it is unresolved.
*/
public final InetAddress getAddress() {
return holder.getAddress();
}
/**
* Gets the <code>hostname</code>.
* Gets the {@code hostname}.
* Note: This method may trigger a name service reverse lookup if the
* address was created with a literal IP address.
*
......@@ -360,8 +360,8 @@ public class InetSocketAddress
/**
* Checks whether the address has been resolved or not.
*
* @return <code>true</code> if the hostname couldn't be resolved into
* an <code>InetAddress</code>.
* @return {@code true} if the hostname couldn't be resolved into
* an {@code InetAddress}.
*/
public final boolean isUnresolved() {
return holder.isUnresolved();
......@@ -382,11 +382,11 @@ public class InetSocketAddress
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> and it represents the same address as
* The result is {@code true} if and only if the argument is
* not {@code null} and it represents the same address as
* this object.
* <p>
* Two instances of <code>InetSocketAddress</code> represent the same
* Two instances of {@code InetSocketAddress} represent the same
* address if both the InetAddresses (or hostnames if it is unresolved) and port
* numbers are equal.
* If both addresses are unresolved, then the hostname and the port number
......@@ -396,8 +396,8 @@ public class InetSocketAddress
* considered equal.
*
* @param obj the object to compare against.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#equals(java.lang.Object)
*/
@Override
......
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -45,18 +45,14 @@ import sun.net.www.ParseUtil;
*
* <p>for example:
*
* <p><code>
* jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class<br>
* </code>
* <p>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <p>Jar URLs should be used to refer to a JAR file or entries in
* a JAR file. The example above is a JAR URL which refers to a JAR
* entry. If the entry name is omitted, the URL refers to the whole
* JAR file:
*
* <code>
* jar:http://www.foo.com/bar/baz.jar!/
* </code>
* {@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <p>Users should cast the generic URLConnection to a
* JarURLConnection when they know that the URL they created is a JAR
......@@ -76,19 +72,19 @@ import sun.net.www.ParseUtil;
* <dl>
*
* <dt>A Jar entry
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <dt>A Jar file
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <dt>A Jar directory
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/}
*
* </dl>
*
* <p><code>!/</code> is refered to as the <em>separator</em>.
* <p>{@code !/} is refered to as the <em>separator</em>.
*
* <p>When constructing a JAR url via <code>new URL(context, spec)</code>,
* <p>When constructing a JAR url via {@code new URL(context, spec)},
* the following rules apply:
*
* <ul>
......@@ -294,7 +290,7 @@ public abstract class JarURLConnection extends URLConnection {
* can only be called once
* the connection has been completely verified by reading
* from the input stream until the end of the stream has been
* reached. Otherwise, this method will return <code>null</code>
* reached. Otherwise, this method will return {@code null}
*
* @return the Certificate object for this connection if the URL
* for it points to a JAR file entry, null otherwise.
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册