Merge
This commit is contained in:
commit
daea6d9ee6
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,7 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
formatVersion=1
|
||||
# Version of the currency data format.
|
||||
# 1: initial
|
||||
# 2: Change in minor unit (allowing 4-9 digits)
|
||||
formatVersion=2
|
||||
|
||||
# Version of the currency code information in this class.
|
||||
# It is a serial number that accompanies with each amendment.
|
||||
@ -36,7 +39,7 @@ dataVersion=159
|
||||
all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036-\
|
||||
AWG533-AYM945-AZM031-AZN944-BAM977-BBD052-BDT050-BEF056-BGL100-BGN975-BHD048-BIF108-\
|
||||
BMD060-BND096-BOB068-BOV984-BRL986-BSD044-BTN064-BWP072-BYB112-BYR974-\
|
||||
BZD084-CAD124-CDF976-CHF756-CLF990-CLP152-CNY156-COP170-CRC188-CSD891-CUP192-CUC931-\
|
||||
BZD084-CAD124-CDF976-CHE947-CHF756-CHW948-CLF990-CLP152-CNY156-COP170-COU970-CRC188-CSD891-CUP192-CUC931-\
|
||||
CVE132-CYP196-CZK203-DEM276-DJF262-DKK208-DOP214-DZD012-EEK233-EGP818-\
|
||||
ERN232-ESP724-ETB230-EUR978-FIM246-FJD242-FKP238-FRF250-GBP826-GEL981-\
|
||||
GHC288-GHS936-GIP292-GMD270-GNF324-GRD300-GTQ320-GWP624-GYD328-HKD344-HNL340-\
|
||||
@ -49,7 +52,7 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036
|
||||
PKR586-PLN985-PTE620-PYG600-QAR634-ROL946-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\
|
||||
SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\
|
||||
SRD968-SRG740-SSP728-STD678-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
|
||||
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-\
|
||||
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
|
||||
UYU858-UZS860-VEB862-VEF937-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
|
||||
XBB956-XBC957-XBD958-XCD951-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
|
||||
XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWL932-\
|
||||
@ -579,16 +582,17 @@ ZM=ZMW
|
||||
ZW=ZWL
|
||||
|
||||
|
||||
# List of currencies with 0, 1, OR 3 decimals for minor units, or where there
|
||||
# are no minor units defined. All others use 2 decimals.
|
||||
# List of currencies with non-2digit decimals for minor units,
|
||||
# or where there are no minor units defined. All others use 2 decimals.
|
||||
|
||||
minor0=\
|
||||
ADP-BEF-BIF-BYB-BYR-CLF-CLP-DJF-ESP-GNF-\
|
||||
ADP-BEF-BIF-BYB-BYR-CLP-DJF-ESP-GNF-\
|
||||
GRD-ISK-ITL-JPY-KMF-KRW-LUF-MGF-PYG-PTE-RWF-\
|
||||
TPE-TRL-UGX-VND-VUV-XAF-XOF-XPF
|
||||
minor1=
|
||||
TPE-TRL-UGX-UYI-VND-VUV-XAF-XOF-XPF
|
||||
minor3=\
|
||||
BHD-IQD-JOD-KWD-LYD-OMR-TND
|
||||
minor4=\
|
||||
CLF
|
||||
minorUndefined=\
|
||||
XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-\
|
||||
XPT-XSU-XTS-XUA-XXX
|
||||
|
@ -1,45 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include GensrcCommon.gmk
|
||||
|
||||
##########################################################################################
|
||||
# Version file for jconsole
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
|
||||
$(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/Version.java.template
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@ $@.tmp
|
||||
$(ECHO) $(LOG_INFO) Generating sun/tools/jconsole/Version.java
|
||||
$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
GENSRC_JDK_JCONSOLE += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java
|
||||
|
||||
jdk.jconsole: $(GENSRC_JDK_JCONSOLE)
|
||||
|
||||
all: jdk.jconsole
|
||||
|
||||
.PHONY: all jdk.jconsole
|
@ -41,7 +41,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
|
||||
DISABLED_WARNINGS_gcc := pointer-to-int-cast, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
@ -74,6 +73,8 @@ ifneq ($(BUILD_CRYPTO), no)
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_LIBKRB5_NAME), )
|
||||
# libosxkrb5 needs to call deprecated krb5 APIs so that java
|
||||
# can use the native credentials cache.
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
|
||||
LIBRARY := $(BUILD_LIBKRB5_NAME), \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
@ -83,7 +84,7 @@ ifneq ($(BUILD_CRYPTO), no)
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
|
||||
DISABLED_WARNINGS_clang := implicit-function-declaration, \
|
||||
DISABLED_WARNINGS_clang := deprecated-declarations, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
|
||||
|
@ -42,6 +42,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
|
||||
CFLAGS_release := -DPRODUCT, \
|
||||
DISABLED_WARNINGS_gcc := conversion-null sign-compare format-security \
|
||||
format-nonliteral parentheses, \
|
||||
DISABLED_WARNINGS_clang := bool-conversion format-security, \
|
||||
DISABLED_WARNINGS_solstudio := truncwarn, \
|
||||
DISABLED_WARNINGS_microsoft := 4267 4018, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
|
||||
|
@ -243,7 +243,7 @@ SUNWprivate_1.1 {
|
||||
getDefaultConfig;
|
||||
Java_sun_font_FontConfigManager_getFontConfig;
|
||||
Java_sun_font_FontConfigManager_getFontConfigAASettings;
|
||||
Java_sun_awt_X11FontManager_getFontPathNative;
|
||||
Java_sun_awt_FcFontManager_getFontPathNative;
|
||||
Java_sun_font_SunFontManager_populateFontFileNameMap;
|
||||
|
||||
# CDE private entry point
|
||||
|
@ -270,7 +270,7 @@ SUNWprivate_1.1 {
|
||||
getDefaultConfig;
|
||||
Java_sun_font_FontConfigManager_getFontConfig;
|
||||
Java_sun_font_FontConfigManager_getFontConfigAASettings;
|
||||
Java_sun_awt_X11FontManager_getFontPathNative;
|
||||
Java_sun_awt_FcFontManager_getFontPathNative;
|
||||
Java_sun_font_SunFontManager_populateFontFileNameMap;
|
||||
|
||||
# CDE private entry point
|
||||
|
@ -65,7 +65,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_font_FontConfigManager_getFontConfig;
|
||||
Java_sun_font_FontConfigManager_getFontConfigAASettings;
|
||||
Java_sun_font_FontConfigManager_getFontConfigVersion;
|
||||
Java_sun_awt_X11FontManager_getFontPathNative;
|
||||
Java_sun_awt_FcFontManager_getFontPathNative;
|
||||
|
||||
Java_sun_awt_FontDescriptor_initIDs;
|
||||
Java_sun_awt_PlatformFont_initIDs;
|
||||
|
@ -188,7 +188,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_font_FontConfigManager_getFontConfig;
|
||||
Java_sun_font_FontConfigManager_getFontConfigAASettings;
|
||||
Java_sun_font_FontConfigManager_getFontConfigVersion;
|
||||
Java_sun_awt_X11FontManager_getFontPathNative;
|
||||
Java_sun_awt_FcFontManager_getFontPathNative;
|
||||
Java_sun_awt_X11GraphicsEnvironment_initDisplay;
|
||||
Java_sun_awt_X11GraphicsEnvironment_initGLX;
|
||||
Java_sun_awt_X11GraphicsEnvironment_initXRender;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,6 +33,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Properties;
|
||||
import java.util.TimeZone;
|
||||
|
||||
@ -72,10 +73,6 @@ public class GenerateCurrencyData {
|
||||
private static String formatVersion;
|
||||
private static String dataVersion;
|
||||
private static String validCurrencyCodes;
|
||||
private static String currenciesWith0MinorUnitDecimals;
|
||||
private static String currenciesWith1MinorUnitDecimal;
|
||||
private static String currenciesWith3MinorUnitDecimal;
|
||||
private static String currenciesWithMinorUnitsUndefined;
|
||||
|
||||
// handy constants - must match definitions in java.util.Currency
|
||||
// magic number
|
||||
@ -83,29 +80,31 @@ public class GenerateCurrencyData {
|
||||
// number of characters from A to Z
|
||||
private static final int A_TO_Z = ('Z' - 'A') + 1;
|
||||
// entry for invalid country codes
|
||||
private static final int INVALID_COUNTRY_ENTRY = 0x007F;
|
||||
private static final int INVALID_COUNTRY_ENTRY = 0x0000007F;
|
||||
// entry for countries without currency
|
||||
private static final int COUNTRY_WITHOUT_CURRENCY_ENTRY = 0x0080;
|
||||
private static final int COUNTRY_WITHOUT_CURRENCY_ENTRY = 0x00000200;
|
||||
// mask for simple case country entries
|
||||
private static final int SIMPLE_CASE_COUNTRY_MASK = 0x0000;
|
||||
private static final int SIMPLE_CASE_COUNTRY_MASK = 0x00000000;
|
||||
// mask for simple case country entry final character
|
||||
private static final int SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK = 0x001F;
|
||||
private static final int SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK = 0x0000001F;
|
||||
// mask for simple case country entry default currency digits
|
||||
private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_MASK = 0x0060;
|
||||
private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_MASK = 0x000001E0;
|
||||
// shift count for simple case country entry default currency digits
|
||||
private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_SHIFT = 5;
|
||||
// maximum number for simple case country entry default currency digits
|
||||
private static final int SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS = 9;
|
||||
// mask for special case country entries
|
||||
private static final int SPECIAL_CASE_COUNTRY_MASK = 0x0080;
|
||||
private static final int SPECIAL_CASE_COUNTRY_MASK = 0x00000200;
|
||||
// mask for special case country index
|
||||
private static final int SPECIAL_CASE_COUNTRY_INDEX_MASK = 0x001F;
|
||||
private static final int SPECIAL_CASE_COUNTRY_INDEX_MASK = 0x0000001F;
|
||||
// delta from entry index component in main table to index into special case tables
|
||||
private static final int SPECIAL_CASE_COUNTRY_INDEX_DELTA = 1;
|
||||
// mask for distinguishing simple and special case countries
|
||||
private static final int COUNTRY_TYPE_MASK = SIMPLE_CASE_COUNTRY_MASK | SPECIAL_CASE_COUNTRY_MASK;
|
||||
// mask for the numeric code of the currency
|
||||
private static final int NUMERIC_CODE_MASK = 0x0003FF00;
|
||||
private static final int NUMERIC_CODE_MASK = 0x000FFC00;
|
||||
// shift count for the numeric code of the currency
|
||||
private static final int NUMERIC_CODE_SHIFT = 8;
|
||||
private static final int NUMERIC_CODE_SHIFT = 10;
|
||||
|
||||
// generated data
|
||||
private static int[] mainTable = new int[A_TO_Z * A_TO_Z];
|
||||
@ -120,7 +119,7 @@ public class GenerateCurrencyData {
|
||||
private static int[] specialCaseOldCurrenciesNumericCode = new int[maxSpecialCases];
|
||||
private static int[] specialCaseNewCurrenciesNumericCode = new int[maxSpecialCases];
|
||||
|
||||
private static final int maxOtherCurrencies = 70;
|
||||
private static final int maxOtherCurrencies = 128;
|
||||
private static int otherCurrenciesCount = 0;
|
||||
private static StringBuffer otherCurrencies = new StringBuffer();
|
||||
private static int[] otherCurrenciesDefaultFractionDigits = new int[maxOtherCurrencies];
|
||||
@ -129,6 +128,11 @@ public class GenerateCurrencyData {
|
||||
// date format for parsing cut-over times
|
||||
private static SimpleDateFormat format;
|
||||
|
||||
// Minor Units
|
||||
private static String[] currenciesWithDefinedMinorUnitDecimals =
|
||||
new String[SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS + 1];
|
||||
private static String currenciesWithMinorUnitsUndefined;
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// Look for "-o outputfilename" option
|
||||
@ -171,16 +175,14 @@ public class GenerateCurrencyData {
|
||||
formatVersion = (String) currencyData.get("formatVersion");
|
||||
dataVersion = (String) currencyData.get("dataVersion");
|
||||
validCurrencyCodes = (String) currencyData.get("all");
|
||||
currenciesWith0MinorUnitDecimals = (String) currencyData.get("minor0");
|
||||
currenciesWith1MinorUnitDecimal = (String) currencyData.get("minor1");
|
||||
currenciesWith3MinorUnitDecimal = (String) currencyData.get("minor3");
|
||||
for (int i = 0; i <= SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS; i++) {
|
||||
currenciesWithDefinedMinorUnitDecimals[i]
|
||||
= (String) currencyData.get("minor"+i);
|
||||
}
|
||||
currenciesWithMinorUnitsUndefined = (String) currencyData.get("minorUndefined");
|
||||
if (formatVersion == null ||
|
||||
dataVersion == null ||
|
||||
validCurrencyCodes == null ||
|
||||
currenciesWith0MinorUnitDecimals == null ||
|
||||
currenciesWith1MinorUnitDecimal == null ||
|
||||
currenciesWith3MinorUnitDecimal == null ||
|
||||
currenciesWithMinorUnitsUndefined == null) {
|
||||
throw new NullPointerException("not all required data is defined in input");
|
||||
}
|
||||
@ -207,7 +209,7 @@ public class GenerateCurrencyData {
|
||||
if (currencyInfo.charAt(0) == firstChar && currencyInfo.charAt(1) == secondChar) {
|
||||
checkCurrencyCode(currencyInfo);
|
||||
int digits = getDefaultFractionDigits(currencyInfo);
|
||||
if (digits < 0 || digits > 3) {
|
||||
if (digits < 0 || digits > SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS) {
|
||||
throw new RuntimeException("fraction digits out of range for " + currencyInfo);
|
||||
}
|
||||
int numericCode= getNumericCode(currencyInfo);
|
||||
@ -231,13 +233,14 @@ public class GenerateCurrencyData {
|
||||
}
|
||||
|
||||
private static int getDefaultFractionDigits(String currencyCode) {
|
||||
if (currenciesWith0MinorUnitDecimals.indexOf(currencyCode) != -1) {
|
||||
return 0;
|
||||
} else if (currenciesWith1MinorUnitDecimal.indexOf(currencyCode) != -1) {
|
||||
return 1;
|
||||
} else if (currenciesWith3MinorUnitDecimal.indexOf(currencyCode) != -1) {
|
||||
return 3;
|
||||
} else if (currenciesWithMinorUnitsUndefined.indexOf(currencyCode) != -1) {
|
||||
for (int i = 0; i <= SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS; i++) {
|
||||
if (Objects.nonNull(currenciesWithDefinedMinorUnitDecimals[i]) &&
|
||||
currenciesWithDefinedMinorUnitDecimals[i].indexOf(currencyCode) != -1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
if (currenciesWithMinorUnitsUndefined.indexOf(currencyCode) != -1) {
|
||||
return -1;
|
||||
} else {
|
||||
return 2;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -61,6 +61,7 @@ import javax.swing.BoxLayout;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@ -698,7 +699,7 @@ public class J2DBench {
|
||||
}
|
||||
};
|
||||
guiFrame = f;
|
||||
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
f.getContentPane().setLayout(new BorderLayout());
|
||||
f.getContentPane().add(Group.root.getJComponent(), BorderLayout.CENTER);
|
||||
JPanel p = new JPanel();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -135,7 +135,7 @@ public final class SampleTree {
|
||||
panel.add("Center", sp);
|
||||
panel.add("South", constructOptionsPanel());
|
||||
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
frame.pack();
|
||||
frame.setVisible(true);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -410,7 +410,7 @@ public class JTop extends JPanel {
|
||||
private static void createAndShowGUI(JPanel jtop) {
|
||||
// Create and set up the window.
|
||||
JFrame frame = new JFrame("JTop");
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
|
||||
// Create and set up the content pane.
|
||||
JComponent contentPane = (JComponent) frame.getContentPane();
|
||||
|
@ -276,7 +276,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
|
||||
* @since 1.4
|
||||
* @spec JSR-51
|
||||
*/
|
||||
public FileChannel getChannel() {
|
||||
public final FileChannel getChannel() {
|
||||
FileChannel fc = this.channel;
|
||||
if (fc == null) {
|
||||
synchronized (this) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -153,8 +153,6 @@ public final class AccessControlContext {
|
||||
* {@code DomainCombiner} with the provided
|
||||
* {@code AccessControlContext}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param acc the {@code AccessControlContext} associated
|
||||
* with the provided {@code DomainCombiner}.
|
||||
*
|
||||
@ -338,8 +336,6 @@ public final class AccessControlContext {
|
||||
* Get the {@code DomainCombiner} associated with this
|
||||
* {@code AccessControlContext}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the {@code DomainCombiner} associated with this
|
||||
* {@code AccessControlContext}, or {@code null}
|
||||
* if there is none.
|
||||
@ -738,12 +734,12 @@ public final class AccessControlContext {
|
||||
|
||||
/**
|
||||
* Checks two AccessControlContext objects for equality.
|
||||
* Checks that <i>obj</i> is
|
||||
* Checks that {@code obj} is
|
||||
* an AccessControlContext and has the same set of ProtectionDomains
|
||||
* as this context.
|
||||
* <P>
|
||||
*
|
||||
* @param obj the object we are testing for equality with this object.
|
||||
* @return true if <i>obj</i> is an AccessControlContext, and has the
|
||||
* @return true if {@code obj} is an AccessControlContext, and has the
|
||||
* same set of ProtectionDomains as this context, false otherwise.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -96,7 +96,7 @@ public final class AllPermission extends Permission {
|
||||
* objects are always equal.
|
||||
*
|
||||
* @param obj the object we are testing for equality with this object.
|
||||
* @return true if <i>obj</i> is an AllPermission, false otherwise.
|
||||
* @return true if {@code obj} is an AllPermission, false otherwise.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
return (obj instanceof AllPermission);
|
||||
@ -124,7 +124,6 @@ public final class AllPermission extends Permission {
|
||||
/**
|
||||
* Returns a new PermissionCollection object for storing AllPermission
|
||||
* objects.
|
||||
* <p>
|
||||
*
|
||||
* @return a new PermissionCollection object suitable for
|
||||
* storing AllPermissions.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,7 +56,7 @@ import java.io.IOException;
|
||||
* named permission or you don't.)
|
||||
* Subclasses may implement actions on top of BasicPermission,
|
||||
* if desired.
|
||||
* <p>
|
||||
*
|
||||
* @see java.security.Permission
|
||||
* @see java.security.Permissions
|
||||
* @see java.security.PermissionCollection
|
||||
@ -154,8 +154,8 @@ public abstract class BasicPermission extends Permission
|
||||
* <P>
|
||||
* More specifically, this method returns true if:
|
||||
* <ul>
|
||||
* <li> <i>p</i>'s class is the same as this object's class, and
|
||||
* <li> <i>p</i>'s name equals or (in the case of wildcards)
|
||||
* <li> {@code p}'s class is the same as this object's class, and
|
||||
* <li> {@code p}'s name equals or (in the case of wildcards)
|
||||
* is implied by this object's
|
||||
* name. For example, "a.b.*" implies "a.b.c".
|
||||
* </ul>
|
||||
@ -193,11 +193,11 @@ public abstract class BasicPermission extends Permission
|
||||
|
||||
/**
|
||||
* Checks two BasicPermission objects for equality.
|
||||
* Checks that <i>obj</i>'s class is the same as this object's class
|
||||
* Checks that {@code obj}'s class is the same as this object's class
|
||||
* and has the same name as this object.
|
||||
* <P>
|
||||
*
|
||||
* @param obj the object we are testing for equality with this object.
|
||||
* @return true if <i>obj</i>'s class is the same as this object's class
|
||||
* @return true if {@code obj}'s class is the same as this object's class
|
||||
* and has the same name as this BasicPermission object, false otherwise.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -87,8 +87,6 @@ public interface DomainCombiner {
|
||||
* Individual ProtectionDomains may be modified (with a new
|
||||
* set of Permissions, for example).
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param currentDomains the ProtectionDomains associated with the
|
||||
* current execution Thread, up to the most recent
|
||||
* privileged {@code ProtectionDomain}.
|
||||
@ -96,7 +94,7 @@ public interface DomainCombiner {
|
||||
* with the most recently executing {@code ProtectionDomain}
|
||||
* residing at the beginning of the array. This parameter may
|
||||
* be {@code null} if the current execution Thread
|
||||
* has no associated ProtectionDomains.<p>
|
||||
* has no associated ProtectionDomains.
|
||||
*
|
||||
* @param assignedDomains an array of inherited ProtectionDomains.
|
||||
* ProtectionDomains may be inherited from a parent Thread,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -112,8 +112,6 @@ public class KeyRep implements Serializable {
|
||||
/**
|
||||
* Construct the alternate Key class.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param type either one of Type.SECRET, Type.PUBLIC, or Type.PRIVATE
|
||||
* @param algorithm the algorithm returned from
|
||||
* {@code Key.getAlgorithm()}
|
||||
@ -157,8 +155,6 @@ public class KeyRep implements Serializable {
|
||||
* encoded key bytes, and generates a private key from the spec
|
||||
* </ul>
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the resolved Key object
|
||||
*
|
||||
* @exception ObjectStreamException if the Type/format
|
||||
|
@ -120,7 +120,7 @@ import sun.security.util.Debug;
|
||||
* KeyStore ks = KeyStore.getInstance("JKS");
|
||||
* </pre>
|
||||
* The system will return the most preferred implementation of the
|
||||
* specified keystore type available in the environment. <p>
|
||||
* specified keystore type available in the environment.
|
||||
* </ul>
|
||||
*
|
||||
* <p> Before a keystore can be accessed, it must be
|
||||
@ -617,7 +617,6 @@ public class KeyStore {
|
||||
|
||||
/**
|
||||
* Retrieves the attributes associated with an entry.
|
||||
* <p>
|
||||
*
|
||||
* @return an unmodifiable {@code Set} of attributes, possibly empty
|
||||
*
|
||||
@ -708,7 +707,6 @@ public class KeyStore {
|
||||
|
||||
/**
|
||||
* Retrieves the attributes associated with an entry.
|
||||
* <p>
|
||||
*
|
||||
* @return an unmodifiable {@code Set} of attributes, possibly empty
|
||||
*
|
||||
@ -792,7 +790,6 @@ public class KeyStore {
|
||||
|
||||
/**
|
||||
* Retrieves the attributes associated with an entry.
|
||||
* <p>
|
||||
*
|
||||
* @return an unmodifiable {@code Set} of attributes, possibly empty
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -595,7 +595,6 @@ public abstract class KeyStoreSpi {
|
||||
* Probes the specified input stream to determine whether it contains a
|
||||
* keystore that is supported by this implementation, or not.
|
||||
*
|
||||
* <p>
|
||||
* @implSpec
|
||||
* This method returns false by default. Keystore implementations should
|
||||
* override this method to peek at the data stream directly or to use other
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -111,7 +111,7 @@ implements Serializable
|
||||
*
|
||||
* This method creates
|
||||
* a new PermissionCollection object (and adds the permission to it)
|
||||
* if an appropriate collection does not yet exist. <p>
|
||||
* if an appropriate collection does not yet exist.
|
||||
*
|
||||
* @param permission the Permission object to add.
|
||||
*
|
||||
@ -162,7 +162,7 @@ implements Serializable
|
||||
*
|
||||
* <p>Additionally, if this PermissionCollection contains the
|
||||
* AllPermission, this method will always return true.
|
||||
* <p>
|
||||
*
|
||||
* @param permission the Permission object to check.
|
||||
*
|
||||
* @return true if "permission" is implied by the permissions in the
|
||||
|
@ -51,7 +51,6 @@ import sun.misc.SharedSecrets;
|
||||
* ProtectionDomain can also be constructed such that it is dynamically
|
||||
* mapped to a set of permissions by the current Policy whenever a permission
|
||||
* is checked.
|
||||
* <p>
|
||||
*
|
||||
* @author Li Gong
|
||||
* @author Roland Schemers
|
||||
@ -168,7 +167,6 @@ public class ProtectionDomain {
|
||||
* this domain. This constructor affords the
|
||||
* Policy provider the opportunity to augment the supplied
|
||||
* PermissionCollection to reflect policy changes.
|
||||
* <p>
|
||||
*
|
||||
* @param codesource the CodeSource associated with this domain
|
||||
* @param permissions the permissions granted to this domain
|
||||
@ -263,7 +261,6 @@ public class ProtectionDomain {
|
||||
* permissions, then the permission will be checked against the
|
||||
* combination of the PermissionCollection supplied at construction and
|
||||
* the current Policy binding.
|
||||
* <p>
|
||||
*
|
||||
* @param permission the Permission object to check.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -65,7 +65,7 @@ public class SecureClassLoader extends ClassLoader {
|
||||
* <p>If there is a security manager, this method first
|
||||
* calls the security manager's {@code checkCreateClassLoader}
|
||||
* method to ensure creation of a class loader is allowed.
|
||||
* <p>
|
||||
*
|
||||
* @param parent the parent ClassLoader
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* {@code checkCreateClassLoader} method doesn't allow
|
||||
@ -112,7 +112,7 @@ public class SecureClassLoader extends ClassLoader {
|
||||
* <p>
|
||||
* If a non-null CodeSource is supplied a ProtectionDomain is
|
||||
* constructed and associated with the class being defined.
|
||||
* <p>
|
||||
*
|
||||
* @param name the expected name of the class, or {@code null}
|
||||
* if not known, using '.' and not '/' as the separator
|
||||
* and without a trailing ".class" suffix.
|
||||
@ -149,7 +149,7 @@ public class SecureClassLoader extends ClassLoader {
|
||||
* <p>
|
||||
* If a non-null CodeSource is supplied a ProtectionDomain is
|
||||
* constructed and associated with the class being defined.
|
||||
* <p>
|
||||
*
|
||||
* @param name the expected name of the class, or {@code null}
|
||||
* if not known, using '.' and not '/' as the separator
|
||||
* and without a trailing ".class" suffix.
|
||||
@ -180,7 +180,7 @@ public class SecureClassLoader extends ClassLoader {
|
||||
* This method is invoked by the defineClass method which takes
|
||||
* a CodeSource as an argument when it is constructing the
|
||||
* ProtectionDomain for the class being defined.
|
||||
* <p>
|
||||
*
|
||||
* @param codesource the codesource.
|
||||
*
|
||||
* @return the permissions granted to the codesource.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -310,7 +310,7 @@ implements java.io.Serializable
|
||||
|
||||
/**
|
||||
* Checks two UnresolvedPermission objects for equality.
|
||||
* Checks that <i>obj</i> is an UnresolvedPermission, and has
|
||||
* Checks that {@code obj} is an UnresolvedPermission, and has
|
||||
* the same type (class) name, permission name, actions, and
|
||||
* certificates as this object.
|
||||
*
|
||||
@ -491,7 +491,7 @@ implements java.io.Serializable
|
||||
/**
|
||||
* Returns a new PermissionCollection object for storing
|
||||
* UnresolvedPermission objects.
|
||||
* <p>
|
||||
*
|
||||
* @return a new PermissionCollection object suitable for
|
||||
* storing UnresolvedPermissions.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,7 +41,7 @@ import sun.security.x509.X509CertImpl;
|
||||
* An identity certificate is a binding of a principal to a public key which
|
||||
* is vouched for by another principal. (A principal represents
|
||||
* an entity such as an individual user, a group, or a corporation.)
|
||||
*<p>
|
||||
* <p>
|
||||
* This class is an abstraction for certificates that have different
|
||||
* formats but important common uses. For example, different types of
|
||||
* certificates, such as X.509 and PGP, share general certificate
|
||||
@ -248,9 +248,7 @@ public abstract class Certificate implements java.io.Serializable {
|
||||
* Construct the alternate Certificate class with the Certificate
|
||||
* type and Certificate encoding bytes.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param type the standard name of the Certificate type. <p>
|
||||
* @param type the standard name of the Certificate type.
|
||||
*
|
||||
* @param data the Certificate data.
|
||||
*/
|
||||
@ -262,8 +260,6 @@ public abstract class Certificate implements java.io.Serializable {
|
||||
/**
|
||||
* Resolve the Certificate Object.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the resolved Certificate Object
|
||||
*
|
||||
* @throws java.io.ObjectStreamException if the Certificate
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -140,11 +140,11 @@ public final class Currency implements Serializable {
|
||||
// - maps country code to 32-bit int
|
||||
// - 26*26 entries, corresponding to [A-Z]*[A-Z]
|
||||
// - \u007F -> not valid country
|
||||
// - bits 18-31: unused
|
||||
// - bits 8-17: numeric code (0 to 1023)
|
||||
// - bit 7: 1 - special case, bits 0-4 indicate which one
|
||||
// - bits 20-31: unused
|
||||
// - bits 10-19: numeric code (0 to 1023)
|
||||
// - bit 9: 1 - special case, bits 0-4 indicate which one
|
||||
// 0 - simple country, bits 0-4 indicate final char of currency code
|
||||
// - bits 5-6: fraction digits for simple countries, 0 for special cases
|
||||
// - bits 5-8: fraction digits for simple countries, 0 for special cases
|
||||
// - bits 0-4: final char for currency code for simple country, or ID of special case
|
||||
// - special case IDs:
|
||||
// - 0: country has no currency
|
||||
@ -182,32 +182,34 @@ public final class Currency implements Serializable {
|
||||
// number of characters from A to Z
|
||||
private static final int A_TO_Z = ('Z' - 'A') + 1;
|
||||
// entry for invalid country codes
|
||||
private static final int INVALID_COUNTRY_ENTRY = 0x007F;
|
||||
private static final int INVALID_COUNTRY_ENTRY = 0x0000007F;
|
||||
// entry for countries without currency
|
||||
private static final int COUNTRY_WITHOUT_CURRENCY_ENTRY = 0x0080;
|
||||
private static final int COUNTRY_WITHOUT_CURRENCY_ENTRY = 0x00000200;
|
||||
// mask for simple case country entries
|
||||
private static final int SIMPLE_CASE_COUNTRY_MASK = 0x0000;
|
||||
private static final int SIMPLE_CASE_COUNTRY_MASK = 0x00000000;
|
||||
// mask for simple case country entry final character
|
||||
private static final int SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK = 0x001F;
|
||||
private static final int SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK = 0x0000001F;
|
||||
// mask for simple case country entry default currency digits
|
||||
private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_MASK = 0x0060;
|
||||
private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_MASK = 0x000001E0;
|
||||
// shift count for simple case country entry default currency digits
|
||||
private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_SHIFT = 5;
|
||||
// maximum number for simple case country entry default currency digits
|
||||
private static final int SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS = 9;
|
||||
// mask for special case country entries
|
||||
private static final int SPECIAL_CASE_COUNTRY_MASK = 0x0080;
|
||||
private static final int SPECIAL_CASE_COUNTRY_MASK = 0x00000200;
|
||||
// mask for special case country index
|
||||
private static final int SPECIAL_CASE_COUNTRY_INDEX_MASK = 0x001F;
|
||||
private static final int SPECIAL_CASE_COUNTRY_INDEX_MASK = 0x0000001F;
|
||||
// delta from entry index component in main table to index into special case tables
|
||||
private static final int SPECIAL_CASE_COUNTRY_INDEX_DELTA = 1;
|
||||
// mask for distinguishing simple and special case countries
|
||||
private static final int COUNTRY_TYPE_MASK = SIMPLE_CASE_COUNTRY_MASK | SPECIAL_CASE_COUNTRY_MASK;
|
||||
// mask for the numeric code of the currency
|
||||
private static final int NUMERIC_CODE_MASK = 0x0003FF00;
|
||||
private static final int NUMERIC_CODE_MASK = 0x000FFC00;
|
||||
// shift count for the numeric code of the currency
|
||||
private static final int NUMERIC_CODE_SHIFT = 8;
|
||||
private static final int NUMERIC_CODE_SHIFT = 10;
|
||||
|
||||
// Currency data format version
|
||||
private static final int VALID_FORMAT_VERSION = 1;
|
||||
private static final int VALID_FORMAT_VERSION = 2;
|
||||
|
||||
static {
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
@ -261,7 +263,7 @@ public final class Currency implements Serializable {
|
||||
Set<String> keys = props.stringPropertyNames();
|
||||
Pattern propertiesPattern =
|
||||
Pattern.compile("([A-Z]{3})\\s*,\\s*(\\d{3})\\s*,\\s*" +
|
||||
"([0-3])\\s*,?\\s*(\\d{4}-\\d{2}-\\d{2}T\\d{2}:" +
|
||||
"(\\d+)\\s*,?\\s*(\\d{4}-\\d{2}-\\d{2}T\\d{2}:" +
|
||||
"\\d{2}:\\d{2})?");
|
||||
for (String key : keys) {
|
||||
replaceCurrencyData(propertiesPattern,
|
||||
@ -682,7 +684,7 @@ public final class Currency implements Serializable {
|
||||
* @param ctry country code
|
||||
* @param curdata currency data. This is a comma separated string that
|
||||
* consists of "three-letter alphabet code", "three-digit numeric code",
|
||||
* and "one-digit (0,1,2, or 3) default fraction digit".
|
||||
* and "one-digit (0-9) default fraction digit".
|
||||
* For example, "JPZ,392,0".
|
||||
* An optional UTC date can be appended to the string (comma separated)
|
||||
* to allow a currency change take effect after date specified.
|
||||
@ -721,8 +723,14 @@ public final class Currency implements Serializable {
|
||||
|
||||
String code = m.group(1);
|
||||
int numeric = Integer.parseInt(m.group(2));
|
||||
int fraction = Integer.parseInt(m.group(3));
|
||||
int entry = numeric << NUMERIC_CODE_SHIFT;
|
||||
int fraction = Integer.parseInt(m.group(3));
|
||||
if (fraction > SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS) {
|
||||
info("currency.properties entry for " + ctry +
|
||||
" ignored since the fraction is more than " +
|
||||
SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS + ":" + curdata, null);
|
||||
return;
|
||||
}
|
||||
|
||||
int index;
|
||||
for (index = 0; index < scOldCurrencies.length; index++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,8 +34,6 @@ import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.BufferedWriter;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
|
||||
import jdk.internal.util.xml.PropertiesDefaultHandler;
|
||||
|
||||
@ -311,9 +309,11 @@ class Properties extends Hashtable<Object,Object> {
|
||||
* input stream.
|
||||
* @throws IllegalArgumentException if a malformed Unicode escape
|
||||
* appears in the input.
|
||||
* @throws NullPointerException if {@code reader} is null.
|
||||
* @since 1.6
|
||||
*/
|
||||
public synchronized void load(Reader reader) throws IOException {
|
||||
Objects.requireNonNull(reader, "reader parameter is null");
|
||||
load0(new LineReader(reader));
|
||||
}
|
||||
|
||||
@ -335,9 +335,11 @@ class Properties extends Hashtable<Object,Object> {
|
||||
* input stream.
|
||||
* @throws IllegalArgumentException if the input stream contains a
|
||||
* malformed Unicode escape sequence.
|
||||
* @throws NullPointerException if {@code inStream} is null.
|
||||
* @since 1.2
|
||||
*/
|
||||
public synchronized void load(InputStream inStream) throws IOException {
|
||||
Objects.requireNonNull(inStream, "inStream parameter is null");
|
||||
load0(new LineReader(inStream));
|
||||
}
|
||||
|
||||
|
@ -292,11 +292,13 @@ public final class Matcher implements MatchResult {
|
||||
|
||||
@Override
|
||||
public int start() {
|
||||
checkMatch();
|
||||
return first;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int start(int group) {
|
||||
checkMatch();
|
||||
if (group < 0 || group > groupCount)
|
||||
throw new IndexOutOfBoundsException("No group " + group);
|
||||
return groups[group * 2];
|
||||
@ -304,11 +306,13 @@ public final class Matcher implements MatchResult {
|
||||
|
||||
@Override
|
||||
public int end() {
|
||||
checkMatch();
|
||||
return last;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int end(int group) {
|
||||
checkMatch();
|
||||
if (group < 0 || group > groupCount)
|
||||
throw new IndexOutOfBoundsException("No group " + group);
|
||||
return groups[group * 2 + 1];
|
||||
@ -321,17 +325,25 @@ public final class Matcher implements MatchResult {
|
||||
|
||||
@Override
|
||||
public String group() {
|
||||
checkMatch();
|
||||
return group(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String group(int group) {
|
||||
checkMatch();
|
||||
if (group < 0 || group > groupCount)
|
||||
throw new IndexOutOfBoundsException("No group " + group);
|
||||
if ((groups[group*2] == -1) || (groups[group*2+1] == -1))
|
||||
return null;
|
||||
return text.subSequence(groups[group * 2], groups[group * 2 + 1]).toString();
|
||||
}
|
||||
|
||||
private void checkMatch() {
|
||||
if (first < 0)
|
||||
throw new IllegalStateException("No match found");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -447,7 +447,7 @@ abstract class DoublePipeline<E_IN>
|
||||
|
||||
@Override
|
||||
public final long count() {
|
||||
return mapToLong(e -> 1L).sum();
|
||||
return evaluate(ReduceOps.makeDoubleCounting());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -581,6 +581,24 @@ public interface DoubleStream extends BaseStream<Double, DoubleStream> {
|
||||
*
|
||||
* <p>This is a <a href="package-summary.html#StreamOps">terminal operation</a>.
|
||||
*
|
||||
* @apiNote
|
||||
* An implementation may choose to not execute the stream pipeline (either
|
||||
* sequentially or in parallel) if it is capable of computing the count
|
||||
* directly from the stream source. In such cases no source elements will
|
||||
* be traversed and no intermediate operations will be evaluated.
|
||||
* Behavioral parameters with side-effects, which are strongly discouraged
|
||||
* except for harmless cases such as debugging, may be affected. For
|
||||
* example, consider the following stream:
|
||||
* <pre>{@code
|
||||
* DoubleStream s = DoubleStream.of(1, 2, 3, 4);
|
||||
* long count = s.peek(System.out::println).count();
|
||||
* }</pre>
|
||||
* The number of elements covered by the stream source is known and the
|
||||
* intermediate operation, {@code peek}, does not inject into or remove
|
||||
* elements from the stream (as may be the case for {@code flatMap} or
|
||||
* {@code filter} operations). Thus the count is 4 and there is no need to
|
||||
* execute the pipeline and, as a side-effect, print out the elements.
|
||||
*
|
||||
* @return the count of elements in this stream
|
||||
*/
|
||||
long count();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -427,7 +427,7 @@ abstract class IntPipeline<E_IN>
|
||||
|
||||
@Override
|
||||
public final long count() {
|
||||
return mapToLong(e -> 1L).sum();
|
||||
return evaluate(ReduceOps.makeIntCounting());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -504,6 +504,24 @@ public interface IntStream extends BaseStream<Integer, IntStream> {
|
||||
*
|
||||
* <p>This is a <a href="package-summary.html#StreamOps">terminal operation</a>.
|
||||
*
|
||||
* @apiNote
|
||||
* An implementation may choose to not execute the stream pipeline (either
|
||||
* sequentially or in parallel) if it is capable of computing the count
|
||||
* directly from the stream source. In such cases no source elements will
|
||||
* be traversed and no intermediate operations will be evaluated.
|
||||
* Behavioral parameters with side-effects, which are strongly discouraged
|
||||
* except for harmless cases such as debugging, may be affected. For
|
||||
* example, consider the following stream:
|
||||
* <pre>{@code
|
||||
* IntStream s = IntStream.of(1, 2, 3, 4);
|
||||
* long count = s.peek(System.out::println).count();
|
||||
* }</pre>
|
||||
* The number of elements covered by the stream source is known and the
|
||||
* intermediate operation, {@code peek}, does not inject into or remove
|
||||
* elements from the stream (as may be the case for {@code flatMap} or
|
||||
* {@code filter} operations). Thus the count is 4 and there is no need to
|
||||
* execute the pipeline and, as a side-effect, print out the elements.
|
||||
*
|
||||
* @return the count of elements in this stream
|
||||
*/
|
||||
long count();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -425,7 +425,7 @@ abstract class LongPipeline<E_IN>
|
||||
|
||||
@Override
|
||||
public final long count() {
|
||||
return map(e -> 1L).sum();
|
||||
return evaluate(ReduceOps.makeLongCounting());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -509,6 +509,24 @@ public interface LongStream extends BaseStream<Long, LongStream> {
|
||||
*
|
||||
* <p>This is a <a href="package-summary.html#StreamOps">terminal operation</a>.
|
||||
*
|
||||
* @apiNote
|
||||
* An implementation may choose to not execute the stream pipeline (either
|
||||
* sequentially or in parallel) if it is capable of computing the count
|
||||
* directly from the stream source. In such cases no source elements will
|
||||
* be traversed and no intermediate operations will be evaluated.
|
||||
* Behavioral parameters with side-effects, which are strongly discouraged
|
||||
* except for harmless cases such as debugging, may be affected. For
|
||||
* example, consider the following stream:
|
||||
* <pre>{@code
|
||||
* LongStream s = LongStream.of(1, 2, 3, 4);
|
||||
* long count = s.peek(System.out::println).count();
|
||||
* }</pre>
|
||||
* The number of elements covered by the stream source is known and the
|
||||
* intermediate operation, {@code peek}, does not inject into or remove
|
||||
* elements from the stream (as may be the case for {@code flatMap} or
|
||||
* {@code filter} operations). Thus the count is 4 and there is no need to
|
||||
* execute the pipeline and, as a side-effect, print out the elements.
|
||||
*
|
||||
* @return the count of elements in this stream
|
||||
*/
|
||||
long count();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -233,6 +233,40 @@ final class ReduceOps {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@code TerminalOp} that counts the number of stream
|
||||
* elements. If the size of the pipeline is known then count is the size
|
||||
* and there is no need to evaluate the pipeline. If the size of the
|
||||
* pipeline is non known then count is produced, via reduction, using a
|
||||
* {@link CountingSink}.
|
||||
*
|
||||
* @param <T> the type of the input elements
|
||||
* @return a {@code TerminalOp} implementing the counting
|
||||
*/
|
||||
public static <T> TerminalOp<T, Long>
|
||||
makeRefCounting() {
|
||||
return new ReduceOp<T, Long, CountingSink<T>>(StreamShape.REFERENCE) {
|
||||
@Override
|
||||
public CountingSink<T> makeSink() { return new CountingSink.OfRef<>(); }
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateSequential(PipelineHelper<T> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateSequential(helper, spliterator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateParallel(PipelineHelper<T> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateParallel(helper, spliterator);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@code TerminalOp} that implements a functional reduce on
|
||||
* {@code int} values.
|
||||
@ -369,6 +403,39 @@ final class ReduceOps {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@code TerminalOp} that counts the number of stream
|
||||
* elements. If the size of the pipeline is known then count is the size
|
||||
* and there is no need to evaluate the pipeline. If the size of the
|
||||
* pipeline is non known then count is produced, via reduction, using a
|
||||
* {@link CountingSink}.
|
||||
*
|
||||
* @return a {@code TerminalOp} implementing the counting
|
||||
*/
|
||||
public static TerminalOp<Integer, Long>
|
||||
makeIntCounting() {
|
||||
return new ReduceOp<Integer, Long, CountingSink<Integer>>(StreamShape.INT_VALUE) {
|
||||
@Override
|
||||
public CountingSink<Integer> makeSink() { return new CountingSink.OfInt(); }
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateSequential(PipelineHelper<Integer> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateSequential(helper, spliterator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateParallel(PipelineHelper<Integer> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateParallel(helper, spliterator);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@code TerminalOp} that implements a functional reduce on
|
||||
* {@code long} values.
|
||||
@ -505,6 +572,39 @@ final class ReduceOps {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@code TerminalOp} that counts the number of stream
|
||||
* elements. If the size of the pipeline is known then count is the size
|
||||
* and there is no need to evaluate the pipeline. If the size of the
|
||||
* pipeline is non known then count is produced, via reduction, using a
|
||||
* {@link CountingSink}.
|
||||
*
|
||||
* @return a {@code TerminalOp} implementing the counting
|
||||
*/
|
||||
public static TerminalOp<Long, Long>
|
||||
makeLongCounting() {
|
||||
return new ReduceOp<Long, Long, CountingSink<Long>>(StreamShape.LONG_VALUE) {
|
||||
@Override
|
||||
public CountingSink<Long> makeSink() { return new CountingSink.OfLong(); }
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateSequential(PipelineHelper<Long> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateSequential(helper, spliterator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateParallel(PipelineHelper<Long> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateParallel(helper, spliterator);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@code TerminalOp} that implements a functional reduce on
|
||||
* {@code double} values.
|
||||
@ -641,6 +741,91 @@ final class ReduceOps {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@code TerminalOp} that counts the number of stream
|
||||
* elements. If the size of the pipeline is known then count is the size
|
||||
* and there is no need to evaluate the pipeline. If the size of the
|
||||
* pipeline is non known then count is produced, via reduction, using a
|
||||
* {@link CountingSink}.
|
||||
*
|
||||
* @return a {@code TerminalOp} implementing the counting
|
||||
*/
|
||||
public static TerminalOp<Double, Long>
|
||||
makeDoubleCounting() {
|
||||
return new ReduceOp<Double, Long, CountingSink<Double>>(StreamShape.DOUBLE_VALUE) {
|
||||
@Override
|
||||
public CountingSink<Double> makeSink() { return new CountingSink.OfDouble(); }
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateSequential(PipelineHelper<Double> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateSequential(helper, spliterator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <P_IN> Long evaluateParallel(PipelineHelper<Double> helper,
|
||||
Spliterator<P_IN> spliterator) {
|
||||
if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags()))
|
||||
return spliterator.getExactSizeIfKnown();
|
||||
return super.evaluateParallel(helper, spliterator);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A sink that counts elements
|
||||
*/
|
||||
static abstract class CountingSink<T>
|
||||
extends Box<Long>
|
||||
implements AccumulatingSink<T, Long, CountingSink<T>> {
|
||||
long count;
|
||||
|
||||
@Override
|
||||
public void begin(long size) {
|
||||
count = 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long get() {
|
||||
return count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void combine(CountingSink<T> other) {
|
||||
count += other.count;
|
||||
}
|
||||
|
||||
static final class OfRef<T> extends CountingSink<T> {
|
||||
@Override
|
||||
public void accept(T t) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
static final class OfInt extends CountingSink<Integer> implements Sink.OfInt {
|
||||
@Override
|
||||
public void accept(int t) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
static final class OfLong extends CountingSink<Long> implements Sink.OfLong {
|
||||
@Override
|
||||
public void accept(long t) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
static final class OfDouble extends CountingSink<Double> implements Sink.OfDouble {
|
||||
@Override
|
||||
public void accept(double t) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A type of {@code TerminalSink} that implements an associative reducing
|
||||
* operation on elements of type {@code T} and producing a result of type
|
||||
@ -652,7 +837,7 @@ final class ReduceOps {
|
||||
*/
|
||||
private interface AccumulatingSink<T, R, K extends AccumulatingSink<T, R, K>>
|
||||
extends TerminalSink<T, R> {
|
||||
public void combine(K other);
|
||||
void combine(K other);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -523,10 +523,9 @@ abstract class ReferencePipeline<P_IN, P_OUT>
|
||||
|
||||
@Override
|
||||
public final long count() {
|
||||
return mapToLong(e -> 1L).sum();
|
||||
return evaluate(ReduceOps.makeRefCounting());
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
/**
|
||||
|
@ -851,6 +851,25 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
|
||||
*
|
||||
* <p>This is a <a href="package-summary.html#StreamOps">terminal operation</a>.
|
||||
*
|
||||
* @apiNote
|
||||
* An implementation may choose to not execute the stream pipeline (either
|
||||
* sequentially or in parallel) if it is capable of computing the count
|
||||
* directly from the stream source. In such cases no source elements will
|
||||
* be traversed and no intermediate operations will be evaluated.
|
||||
* Behavioral parameters with side-effects, which are strongly discouraged
|
||||
* except for harmless cases such as debugging, may be affected. For
|
||||
* example, consider the following stream:
|
||||
* <pre>{@code
|
||||
* List<String> l = Arrays.asList("A", "B", "C", "D");
|
||||
* long count = l.stream().peek(System.out::println).count();
|
||||
* }</pre>
|
||||
* The number of elements covered by the stream source, a {@code List}, is
|
||||
* known and the intermediate operation, {@code peek}, does not inject into
|
||||
* or remove elements from the stream (as may be the case for
|
||||
* {@code flatMap} or {@code filter} operations). Thus the count is the
|
||||
* size of the {@code List} and there is no need to execute the pipeline
|
||||
* and, as a side-effect, print out the list elements.
|
||||
*
|
||||
* @return the count of elements in this stream
|
||||
*/
|
||||
long count();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -172,7 +172,6 @@ public class CipherInputStream extends FilterInputStream {
|
||||
* <code>-1</code> is returned. This method blocks until input data
|
||||
* is available, the end of the stream is detected, or an exception
|
||||
* is thrown.
|
||||
* <p>
|
||||
*
|
||||
* @return the next byte of data, or <code>-1</code> if the end of the
|
||||
* stream is reached.
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,8 +47,8 @@ provider-based implementations without having to add or rewrite code.
|
||||
<h2>Package Specification</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html"><b>
|
||||
<b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
|
||||
<li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
|
||||
<b>Java™
|
||||
Cryptography Architecture Standard Algorithm Name
|
||||
Documentation</b></a></li>
|
||||
</ul>
|
||||
@ -60,14 +60,14 @@ For further documentation, please see:
|
||||
<li>
|
||||
<a href=
|
||||
"{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html">
|
||||
<b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
|
||||
<b>Java™
|
||||
Cryptography Architecture (JCA) Reference Guide
|
||||
</b></a></li>
|
||||
<li>
|
||||
<a href=
|
||||
"{@docRoot}/../technotes/guides/security/crypto/HowToImplAProvider.html">
|
||||
<b>How to Implement a Provider in the
|
||||
Java<FONT SIZE=-2><SUP>TM</SUP></FONT> Cryptography Architecture
|
||||
Java™ Cryptography Architecture
|
||||
</b></a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -240,7 +240,6 @@ public class KeyManagerFactory {
|
||||
* <P>
|
||||
* For more flexible initialization, please see
|
||||
* {@link #init(ManagerFactoryParameters)}.
|
||||
* <P>
|
||||
*
|
||||
* @param ks the key store or null
|
||||
* @param password the password for recovering keys in the KeyStore
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -339,7 +339,6 @@ public class SSLParameters {
|
||||
* SSLEngine engine =
|
||||
* sslContext.createSSLEngine("www.example.com", 443);
|
||||
* </pre>
|
||||
* <P>
|
||||
*
|
||||
* @return null or an immutable list of non-null {@link SNIServerName}s
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -80,7 +80,7 @@ package javax.security.auth;
|
||||
*
|
||||
* createLoginContext.{name} - allow code to instantiate a
|
||||
* {@code LoginContext} with the
|
||||
* specified <i>name</i>. <i>name</i>
|
||||
* specified {@code name}. {@code name}
|
||||
* is used as the index into the installed login
|
||||
* {@code Configuration}
|
||||
* (that returned by
|
||||
@ -135,8 +135,6 @@ java.security.BasicPermission {
|
||||
* Creates a new AuthPermission with the specified name.
|
||||
* The name is the symbolic name of the AuthPermission.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the name of the AuthPermission
|
||||
*
|
||||
* @throws NullPointerException if {@code name} is {@code null}.
|
||||
@ -154,9 +152,7 @@ java.security.BasicPermission {
|
||||
* The name is the symbolic name of the AuthPermission, and the
|
||||
* actions String is currently unused and should be null.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the name of the AuthPermission <p>
|
||||
* @param name the name of the AuthPermission
|
||||
*
|
||||
* @param actions should be null.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,8 +50,6 @@ public class DestroyFailedException extends Exception {
|
||||
* message. A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public DestroyFailedException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,7 +44,7 @@ public interface Destroyable {
|
||||
* @implSpec
|
||||
* The default implementation throws {@code DestroyFailedException}.
|
||||
*
|
||||
* @exception DestroyFailedException if the destroy operation fails. <p>
|
||||
* @exception DestroyFailedException if the destroy operation fails.
|
||||
*
|
||||
* @exception SecurityException if the caller does not have permission
|
||||
* to destroy this {@code Object}.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,8 +51,8 @@ import sun.security.util.Debug;
|
||||
* The {@code Policy} object consults the local policy and returns
|
||||
* and appropriate {@code Permissions} object with the
|
||||
* Permissions granted to the Principals associated with the
|
||||
* provided <i>subject</i>, and granted to the code specified
|
||||
* by the provided <i>codeSource</i>.
|
||||
* provided {@code subject}, and granted to the code specified
|
||||
* by the provided {@code codeSource}.
|
||||
*
|
||||
* <p> A {@code Policy} contains the following information.
|
||||
* Note that this example only represents the syntax for the default
|
||||
@ -181,8 +181,6 @@ public abstract class Policy {
|
||||
* {@code AuthPermission("getPolicy")} permission
|
||||
* to ensure the caller has permission to get the Policy object.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the installed Policy. The return value cannot be
|
||||
* {@code null}.
|
||||
*
|
||||
@ -263,8 +261,6 @@ public abstract class Policy {
|
||||
* {@code AuthPermission("setPolicy")}
|
||||
* permission to ensure the caller has permission to set the Policy.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param policy the new system Policy object.
|
||||
*
|
||||
* @exception java.lang.SecurityException if the current thread does not
|
||||
@ -321,8 +317,6 @@ public abstract class Policy {
|
||||
* Retrieve the Permissions granted to the Principals associated with
|
||||
* the specified {@code CodeSource}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param subject the {@code Subject}
|
||||
* whose associated Principals,
|
||||
* in conjunction with the provided
|
||||
@ -353,8 +347,6 @@ public abstract class Policy {
|
||||
* For example, if the Policy object is stored in
|
||||
* a file, calling {@code refresh} will cause the file to be re-read.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception SecurityException if the caller does not have permission
|
||||
* to refresh the Policy.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -157,10 +157,8 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
* with the specified {@code name}. The {@code name}
|
||||
* specifies both a Credential class and a {@code Principal} Set.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the name specifying the Credential class and
|
||||
* {@code Principal} Set. <p>
|
||||
* {@code Principal} Set.
|
||||
*
|
||||
* @param actions the actions specifying that the Credential can be read.
|
||||
*
|
||||
@ -180,8 +178,6 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
* Returns the Class name of the Credential associated with this
|
||||
* {@code PrivateCredentialPermission}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the Class name of the Credential associated with this
|
||||
* {@code PrivateCredentialPermission}.
|
||||
*/
|
||||
@ -202,8 +198,6 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
* corresponds to the {@code Principal} name of the
|
||||
* first {@code Principal} in the array.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the {@code Principal} class and names associated
|
||||
* with this {@code PrivateCredentialPermission}.
|
||||
*/
|
||||
@ -229,8 +223,8 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
*
|
||||
* This method returns true if:
|
||||
* <ul>
|
||||
* <li> <i>p</i> is an instanceof PrivateCredentialPermission and
|
||||
* <li> the target name for <i>p</i> is implied by this object's
|
||||
* <li> {@code p} is an instanceof PrivateCredentialPermission and
|
||||
* <li> the target name for {@code p} is implied by this object's
|
||||
* target name. For example:
|
||||
* <pre>
|
||||
* [* P1 "duke"] implies [a.b.Credential P1 "duke"].
|
||||
@ -239,8 +233,6 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
* </pre>
|
||||
* </ul>
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param p the {@code Permission} to check against.
|
||||
*
|
||||
* @return true if this {@code PrivateCredentialPermission} implies
|
||||
@ -261,15 +253,13 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
|
||||
/**
|
||||
* Checks two {@code PrivateCredentialPermission} objects for
|
||||
* equality. Checks that <i>obj</i> is a
|
||||
* equality. Checks that {@code obj} is a
|
||||
* {@code PrivateCredentialPermission},
|
||||
* and has the same credential class as this object,
|
||||
* as well as the same Principals as this object.
|
||||
* The order of the Principals in the respective Permission's
|
||||
* target names is not relevant.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param obj the object we are testing for equality with this object.
|
||||
*
|
||||
* @return true if obj is a {@code PrivateCredentialPermission},
|
||||
@ -301,8 +291,6 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
* Returns the "canonical string representation" of the actions.
|
||||
* This method always returns the String, "read".
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the actions (always returns "read").
|
||||
*/
|
||||
public String getActions() {
|
||||
@ -315,8 +303,6 @@ public final class PrivateCredentialPermission extends Permission {
|
||||
* No such {@code PermissionCollection} is defined,
|
||||
* so this method always returns {@code null}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return null in all cases.
|
||||
*/
|
||||
public PermissionCollection newPermissionCollection() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,8 +50,6 @@ public class RefreshFailedException extends Exception {
|
||||
* message. A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public RefreshFailedException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,8 +39,6 @@ public interface Refreshable {
|
||||
/**
|
||||
* Determine if this {@code Object} is current.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return true if this {@code Object} is currently current,
|
||||
* false otherwise.
|
||||
*/
|
||||
@ -50,11 +48,9 @@ public interface Refreshable {
|
||||
* Update or extend the validity period for this
|
||||
* {@code Object}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception SecurityException if the caller does not have permission
|
||||
* to update or extend the validity period for this
|
||||
* {@code Object}. <p>
|
||||
* {@code Object}.
|
||||
*
|
||||
* @exception RefreshFailedException if the refresh attempt failed.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -105,8 +105,6 @@ public final class Subject implements java.io.Serializable {
|
||||
* A {@code Set} that provides a view of all of this
|
||||
* Subject's Principals
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @serial Each element in this set is a
|
||||
* {@code java.security.Principal}.
|
||||
* The set is a {@code Subject.SecureSet}.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -69,8 +69,6 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
|
||||
* Associate the provided {@code Subject} with this
|
||||
* {@code SubjectDomainCombiner}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param subject the {@code Subject} to be associated with
|
||||
* with this {@code SubjectDomainCombiner}.
|
||||
*/
|
||||
@ -88,8 +86,6 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
|
||||
* Get the {@code Subject} associated with this
|
||||
* {@code SubjectDomainCombiner}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the {@code Subject} associated with this
|
||||
* {@code SubjectDomainCombiner}, or {@code null}
|
||||
* if no {@code Subject} is associated with this
|
||||
@ -115,25 +111,23 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
|
||||
*
|
||||
* <p> A new {@code ProtectionDomain} instance is created
|
||||
* for each {@code ProtectionDomain} in the
|
||||
* <i>currentDomains</i> array. Each new {@code ProtectionDomain}
|
||||
* {@code currentDomains} array. Each new {@code ProtectionDomain}
|
||||
* instance is created using the {@code CodeSource},
|
||||
* {@code Permission}s and {@code ClassLoader}
|
||||
* from the corresponding {@code ProtectionDomain} in
|
||||
* <i>currentDomains</i>, as well as with the Principals from
|
||||
* {@code currentDomains}, as well as with the Principals from
|
||||
* the {@code Subject} associated with this
|
||||
* {@code SubjectDomainCombiner}.
|
||||
*
|
||||
* <p> All of the newly instantiated ProtectionDomains are
|
||||
* combined into a new array. The ProtectionDomains from the
|
||||
* <i>assignedDomains</i> array are appended to this new array,
|
||||
* {@code assignedDomains} array are appended to this new array,
|
||||
* and the result is returned.
|
||||
*
|
||||
* <p> Note that optimizations such as the removal of duplicate
|
||||
* ProtectionDomains may have occurred.
|
||||
* In addition, caching of ProtectionDomains may be permitted.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param currentDomains the ProtectionDomains associated with the
|
||||
* current execution Thread, up to the most recent
|
||||
* privileged {@code ProtectionDomain}.
|
||||
@ -141,15 +135,15 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
|
||||
* with the most recently executing {@code ProtectionDomain}
|
||||
* residing at the beginning of the array. This parameter may
|
||||
* be {@code null} if the current execution Thread
|
||||
* has no associated ProtectionDomains.<p>
|
||||
* has no associated ProtectionDomains.
|
||||
*
|
||||
* @param assignedDomains the ProtectionDomains inherited from the
|
||||
* parent Thread, or the ProtectionDomains from the
|
||||
* privileged <i>context</i>, if a call to
|
||||
* AccessController.doPrivileged(..., <i>context</i>)
|
||||
* privileged {@code context}, if a call to
|
||||
* {@code AccessController.doPrivileged(..., context)}
|
||||
* had occurred This parameter may be {@code null}
|
||||
* if there were no ProtectionDomains inherited from the
|
||||
* parent Thread, or from the privileged <i>context</i>.
|
||||
* parent Thread, or from the privileged {@code context}.
|
||||
*
|
||||
* @return a new array consisting of the updated ProtectionDomains,
|
||||
* or {@code null}.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -139,7 +139,7 @@ public interface CallbackHandler {
|
||||
* by an underlying security service which contains
|
||||
* the information requested to be retrieved or displayed.
|
||||
*
|
||||
* @exception java.io.IOException if an input or output error occurs. <p>
|
||||
* @exception java.io.IOException if an input or output error occurs.
|
||||
*
|
||||
* @exception UnsupportedCallbackException if the implementation of this
|
||||
* method does not support one or more of the Callbacks
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -70,16 +70,15 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
* a list of choices, a default choice, and a boolean specifying
|
||||
* whether or not multiple selections from the list of choices are allowed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to describe the list of choices. <p>
|
||||
* @param prompt the prompt used to describe the list of choices.
|
||||
*
|
||||
* @param choices the list of choices. <p>
|
||||
* @param choices the list of choices.
|
||||
*
|
||||
* @param defaultChoice the choice to be used as the default choice
|
||||
* when the list of choices are displayed. This value
|
||||
* is represented as an index into the
|
||||
* {@code choices} array. <p>
|
||||
* {@code choices} array.
|
||||
*
|
||||
* @param multipleSelectionsAllowed boolean specifying whether or
|
||||
* not multiple selections can be made from the
|
||||
@ -117,8 +116,6 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the prompt.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the prompt.
|
||||
*/
|
||||
public String getPrompt() {
|
||||
@ -128,8 +125,6 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the list of choices.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the list of choices.
|
||||
*/
|
||||
public String[] getChoices() {
|
||||
@ -139,8 +134,6 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the defaultChoice.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the defaultChoice, represented as an index into
|
||||
* the {@code choices} list.
|
||||
*/
|
||||
@ -152,8 +145,6 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
* Get the boolean determining whether multiple selections from
|
||||
* the {@code choices} list are allowed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return whether multiple selections are allowed.
|
||||
*/
|
||||
public boolean allowMultipleSelections() {
|
||||
@ -163,8 +154,6 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Set the selected choice.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param selection the selection represented as an index into the
|
||||
* {@code choices} list.
|
||||
*
|
||||
@ -178,8 +167,6 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Set the selected choices.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param selections the selections represented as indexes into the
|
||||
* {@code choices} list.
|
||||
*
|
||||
@ -198,8 +185,6 @@ public class ChoiceCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the selected choices.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the selected choices, represented as indexes into the
|
||||
* {@code choices} list.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -159,14 +159,12 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
* they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL
|
||||
* confirmation.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param messageType the message type ({@code INFORMATION},
|
||||
* {@code WARNING} or {@code ERROR}). <p>
|
||||
* {@code WARNING} or {@code ERROR}).
|
||||
*
|
||||
* @param optionType the option type ({@code YES_NO_OPTION},
|
||||
* {@code YES_NO_CANCEL_OPTION} or
|
||||
* {@code OK_CANCEL_OPTION}). <p>
|
||||
* {@code OK_CANCEL_OPTION}).
|
||||
*
|
||||
* @param defaultOption the default option
|
||||
* from the provided optionType ({@code YES},
|
||||
@ -222,12 +220,10 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
* and are displayed by the {@code CallbackHandler} implementation
|
||||
* in a manner consistent with the way preset options are displayed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param messageType the message type ({@code INFORMATION},
|
||||
* {@code WARNING} or {@code ERROR}). <p>
|
||||
* {@code WARNING} or {@code ERROR}).
|
||||
*
|
||||
* @param options the list of confirmation options. <p>
|
||||
* @param options the list of confirmation options.
|
||||
*
|
||||
* @param defaultOption the default option, represented as an index
|
||||
* into the {@code options} array.
|
||||
@ -268,16 +264,14 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
* they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL
|
||||
* confirmation.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to describe the list of options. <p>
|
||||
* @param prompt the prompt used to describe the list of options.
|
||||
*
|
||||
* @param messageType the message type ({@code INFORMATION},
|
||||
* {@code WARNING} or {@code ERROR}). <p>
|
||||
* {@code WARNING} or {@code ERROR}).
|
||||
*
|
||||
* @param optionType the option type ({@code YES_NO_OPTION},
|
||||
* {@code YES_NO_CANCEL_OPTION} or
|
||||
* {@code OK_CANCEL_OPTION}). <p>
|
||||
* {@code OK_CANCEL_OPTION}).
|
||||
*
|
||||
* @param defaultOption the default option
|
||||
* from the provided optionType ({@code YES},
|
||||
@ -337,14 +331,12 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
* and are displayed by the {@code CallbackHandler} implementation
|
||||
* in a manner consistent with the way preset options are displayed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to describe the list of options. <p>
|
||||
* @param prompt the prompt used to describe the list of options.
|
||||
*
|
||||
* @param messageType the message type ({@code INFORMATION},
|
||||
* {@code WARNING} or {@code ERROR}). <p>
|
||||
* {@code WARNING} or {@code ERROR}).
|
||||
*
|
||||
* @param options the list of confirmation options. <p>
|
||||
* @param options the list of confirmation options.
|
||||
*
|
||||
* @param defaultOption the default option, represented as an index
|
||||
* into the {@code options} array.
|
||||
@ -384,8 +376,6 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the prompt.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the prompt, or null if this {@code ConfirmationCallback}
|
||||
* was instantiated without a {@code prompt}.
|
||||
*/
|
||||
@ -396,8 +386,6 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the message type.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the message type ({@code INFORMATION},
|
||||
* {@code WARNING} or {@code ERROR}).
|
||||
*/
|
||||
@ -414,8 +402,6 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
* In this case, invoke the {@code getOptions} method
|
||||
* to determine which confirmation options to display.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the option type ({@code YES_NO_OPTION},
|
||||
* {@code YES_NO_CANCEL_OPTION} or
|
||||
* {@code OK_CANCEL_OPTION}), or
|
||||
@ -430,8 +416,6 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the confirmation options.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the list of confirmation options, or null if this
|
||||
* {@code ConfirmationCallback} was instantiated with
|
||||
* an {@code optionType} instead of {@code options}.
|
||||
@ -443,8 +427,6 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the default option.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the default option, represented as
|
||||
* {@code YES}, {@code NO}, {@code OK} or
|
||||
* {@code CANCEL} if an {@code optionType}
|
||||
@ -462,8 +444,6 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Set the selected confirmation option.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param selection the selection represented as {@code YES},
|
||||
* {@code NO}, {@code OK} or {@code CANCEL}
|
||||
* if an {@code optionType} was specified to the constructor
|
||||
@ -481,8 +461,6 @@ public class ConfirmationCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the selected confirmation option.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the selected confirmation option represented as
|
||||
* {@code YES}, {@code NO}, {@code OK} or
|
||||
* {@code CANCEL} if an {@code optionType}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -53,8 +53,6 @@ public class LanguageCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Set the retrieved {@code Locale}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param locale the retrieved {@code Locale}.
|
||||
*
|
||||
* @see #getLocale
|
||||
@ -66,8 +64,6 @@ public class LanguageCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the retrieved {@code Locale}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the retrieved {@code Locale}, or null
|
||||
* if no {@code Locale} could be retrieved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,8 +55,6 @@ public class NameCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Construct a {@code NameCallback} with a prompt.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to request the name.
|
||||
*
|
||||
* @exception IllegalArgumentException if {@code prompt} is null
|
||||
@ -72,9 +70,7 @@ public class NameCallback implements Callback, java.io.Serializable {
|
||||
* Construct a {@code NameCallback} with a prompt
|
||||
* and default name.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to request the information. <p>
|
||||
* @param prompt the prompt used to request the information.
|
||||
*
|
||||
* @param defaultName the name to be used as the default name displayed
|
||||
* with the prompt.
|
||||
@ -96,8 +92,6 @@ public class NameCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the prompt.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the prompt.
|
||||
*/
|
||||
public String getPrompt() {
|
||||
@ -107,8 +101,6 @@ public class NameCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the default name.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the default name, or null if this {@code NameCallback}
|
||||
* was not instantiated with a {@code defaultName}.
|
||||
*/
|
||||
@ -119,8 +111,6 @@ public class NameCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Set the retrieved name.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the retrieved name (which may be null).
|
||||
*
|
||||
* @see #getName
|
||||
@ -132,8 +122,6 @@ public class NameCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the retrieved name.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the retrieved name (which may be null)
|
||||
*
|
||||
* @see #setName
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,9 +57,7 @@ public class PasswordCallback implements Callback, java.io.Serializable {
|
||||
* and a boolean specifying whether the password should be displayed
|
||||
* as it is being typed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to request the password. <p>
|
||||
* @param prompt the prompt used to request the password.
|
||||
*
|
||||
* @param echoOn true if the password should be displayed
|
||||
* as it is being typed.
|
||||
@ -78,8 +76,6 @@ public class PasswordCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the prompt.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the prompt.
|
||||
*/
|
||||
public String getPrompt() {
|
||||
@ -90,8 +86,6 @@ public class PasswordCallback implements Callback, java.io.Serializable {
|
||||
* Return whether the password
|
||||
* should be displayed as it is being typed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the whether the password
|
||||
* should be displayed as it is being typed.
|
||||
*/
|
||||
@ -102,11 +96,9 @@ public class PasswordCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Set the retrieved password.
|
||||
*
|
||||
* <p> This method makes a copy of the input <i>password</i>
|
||||
* <p> This method makes a copy of the input {@code password}
|
||||
* before storing it.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param password the retrieved password, which may be null.
|
||||
*
|
||||
* @see #getPassword
|
||||
@ -120,8 +112,6 @@ public class PasswordCallback implements Callback, java.io.Serializable {
|
||||
*
|
||||
* <p> This method returns a copy of the retrieved password.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the retrieved password, which may be null.
|
||||
*
|
||||
* @see #setPassword
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,8 +56,6 @@ public class TextInputCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Construct a {@code TextInputCallback} with a prompt.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to request the information.
|
||||
*
|
||||
* @exception IllegalArgumentException if {@code prompt} is null
|
||||
@ -73,9 +71,7 @@ public class TextInputCallback implements Callback, java.io.Serializable {
|
||||
* Construct a {@code TextInputCallback} with a prompt
|
||||
* and default input value.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param prompt the prompt used to request the information. <p>
|
||||
* @param prompt the prompt used to request the information.
|
||||
*
|
||||
* @param defaultText the text to be used as the default text displayed
|
||||
* with the prompt.
|
||||
@ -97,8 +93,6 @@ public class TextInputCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the prompt.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the prompt.
|
||||
*/
|
||||
public String getPrompt() {
|
||||
@ -108,8 +102,6 @@ public class TextInputCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the default text.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the default text, or null if this {@code TextInputCallback}
|
||||
* was not instantiated with {@code defaultText}.
|
||||
*/
|
||||
@ -120,8 +112,6 @@ public class TextInputCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Set the retrieved text.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param text the retrieved text, which may be null.
|
||||
*
|
||||
* @see #getText
|
||||
@ -133,8 +123,6 @@ public class TextInputCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the retrieved text.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the retrieved text, which may be null.
|
||||
*
|
||||
* @see #setText
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -59,12 +59,10 @@ public class TextOutputCallback implements Callback, java.io.Serializable {
|
||||
* Construct a TextOutputCallback with a message type and message
|
||||
* to be displayed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param messageType the message type ({@code INFORMATION},
|
||||
* {@code WARNING} or {@code ERROR}). <p>
|
||||
* {@code WARNING} or {@code ERROR}).
|
||||
*
|
||||
* @param message the message to be displayed. <p>
|
||||
* @param message the message to be displayed.
|
||||
*
|
||||
* @exception IllegalArgumentException if {@code messageType}
|
||||
* is not either {@code INFORMATION},
|
||||
@ -85,8 +83,6 @@ public class TextOutputCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the message type.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the message type ({@code INFORMATION},
|
||||
* {@code WARNING} or {@code ERROR}).
|
||||
*/
|
||||
@ -97,8 +93,6 @@ public class TextOutputCallback implements Callback, java.io.Serializable {
|
||||
/**
|
||||
* Get the message to be displayed.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the message to be displayed.
|
||||
*/
|
||||
public String getMessage() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,8 +43,6 @@ public class UnsupportedCallbackException extends Exception {
|
||||
* Constructs a {@code UnsupportedCallbackException}
|
||||
* with no detail message.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param callback the unrecognized {@code Callback}.
|
||||
*/
|
||||
public UnsupportedCallbackException(Callback callback) {
|
||||
@ -57,9 +55,7 @@ public class UnsupportedCallbackException extends Exception {
|
||||
* message. A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param callback the unrecognized {@code Callback}. <p>
|
||||
* @param callback the unrecognized {@code Callback}.
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
@ -71,8 +67,6 @@ public class UnsupportedCallbackException extends Exception {
|
||||
/**
|
||||
* Get the unrecognized {@code Callback}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the unrecognized {@code Callback}.
|
||||
*/
|
||||
public Callback getCallback() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,8 +47,6 @@ public class AccountException extends LoginException {
|
||||
* A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public AccountException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -53,8 +53,6 @@ public class AccountExpiredException extends AccountException {
|
||||
* message. A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public AccountExpiredException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,8 +51,6 @@ public class AccountLockedException extends AccountException {
|
||||
* detail message. A detail message is a String that describes
|
||||
* this particular exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public AccountLockedException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,8 +50,6 @@ public class AccountNotFoundException extends AccountException {
|
||||
* detail message. A detail message is a String that describes
|
||||
* this particular exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public AccountNotFoundException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,10 +57,10 @@ public class AppConfigurationEntry {
|
||||
*
|
||||
* @param loginModuleName String representing the class name of the
|
||||
* {@code LoginModule} configured for the
|
||||
* specified application. <p>
|
||||
* specified application.
|
||||
*
|
||||
* @param controlFlag either REQUIRED, REQUISITE, SUFFICIENT,
|
||||
* or OPTIONAL. <p>
|
||||
* or OPTIONAL.
|
||||
*
|
||||
* @param options the options configured for this {@code LoginModule}.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -209,8 +209,6 @@ public abstract class Configuration {
|
||||
/**
|
||||
* Get the installed login Configuration.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the login Configuration. If a Configuration object was set
|
||||
* via the {@code Configuration.setConfiguration} method,
|
||||
* then that object is returned. Otherwise, a default
|
||||
@ -287,8 +285,6 @@ public abstract class Configuration {
|
||||
/**
|
||||
* Set the login {@code Configuration}.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param configuration the new {@code Configuration}
|
||||
*
|
||||
* @exception SecurityException if the current thread does not have
|
||||
@ -546,16 +542,14 @@ public abstract class Configuration {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the AppConfigurationEntries for the specified <i>name</i>
|
||||
* Retrieve the AppConfigurationEntries for the specified {@code name}
|
||||
* from this Configuration.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the name used to index the Configuration.
|
||||
*
|
||||
* @return an array of AppConfigurationEntries for the specified <i>name</i>
|
||||
* @return an array of AppConfigurationEntries for the specified {@code name}
|
||||
* from this Configuration, or null if there are no entries
|
||||
* for the specified <i>name</i>
|
||||
* for the specified {@code name}
|
||||
*/
|
||||
public abstract AppConfigurationEntry[] getAppConfigurationEntry
|
||||
(String name);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,14 +44,12 @@ package javax.security.auth.login;
|
||||
|
||||
public abstract class ConfigurationSpi {
|
||||
/**
|
||||
* Retrieve the AppConfigurationEntries for the specified <i>name</i>.
|
||||
*
|
||||
* <p>
|
||||
* Retrieve the AppConfigurationEntries for the specified {@code name}.
|
||||
*
|
||||
* @param name the name used to index the Configuration.
|
||||
*
|
||||
* @return an array of AppConfigurationEntries for the specified
|
||||
* <i>name</i>, or null if there are no entries.
|
||||
* {@code name}, or null if there are no entries.
|
||||
*/
|
||||
protected abstract AppConfigurationEntry[] engineGetAppConfigurationEntry
|
||||
(String name);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,8 +47,6 @@ public class CredentialException extends LoginException {
|
||||
* A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public CredentialException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,8 +55,6 @@ public class CredentialExpiredException extends CredentialException {
|
||||
* message. A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public CredentialExpiredException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,8 +50,6 @@ public class CredentialNotFoundException extends CredentialException {
|
||||
* detail message. A detail message is a String that describes
|
||||
* this particular exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public CredentialNotFoundException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,8 +50,6 @@ public class FailedLoginException extends LoginException {
|
||||
* message. A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public FailedLoginException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -108,7 +108,6 @@ import sun.security.util.ResourcesMgr;
|
||||
*
|
||||
* <li> If the constructor does <b>not</b> have a Subject
|
||||
* input parameter, the LoginContext instantiates a new Subject.
|
||||
* <p>
|
||||
* </ul>
|
||||
*
|
||||
* <li> {@code Configuration}
|
||||
@ -150,7 +149,6 @@ import sun.security.util.ResourcesMgr;
|
||||
* This means the caller context (stored when the LoginContext was created)
|
||||
* must have sufficient permissions to perform any security-sensitive tasks
|
||||
* that the modules may perform.
|
||||
* <p>
|
||||
* </ul>
|
||||
*
|
||||
* <li> {@code CallbackHandler}
|
||||
@ -332,15 +330,15 @@ public class LoginContext {
|
||||
* @exception LoginException if the caller-specified {@code name}
|
||||
* does not appear in the {@code Configuration}
|
||||
* and there is no {@code Configuration} entry
|
||||
* for "<i>other</i>", or if the
|
||||
* <i>auth.login.defaultCallbackHandler</i>
|
||||
* for "{@code other}", or if the
|
||||
* {@code auth.login.defaultCallbackHandler}
|
||||
* security property was set, but the implementation
|
||||
* class could not be loaded.
|
||||
* <p>
|
||||
*
|
||||
* @exception SecurityException if a SecurityManager is set and
|
||||
* the caller does not have
|
||||
* AuthPermission("createLoginContext.<i>name</i>"),
|
||||
* or if a configuration entry for <i>name</i> does not exist and
|
||||
* or if a configuration entry for {@code name} does not exist and
|
||||
* the caller does not additionally have
|
||||
* AuthPermission("createLoginContext.other")
|
||||
*/
|
||||
@ -353,10 +351,8 @@ public class LoginContext {
|
||||
* Instantiate a new {@code LoginContext} object with a name
|
||||
* and a {@code Subject} object.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the name used as the index into the
|
||||
* {@code Configuration}. <p>
|
||||
* {@code Configuration}.
|
||||
*
|
||||
* @param subject the {@code Subject} to authenticate.
|
||||
*
|
||||
@ -368,7 +364,7 @@ public class LoginContext {
|
||||
* <i>auth.login.defaultCallbackHandler</i>
|
||||
* security property was set, but the implementation
|
||||
* class could not be loaded.
|
||||
* <p>
|
||||
*
|
||||
* @exception SecurityException if a SecurityManager is set and
|
||||
* the caller does not have
|
||||
* AuthPermission("createLoginContext.<i>name</i>"),
|
||||
@ -391,10 +387,8 @@ public class LoginContext {
|
||||
* Instantiate a new {@code LoginContext} object with a name
|
||||
* and a {@code CallbackHandler} object.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the name used as the index into the
|
||||
* {@code Configuration}. <p>
|
||||
* {@code Configuration}.
|
||||
*
|
||||
* @param callbackHandler the {@code CallbackHandler} object used by
|
||||
* LoginModules to communicate with the user.
|
||||
@ -402,9 +396,9 @@ public class LoginContext {
|
||||
* @exception LoginException if the caller-specified {@code name}
|
||||
* does not appear in the {@code Configuration}
|
||||
* and there is no {@code Configuration} entry
|
||||
* for "<i>other</i>", or if the caller-specified
|
||||
* for "{@code other}", or if the caller-specified
|
||||
* {@code callbackHandler} is {@code null}.
|
||||
* <p>
|
||||
*
|
||||
* @exception SecurityException if a SecurityManager is set and
|
||||
* the caller does not have
|
||||
* AuthPermission("createLoginContext.<i>name</i>"),
|
||||
@ -428,12 +422,10 @@ public class LoginContext {
|
||||
* a {@code Subject} to be authenticated, and a
|
||||
* {@code CallbackHandler} object.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param name the name used as the index into the
|
||||
* {@code Configuration}. <p>
|
||||
* {@code Configuration}.
|
||||
*
|
||||
* @param subject the {@code Subject} to authenticate. <p>
|
||||
* @param subject the {@code Subject} to authenticate.
|
||||
*
|
||||
* @param callbackHandler the {@code CallbackHandler} object used by
|
||||
* LoginModules to communicate with the user.
|
||||
@ -445,7 +437,7 @@ public class LoginContext {
|
||||
* {@code subject} is {@code null},
|
||||
* or if the caller-specified
|
||||
* {@code callbackHandler} is {@code null}.
|
||||
* <p>
|
||||
*
|
||||
* @exception SecurityException if a SecurityManager is set and
|
||||
* the caller does not have
|
||||
* AuthPermission("createLoginContext.<i>name</i>"),
|
||||
@ -467,20 +459,16 @@ public class LoginContext {
|
||||
/**
|
||||
* Instantiate a new {@code LoginContext} object with a name,
|
||||
* a {@code Subject} to be authenticated,
|
||||
* a {@code CallbackHandler} object, and a login
|
||||
* {@code Configuration}.
|
||||
*
|
||||
* <p>
|
||||
* a {@code CallbackHandler} object, and a login {@code Configuration}.
|
||||
*
|
||||
* @param name the name used as the index into the caller-specified
|
||||
* {@code Configuration}. <p>
|
||||
* {@code Configuration}.
|
||||
*
|
||||
* @param subject the {@code Subject} to authenticate,
|
||||
* or {@code null}. <p>
|
||||
* or {@code null}.
|
||||
*
|
||||
* @param callbackHandler the {@code CallbackHandler} object used by
|
||||
* LoginModules to communicate with the user, or {@code null}.
|
||||
* <p>
|
||||
*
|
||||
* @param config the {@code Configuration} that lists the
|
||||
* login modules to be called to perform the authentication,
|
||||
@ -490,7 +478,7 @@ public class LoginContext {
|
||||
* does not appear in the {@code Configuration}
|
||||
* and there is no {@code Configuration} entry
|
||||
* for "<i>other</i>".
|
||||
* <p>
|
||||
*
|
||||
* @exception SecurityException if a SecurityManager is set,
|
||||
* <i>config</i> is {@code null},
|
||||
* and either the caller does not have
|
||||
@ -570,8 +558,6 @@ public class LoginContext {
|
||||
* {@code abort} phase. This guarantees that proper cleanup
|
||||
* and state restoration can take place.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception LoginException if the authentication fails.
|
||||
*/
|
||||
public void login() throws LoginException {
|
||||
@ -614,8 +600,6 @@ public class LoginContext {
|
||||
* ignored for this method. This guarantees that proper cleanup
|
||||
* and state restoration can take place.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception LoginException if the logout fails.
|
||||
*/
|
||||
public void logout() throws LoginException {
|
||||
@ -631,8 +615,6 @@ public class LoginContext {
|
||||
/**
|
||||
* Return the authenticated Subject.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @return the authenticated Subject. If the caller specified a
|
||||
* Subject to this LoginContext's constructor,
|
||||
* this method returns the caller-specified Subject.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -48,8 +48,6 @@ public class LoginException extends java.security.GeneralSecurityException {
|
||||
* A detail message is a String that describes this particular
|
||||
* exception.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param msg the detail message.
|
||||
*/
|
||||
public LoginException(String msg) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -139,15 +139,13 @@ public interface LoginModule {
|
||||
* any of the data stored in {@code sharedState} or
|
||||
* {@code options} parameters, they can be ignored.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @param subject the {@code Subject} to be authenticated. <p>
|
||||
* @param subject the {@code Subject} to be authenticated.
|
||||
*
|
||||
* @param callbackHandler a {@code CallbackHandler} for communicating
|
||||
* with the end user (prompting for usernames and
|
||||
* passwords, for example). <p>
|
||||
* passwords, for example).
|
||||
*
|
||||
* @param sharedState state shared with other configured LoginModules. <p>
|
||||
* @param sharedState state shared with other configured LoginModules.
|
||||
*
|
||||
* @param options options specified in the login
|
||||
* {@code Configuration} for this particular
|
||||
@ -167,8 +165,6 @@ public interface LoginModule {
|
||||
* This method saves the result of the authentication attempt
|
||||
* as private state within the LoginModule.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception LoginException if the authentication fails
|
||||
*
|
||||
* @return true if the authentication succeeded, or false if this
|
||||
@ -192,8 +188,6 @@ public interface LoginModule {
|
||||
* authentication attempted failed, then this method removes/destroys
|
||||
* any state that was originally saved.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception LoginException if the commit fails
|
||||
*
|
||||
* @return true if this method succeeded, or false if this
|
||||
@ -214,8 +208,6 @@ public interface LoginModule {
|
||||
* {@code login} method), then this method cleans up any state
|
||||
* that was originally saved.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception LoginException if the abort fails
|
||||
*
|
||||
* @return true if this method succeeded, or false if this
|
||||
@ -229,8 +221,6 @@ public interface LoginModule {
|
||||
* <p>An implementation of this method might remove/destroy a Subject's
|
||||
* Principals and Credentials.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @exception LoginException if the logout fails
|
||||
*
|
||||
* @return true if this method succeeded, or false if this
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -45,7 +45,7 @@ public final class X500PrivateCredential implements Destroyable {
|
||||
/**
|
||||
* Creates an X500PrivateCredential that associates an X.509 certificate,
|
||||
* a private key and the KeyStore alias.
|
||||
* <p>
|
||||
*
|
||||
* @param cert X509Certificate
|
||||
* @param key PrivateKey for the certificate
|
||||
* @exception IllegalArgumentException if either {@code cert} or
|
||||
@ -64,7 +64,7 @@ public final class X500PrivateCredential implements Destroyable {
|
||||
/**
|
||||
* Creates an X500PrivateCredential that associates an X.509 certificate,
|
||||
* a private key and the KeyStore alias.
|
||||
* <p>
|
||||
*
|
||||
* @param cert X509Certificate
|
||||
* @param key PrivateKey for the certificate
|
||||
* @param alias KeyStore alias
|
||||
@ -83,7 +83,7 @@ public final class X500PrivateCredential implements Destroyable {
|
||||
|
||||
/**
|
||||
* Returns the X.509 certificate.
|
||||
* <p>
|
||||
*
|
||||
* @return the X509Certificate
|
||||
*/
|
||||
|
||||
@ -93,7 +93,7 @@ public final class X500PrivateCredential implements Destroyable {
|
||||
|
||||
/**
|
||||
* Returns the PrivateKey.
|
||||
* <p>
|
||||
*
|
||||
* @return the PrivateKey
|
||||
*/
|
||||
public PrivateKey getPrivateKey() {
|
||||
@ -102,7 +102,7 @@ public final class X500PrivateCredential implements Destroyable {
|
||||
|
||||
/**
|
||||
* Returns the KeyStore alias.
|
||||
* <p>
|
||||
*
|
||||
* @return the KeyStore alias
|
||||
*/
|
||||
|
||||
@ -124,7 +124,7 @@ public final class X500PrivateCredential implements Destroyable {
|
||||
/**
|
||||
* Determines if the references to the X.509 certificate and private key
|
||||
* in this object have been cleared.
|
||||
* <p>
|
||||
*
|
||||
* @return true if X509Certificate and the PrivateKey are null
|
||||
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -670,6 +670,38 @@ public final class OCSPResponse {
|
||||
return signerCert; // set in verify()
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a String-Extension map from DER encoded data.
|
||||
* @param derVal A {@code DerValue} object built from a SEQUENCE of
|
||||
* extensions
|
||||
*
|
||||
* @return A {@code Map} using the OID in string form as the keys. If no
|
||||
* extensions are found or an empty SEQUENCE is passed in, then
|
||||
* an empty {@code Map} will be returned.
|
||||
*
|
||||
* @throws IOException if any decoding errors occur.
|
||||
*/
|
||||
private static Map<String, java.security.cert.Extension>
|
||||
parseExtensions(DerValue derVal) throws IOException {
|
||||
DerValue[] extDer = derVal.data.getSequence(3);
|
||||
Map<String, java.security.cert.Extension> extMap =
|
||||
new HashMap<>(extDer.length);
|
||||
|
||||
for (DerValue extDerVal : extDer) {
|
||||
Extension ext = new Extension(extDerVal);
|
||||
// We don't support any extensions yet. Therefore, if it
|
||||
// is critical we must throw an exception because we
|
||||
// don't know how to process it.
|
||||
if (ext.isCritical()) {
|
||||
throw new IOException("Unsupported OCSP critical extension: " +
|
||||
ext.getExtensionId());
|
||||
}
|
||||
extMap.put(ext.getId(), ext);
|
||||
}
|
||||
|
||||
return extMap;
|
||||
}
|
||||
|
||||
/*
|
||||
* A class representing a single OCSP response.
|
||||
*/
|
||||
@ -718,7 +750,7 @@ public final class OCSPResponse {
|
||||
}
|
||||
} else {
|
||||
revocationTime = null;
|
||||
revocationReason = CRLReason.UNSPECIFIED;
|
||||
revocationReason = null;
|
||||
if (tag == CERT_STATUS_GOOD) {
|
||||
certStatus = CertStatus.GOOD;
|
||||
} else if (tag == CERT_STATUS_UNKNOWN) {
|
||||
@ -729,55 +761,59 @@ public final class OCSPResponse {
|
||||
}
|
||||
|
||||
thisUpdate = tmp.getGeneralizedTime();
|
||||
|
||||
if (tmp.available() == 0) {
|
||||
// we are done
|
||||
nextUpdate = null;
|
||||
} else {
|
||||
derVal = tmp.getDerValue();
|
||||
tag = (byte)(derVal.tag & 0x1f);
|
||||
if (tag == 0) {
|
||||
// next update
|
||||
nextUpdate = derVal.data.getGeneralizedTime();
|
||||
|
||||
if (tmp.available() == 0) {
|
||||
// we are done
|
||||
} else {
|
||||
derVal = tmp.getDerValue();
|
||||
tag = (byte)(derVal.tag & 0x1f);
|
||||
}
|
||||
} else {
|
||||
nextUpdate = null;
|
||||
}
|
||||
if (debug != null) {
|
||||
debug.println("thisUpdate: " + thisUpdate);
|
||||
}
|
||||
// singleExtensions
|
||||
|
||||
// Parse optional fields like nextUpdate and singleExtensions
|
||||
Date tmpNextUpdate = null;
|
||||
Map<String, java.security.cert.Extension> tmpMap = null;
|
||||
|
||||
// Check for the first optional item, it could be nextUpdate
|
||||
// [CONTEXT 0] or singleExtensions [CONTEXT 1]
|
||||
if (tmp.available() > 0) {
|
||||
derVal = tmp.getDerValue();
|
||||
if (derVal.isContextSpecific((byte)1)) {
|
||||
DerValue[] singleExtDer = derVal.data.getSequence(3);
|
||||
singleExtensions =
|
||||
new HashMap<String, java.security.cert.Extension>
|
||||
(singleExtDer.length);
|
||||
for (int i = 0; i < singleExtDer.length; i++) {
|
||||
Extension ext = new Extension(singleExtDer[i]);
|
||||
if (debug != null) {
|
||||
debug.println("OCSP single extension: " + ext);
|
||||
}
|
||||
// We don't support any extensions yet. Therefore, if it
|
||||
// is critical we must throw an exception because we
|
||||
// don't know how to process it.
|
||||
if (ext.isCritical()) {
|
||||
throw new IOException(
|
||||
"Unsupported OCSP critical extension: " +
|
||||
ext.getExtensionId());
|
||||
}
|
||||
singleExtensions.put(ext.getId(), ext);
|
||||
|
||||
// nextUpdate processing
|
||||
if (derVal.isContextSpecific((byte)0)) {
|
||||
tmpNextUpdate = derVal.data.getGeneralizedTime();
|
||||
if (debug != null) {
|
||||
debug.println("nextUpdate: " + tmpNextUpdate);
|
||||
}
|
||||
} else {
|
||||
singleExtensions = Collections.emptyMap();
|
||||
|
||||
// If more data exists in the singleResponse, it
|
||||
// can only be singleExtensions. Get this DER value
|
||||
// for processing in the next block
|
||||
derVal = tmp.available() > 0 ? tmp.getDerValue() : null;
|
||||
}
|
||||
|
||||
// singleExtensions processing
|
||||
if (derVal != null) {
|
||||
if (derVal.isContextSpecific((byte)1)) {
|
||||
tmpMap = parseExtensions(derVal);
|
||||
|
||||
// There should not be any other items in the
|
||||
// singleResponse at this point.
|
||||
if (tmp.available() > 0) {
|
||||
throw new IOException(tmp.available() +
|
||||
" bytes of additional data in singleResponse");
|
||||
}
|
||||
} else {
|
||||
// Unknown item in the singleResponse
|
||||
throw new IOException("Unsupported singleResponse " +
|
||||
"item, tag = " + String.format("%02X", derVal.tag));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nextUpdate = tmpNextUpdate;
|
||||
singleExtensions = (tmpMap != null) ? tmpMap :
|
||||
Collections.emptyMap();
|
||||
if (debug != null) {
|
||||
for (java.security.cert.Extension ext :
|
||||
singleExtensions.values()) {
|
||||
debug.println("singleExtension: " + ext);
|
||||
}
|
||||
} else {
|
||||
singleExtensions = Collections.emptyMap();
|
||||
}
|
||||
}
|
||||
|
||||
@ -793,7 +829,8 @@ public final class OCSPResponse {
|
||||
}
|
||||
|
||||
@Override public Date getRevocationTime() {
|
||||
return (Date) revocationTime.clone();
|
||||
return (revocationTime != null ? (Date) revocationTime.clone() :
|
||||
null);
|
||||
}
|
||||
|
||||
@Override public CRLReason getRevocationReason() {
|
||||
@ -821,6 +858,9 @@ public final class OCSPResponse {
|
||||
if (nextUpdate != null) {
|
||||
sb.append("nextUpdate is " + nextUpdate + "\n");
|
||||
}
|
||||
for (java.security.cert.Extension ext : singleExtensions.values()) {
|
||||
sb.append("singleExtension: " + ext + "\n");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -257,7 +257,7 @@ final class CipherBox {
|
||||
throw new NoSuchAlgorithmException("Unsupported cipher " + cipher);
|
||||
}
|
||||
|
||||
if (cipher == B_NULL) {
|
||||
if (cipher == BulkCipher.B_NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
return new CipherBox(version, cipher, key, iv, random, encrypt);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,6 +41,8 @@ import javax.crypto.spec.SecretKeySpec;
|
||||
import static sun.security.ssl.CipherSuite.KeyExchange.*;
|
||||
import static sun.security.ssl.CipherSuite.PRF.*;
|
||||
import static sun.security.ssl.CipherSuite.CipherType.*;
|
||||
import static sun.security.ssl.CipherSuite.MacAlg.*;
|
||||
import static sun.security.ssl.CipherSuite.BulkCipher.*;
|
||||
import static sun.security.ssl.JsseJce.*;
|
||||
|
||||
/**
|
||||
@ -129,33 +131,15 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
* Constructor for implemented CipherSuites.
|
||||
*/
|
||||
private CipherSuite(String name, int id, int priority,
|
||||
KeyExchange keyExchange, BulkCipher cipher,
|
||||
KeyExchange keyExchange, BulkCipher cipher, MacAlg mac,
|
||||
boolean allowed, int obsoleted, int supported, PRF prfAlg) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
this.priority = priority;
|
||||
this.keyExchange = keyExchange;
|
||||
this.cipher = cipher;
|
||||
this.macAlg = mac;
|
||||
this.exportable = cipher.exportable;
|
||||
if (cipher.cipherType == CipherType.AEAD_CIPHER) {
|
||||
macAlg = M_NULL;
|
||||
} else if (name.endsWith("_MD5")) {
|
||||
macAlg = M_MD5;
|
||||
} else if (name.endsWith("_SHA")) {
|
||||
macAlg = M_SHA;
|
||||
} else if (name.endsWith("_SHA256")) {
|
||||
macAlg = M_SHA256;
|
||||
} else if (name.endsWith("_SHA384")) {
|
||||
macAlg = M_SHA384;
|
||||
} else if (name.endsWith("_NULL")) {
|
||||
macAlg = M_NULL;
|
||||
} else if (name.endsWith("_SCSV")) {
|
||||
macAlg = M_NULL;
|
||||
} else {
|
||||
throw new IllegalArgumentException
|
||||
("Unknown MAC algorithm for ciphersuite " + name);
|
||||
}
|
||||
|
||||
allowed &= keyExchange.allowed;
|
||||
allowed &= cipher.allowed;
|
||||
this.allowed = allowed;
|
||||
@ -269,11 +253,11 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
* TLS 1.2+ that doesn't use the "default" PRF.
|
||||
*/
|
||||
private static void add(String name, int id, int priority,
|
||||
KeyExchange keyExchange, BulkCipher cipher,
|
||||
KeyExchange keyExchange, BulkCipher cipher, MacAlg mac,
|
||||
boolean allowed, int obsoleted, int supported, PRF prf) {
|
||||
|
||||
CipherSuite c = new CipherSuite(name, id, priority, keyExchange,
|
||||
cipher, allowed, obsoleted, supported, prf);
|
||||
cipher, mac, allowed, obsoleted, supported, prf);
|
||||
if (idMap.put(id, c) != null) {
|
||||
throw new RuntimeException("Duplicate ciphersuite definition: "
|
||||
+ id + ", " + name);
|
||||
@ -294,16 +278,13 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
* All cipher suites in this document use P_SHA256.
|
||||
*/
|
||||
private static void add(String name, int id, int priority,
|
||||
KeyExchange keyExchange, BulkCipher cipher,
|
||||
KeyExchange keyExchange, BulkCipher cipher, MacAlg mac,
|
||||
boolean allowed, int obsoleted) {
|
||||
// If this is an obsoleted suite, then don't let the TLS 1.2
|
||||
// protocol have a valid PRF value.
|
||||
PRF prf = P_SHA256;
|
||||
if (obsoleted < ProtocolVersion.TLS12.v) {
|
||||
prf = P_NONE;
|
||||
}
|
||||
PRF prf = obsoleted < ProtocolVersion.TLS12.v ? P_NONE : P_SHA256;
|
||||
|
||||
add(name, id, priority, keyExchange, cipher, allowed, obsoleted,
|
||||
add(name, id, priority, keyExchange, cipher, mac, allowed, obsoleted,
|
||||
ProtocolVersion.LIMIT_MIN_VALUE, prf);
|
||||
}
|
||||
|
||||
@ -312,9 +293,10 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
* suites which have not been obsoleted.
|
||||
*/
|
||||
private static void add(String name, int id, int priority,
|
||||
KeyExchange keyExchange, BulkCipher cipher, boolean allowed) {
|
||||
add(name, id, priority, keyExchange,
|
||||
cipher, allowed, ProtocolVersion.LIMIT_MAX_VALUE);
|
||||
KeyExchange keyExchange, BulkCipher cipher, MacAlg mac,
|
||||
boolean allowed) {
|
||||
add(name, id, priority, keyExchange, cipher, mac, allowed,
|
||||
ProtocolVersion.LIMIT_MAX_VALUE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -402,7 +384,23 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
* Also contains a factory method to obtain in initialized CipherBox
|
||||
* for this algorithm.
|
||||
*/
|
||||
final static class BulkCipher {
|
||||
static enum BulkCipher {
|
||||
|
||||
// export strength ciphers
|
||||
B_NULL("NULL", STREAM_CIPHER, 0, 0, 0, 0, true),
|
||||
B_RC4_40(CIPHER_RC4, STREAM_CIPHER, 5, 16, 0, 0, true),
|
||||
B_RC2_40("RC2", BLOCK_CIPHER, 5, 16, 8, 0, false),
|
||||
B_DES_40(CIPHER_DES, BLOCK_CIPHER, 5, 8, 8, 0, true),
|
||||
|
||||
// domestic strength ciphers
|
||||
B_RC4_128(CIPHER_RC4, STREAM_CIPHER, 16, 0, 0, true),
|
||||
B_DES(CIPHER_DES, BLOCK_CIPHER, 8, 8, 0, true),
|
||||
B_3DES(CIPHER_3DES, BLOCK_CIPHER, 24, 8, 0, true),
|
||||
B_IDEA("IDEA", BLOCK_CIPHER, 16, 8, 0, false),
|
||||
B_AES_128(CIPHER_AES, BLOCK_CIPHER, 16, 16, 0, true),
|
||||
B_AES_256(CIPHER_AES, BLOCK_CIPHER, 32, 16, 0, true),
|
||||
B_AES_128_GCM(CIPHER_AES_GCM, AEAD_CIPHER, 16, 12, 4, true),
|
||||
B_AES_256_GCM(CIPHER_AES_GCM, AEAD_CIPHER, 32, 12, 4, true);
|
||||
|
||||
// Map BulkCipher -> Boolean(available)
|
||||
private final static Map<BulkCipher,Boolean> availableCache =
|
||||
@ -600,7 +598,13 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
* Also contains a factory method to obtain an initialized MAC
|
||||
* for this algorithm.
|
||||
*/
|
||||
final static class MacAlg {
|
||||
static enum MacAlg {
|
||||
// MACs
|
||||
M_NULL ("NULL", 0, 0, 0),
|
||||
M_MD5 ("MD5", 16, 64, 9),
|
||||
M_SHA ("SHA", 20, 64, 9),
|
||||
M_SHA256 ("SHA256", 32, 64, 9),
|
||||
M_SHA384 ("SHA384", 48, 128, 17);
|
||||
|
||||
// descriptive name, e.g. MD5
|
||||
final String name;
|
||||
@ -639,41 +643,6 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
}
|
||||
}
|
||||
|
||||
// export strength ciphers
|
||||
final static BulkCipher B_NULL =
|
||||
new BulkCipher("NULL", STREAM_CIPHER, 0, 0, 0, 0, true);
|
||||
final static BulkCipher B_RC4_40 =
|
||||
new BulkCipher(CIPHER_RC4, STREAM_CIPHER, 5, 16, 0, 0, true);
|
||||
final static BulkCipher B_RC2_40 =
|
||||
new BulkCipher("RC2", BLOCK_CIPHER, 5, 16, 8, 0, false);
|
||||
final static BulkCipher B_DES_40 =
|
||||
new BulkCipher(CIPHER_DES, BLOCK_CIPHER, 5, 8, 8, 0, true);
|
||||
|
||||
// domestic strength ciphers
|
||||
final static BulkCipher B_RC4_128 =
|
||||
new BulkCipher(CIPHER_RC4, STREAM_CIPHER, 16, 0, 0, true);
|
||||
final static BulkCipher B_DES =
|
||||
new BulkCipher(CIPHER_DES, BLOCK_CIPHER, 8, 8, 0, true);
|
||||
final static BulkCipher B_3DES =
|
||||
new BulkCipher(CIPHER_3DES, BLOCK_CIPHER, 24, 8, 0, true);
|
||||
final static BulkCipher B_IDEA =
|
||||
new BulkCipher("IDEA", BLOCK_CIPHER, 16, 8, 0, false);
|
||||
final static BulkCipher B_AES_128 =
|
||||
new BulkCipher(CIPHER_AES, BLOCK_CIPHER, 16, 16, 0, true);
|
||||
final static BulkCipher B_AES_256 =
|
||||
new BulkCipher(CIPHER_AES, BLOCK_CIPHER, 32, 16, 0, true);
|
||||
final static BulkCipher B_AES_128_GCM =
|
||||
new BulkCipher(CIPHER_AES_GCM, AEAD_CIPHER, 16, 12, 4, true);
|
||||
final static BulkCipher B_AES_256_GCM =
|
||||
new BulkCipher(CIPHER_AES_GCM, AEAD_CIPHER, 32, 12, 4, true);
|
||||
|
||||
// MACs
|
||||
final static MacAlg M_NULL = new MacAlg("NULL", 0, 0, 0);
|
||||
final static MacAlg M_MD5 = new MacAlg("MD5", 16, 64, 9);
|
||||
final static MacAlg M_SHA = new MacAlg("SHA", 20, 64, 9);
|
||||
final static MacAlg M_SHA256 = new MacAlg("SHA256", 32, 64, 9);
|
||||
final static MacAlg M_SHA384 = new MacAlg("SHA384", 48, 128, 17);
|
||||
|
||||
/**
|
||||
* PRFs (PseudoRandom Function) from TLS specifications.
|
||||
*
|
||||
@ -958,8 +927,8 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
* 0xFF,0x00-FF Reserved for Private Use [RFC5246]
|
||||
*/
|
||||
|
||||
add("SSL_NULL_WITH_NULL_NULL",
|
||||
0x0000, 1, K_NULL, B_NULL, F);
|
||||
add("SSL_NULL_WITH_NULL_NULL", 0x0000,
|
||||
1, K_NULL, B_NULL, M_NULL, F);
|
||||
|
||||
/*
|
||||
* Definition of the CipherSuites that are enabled by default.
|
||||
@ -992,134 +961,134 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
// of RFC 6460. In this section, only two cipher suites are listed
|
||||
// so that applications can make use of Suite-B compliant cipher
|
||||
// suite firstly.
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
|
||||
0xc02c, --p, K_ECDHE_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
|
||||
0xc02b, --p, K_ECDHE_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", 0xc02c, --p,
|
||||
K_ECDHE_ECDSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", 0xc02b, --p,
|
||||
K_ECDHE_ECDSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256);
|
||||
|
||||
// AES_256(GCM)
|
||||
add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
|
||||
0xc030, --p, K_ECDHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384);
|
||||
add("TLS_RSA_WITH_AES_256_GCM_SHA384",
|
||||
0x009d, --p, K_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
|
||||
0xc02e, --p, K_ECDH_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
|
||||
0xc032, --p, K_ECDH_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384);
|
||||
add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
|
||||
0x009f, --p, K_DHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384);
|
||||
add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
|
||||
0x00a3, --p, K_DHE_DSS, B_AES_256_GCM, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", 0xc030, --p,
|
||||
K_ECDHE_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384);
|
||||
add("TLS_RSA_WITH_AES_256_GCM_SHA384", 0x009d, --p,
|
||||
K_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", 0xc02e, --p,
|
||||
K_ECDH_ECDSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", 0xc032, --p,
|
||||
K_ECDH_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384);
|
||||
add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", 0x009f, --p,
|
||||
K_DHE_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384);
|
||||
add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", 0x00a3, --p,
|
||||
K_DHE_DSS, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384);
|
||||
|
||||
// AES_128(GCM)
|
||||
add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||
0xc02f, --p, K_ECDHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256);
|
||||
add("TLS_RSA_WITH_AES_128_GCM_SHA256",
|
||||
0x009c, --p, K_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
|
||||
0xc02d, --p, K_ECDH_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
|
||||
0xc031, --p, K_ECDH_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||
0x009e, --p, K_DHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
|
||||
0x00a2, --p, K_DHE_DSS, B_AES_128_GCM, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", 0xc02f, --p,
|
||||
K_ECDHE_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256);
|
||||
add("TLS_RSA_WITH_AES_128_GCM_SHA256", 0x009c, --p,
|
||||
K_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", 0xc02d, --p,
|
||||
K_ECDH_ECDSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", 0xc031, --p,
|
||||
K_ECDH_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", 0x009e, --p,
|
||||
K_DHE_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", 0x00a2, --p,
|
||||
K_DHE_DSS, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256);
|
||||
|
||||
// AES_256(CBC)
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
|
||||
0xc024, --p, K_ECDHE_ECDSA, B_AES_256, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
|
||||
0xc028, --p, K_ECDHE_RSA, B_AES_256, T, max, tls12, P_SHA384);
|
||||
add("TLS_RSA_WITH_AES_256_CBC_SHA256",
|
||||
0x003d, --p, K_RSA, B_AES_256, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",
|
||||
0xc026, --p, K_ECDH_ECDSA, B_AES_256, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",
|
||||
0xc02a, --p, K_ECDH_RSA, B_AES_256, T, max, tls12, P_SHA384);
|
||||
add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
|
||||
0x006b, --p, K_DHE_RSA, B_AES_256, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
|
||||
0x006a, --p, K_DHE_DSS, B_AES_256, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", 0xc024, --p,
|
||||
K_ECDHE_ECDSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", 0xc028, --p,
|
||||
K_ECDHE_RSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384);
|
||||
add("TLS_RSA_WITH_AES_256_CBC_SHA256", 0x003d, --p,
|
||||
K_RSA, B_AES_256, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", 0xc026, --p,
|
||||
K_ECDH_ECDSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384);
|
||||
add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", 0xc02a, --p,
|
||||
K_ECDH_RSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384);
|
||||
add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", 0x006b, --p,
|
||||
K_DHE_RSA, B_AES_256, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", 0x006a, --p,
|
||||
K_DHE_DSS, B_AES_256, M_SHA256, T, max, tls12, P_SHA256);
|
||||
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
|
||||
0xC00A, --p, K_ECDHE_ECDSA, B_AES_256, T);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
|
||||
0xC014, --p, K_ECDHE_RSA, B_AES_256, T);
|
||||
add("TLS_RSA_WITH_AES_256_CBC_SHA",
|
||||
0x0035, --p, K_RSA, B_AES_256, T);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
|
||||
0xC005, --p, K_ECDH_ECDSA, B_AES_256, T);
|
||||
add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
|
||||
0xC00F, --p, K_ECDH_RSA, B_AES_256, T);
|
||||
add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
|
||||
0x0039, --p, K_DHE_RSA, B_AES_256, T);
|
||||
add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
|
||||
0x0038, --p, K_DHE_DSS, B_AES_256, T);
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", 0xC00A, --p,
|
||||
K_ECDHE_ECDSA, B_AES_256, M_SHA, T);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", 0xC014, --p,
|
||||
K_ECDHE_RSA, B_AES_256, M_SHA, T);
|
||||
add("TLS_RSA_WITH_AES_256_CBC_SHA", 0x0035, --p,
|
||||
K_RSA, B_AES_256, M_SHA, T);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", 0xC005, --p,
|
||||
K_ECDH_ECDSA, B_AES_256, M_SHA, T);
|
||||
add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", 0xC00F, --p,
|
||||
K_ECDH_RSA, B_AES_256, M_SHA, T);
|
||||
add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA", 0x0039, --p,
|
||||
K_DHE_RSA, B_AES_256, M_SHA, T);
|
||||
add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA", 0x0038, --p,
|
||||
K_DHE_DSS, B_AES_256, M_SHA, T);
|
||||
|
||||
// AES_128(CBC)
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
|
||||
0xc023, --p, K_ECDHE_ECDSA, B_AES_128, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
|
||||
0xc027, --p, K_ECDHE_RSA, B_AES_128, T, max, tls12, P_SHA256);
|
||||
add("TLS_RSA_WITH_AES_128_CBC_SHA256",
|
||||
0x003c, --p, K_RSA, B_AES_128, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
|
||||
0xc025, --p, K_ECDH_ECDSA, B_AES_128, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
|
||||
0xc029, --p, K_ECDH_RSA, B_AES_128, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
|
||||
0x0067, --p, K_DHE_RSA, B_AES_128, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
|
||||
0x0040, --p, K_DHE_DSS, B_AES_128, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 0xc023, --p,
|
||||
K_ECDHE_ECDSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", 0xc027, --p,
|
||||
K_ECDHE_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_RSA_WITH_AES_128_CBC_SHA256", 0x003c, --p,
|
||||
K_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", 0xc025, --p,
|
||||
K_ECDH_ECDSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", 0xc029, --p,
|
||||
K_ECDH_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", 0x0067, --p,
|
||||
K_DHE_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256);
|
||||
add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", 0x0040, --p,
|
||||
K_DHE_DSS, B_AES_128, M_SHA256, T, max, tls12, P_SHA256);
|
||||
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
|
||||
0xC009, --p, K_ECDHE_ECDSA, B_AES_128, T);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
|
||||
0xC013, --p, K_ECDHE_RSA, B_AES_128, T);
|
||||
add("TLS_RSA_WITH_AES_128_CBC_SHA",
|
||||
0x002f, --p, K_RSA, B_AES_128, T);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
|
||||
0xC004, --p, K_ECDH_ECDSA, B_AES_128, T);
|
||||
add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
|
||||
0xC00E, --p, K_ECDH_RSA, B_AES_128, T);
|
||||
add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
|
||||
0x0033, --p, K_DHE_RSA, B_AES_128, T);
|
||||
add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
|
||||
0x0032, --p, K_DHE_DSS, B_AES_128, T);
|
||||
add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", 0xC009, --p,
|
||||
K_ECDHE_ECDSA, B_AES_128, M_SHA, T);
|
||||
add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", 0xC013, --p,
|
||||
K_ECDHE_RSA, B_AES_128, M_SHA, T);
|
||||
add("TLS_RSA_WITH_AES_128_CBC_SHA", 0x002f, --p,
|
||||
K_RSA, B_AES_128, M_SHA, T);
|
||||
add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", 0xC004, --p,
|
||||
K_ECDH_ECDSA, B_AES_128, M_SHA, T);
|
||||
add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", 0xC00E, --p,
|
||||
K_ECDH_RSA, B_AES_128, M_SHA, T);
|
||||
add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA", 0x0033, --p,
|
||||
K_DHE_RSA, B_AES_128, M_SHA, T);
|
||||
add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA", 0x0032, --p,
|
||||
K_DHE_DSS, B_AES_128, M_SHA, T);
|
||||
|
||||
// 3DES_EDE
|
||||
add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
|
||||
0xC008, --p, K_ECDHE_ECDSA, B_3DES, T);
|
||||
add("TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
|
||||
0xC012, --p, K_ECDHE_RSA, B_3DES, T);
|
||||
add("SSL_RSA_WITH_3DES_EDE_CBC_SHA",
|
||||
0x000a, --p, K_RSA, B_3DES, T);
|
||||
add("TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
|
||||
0xC003, --p, K_ECDH_ECDSA, B_3DES, T);
|
||||
add("TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
|
||||
0xC00D, --p, K_ECDH_RSA, B_3DES, T);
|
||||
add("SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
|
||||
0x0016, --p, K_DHE_RSA, B_3DES, T);
|
||||
add("SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
|
||||
0x0013, --p, K_DHE_DSS, B_3DES, N);
|
||||
add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", 0xC008, --p,
|
||||
K_ECDHE_ECDSA, B_3DES, M_SHA, T);
|
||||
add("TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", 0xC012, --p,
|
||||
K_ECDHE_RSA, B_3DES, M_SHA, T);
|
||||
add("SSL_RSA_WITH_3DES_EDE_CBC_SHA", 0x000a, --p,
|
||||
K_RSA, B_3DES, M_SHA, T);
|
||||
add("TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", 0xC003, --p,
|
||||
K_ECDH_ECDSA, B_3DES, M_SHA, T);
|
||||
add("TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", 0xC00D, --p,
|
||||
K_ECDH_RSA, B_3DES, M_SHA, T);
|
||||
add("SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", 0x0016, --p,
|
||||
K_DHE_RSA, B_3DES, M_SHA, T);
|
||||
add("SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", 0x0013, --p,
|
||||
K_DHE_DSS, B_3DES, M_SHA, N);
|
||||
|
||||
// RC-4
|
||||
add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
|
||||
0xC007, --p, K_ECDHE_ECDSA, B_RC4_128, N);
|
||||
add("TLS_ECDHE_RSA_WITH_RC4_128_SHA",
|
||||
0xC011, --p, K_ECDHE_RSA, B_RC4_128, N);
|
||||
add("SSL_RSA_WITH_RC4_128_SHA",
|
||||
0x0005, --p, K_RSA, B_RC4_128, N);
|
||||
add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
|
||||
0xC002, --p, K_ECDH_ECDSA, B_RC4_128, N);
|
||||
add("TLS_ECDH_RSA_WITH_RC4_128_SHA",
|
||||
0xC00C, --p, K_ECDH_RSA, B_RC4_128, N);
|
||||
add("SSL_RSA_WITH_RC4_128_MD5",
|
||||
0x0004, --p, K_RSA, B_RC4_128, N);
|
||||
add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", 0xC007, --p,
|
||||
K_ECDHE_ECDSA, B_RC4_128, M_SHA, N);
|
||||
add("TLS_ECDHE_RSA_WITH_RC4_128_SHA", 0xC011, --p,
|
||||
K_ECDHE_RSA, B_RC4_128, M_SHA, N);
|
||||
add("SSL_RSA_WITH_RC4_128_SHA", 0x0005, --p,
|
||||
K_RSA, B_RC4_128, M_SHA, N);
|
||||
add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA", 0xC002, --p,
|
||||
K_ECDH_ECDSA, B_RC4_128, M_SHA, N);
|
||||
add("TLS_ECDH_RSA_WITH_RC4_128_SHA", 0xC00C, --p,
|
||||
K_ECDH_RSA, B_RC4_128, M_SHA, N);
|
||||
add("SSL_RSA_WITH_RC4_128_MD5", 0x0004, --p,
|
||||
K_RSA, B_RC4_128, M_MD5, N);
|
||||
|
||||
// Renegotiation protection request Signalling Cipher Suite Value (SCSV)
|
||||
add("TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
|
||||
0x00ff, --p, K_SCSV, B_NULL, T);
|
||||
add("TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 0x00ff, --p,
|
||||
K_SCSV, B_NULL, M_NULL, T);
|
||||
|
||||
/*
|
||||
* Definition of the CipherSuites that are supported but not enabled
|
||||
@ -1142,98 +1111,98 @@ final class CipherSuite implements Comparable<CipherSuite> {
|
||||
*/
|
||||
p = DEFAULT_SUITES_PRIORITY;
|
||||
|
||||
add("TLS_DH_anon_WITH_AES_256_GCM_SHA384",
|
||||
0x00a7, --p, K_DH_ANON, B_AES_256_GCM, N, max, tls12, P_SHA384);
|
||||
add("TLS_DH_anon_WITH_AES_128_GCM_SHA256",
|
||||
0x00a6, --p, K_DH_ANON, B_AES_128_GCM, N, max, tls12, P_SHA256);
|
||||
add("TLS_DH_anon_WITH_AES_256_GCM_SHA384", 0x00a7, --p,
|
||||
K_DH_ANON, B_AES_256_GCM, M_NULL, N, max, tls12, P_SHA384);
|
||||
add("TLS_DH_anon_WITH_AES_128_GCM_SHA256", 0x00a6, --p,
|
||||
K_DH_ANON, B_AES_128_GCM, M_NULL, N, max, tls12, P_SHA256);
|
||||
|
||||
add("TLS_DH_anon_WITH_AES_256_CBC_SHA256",
|
||||
0x006d, --p, K_DH_ANON, B_AES_256, N, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
|
||||
0xC019, --p, K_ECDH_ANON, B_AES_256, N);
|
||||
add("TLS_DH_anon_WITH_AES_256_CBC_SHA",
|
||||
0x003a, --p, K_DH_ANON, B_AES_256, N);
|
||||
add("TLS_DH_anon_WITH_AES_256_CBC_SHA256", 0x006d, --p,
|
||||
K_DH_ANON, B_AES_256, M_SHA256, N, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_anon_WITH_AES_256_CBC_SHA", 0xC019, --p,
|
||||
K_ECDH_ANON, B_AES_256, M_SHA, N);
|
||||
add("TLS_DH_anon_WITH_AES_256_CBC_SHA", 0x003a, --p,
|
||||
K_DH_ANON, B_AES_256, M_SHA, N);
|
||||
|
||||
add("TLS_DH_anon_WITH_AES_128_CBC_SHA256",
|
||||
0x006c, --p, K_DH_ANON, B_AES_128, N, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
|
||||
0xC018, --p, K_ECDH_ANON, B_AES_128, N);
|
||||
add("TLS_DH_anon_WITH_AES_128_CBC_SHA",
|
||||
0x0034, --p, K_DH_ANON, B_AES_128, N);
|
||||
add("TLS_DH_anon_WITH_AES_128_CBC_SHA256", 0x006c, --p,
|
||||
K_DH_ANON, B_AES_128, M_SHA256, N, max, tls12, P_SHA256);
|
||||
add("TLS_ECDH_anon_WITH_AES_128_CBC_SHA", 0xC018, --p,
|
||||
K_ECDH_ANON, B_AES_128, M_SHA, N);
|
||||
add("TLS_DH_anon_WITH_AES_128_CBC_SHA", 0x0034, --p,
|
||||
K_DH_ANON, B_AES_128, M_SHA, N);
|
||||
|
||||
add("TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
|
||||
0xC017, --p, K_ECDH_ANON, B_3DES, N);
|
||||
add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
|
||||
0x001b, --p, K_DH_ANON, B_3DES, N);
|
||||
add("TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA", 0xC017, --p,
|
||||
K_ECDH_ANON, B_3DES, M_SHA, N);
|
||||
add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA", 0x001b, --p,
|
||||
K_DH_ANON, B_3DES, M_SHA, N);
|
||||
|
||||
add("TLS_ECDH_anon_WITH_RC4_128_SHA",
|
||||
0xC016, --p, K_ECDH_ANON, B_RC4_128, N);
|
||||
add("SSL_DH_anon_WITH_RC4_128_MD5",
|
||||
0x0018, --p, K_DH_ANON, B_RC4_128, N);
|
||||
add("TLS_ECDH_anon_WITH_RC4_128_SHA", 0xC016, --p,
|
||||
K_ECDH_ANON, B_RC4_128, M_SHA, N);
|
||||
add("SSL_DH_anon_WITH_RC4_128_MD5", 0x0018, --p,
|
||||
K_DH_ANON, B_RC4_128, M_MD5, N);
|
||||
|
||||
// weak cipher suites obsoleted in TLS 1.2
|
||||
add("SSL_RSA_WITH_DES_CBC_SHA",
|
||||
0x0009, --p, K_RSA, B_DES, N, tls12);
|
||||
add("SSL_DHE_RSA_WITH_DES_CBC_SHA",
|
||||
0x0015, --p, K_DHE_RSA, B_DES, N, tls12);
|
||||
add("SSL_DHE_DSS_WITH_DES_CBC_SHA",
|
||||
0x0012, --p, K_DHE_DSS, B_DES, N, tls12);
|
||||
add("SSL_DH_anon_WITH_DES_CBC_SHA",
|
||||
0x001a, --p, K_DH_ANON, B_DES, N, tls12);
|
||||
add("SSL_RSA_WITH_DES_CBC_SHA", 0x0009, --p,
|
||||
K_RSA, B_DES, M_SHA, N, tls12);
|
||||
add("SSL_DHE_RSA_WITH_DES_CBC_SHA", 0x0015, --p,
|
||||
K_DHE_RSA, B_DES, M_SHA, N, tls12);
|
||||
add("SSL_DHE_DSS_WITH_DES_CBC_SHA", 0x0012, --p,
|
||||
K_DHE_DSS, B_DES, M_SHA, N, tls12);
|
||||
add("SSL_DH_anon_WITH_DES_CBC_SHA", 0x001a, --p,
|
||||
K_DH_ANON, B_DES, M_SHA, N, tls12);
|
||||
|
||||
// weak cipher suites obsoleted in TLS 1.1
|
||||
add("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
|
||||
0x0008, --p, K_RSA_EXPORT, B_DES_40, N, tls11);
|
||||
add("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
|
||||
0x0014, --p, K_DHE_RSA, B_DES_40, N, tls11);
|
||||
add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
|
||||
0x0011, --p, K_DHE_DSS, B_DES_40, N, tls11);
|
||||
add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
|
||||
0x0019, --p, K_DH_ANON, B_DES_40, N, tls11);
|
||||
add("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0008, --p,
|
||||
K_RSA_EXPORT, B_DES_40, M_SHA, N, tls11);
|
||||
add("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0014, --p,
|
||||
K_DHE_RSA, B_DES_40, M_SHA, N, tls11);
|
||||
add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x0011, --p,
|
||||
K_DHE_DSS, B_DES_40, M_SHA, N, tls11);
|
||||
add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", 0x0019, --p,
|
||||
K_DH_ANON, B_DES_40, M_SHA, N, tls11);
|
||||
|
||||
add("SSL_RSA_EXPORT_WITH_RC4_40_MD5",
|
||||
0x0003, --p, K_RSA_EXPORT, B_RC4_40, N, tls11);
|
||||
add("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
|
||||
0x0017, --p, K_DH_ANON, B_RC4_40, N, tls11);
|
||||
add("SSL_RSA_EXPORT_WITH_RC4_40_MD5", 0x0003, --p,
|
||||
K_RSA_EXPORT, B_RC4_40, M_MD5, N, tls11);
|
||||
add("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", 0x0017, --p,
|
||||
K_DH_ANON, B_RC4_40, M_MD5, N, tls11);
|
||||
|
||||
add("TLS_RSA_WITH_NULL_SHA256",
|
||||
0x003b, --p, K_RSA, B_NULL, N, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_ECDSA_WITH_NULL_SHA",
|
||||
0xC006, --p, K_ECDHE_ECDSA, B_NULL, N);
|
||||
add("TLS_ECDHE_RSA_WITH_NULL_SHA",
|
||||
0xC010, --p, K_ECDHE_RSA, B_NULL, N);
|
||||
add("SSL_RSA_WITH_NULL_SHA",
|
||||
0x0002, --p, K_RSA, B_NULL, N);
|
||||
add("TLS_ECDH_ECDSA_WITH_NULL_SHA",
|
||||
0xC001, --p, K_ECDH_ECDSA, B_NULL, N);
|
||||
add("TLS_ECDH_RSA_WITH_NULL_SHA",
|
||||
0xC00B, --p, K_ECDH_RSA, B_NULL, N);
|
||||
add("TLS_ECDH_anon_WITH_NULL_SHA",
|
||||
0xC015, --p, K_ECDH_ANON, B_NULL, N);
|
||||
add("SSL_RSA_WITH_NULL_MD5",
|
||||
0x0001, --p, K_RSA, B_NULL, N);
|
||||
add("TLS_RSA_WITH_NULL_SHA256", 0x003b, --p,
|
||||
K_RSA, B_NULL, M_SHA256, N, max, tls12, P_SHA256);
|
||||
add("TLS_ECDHE_ECDSA_WITH_NULL_SHA", 0xC006, --p,
|
||||
K_ECDHE_ECDSA, B_NULL, M_SHA, N);
|
||||
add("TLS_ECDHE_RSA_WITH_NULL_SHA", 0xC010, --p,
|
||||
K_ECDHE_RSA, B_NULL, M_SHA, N);
|
||||
add("SSL_RSA_WITH_NULL_SHA", 0x0002, --p,
|
||||
K_RSA, B_NULL, M_SHA, N);
|
||||
add("TLS_ECDH_ECDSA_WITH_NULL_SHA", 0xC001, --p,
|
||||
K_ECDH_ECDSA, B_NULL, M_SHA, N);
|
||||
add("TLS_ECDH_RSA_WITH_NULL_SHA", 0xC00B, --p,
|
||||
K_ECDH_RSA, B_NULL, M_SHA, N);
|
||||
add("TLS_ECDH_anon_WITH_NULL_SHA", 0xC015, --p,
|
||||
K_ECDH_ANON, B_NULL, M_SHA, N);
|
||||
add("SSL_RSA_WITH_NULL_MD5", 0x0001, --p,
|
||||
K_RSA, B_NULL, M_MD5, N);
|
||||
|
||||
// Supported Kerberos ciphersuites from RFC2712
|
||||
add("TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
|
||||
0x001f, --p, K_KRB5, B_3DES, N);
|
||||
add("TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
|
||||
0x0023, --p, K_KRB5, B_3DES, N);
|
||||
add("TLS_KRB5_WITH_RC4_128_SHA",
|
||||
0x0020, --p, K_KRB5, B_RC4_128, N);
|
||||
add("TLS_KRB5_WITH_RC4_128_MD5",
|
||||
0x0024, --p, K_KRB5, B_RC4_128, N);
|
||||
add("TLS_KRB5_WITH_DES_CBC_SHA",
|
||||
0x001e, --p, K_KRB5, B_DES, N, tls12);
|
||||
add("TLS_KRB5_WITH_DES_CBC_MD5",
|
||||
0x0022, --p, K_KRB5, B_DES, N, tls12);
|
||||
add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
|
||||
0x0026, --p, K_KRB5_EXPORT, B_DES_40, N, tls11);
|
||||
add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",
|
||||
0x0029, --p, K_KRB5_EXPORT, B_DES_40, N, tls11);
|
||||
add("TLS_KRB5_EXPORT_WITH_RC4_40_SHA",
|
||||
0x0028, --p, K_KRB5_EXPORT, B_RC4_40, N, tls11);
|
||||
add("TLS_KRB5_EXPORT_WITH_RC4_40_MD5",
|
||||
0x002b, --p, K_KRB5_EXPORT, B_RC4_40, N, tls11);
|
||||
add("TLS_KRB5_WITH_3DES_EDE_CBC_SHA", 0x001f, --p,
|
||||
K_KRB5, B_3DES, M_SHA, N);
|
||||
add("TLS_KRB5_WITH_3DES_EDE_CBC_MD5", 0x0023, --p,
|
||||
K_KRB5, B_3DES, M_MD5, N);
|
||||
add("TLS_KRB5_WITH_RC4_128_SHA", 0x0020, --p,
|
||||
K_KRB5, B_RC4_128, M_SHA, N);
|
||||
add("TLS_KRB5_WITH_RC4_128_MD5", 0x0024, --p,
|
||||
K_KRB5, B_RC4_128, M_MD5, N);
|
||||
add("TLS_KRB5_WITH_DES_CBC_SHA", 0x001e, --p,
|
||||
K_KRB5, B_DES, M_SHA, N, tls12);
|
||||
add("TLS_KRB5_WITH_DES_CBC_MD5", 0x0022, --p,
|
||||
K_KRB5, B_DES, M_MD5, N, tls12);
|
||||
add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", 0x0026, --p,
|
||||
K_KRB5_EXPORT, B_DES_40, M_SHA, N, tls11);
|
||||
add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", 0x0029, --p,
|
||||
K_KRB5_EXPORT, B_DES_40, M_MD5, N, tls11);
|
||||
add("TLS_KRB5_EXPORT_WITH_RC4_40_SHA", 0x0028, --p,
|
||||
K_KRB5_EXPORT, B_RC4_40, M_SHA, N, tls11);
|
||||
add("TLS_KRB5_EXPORT_WITH_RC4_40_MD5", 0x002b, --p,
|
||||
K_KRB5_EXPORT, B_RC4_40, M_MD5, N, tls11);
|
||||
|
||||
/*
|
||||
* Other values from the TLS Cipher Suite Registry, as of August 2010.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -36,6 +36,7 @@ import javax.crypto.SecretKey;
|
||||
|
||||
import sun.security.ssl.CipherSuite.MacAlg;
|
||||
import static sun.security.ssl.CipherSuite.*;
|
||||
import static sun.security.ssl.CipherSuite.MacAlg.*;
|
||||
|
||||
/**
|
||||
* This class computes the "Message Authentication Code" (MAC) for each
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -382,18 +382,18 @@ final class SSLAlgorithmConstraints implements AlgorithmConstraints {
|
||||
protected Set<String> decomposes(MacAlg macAlg) {
|
||||
Set<String> components = new HashSet<>();
|
||||
|
||||
if (macAlg == CipherSuite.M_MD5) {
|
||||
if (macAlg == CipherSuite.MacAlg.M_MD5) {
|
||||
components.add("MD5");
|
||||
components.add("HmacMD5");
|
||||
} else if (macAlg == CipherSuite.M_SHA) {
|
||||
} else if (macAlg == CipherSuite.MacAlg.M_SHA) {
|
||||
components.add("SHA1");
|
||||
components.add("SHA-1");
|
||||
components.add("HmacSHA1");
|
||||
} else if (macAlg == CipherSuite.M_SHA256) {
|
||||
} else if (macAlg == CipherSuite.MacAlg.M_SHA256) {
|
||||
components.add("SHA256");
|
||||
components.add("SHA-256");
|
||||
components.add("HmacSHA256");
|
||||
} else if (macAlg == CipherSuite.M_SHA384) {
|
||||
} else if (macAlg == CipherSuite.MacAlg.M_SHA384) {
|
||||
components.add("SHA384");
|
||||
components.add("SHA-384");
|
||||
components.add("HmacSHA384");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,46 +25,33 @@
|
||||
|
||||
package com.apple.laf;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Insets;
|
||||
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import sun.swing.SwingUtilities2;
|
||||
|
||||
/**
|
||||
* The class represents the border of a {@code JMenuBar}.
|
||||
*/
|
||||
public class AquaMenuBarBorder implements Border {
|
||||
public AquaMenuBarBorder() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Paints the border for the specified component with the specified
|
||||
* position and size.
|
||||
* @param c the component for which this border is being painted
|
||||
* @param g the paint graphics
|
||||
* @param x the x position of the painted border
|
||||
* @param y the y position of the painted border
|
||||
* @param width the width of the painted border
|
||||
* @param height the height of the painted border
|
||||
*/
|
||||
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
|
||||
// for now we don't paint a border. We let the button paint it since there
|
||||
// needs to be a strict ordering for aqua components.
|
||||
//paintButton(c, g, x, y, width, height);
|
||||
@Override
|
||||
public void paintBorder(final Component c, final Graphics g, final int x,
|
||||
final int y, final int width, final int height) {
|
||||
g.setColor(Color.gray);
|
||||
g.drawLine(x, y + height - 1, x + width, y + height - 1);
|
||||
SwingUtilities2.drawHLine(g, x, x + width - 1, y + height - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the insets of the border.
|
||||
* @param c the component for which this border insets value applies
|
||||
*/
|
||||
@Override
|
||||
public Insets getBorderInsets(final Component c) {
|
||||
return new Insets(0, 0, 1, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the border is opaque. If the border
|
||||
* is opaque, it is responsible for filling in it's own
|
||||
* background when painting.
|
||||
*/
|
||||
@Override
|
||||
public boolean isBorderOpaque() {
|
||||
return false;
|
||||
}
|
||||
|
@ -148,11 +148,15 @@ public class AquaMenuUI extends BasicMenuUI implements AquaMenuPainter.Client {
|
||||
|
||||
// In Aqua, we always have a menu delay, regardless of where the menu is.
|
||||
if (!(selectedPath.length > 0 && selectedPath[selectedPath.length - 1] == menu.getPopupMenu())) {
|
||||
if (menu.getDelay() == 0) {
|
||||
appendPath(getPath(), menu.getPopupMenu());
|
||||
} else {
|
||||
manager.setSelectedPath(getPath());
|
||||
setupPostTimer(menu);
|
||||
// the condition below prevents from activating menu in other frame
|
||||
if (!menu.isTopLevelMenu() || (selectedPath.length > 0 &&
|
||||
selectedPath[0] == menu.getParent())) {
|
||||
if (menu.getDelay() == 0) {
|
||||
appendPath(getPath(), menu.getPopupMenu());
|
||||
} else {
|
||||
manager.setSelectedPath(getPath());
|
||||
setupPostTimer(menu);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -488,6 +488,9 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
} else {
|
||||
deliverZoom(true);
|
||||
|
||||
// We need an up to date size of the peer, so we flush the native events
|
||||
// to be sure that there are no setBounds requests in the queue.
|
||||
LWCToolkit.flushNativeSelectors();
|
||||
this.normalBounds = peer.getBounds();
|
||||
|
||||
GraphicsConfiguration config = getPeer().getGraphicsConfiguration();
|
||||
|
@ -843,7 +843,7 @@ public final class LWCToolkit extends LWToolkit {
|
||||
/**
|
||||
* Just spin a single empty block synchronously.
|
||||
*/
|
||||
private static native void flushNativeSelectors();
|
||||
static native void flushNativeSelectors();
|
||||
|
||||
@Override
|
||||
public Clipboard createPlatformClipboard() {
|
||||
|
@ -1104,6 +1104,11 @@ public class JPEGImageWriter extends ImageWriter {
|
||||
currentImage++; // After a successful write
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canWriteSequence() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void prepareWriteSequence(IIOMetadata streamMetadata)
|
||||
throws IOException {
|
||||
setThreadLock();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -127,16 +127,6 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
RootPaneContainer,
|
||||
TransferHandler.HasGetTransferHandler
|
||||
{
|
||||
/**
|
||||
* The exit application default window close operation. If a window
|
||||
* has this set as the close operation and is closed in an applet,
|
||||
* a <code>SecurityException</code> may be thrown.
|
||||
* It is recommended you only use this in an application.
|
||||
*
|
||||
* @since 1.3
|
||||
*/
|
||||
public static final int EXIT_ON_CLOSE = 3;
|
||||
|
||||
/**
|
||||
* Key into the AppContext, used to check if should provide decorations
|
||||
* by default.
|
||||
@ -352,7 +342,7 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
* objects.
|
||||
*
|
||||
* <li><code>EXIT_ON_CLOSE</code>
|
||||
* (defined in <code>JFrame</code>):
|
||||
* (defined in <code>WindowConstants</code>):
|
||||
* Exit the application using the <code>System</code>
|
||||
* <code>exit</code> method. Use this only in applications.
|
||||
* </ul>
|
||||
@ -393,7 +383,9 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
operation != HIDE_ON_CLOSE &&
|
||||
operation != DISPOSE_ON_CLOSE &&
|
||||
operation != EXIT_ON_CLOSE) {
|
||||
throw new IllegalArgumentException("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
|
||||
throw new IllegalArgumentException("defaultCloseOperation must be"
|
||||
+ " one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE,"
|
||||
+ " DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
|
||||
}
|
||||
|
||||
if (operation == EXIT_ON_CLOSE) {
|
||||
@ -861,7 +853,7 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
defaultCloseOperationString = "DISPOSE_ON_CLOSE";
|
||||
} else if (defaultCloseOperation == DO_NOTHING_ON_CLOSE) {
|
||||
defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
|
||||
} else if (defaultCloseOperation == 3) {
|
||||
} else if (defaultCloseOperation == EXIT_ON_CLOSE) {
|
||||
defaultCloseOperationString = "EXIT_ON_CLOSE";
|
||||
} else defaultCloseOperationString = "";
|
||||
String rootPaneString = (rootPane != null ?
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -103,7 +103,7 @@ import java.security.PrivilegedAction;
|
||||
*
|
||||
* private static void createAndShowGUI() {
|
||||
* final JFrame frame = new JFrame();
|
||||
* frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
* frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
*
|
||||
* // work with the layer as with any other Swing component
|
||||
* frame.add(createLayer());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -37,6 +37,8 @@ import java.awt.Rectangle;
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
|
||||
import sun.swing.SwingUtilities2;
|
||||
|
||||
/**
|
||||
* Factory object that can vend Borders appropriate for the basic L & F.
|
||||
* @author Georges Saab
|
||||
@ -453,10 +455,10 @@ public class BasicBorders {
|
||||
Color oldColor = g.getColor();
|
||||
g.translate(x, y);
|
||||
g.setColor(shadow);
|
||||
g.drawLine(0, height-2, width, height-2);
|
||||
SwingUtilities2.drawHLine(g, 0, width - 1, height - 2);
|
||||
g.setColor(highlight);
|
||||
g.drawLine(0, height-1, width, height-1);
|
||||
g.translate(-x,-y);
|
||||
SwingUtilities2.drawHLine(g, 0, width - 1, height - 1);
|
||||
g.translate(-x, -y);
|
||||
g.setColor(oldColor);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,6 +40,7 @@ import java.awt.Graphics;
|
||||
import java.awt.Window;
|
||||
|
||||
import sun.swing.StringUIClientPropertyKey;
|
||||
import sun.swing.SwingUtilities2;
|
||||
|
||||
|
||||
/**
|
||||
@ -559,25 +560,22 @@ public class MetalBorders {
|
||||
protected static Insets borderInsets = new Insets( 1, 0, 1, 0 );
|
||||
|
||||
public void paintBorder( Component c, Graphics g, int x, int y, int w, int h ) {
|
||||
g.translate( x, y );
|
||||
g.translate(x, y);
|
||||
|
||||
if (MetalLookAndFeel.usingOcean()) {
|
||||
// Only paint a border if we're not next to a horizontal
|
||||
// toolbar
|
||||
if ((c instanceof JMenuBar) && !MetalToolBarUI.doesMenuBarBorderToolBar((JMenuBar)c)) {
|
||||
// Only paint a border if we're not next to a horizontal toolbar
|
||||
if (c instanceof JMenuBar
|
||||
&& !MetalToolBarUI.doesMenuBarBorderToolBar((JMenuBar)c)) {
|
||||
g.setColor(MetalLookAndFeel.getControl());
|
||||
g.drawLine(0, h - 2, w, h - 2);
|
||||
SwingUtilities2.drawHLine(g, 0, w - 1, h - 2);
|
||||
g.setColor(UIManager.getColor("MenuBar.borderColor"));
|
||||
g.drawLine(0, h - 1, w, h - 1);
|
||||
SwingUtilities2.drawHLine(g, 0, w - 1, h - 1);
|
||||
}
|
||||
} else {
|
||||
g.setColor(MetalLookAndFeel.getControlShadow());
|
||||
SwingUtilities2.drawHLine(g, 0, w - 1, h - 1);
|
||||
}
|
||||
else {
|
||||
g.setColor( MetalLookAndFeel.getControlShadow() );
|
||||
g.drawLine( 0, h-1, w, h-1 );
|
||||
}
|
||||
|
||||
g.translate( -x, -y );
|
||||
|
||||
g.translate(-x, -y);
|
||||
}
|
||||
|
||||
public Insets getBorderInsets(Component c, Insets newInsets) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,15 +25,14 @@
|
||||
|
||||
package javax.swing.table;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.*;
|
||||
import javax.swing.event.SwingPropertyChangeSupport;
|
||||
import java.lang.Integer;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.io.Serializable;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.event.SwingPropertyChangeSupport;
|
||||
|
||||
/**
|
||||
* A <code>TableColumn</code> represents all the attributes of a column in a
|
||||
@ -744,19 +743,25 @@ public class TableColumn extends Object implements Serializable {
|
||||
//
|
||||
|
||||
/**
|
||||
* Adds a <code>PropertyChangeListener</code> to the listener list.
|
||||
* The listener is registered for all properties.
|
||||
* <p>
|
||||
* A <code>PropertyChangeEvent</code> will get fired in response to an
|
||||
* explicit call to <code>setFont</code>, <code>setBackground</code>,
|
||||
* or <code>setForeground</code> on the
|
||||
* current component. Note that if the current component is
|
||||
* inheriting its foreground, background, or font from its
|
||||
* container, then no event will be fired in response to a
|
||||
* change in the inherited property.
|
||||
*
|
||||
* @param listener the listener to be added
|
||||
* Adds a {@code PropertyChangeListener} to the listener list. The listener
|
||||
* is registered for all bound properties of this class, including the
|
||||
* following:
|
||||
* <ul>
|
||||
* <li>this TableColumn's modelIndex ("modelIndex")</li>
|
||||
* <li>this TableColumn's identifier ("identifier")</li>
|
||||
* <li>this TableColumn's header value ("headerValue")</li>
|
||||
* <li>this TableColumn's header renderer ("headerRenderer")</li>
|
||||
* <li>this TableColumn's cell renderer ("cellRenderer")</li>
|
||||
* <li>this TableColumn's cell editor ("cellEditor")</li>
|
||||
* <li>this TableColumn's width ("width")</li>
|
||||
* <li>this TableColumn's preferred width ("preferredWidth")</li>
|
||||
* <li>this TableColumn's minimum width ("minWidth")</li>
|
||||
* <li>this TableColumn's maximum width ("maxWidth")</li>
|
||||
* <li>this TableColumn's resizable state ("isResizable")</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param listener the listener to be added
|
||||
* @see #removePropertyChangeListener(PropertyChangeListener)
|
||||
*/
|
||||
public synchronized void addPropertyChangeListener(
|
||||
PropertyChangeListener listener) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,7 @@ import java.awt.datatransfer.UnsupportedFlavorException;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
|
||||
@ -74,12 +74,11 @@ public abstract class SunClipboard extends Clipboard
|
||||
private volatile int numberOfFlavorListeners = 0;
|
||||
|
||||
/**
|
||||
* A set of <code>DataFlavor</code>s that is available on
|
||||
* this clipboard. It is used for tracking changes
|
||||
* of <code>DataFlavor</code>s available on this clipboard.
|
||||
* A set of {@code DataFlavor}s that is available on this clipboard. It is
|
||||
* used for tracking changes of {@code DataFlavor}s available on this
|
||||
* clipboard. Can be {@code null}.
|
||||
*/
|
||||
private volatile Set<DataFlavor> currentDataFlavors;
|
||||
|
||||
private volatile long[] currentFormats;
|
||||
|
||||
public SunClipboard(String name) {
|
||||
super(name);
|
||||
@ -362,11 +361,11 @@ public abstract class SunClipboard extends Clipboard
|
||||
try {
|
||||
openClipboard(null);
|
||||
currentFormats = getClipboardFormats();
|
||||
} catch (IllegalStateException exc) {
|
||||
} catch (final IllegalStateException ignored) {
|
||||
} finally {
|
||||
closeClipboard();
|
||||
}
|
||||
currentDataFlavors = formatArrayAsDataFlavorSet(currentFormats);
|
||||
this.currentFormats = currentFormats;
|
||||
|
||||
registerClipboardViewerChecked();
|
||||
}
|
||||
@ -383,7 +382,7 @@ public abstract class SunClipboard extends Clipboard
|
||||
}
|
||||
if (flavorListeners.remove(listener) && --numberOfFlavorListeners == 0) {
|
||||
unregisterClipboardViewerChecked();
|
||||
currentDataFlavors = null;
|
||||
currentFormats = null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -416,18 +415,16 @@ public abstract class SunClipboard extends Clipboard
|
||||
* @param formats data formats that have just been retrieved from
|
||||
* this clipboard
|
||||
*/
|
||||
public void checkChange(long[] formats) {
|
||||
Set<DataFlavor> prevDataFlavors = currentDataFlavors;
|
||||
currentDataFlavors = formatArrayAsDataFlavorSet(formats);
|
||||
|
||||
if (Objects.equals(prevDataFlavors, currentDataFlavors)) {
|
||||
public final void checkChange(final long[] formats) {
|
||||
if (Arrays.equals(formats, currentFormats)) {
|
||||
// we've been able to successfully get available on the clipboard
|
||||
// DataFlavors this and previous time and they are coincident;
|
||||
// don't notify
|
||||
return;
|
||||
}
|
||||
currentFormats = formats;
|
||||
|
||||
for (AppContext appContext : AppContext.getAppContexts()) {
|
||||
for (final AppContext appContext : AppContext.getAppContexts()) {
|
||||
if (appContext == null || appContext.isDisposed()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -167,6 +167,15 @@ final class PiscesCache {
|
||||
rowAARLE[row][1] = end;
|
||||
}
|
||||
|
||||
void getBBox(int bbox[]) {
|
||||
// Since we add +1 to bboxX1,bboxY1 so when PTG asks for bbox,
|
||||
// we will give after -1
|
||||
bbox[0] = bboxX0;
|
||||
bbox[1] = bboxY0;
|
||||
bbox[2] = bboxX1 - 1;
|
||||
bbox[3] = bboxY1 - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String ret = "bbox = ["+
|
||||
|
@ -76,10 +76,7 @@ final class PiscesTileGenerator implements AATileGenerator {
|
||||
}
|
||||
|
||||
public void getBbox(int bbox[]) {
|
||||
bbox[0] = cache.bboxX0;
|
||||
bbox[1] = cache.bboxY0;
|
||||
bbox[2] = cache.bboxX1;
|
||||
bbox[3] = cache.bboxY1;
|
||||
cache.getBBox(bbox);
|
||||
//System.out.println("bbox["+bbox[0]+", "+bbox[1]+" => "+bbox[2]+", "+bbox[3]+"]");
|
||||
}
|
||||
|
||||
|
@ -2778,6 +2778,14 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
|
||||
pb = &data->pixelBuf;
|
||||
|
||||
if (setPixelBuffer(env, pb, buffer) == NOT_OK) {
|
||||
if (scale != NULL) {
|
||||
for (i = 0; i < numBands; i++) {
|
||||
if (scale[i] != NULL) {
|
||||
free(scale[i]);
|
||||
}
|
||||
}
|
||||
free(scale);
|
||||
}
|
||||
return data->abortFlag; // We already threw an out of memory exception
|
||||
}
|
||||
|
||||
|
108
jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java
Normal file
108
jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java
Normal file
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.awt;
|
||||
|
||||
import sun.font.FcFontConfiguration;
|
||||
import sun.font.FontConfigManager;
|
||||
import sun.font.SunFontManager;
|
||||
|
||||
/**
|
||||
* A {@link sun.font.FontManager} that uses fontconfig to find system fonts.
|
||||
*/
|
||||
public class FcFontManager extends SunFontManager {
|
||||
|
||||
private FontConfigManager fcManager = null;
|
||||
|
||||
public synchronized FontConfigManager getFontConfigManager() {
|
||||
|
||||
if (fcManager == null) {
|
||||
fcManager = new FontConfigManager();
|
||||
}
|
||||
|
||||
return fcManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FontConfiguration createFontConfiguration() {
|
||||
FcFontConfiguration fcFontConfig = new FcFontConfiguration(this);
|
||||
if (fcFontConfig.init()) {
|
||||
return fcFontConfig;
|
||||
} else {
|
||||
throw new InternalError("failed to initialize fontconfig");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
|
||||
boolean preferPropFonts) {
|
||||
FcFontConfiguration fcFontConfig =
|
||||
new FcFontConfiguration(this, preferLocaleFonts, preferPropFonts);
|
||||
if (fcFontConfig.init()) {
|
||||
return fcFontConfig;
|
||||
} else {
|
||||
throw new InternalError("failed to initialize fontconfig");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] getDefaultPlatformFont() {
|
||||
final String[] info = new String[2];
|
||||
getFontConfigManager().initFontConfigFonts(false);
|
||||
FontConfigManager.FcCompFont[] fontConfigFonts =
|
||||
getFontConfigManager().getFontConfigFonts();
|
||||
for (int i=0; i<fontConfigFonts.length; i++) {
|
||||
if ("sans".equals(fontConfigFonts[i].fcFamily) &&
|
||||
0 == fontConfigFonts[i].style) {
|
||||
info[0] = fontConfigFonts[i].firstFont.familyName;
|
||||
info[1] = fontConfigFonts[i].firstFont.fontFile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Absolute last ditch attempt in the face of fontconfig problems.
|
||||
* If we didn't match, pick the first, or just make something
|
||||
* up so we don't NPE.
|
||||
*/
|
||||
if (info[0] == null) {
|
||||
if (fontConfigFonts.length > 0 &&
|
||||
fontConfigFonts[0].firstFont.fontFile != null) {
|
||||
info[0] = fontConfigFonts[0].firstFont.familyName;
|
||||
info[1] = fontConfigFonts[0].firstFont.fontFile;
|
||||
} else {
|
||||
info[0] = "Dialog";
|
||||
info[1] = "/dialog.ttf";
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
protected native String getFontPathNative(boolean noType1Fonts,
|
||||
boolean isX11GE);
|
||||
|
||||
protected synchronized String getFontPath(boolean noType1Fonts) {
|
||||
return getFontPathNative(noType1Fonts, false);
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,11 +29,9 @@ import static java.awt.RenderingHints.*;
|
||||
import java.awt.color.ColorSpace;
|
||||
import java.awt.image.*;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import sun.security.action.GetIntegerAction;
|
||||
import com.sun.java.swing.plaf.gtk.GTKConstants.TextDirection;
|
||||
import sun.java2d.opengl.OGLRenderQueue;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public abstract class UNIXToolkit extends SunToolkit
|
||||
{
|
||||
@ -73,16 +71,16 @@ public abstract class UNIXToolkit extends SunToolkit
|
||||
if (nativeGTKLoaded != null) {
|
||||
// We've already attempted to load GTK, so just return the
|
||||
// status of that attempt.
|
||||
return nativeGTKLoaded.booleanValue();
|
||||
return nativeGTKLoaded;
|
||||
|
||||
} else if (nativeGTKAvailable != null) {
|
||||
// We've already checked the availability of the native GTK
|
||||
// libraries, so just return the status of that attempt.
|
||||
return nativeGTKAvailable.booleanValue();
|
||||
return nativeGTKAvailable;
|
||||
|
||||
} else {
|
||||
boolean success = check_gtk();
|
||||
nativeGTKAvailable = Boolean.valueOf(success);
|
||||
nativeGTKAvailable = success;
|
||||
return success;
|
||||
}
|
||||
}
|
||||
@ -99,11 +97,10 @@ public abstract class UNIXToolkit extends SunToolkit
|
||||
public boolean loadGTK() {
|
||||
synchronized (GTK_LOCK) {
|
||||
if (nativeGTKLoaded == null) {
|
||||
boolean success = load_gtk();
|
||||
nativeGTKLoaded = Boolean.valueOf(success);
|
||||
nativeGTKLoaded = load_gtk();
|
||||
}
|
||||
}
|
||||
return nativeGTKLoaded.booleanValue();
|
||||
return nativeGTKLoaded;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,6 +249,7 @@ public abstract class UNIXToolkit extends SunToolkit
|
||||
|
||||
private native void nativeSync();
|
||||
|
||||
@Override
|
||||
public void sync() {
|
||||
// flush the X11 buffer
|
||||
nativeSync();
|
||||
@ -266,6 +264,8 @@ public abstract class UNIXToolkit extends SunToolkit
|
||||
* This requires that the Gnome properties have already been gathered.
|
||||
*/
|
||||
public static final String FONTCONFIGAAHINT = "fontconfig/Antialias";
|
||||
|
||||
@Override
|
||||
protected RenderingHints getDesktopAAHints() {
|
||||
|
||||
Object aaValue = getDesktopProperty("gnome.Xft/Antialias");
|
||||
@ -288,8 +288,8 @@ public abstract class UNIXToolkit extends SunToolkit
|
||||
* us to default to "OFF". I don't think that's the best guess.
|
||||
* So if its !=0 then lets assume AA.
|
||||
*/
|
||||
boolean aa = Boolean.valueOf(((aaValue instanceof Number) &&
|
||||
((Number)aaValue).intValue() != 0));
|
||||
boolean aa = ((aaValue instanceof Number)
|
||||
&& ((Number) aaValue).intValue() != 0);
|
||||
Object aaHint;
|
||||
if (aa) {
|
||||
String subpixOrder =
|
||||
|
@ -54,7 +54,7 @@ import sun.util.logging.PlatformLogger;
|
||||
/**
|
||||
* The X11 implementation of {@link FontManager}.
|
||||
*/
|
||||
public final class X11FontManager extends SunFontManager {
|
||||
public final class X11FontManager extends FcFontManager {
|
||||
|
||||
// constants identifying XLFD and font ID fields
|
||||
private static final int FOUNDRY_FIELD = 1;
|
||||
@ -154,8 +154,6 @@ public final class X11FontManager extends SunFontManager {
|
||||
*/
|
||||
private static String[] fontdirs = null;
|
||||
|
||||
private FontConfigManager fcManager = null;
|
||||
|
||||
public static X11FontManager getInstance() {
|
||||
return (X11FontManager) SunFontManager.getInstance();
|
||||
}
|
||||
@ -784,51 +782,9 @@ public final class X11FontManager extends SunFontManager {
|
||||
preferLocaleFonts, preferPropFonts);
|
||||
}
|
||||
|
||||
public synchronized native String getFontPathNative(boolean noType1Fonts);
|
||||
|
||||
protected synchronized String getFontPath(boolean noType1Fonts) {
|
||||
isHeadless(); // make sure GE is inited, as its the X11 lock.
|
||||
return getFontPathNative(noType1Fonts);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] getDefaultPlatformFont() {
|
||||
final String[] info = new String[2];
|
||||
getFontConfigManager().initFontConfigFonts(false);
|
||||
FontConfigManager.FcCompFont[] fontConfigFonts =
|
||||
getFontConfigManager().getFontConfigFonts();
|
||||
for (int i=0; i<fontConfigFonts.length; i++) {
|
||||
if ("sans".equals(fontConfigFonts[i].fcFamily) &&
|
||||
0 == fontConfigFonts[i].style) {
|
||||
info[0] = fontConfigFonts[i].firstFont.familyName;
|
||||
info[1] = fontConfigFonts[i].firstFont.fontFile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Absolute last ditch attempt in the face of fontconfig problems.
|
||||
* If we didn't match, pick the first, or just make something
|
||||
* up so we don't NPE.
|
||||
*/
|
||||
if (info[0] == null) {
|
||||
if (fontConfigFonts.length > 0 &&
|
||||
fontConfigFonts[0].firstFont.fontFile != null) {
|
||||
info[0] = fontConfigFonts[0].firstFont.familyName;
|
||||
info[1] = fontConfigFonts[0].firstFont.fontFile;
|
||||
} else {
|
||||
info[0] = "Dialog";
|
||||
info[1] = "/dialog.ttf";
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
public synchronized FontConfigManager getFontConfigManager() {
|
||||
|
||||
if (fcManager == null) {
|
||||
fcManager = new FontConfigManager();
|
||||
}
|
||||
|
||||
return fcManager;
|
||||
return getFontPathNative(noType1Fonts, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -39,10 +39,10 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
import java.util.Scanner;
|
||||
import sun.awt.FcFontManager;
|
||||
import sun.awt.FontConfiguration;
|
||||
import sun.awt.FontDescriptor;
|
||||
import sun.awt.SunToolkit;
|
||||
import sun.awt.X11FontManager;
|
||||
import sun.font.CompositeFontDescriptor;
|
||||
import sun.font.FontManager;
|
||||
import sun.font.FontConfigManager.FontConfigInfo;
|
||||
@ -92,7 +92,7 @@ public class FcFontConfiguration extends FontConfiguration {
|
||||
|
||||
setFontConfiguration();
|
||||
readFcInfo();
|
||||
X11FontManager fm = (X11FontManager) fontManager;
|
||||
FcFontManager fm = (FcFontManager) fontManager;
|
||||
FontConfigManager fcm = fm.getFontConfigManager();
|
||||
if (fcCompFonts == null) {
|
||||
fcCompFonts = fcm.loadFontConfig();
|
||||
@ -194,7 +194,7 @@ public class FcFontConfiguration extends FontConfiguration {
|
||||
@Override
|
||||
public String[] getPlatformFontNames() {
|
||||
HashSet<String> nameSet = new HashSet<String>();
|
||||
X11FontManager fm = (X11FontManager) fontManager;
|
||||
FcFontManager fm = (FcFontManager) fontManager;
|
||||
FontConfigManager fcm = fm.getFontConfigManager();
|
||||
FcCompFont[] fcCompFonts = fcm.loadFontConfig();
|
||||
for (int i=0; i<fcCompFonts.length; i++) {
|
||||
@ -235,7 +235,7 @@ public class FcFontConfiguration extends FontConfiguration {
|
||||
@Override
|
||||
public CompositeFontDescriptor[] get2DCompositeFontInfo() {
|
||||
|
||||
X11FontManager fm = (X11FontManager) fontManager;
|
||||
FcFontManager fm = (FcFontManager) fontManager;
|
||||
FontConfigManager fcm = fm.getFontConfigManager();
|
||||
FcCompFont[] fcCompFonts = fcm.loadFontConfig();
|
||||
|
||||
@ -368,7 +368,7 @@ public class FcFontConfiguration extends FontConfiguration {
|
||||
private void writeFcInfo() {
|
||||
Properties props = new Properties();
|
||||
props.setProperty("version", fileVersion);
|
||||
X11FontManager fm = (X11FontManager) fontManager;
|
||||
FcFontManager fm = (FcFontManager) fontManager;
|
||||
FontConfigManager fcm = fm.getFontConfigManager();
|
||||
FontConfigInfo fcInfo = fcm.getFontConfigInfo();
|
||||
props.setProperty("fcversion", Integer.toString(fcInfo.fcVersion));
|
||||
@ -427,7 +427,7 @@ public class FcFontConfiguration extends FontConfiguration {
|
||||
return;
|
||||
}
|
||||
Properties props = new Properties();
|
||||
X11FontManager fm = (X11FontManager) fontManager;
|
||||
FcFontManager fm = (FcFontManager) fontManager;
|
||||
FontConfigManager fcm = fm.getFontConfigManager();
|
||||
try {
|
||||
FileInputStream fis = new FileInputStream(fcFile);
|
||||
|
@ -548,8 +548,18 @@ public abstract class XRSurfaceData extends XSurfaceData {
|
||||
peer.getColorModel().getPixelSize(), Transparency.OPAQUE);
|
||||
|
||||
if (isXRDrawableValid()) {
|
||||
initXRender(XRUtils.
|
||||
getPictureFormatForTransparency(Transparency.OPAQUE));
|
||||
// If we have a 32 bit color model for the window it needs
|
||||
// alpha to support translucency of the window so we need
|
||||
// to get the ARGB32 XRender picture format else for
|
||||
// 24 bit colormodel we need RGB24 or OPAQUE pictureformat.
|
||||
if (peer.getColorModel().getPixelSize() == 32) {
|
||||
initXRender(XRUtils.
|
||||
getPictureFormatForTransparency(Transparency.TRANSLUCENT));
|
||||
}
|
||||
else {
|
||||
initXRender(XRUtils.
|
||||
getPictureFormatForTransparency(Transparency.OPAQUE));
|
||||
}
|
||||
makePipes();
|
||||
}
|
||||
}
|
||||
|
@ -497,7 +497,7 @@ static char* mergePaths(char **p1, char **p2, char **p3, jboolean noType1) {
|
||||
* This also frees us from X11 APIs as JRE is required to function in
|
||||
* a "headless" mode where there is no Xserver.
|
||||
*/
|
||||
static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1) {
|
||||
static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1, jboolean isX11) {
|
||||
|
||||
char **fcdirs = NULL, **x11dirs = NULL, **knowndirs = NULL, *path = NULL;
|
||||
|
||||
@ -519,6 +519,7 @@ static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1) {
|
||||
* be initialised.
|
||||
*/
|
||||
#ifndef HEADLESS
|
||||
if (isX11) { // The following only works in an x11 environment.
|
||||
#if defined(__linux__)
|
||||
/* There's no headless build on linux ... */
|
||||
if (!AWTIsHeadless()) { /* .. so need to call a function to check */
|
||||
@ -538,6 +539,7 @@ static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1) {
|
||||
#if defined(__linux__)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* !HEADLESS */
|
||||
path = mergePaths(fcdirs, x11dirs, knowndirs, noType1);
|
||||
if (fcdirs != NULL) {
|
||||
@ -555,13 +557,13 @@ static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1) {
|
||||
return path;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_sun_awt_X11FontManager_getFontPathNative
|
||||
(JNIEnv *env, jobject thiz, jboolean noType1) {
|
||||
JNIEXPORT jstring JNICALL Java_sun_awt_FcFontManager_getFontPathNative
|
||||
(JNIEnv *env, jobject thiz, jboolean noType1, jboolean isX11) {
|
||||
jstring ret;
|
||||
static char *ptr = NULL; /* retain result across calls */
|
||||
|
||||
if (ptr == NULL) {
|
||||
ptr = getPlatformFontPathChars(env, noType1);
|
||||
ptr = getPlatformFontPathChars(env, noType1, isX11);
|
||||
}
|
||||
ret = (*env)->NewStringUTF(env, ptr);
|
||||
return ret;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,6 +33,7 @@
|
||||
#include "jvm_md.h"
|
||||
#include "sizecalc.h"
|
||||
#include <jni_util.h>
|
||||
#include "awt.h"
|
||||
|
||||
#define GTK2_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0")
|
||||
#define GTK2_LIB JNI_LIB_NAME("gtk-x11-2.0")
|
||||
@ -890,6 +891,7 @@ gboolean gtk2_load(JNIEnv *env)
|
||||
* BadMatch errors which we would normally ignore. The IO error handler
|
||||
* is preserved here, too, just for consistency.
|
||||
*/
|
||||
AWT_LOCK();
|
||||
handler = XSetErrorHandler(NULL);
|
||||
io_handler = XSetIOErrorHandler(NULL);
|
||||
|
||||
@ -926,6 +928,7 @@ gboolean gtk2_load(JNIEnv *env)
|
||||
|
||||
XSetErrorHandler(handler);
|
||||
XSetIOErrorHandler(io_handler);
|
||||
AWT_UNLOCK();
|
||||
|
||||
/* Initialize widget array. */
|
||||
for (i = 0; i < _GTK_WIDGET_TYPE_SIZE; i++)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user