This commit is contained in:
Lana Steuck 2014-04-09 17:17:03 -07:00
commit dfa779bc6e
163 changed files with 2451 additions and 1164 deletions

View File

@ -27,7 +27,7 @@ DISABLE_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-
# To build with all warnings enabled, do the following:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,static,try,varargs -Werror
JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,serial,static,try,varargs -Werror
# Any java code executed during a JDK build to build other parts of the JDK must be
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this

View File

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

View File

@ -891,7 +891,10 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
# Another source (specifying the time for start and end in the decree):
# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html
# From Paul Eggert (2013-10-03):
# From Sebastien Willemijns (2014-03-18):
# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp
# From Paul Eggert (2014-03-19):
# To estimate what the Moroccan government will do in future years,
# transition dates for 2014 through 2038 were determined by running
# the following program under GNU Emacs 24.3:

View File

@ -253,24 +253,41 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
# year-round base
# Scott Base, Ross Island, since 1957-01.
# See Pacific/Auckland.
#
# These rules for New Zealand are stolen from the 'australasia' file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D
Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D
Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D
Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D
Rule NZAQ 1975 only - Feb 23 2:00s 0 S
Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S
Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S
Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D
Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S
# Norway - territories
# Bouvet (never inhabited)
#
# claims
# Peter I Island (never inhabited)
#
# year-round base
# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12
#
# From Paul-Inge Flakstad (2014-03-10):
# I recently had a long dialog about this with the developer of timegenie.com.
# In the absence of specific dates, he decided to choose some likely ones:
# GMT +1 - From March 1 to the last Sunday in March
# GMT +2 - From the last Sunday in March until the last Sunday in October
# GMT +1 - From the last Sunday in October until November 7
# GMT +0 - From November 7 until March 1
# The dates for switching to and from UTC+0 will probably not be absolutely
# correct, but they should be quite close to the actual dates.
#
# From Paul Eggert (2014-03-21):
# The CET-switching Troll rules require zic from tzcode 2014b or later, so as
# suggested by Bengt-Inge Larsson comment them out for now, and approximate
# with only UTC and CEST. Uncomment them when 2014b is more prevalent.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET
Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST
#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET
#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC
# Remove the following line when uncommenting the above '#Rule' lines.
Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Antarctica/Troll 0 - zzz 2005 Feb 12
0:00 Troll %s
# Poland - year-round base
# Arctowski, King George Island, -620945-0582745, since 1977

View File

@ -786,14 +786,29 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# Johnston
#
# From Paul Eggert (2013-09-03):
# From Paul Eggert (2014-03-11):
# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind.
# Details are uncertain. We have no data for Johnston after 1970, so
# treat it like Hawaii for now.
#
# In his memoirs of June 6th to October 4, 1945
# <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes,
# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
# Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and
# confirms that Johnston kept the same time as Honolulu in summer 1945.
# We have no better information, so for now, assume this has been true
# indefinitely into the past.
#
# From Lyle McElhaney (2014-03-11):
# [W]hen JI was being used for that [atomic bomb] testing, the time being used
# was not Hawaiian time but rather the same time being used on the ships,
# which had a GMT offset of -11 hours. This apparently applied to at least the
# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last
# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin,
# "The United States High-Altitude Test Experience: A Review Emphasizing the
# Impact on the Environment", Los Alamos LA-6405, Oct 1976
# <http://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf>.
# See the table on page 4 where he lists GMT and local times for the tests; a
# footnote for the JI tests reads that local time is "JI time = Hawaii Time
# Minus One Hour".
#
# See 'northamerica' for Pacific/Johnston.

View File

@ -2986,7 +2986,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
# Assume it happened in March by not changing the clocks.
3:00 Russia MSK/MSD 1997
3:00 - MSK 1997 Mar lastSun 1:00u
2:00 EU EE%sT
# From Alexander Krivenyshev (2014-03-17):
# time change at 2:00 (2am) on March 30, 2014
# http://vz.ru/news/2014/3/17/677464.html
2:00 EU EE%sT 2014 Mar 30 2:00
4:00 - MSK
# Vatican City
# See Europe/Rome.

View File

@ -20,7 +20,7 @@
# 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.
#
# Allowance for leapseconds added to each timezone file.
# This file is in the public domain.

View File

@ -74,6 +74,7 @@ AQ -6617+11031 Antarctica/Casey Casey Station, Bailey Peninsula
AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie
AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land
AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF)
AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN)
@ -366,6 +367,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad
RU +5545+03735 Europe/Moscow Moscow+00 - west Russia
RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea
RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia
RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea
RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals
RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia
RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk
@ -421,7 +423,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam
UA +5026+03031 Europe/Kiev most locations
UA +4837+02218 Europe/Uzhgorod Ruthenia
UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
UA +4457+03406 Europe/Simferopol central Crimea
UG +0019+03225 Africa/Kampala
UM +1645-16931 Pacific/Johnston Johnston Atoll
UM +2813-17722 Pacific/Midway Midway Islands

View File

@ -1,201 +0,0 @@
/*
* Copyright (c) 2010, 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.
*/
package com.oracle.net;
import java.net.Socket;
import java.net.ServerSocket;
import java.net.SocketImpl;
import java.net.SocketImplFactory;
import java.net.SocketException;
import java.nio.channels.SocketChannel;
import java.nio.channels.ServerSocketChannel;
import java.io.IOException;
import java.io.FileDescriptor;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.lang.reflect.Constructor;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.InvocationTargetException;
import sun.net.sdp.SdpSupport;
/**
* This class consists exclusively of static methods that Sockets or Channels to
* sockets that support the InfiniBand Sockets Direct Protocol (SDP).
*/
public final class Sdp {
private Sdp() { }
/**
* The package-privage ServerSocket(SocketImpl) constructor
*/
private static final Constructor<ServerSocket> serverSocketCtor;
static {
try {
serverSocketCtor =
ServerSocket.class.getDeclaredConstructor(SocketImpl.class);
setAccessible(serverSocketCtor);
} catch (NoSuchMethodException e) {
throw new AssertionError(e);
}
}
/**
* The package-private SdpSocketImpl() constructor
*/
private static final Constructor<SocketImpl> socketImplCtor;
static {
try {
Class<?> cl = Class.forName("java.net.SdpSocketImpl", true, null);
socketImplCtor = (Constructor<SocketImpl>)cl.getDeclaredConstructor();
setAccessible(socketImplCtor);
} catch (ClassNotFoundException e) {
throw new AssertionError(e);
} catch (NoSuchMethodException e) {
throw new AssertionError(e);
}
}
private static void setAccessible(final AccessibleObject o) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
o.setAccessible(true);
return null;
}
});
}
/**
* SDP enabled Socket.
*/
private static class SdpSocket extends Socket {
SdpSocket(SocketImpl impl) throws SocketException {
super(impl);
}
}
/**
* Creates a SDP enabled SocketImpl
*/
private static SocketImpl createSocketImpl() {
try {
return socketImplCtor.newInstance();
} catch (InstantiationException x) {
throw new AssertionError(x);
} catch (IllegalAccessException x) {
throw new AssertionError(x);
} catch (InvocationTargetException x) {
throw new AssertionError(x);
}
}
/**
* Creates an unconnected and unbound SDP socket. The {@code Socket} is
* associated with a {@link java.net.SocketImpl} of the system-default type.
*
* @return a new Socket
*
* @throws UnsupportedOperationException
* If SDP is not supported
* @throws IOException
* If an I/O error occurs
*/
public static Socket openSocket() throws IOException {
SocketImpl impl = createSocketImpl();
return new SdpSocket(impl);
}
/**
* Creates an unbound SDP server socket. The {@code ServerSocket} is
* associated with a {@link java.net.SocketImpl} of the system-default type.
*
* @return a new ServerSocket
*
* @throws UnsupportedOperationException
* If SDP is not supported
* @throws IOException
* If an I/O error occurs
*/
public static ServerSocket openServerSocket() throws IOException {
// create ServerSocket via package-private constructor
SocketImpl impl = createSocketImpl();
try {
return serverSocketCtor.newInstance(impl);
} catch (IllegalAccessException x) {
throw new AssertionError(x);
} catch (InstantiationException x) {
throw new AssertionError(x);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();
if (cause instanceof IOException)
throw (IOException)cause;
if (cause instanceof RuntimeException)
throw (RuntimeException)cause;
throw new RuntimeException(x);
}
}
/**
* Opens a socket channel to a SDP socket.
*
* <p> The channel will be associated with the system-wide default
* {@link java.nio.channels.spi.SelectorProvider SelectorProvider}.
*
* @return a new SocketChannel
*
* @throws UnsupportedOperationException
* If SDP is not supported or not supported by the default selector
* provider
* @throws IOException
* If an I/O error occurs.
*/
public static SocketChannel openSocketChannel() throws IOException {
FileDescriptor fd = SdpSupport.createSocket();
return sun.nio.ch.Secrets.newSocketChannel(fd);
}
/**
* Opens a socket channel to a SDP socket.
*
* <p> The channel will be associated with the system-wide default
* {@link java.nio.channels.spi.SelectorProvider SelectorProvider}.
*
* @return a new ServerSocketChannel
*
* @throws UnsupportedOperationException
* If SDP is not supported or not supported by the default selector
* provider
* @throws IOException
* If an I/O error occurs
*/
public static ServerSocketChannel openServerSocketChannel()
throws IOException
{
FileDescriptor fd = SdpSupport.createSocket();
return sun.nio.ch.Secrets.newServerSocketChannel(fd);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,6 +39,8 @@ import javax.crypto.spec.OAEPParameterSpec;
import sun.security.rsa.*;
import sun.security.jca.Providers;
import sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec;
import sun.security.util.KeyUtil;
/**
* RSA cipher implementation. Supports RSA en/decryption and signing/verifying
@ -91,8 +93,8 @@ public final class RSACipher extends CipherSpi {
// padding object
private RSAPadding padding;
// cipher parameter for OAEP padding
private OAEPParameterSpec spec = null;
// cipher parameter for OAEP padding and TLS RSA premaster secret
private AlgorithmParameterSpec spec = null;
// buffer for the data
private byte[] buffer;
@ -110,6 +112,9 @@ public final class RSACipher extends CipherSpi {
// hash algorithm for OAEP
private String oaepHashAlgorithm = "SHA-1";
// the source of randomness
private SecureRandom random;
public RSACipher() {
paddingType = PAD_PKCS1;
}
@ -175,7 +180,7 @@ public final class RSACipher extends CipherSpi {
// see JCE spec
protected AlgorithmParameters engineGetParameters() {
if (spec != null) {
if (spec != null && spec instanceof OAEPParameterSpec) {
try {
AlgorithmParameters params =
AlgorithmParameters.getInstance("OAEP",
@ -276,8 +281,13 @@ public final class RSACipher extends CipherSpi {
buffer = new byte[n];
} else if (paddingType == PAD_PKCS1) {
if (params != null) {
throw new InvalidAlgorithmParameterException
("Parameters not supported");
if (!(params instanceof TlsRsaPremasterSecretParameterSpec)) {
throw new InvalidAlgorithmParameterException(
"Parameters not supported");
}
spec = params;
this.random = random; // for TLS RSA premaster secret
}
int blockType = (mode <= MODE_DECRYPT) ? RSAPadding.PAD_BLOCKTYPE_2
: RSAPadding.PAD_BLOCKTYPE_1;
@ -293,19 +303,18 @@ public final class RSACipher extends CipherSpi {
throw new InvalidKeyException
("OAEP cannot be used to sign or verify signatures");
}
OAEPParameterSpec myParams;
if (params != null) {
if (!(params instanceof OAEPParameterSpec)) {
throw new InvalidAlgorithmParameterException
("Wrong Parameters for OAEP Padding");
}
myParams = (OAEPParameterSpec) params;
spec = params;
} else {
myParams = new OAEPParameterSpec(oaepHashAlgorithm, "MGF1",
spec = new OAEPParameterSpec(oaepHashAlgorithm, "MGF1",
MGF1ParameterSpec.SHA1, PSource.PSpecified.DEFAULT);
}
padding = RSAPadding.getInstance(RSAPadding.PAD_OAEP_MGF1, n,
random, myParams);
random, (OAEPParameterSpec)spec);
if (encrypt) {
int k = padding.getMaxDataSize();
buffer = new byte[k];
@ -420,17 +429,40 @@ public final class RSACipher extends CipherSpi {
if (wrappedKey.length > buffer.length) {
throw new InvalidKeyException("Key is too long for unwrapping");
}
boolean isTlsRsaPremasterSecret =
algorithm.equals("TlsRsaPremasterSecret");
Exception failover = null;
byte[] encoded = null;
update(wrappedKey, 0, wrappedKey.length);
try {
byte[] encoded = doFinal();
return ConstructKeys.constructKey(encoded, algorithm, type);
encoded = doFinal();
} catch (BadPaddingException e) {
// should not occur
throw new InvalidKeyException("Unwrapping failed", e);
if (isTlsRsaPremasterSecret) {
failover = e;
} else {
throw new InvalidKeyException("Unwrapping failed", e);
}
} catch (IllegalBlockSizeException e) {
// should not occur, handled with length check above
throw new InvalidKeyException("Unwrapping failed", e);
}
if (isTlsRsaPremasterSecret) {
if (!(spec instanceof TlsRsaPremasterSecretParameterSpec)) {
throw new IllegalStateException(
"No TlsRsaPremasterSecretParameterSpec specified");
}
// polish the TLS premaster secret
encoded = KeyUtil.checkTlsPreMasterSecretKey(
((TlsRsaPremasterSecretParameterSpec)spec).getClientVersion(),
((TlsRsaPremasterSecretParameterSpec)spec).getServerVersion(),
random, encoded, (failover != null));
}
return ConstructKeys.constructKey(encoded, algorithm, type);
}
// see JCE spec
@ -438,5 +470,4 @@ public final class RSACipher extends CipherSpi {
RSAKey rsaKey = RSAKeyFactory.toRSAKey(key);
return rsaKey.getModulus().bitLength();
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -56,7 +56,7 @@ public final class TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi {
protected void engineInit(AlgorithmParameterSpec params,
SecureRandom random) throws InvalidAlgorithmParameterException {
if (params instanceof TlsRsaPremasterSecretParameterSpec == false) {
if (!(params instanceof TlsRsaPremasterSecretParameterSpec)) {
throw new InvalidAlgorithmParameterException(MSG);
}
this.spec = (TlsRsaPremasterSecretParameterSpec)params;
@ -67,21 +67,20 @@ public final class TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi {
throw new InvalidParameterException(MSG);
}
// Only can be used in client side to generate TLS RSA premaster secret.
protected SecretKey engineGenerateKey() {
if (spec == null) {
throw new IllegalStateException(
"TlsRsaPremasterSecretGenerator must be initialized");
}
byte[] b = spec.getEncodedSecret();
if (b == null) {
if (random == null) {
random = new SecureRandom();
}
b = new byte[48];
random.nextBytes(b);
b[0] = (byte)spec.getMajorVersion();
b[1] = (byte)spec.getMinorVersion();
if (random == null) {
random = new SecureRandom();
}
byte[] b = new byte[48];
random.nextBytes(b);
b[0] = (byte)spec.getMajorVersion();
b[1] = (byte)spec.getMinorVersion();
return new SecretKeySpec(b, "TlsRsaPremasterSecret");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,7 +45,7 @@ import java.util.*;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
abstract public class Enumerated implements Serializable {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -44,6 +44,7 @@ import static com.sun.jmx.defaults.JmxProperties.SNMP_LOGGER;
* The class defines an abstract representation of a host.
*
*/
@SuppressWarnings("serial") // JDK implementation class
abstract class Host extends SimpleNode implements Serializable {
public Host(int id) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,6 +45,7 @@ import java.net.InetAddress;
*
* @since 1.5
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpPdu implements SnmpDefinitions, Serializable {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -47,6 +47,7 @@ import com.sun.jmx.snmp.SnmpDefinitions;
*
* @since 1.5
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpScopedPduPacket extends SnmpPdu
implements Serializable {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@ package com.sun.jmx.snmp;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpUnsignedInt extends SnmpInt {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ import java.io.Serializable;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpValue implements Cloneable, Serializable, SnmpDataTypeEnums {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -59,6 +59,7 @@ import com.sun.jmx.snmp.SnmpStatusException;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpMib extends SnmpMibAgent implements Serializable {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -59,7 +59,7 @@ import com.sun.jmx.snmp.SnmpEngine;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpMibAgent
implements SnmpMibAgentMBean, MBeanRegistration, Serializable {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,7 @@ import com.sun.jmx.snmp.SnmpStatusException;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpMibEntry extends SnmpMibNode
implements Serializable {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -49,7 +49,7 @@ import com.sun.jmx.snmp.SnmpStatusException;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpMibGroup extends SnmpMibOid
implements Serializable {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -53,7 +53,7 @@ import com.sun.jmx.snmp.SnmpStatusException;
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpMibNode implements Serializable {
// ---------------------------------------------------------------------

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -84,7 +84,7 @@ import com.sun.jmx.snmp.SnmpVarBind;
* @see com.sun.jmx.snmp.agent.SnmpTableSupport
*
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpMibTable extends SnmpMibNode
implements NotificationBroadcaster, Serializable {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -80,6 +80,7 @@ import com.sun.jmx.snmp.SnmpStatusException;
* @see com.sun.jmx.snmp.agent.SnmpMibTable
*
*/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpTableSupport implements SnmpTableEntryFactory,
// NPCTE fix for bugId 4499265, esc 0, MR 04 sept 2001
// SnmpTableCallbackHandler {

View File

@ -108,6 +108,7 @@ public class ResolverDirectHTTP extends ResourceResolverSpi {
@Override
public XMLSignatureInput engineResolveURI(ResourceResolverContext context)
throws ResourceResolverException {
InputStream inputStream = null;
try {
// calculate new URI
@ -139,7 +140,7 @@ public class ResolverDirectHTTP extends ResourceResolverSpi {
}
String mimeType = urlConnection.getHeaderField("Content-Type");
InputStream inputStream = urlConnection.getInputStream();
inputStream = urlConnection.getInputStream();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte buf[] = new byte[4096];
int read = 0;
@ -168,6 +169,16 @@ public class ResolverDirectHTTP extends ResourceResolverSpi {
throw new ResourceResolverException("generic.EmptyMessage", ex, context.attr, context.baseUri);
} catch (IllegalArgumentException e) {
throw new ResourceResolverException("generic.EmptyMessage", e, context.attr, context.baseUri);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
if (log.isLoggable(java.util.logging.Level.FINE)) {
log.log(java.util.logging.Level.FINE, e.getMessage(), e);
}
}
}
}
}

View File

@ -115,7 +115,7 @@ import java.util.Hashtable;
* }
* }
* </pre></blockquote><hr>
* <p>
*
* @author Arthur van Hoff
* @see java.awt.Container#add(String, Component)
* @see java.awt.ComponentOrientation
@ -414,8 +414,7 @@ public class BorderLayout implements LayoutManager2,
* the component is added to the layout.
* @see java.awt.Container#add(java.awt.Component, java.lang.Object)
* @exception IllegalArgumentException if the constraint object is not
* a string, or if it not one of the five specified
* constants.
* a string, or if it not one of the five specified constants.
* @since JDK1.1
*/
public void addLayoutComponent(Component comp, Object constraints) {

View File

@ -49,7 +49,7 @@ package java.awt;
* <img src="doc-files/CheckboxGroup-1.gif"
* alt="Shows three checkboxes, arranged vertically, labeled one, two, and three. Checkbox one is in the on state."
* style="float:center; margin: 7px 10px;">
* <p>
*
* @author Sami Shaio
* @see java.awt.Checkbox
* @since JDK1.0

View File

@ -65,7 +65,7 @@ import javax.accessibility.*;
* Native GUI <code>Choice</code> components' size are often bound by such
* attributes as font size and length of items contained within
* the <code>Choice</code>.
* <p>
*
* @author Sami Shaio
* @author Arthur van Hoff
* @since JDK1.0

View File

@ -680,7 +680,7 @@ public class EventQueue {
* <td>No action (ignored)</td>
* </tr>
* </table>
* <p>
*
* @param event an instance of <code>java.awt.AWTEvent</code>,
* or a subclass of it
* @throws NullPointerException if <code>event</code> is <code>null</code>
@ -1015,7 +1015,6 @@ public class EventQueue {
* methods to execute a task in
* {@link Toolkit#getSystemEventQueue the current AWT EventQueue}'s
* dispatch thread.
* <p>
*
* @return true if running in
* {@link Toolkit#getSystemEventQueue the current AWT EventQueue}'s

View File

@ -29,7 +29,7 @@ package java.awt;
* The {@code GridBagLayoutInfo} is an utility class for
* {@code GridBagLayout} layout manager.
* It stores align, size and baseline parameters for every component within a container.
* <p>
*
* @see java.awt.GridBagLayout
* @see java.awt.GridBagConstraints
* @since 1.6

View File

@ -76,7 +76,6 @@ public class Robot {
/**
* Constructs a Robot object in the coordinate system of the primary screen.
* <p>
*
* @throws AWTException if the platform configuration does not allow
* low-level input control. This exception is always thrown when

View File

@ -49,7 +49,7 @@ import javax.accessibility.*;
* <hr><blockquote><pre>
* new TextArea("Hello", 5, 40);
* </pre></blockquote><hr>
* <p>
*
* @author Sami Shaio
* @since JDK1.0
*/

View File

@ -2590,7 +2590,7 @@ public abstract class Toolkit {
* If not set by the time of the {@code Toolkit} class initialization, this property will be
* initialized with {@code true}.
* Changing this value after the {@code Toolkit} class initialization will have no effect.
* <p>
*
* @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true
* @return {@code true} if events from extra mouse buttons are allowed to be processed and posted;
* {@code false} otherwise

View File

@ -231,7 +231,7 @@ public class TrayIcon {
/**
* Sets the image for this <code>TrayIcon</code>. The previous
* tray icon image is discarded without calling the {@link
* java.awt.Image#flush} method &#151; you will need to call it
* java.awt.Image#flush} method &#8212; you will need to call it
* manually.
*
* <p> If the image represents an animated image, it will be
@ -368,7 +368,7 @@ public class TrayIcon {
*
* <p> If auto-size is <code>false</code>, and the image size
* doesn't match the tray icon space, the image is painted as-is
* inside that space &#151; if larger than the allocated space, it will
* inside that space &#8212; if larger than the allocated space, it will
* be cropped.
*
* <p> If auto-size is <code>true</code>, the image is stretched or shrunk to

View File

@ -2550,7 +2550,7 @@ public class Window extends Container implements Accessible {
* a non-focusable Window.
*
* Setting the focusability state on a visible {@code Window}
* can have a delayed effect on some platforms &#151; the actual
* can have a delayed effect on some platforms &#8212; the actual
* change may happen only when the {@code Window} becomes
* hidden and then visible again. To ensure consistent behavior
* across platforms, set the {@code Window}'s focusable state

View File

@ -85,7 +85,7 @@ public interface InputMethodContext extends InputMethodRequests {
* <p>
* Input methods must call {@link java.awt.Window#dispose() Window.dispose} on the
* returned input method window when it is no longer needed.
* <p>
*
* @param title the title to be displayed in the window's title bar,
* if there is such a title bar.
* A <code>null</code> value is treated as an empty string, "".
@ -117,7 +117,7 @@ public interface InputMethodContext extends InputMethodRequests {
* <p>
* Input methods must call {@link java.awt.Window#dispose() Window.dispose} on the
* returned input method window when it is no longer needed.
* <p>
*
* @param title the title to be displayed in the window's title bar,
* if there is such a title bar.
* A <code>null</code> value is treated as an empty string, "".

View File

@ -104,7 +104,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Connects this socket to a remote socket address (IP address + port number).
* Binds socket if not already bound.
* <p>
*
* @param address The remote address.
* @param port The remote port
* @throws SocketException if binding the socket fails.
@ -338,7 +338,7 @@ class DatagramSocket implements java.io.Closeable {
* <p>
* If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*<p>
*
* @param addr The address and port to bind to.
* @throws SocketException if any error happens during the bind, or if the
* socket is already bound.
@ -1240,10 +1240,8 @@ class DatagramSocket implements java.io.Closeable {
* datagram socket factory.
* @exception SocketException if the factory is already defined.
* @exception SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the
operation.
* @see
java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
* @see SecurityManager#checkSetFactory
* @since 1.3
*/

View File

@ -157,7 +157,7 @@ public class InetSocketAddress
* A valid port value is between 0 and 65535.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <p>
*
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified
* range of valid port values.
@ -175,7 +175,7 @@ public class InetSocketAddress
* ephemeral port in a {@code bind} operation.
* <P>
* A {@code null} address will assign the <i>wildcard</i> address.
* <p>
*
* @param addr The IP address
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified
@ -202,7 +202,7 @@ public class InetSocketAddress
* A valid port value is between 0 and 65535.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
*
* @param hostname the Host name
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the range
@ -239,7 +239,7 @@ public class InetSocketAddress
* A valid port value is between 0 and 65535.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
*
* @param host the Host name
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside

View File

@ -1,49 +0,0 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 java.net;
import java.io.IOException;
import java.io.FileDescriptor;
import sun.net.sdp.SdpSupport;
/**
* SocketImpl that supports the SDP protocol
*/
class SdpSocketImpl extends PlainSocketImpl {
SdpSocketImpl() { }
@Override
protected void create(boolean stream) throws IOException {
if (!stream)
throw new UnsupportedOperationException("Must be a stream socket");
fd = SdpSupport.createSocket();
if (socket != null)
socket.setCreated();
if (serverSocket != null)
serverSocket.setCreated();
}
}

View File

@ -157,7 +157,6 @@ class ServerSocket implements java.io.Closeable {
* or may choose to ignore the parameter altogther. The value provided
* should be greater than {@code 0}. If it is less than or equal to
* {@code 0}, then an implementation specific default will be used.
* <P>
*
* @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
@ -206,7 +205,7 @@ class ServerSocket implements java.io.Closeable {
* or may choose to ignore the parameter altogther. The value provided
* should be greater than {@code 0}. If it is less than or equal to
* {@code 0}, then an implementation specific default will be used.
* <P>
*
* @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
* @param backlog requested maximum length of the queue of incoming
@ -315,7 +314,7 @@ class ServerSocket implements java.io.Closeable {
* <p>
* If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
* <p>
*
* @param endpoint The IP address and port number to bind to.
* @throws IOException if the bind operation fails, or if the socket
* is already bound.

View File

@ -153,7 +153,7 @@ class Socket implements java.io.Closeable {
/**
* Creates an unconnected Socket with a user-specified
* SocketImpl.
* <P>
*
* @param impl an instance of a <B>SocketImpl</B>
* the subclass wishes to use on the Socket.
*
@ -1245,7 +1245,7 @@ class Socket implements java.io.Closeable {
* <ol>
* <li>For sockets accepted from a ServerSocket, this must be done by calling
* {@link ServerSocket#setReceiveBufferSize(int)} before the ServerSocket
* is bound to a local address.<p></li>
* is bound to a local address.</li>
* <li>For client sockets, setReceiveBufferSize() must be called before
* connecting the socket to its remote peer.</li></ol>
* @param size the size to which to set the receive buffer

View File

@ -38,7 +38,7 @@ import java.lang.annotation.Native;
* DatagramSocketImpl, <B>you won't use these directly.</B> There are
* type-safe methods to get/set each of these options in Socket, ServerSocket,
* DatagramSocket and MulticastSocket.
* <P>
*
* @author David Brown
*/

View File

@ -1001,7 +1001,7 @@ public final class SocketPermission extends Permission
/**
* Checks two SocketPermission objects for equality.
* <P>
*
* @param obj the object to test for equality with this object.
*
* @return true if <i>obj</i> is a SocketPermission, and has the

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1337,7 +1337,7 @@ public final class URI
*/
public String getQuery() {
if ((decodedQuery == null) && (query != null))
decodedQuery = decode(query);
decodedQuery = decode(query, false);
return decodedQuery;
}
@ -1366,7 +1366,7 @@ public final class URI
*/
public String getFragment() {
if ((decodedFragment == null) && (fragment != null))
decodedFragment = decode(fragment);
decodedFragment = decode(fragment, false);
return decodedFragment;
}
@ -2764,6 +2764,12 @@ public final class URI
// with a scope_id
//
private static String decode(String s) {
return decode(s, true);
}
// This method was introduced as a generalization of URI.decode method
// to provide a fix for JDK-8037396
private static String decode(String s, boolean ignorePercentInBrackets) {
if (s == null)
return s;
int n = s.length();
@ -2776,8 +2782,8 @@ public final class URI
ByteBuffer bb = ByteBuffer.allocate(n);
CharBuffer cb = CharBuffer.allocate(n);
CharsetDecoder dec = ThreadLocalCoders.decoderFor("UTF-8")
.onMalformedInput(CodingErrorAction.REPLACE)
.onUnmappableCharacter(CodingErrorAction.REPLACE);
.onMalformedInput(CodingErrorAction.REPLACE)
.onUnmappableCharacter(CodingErrorAction.REPLACE);
// This is not horribly efficient, but it will do for now
char c = s.charAt(0);
@ -2790,7 +2796,7 @@ public final class URI
} else if (betweenBrackets && c == ']') {
betweenBrackets = false;
}
if (c != '%' || betweenBrackets) {
if (c != '%' || (betweenBrackets && ignorePercentInBrackets)) {
sb.append(c);
if (++i >= n)
break;

View File

@ -867,7 +867,7 @@ public final class URL implements java.io.Serializable {
* Creates an integer suitable for hash table indexing.<p>
*
* The hash code is based upon all the URL components relevant for URL
* comparison. As such, this operation is a blocking operation.<p>
* comparison. As such, this operation is a blocking operation.
*
* @return a hash code for this {@code URL}.
*/

View File

@ -271,7 +271,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* by catching {@link IOException}s internally. Unchecked exceptions
* and errors are not caught. Calling close on an already closed
* loader has no effect.
* <p>
*
* @exception IOException if closing any file opened by this class loader
* resulted in an IOException. Any such exceptions are caught internally.
* If only one is caught, then it is re-thrown. If more than one exception

View File

@ -35,7 +35,8 @@ alter the mechanisms and behavior of the various classes of the
java.net package. Some are checked only once at startup of the VM,
and therefore are best set using the -D option of the java command,
while others have a more dynamic nature and can also be changed using
the <a href="../../lang/System.html#setProperty(java.lang.String, java.lang.String)">System.setProperty()</a> API. The purpose of this document is to list
the <a href="../../lang/System.html#setProperty(java.lang.String,%20java.lang.String)">System.setProperty()</a> API.
The purpose of this document is to list
and detail all of these properties.</P>
<P>If there is no special note, a property value is checked every time it is used.</P>
<a name="Ipv4IPv6"></a>

View File

@ -172,7 +172,7 @@ public abstract class ActivationGroup
*
* <p>This method simply informs the group's monitor that the object
* is inactive. It is up to the concrete subclass of ActivationGroup
* to fulfill the additional requirement of unexporting the object. <p>
* to fulfill the additional requirement of unexporting the object.
*
* @param id the object's activation identifier
* @return true if the object was successfully deactivated; otherwise

View File

@ -49,7 +49,7 @@ import java.util.Properties;
*
* <li> the group's <code>ActivationGroupID</code>, and
* <li> the group's initialization data (in a
* <code>java.rmi.MarshalledObject</code>)</ul><p>
* <code>java.rmi.MarshalledObject</code>)</ul>
*
* @author Ann Wollrath
* @since 1.2

View File

@ -63,7 +63,7 @@ public interface ActivationMonitor extends Remote {
* reference associated with <code>id</code> as a stale reference.
* Since the reference is considered stale, a subsequent
* <code>activate</code> call for the same activation identifier
* results in re-activating the remote object.<p>
* results in re-activating the remote object.
*
* @param id the object's activation identifier
* @exception UnknownObjectException if object is unknown

View File

@ -61,7 +61,7 @@ public interface ActivationSystem extends Remote {
* receives an <code>activate</code> request for a specific identifier, it
* looks up the activation descriptor (registered previously) for
* the specified identifier and uses that information to activate
* the object. <p>
* the object.
*
* @param desc the object's activation descriptor
* @return the activation id that can be used to activate the object

View File

@ -53,7 +53,7 @@ import java.rmi.activation.UnknownObjectException;
*
* The activator is responsible for monitoring and detecting when
* activation groups fail so that it can remove stale remote references
* to groups and active object's within those groups.<p>
* to groups and active object's within those groups.
*
* @author Ann Wollrath
* @see ActivationInstantiator
@ -95,7 +95,7 @@ public interface Activator extends Remote {
* collection for that object. If the activator kept a strong
* reference to the remote object, the activator would then
* prevent the object from being garbage collected under the
* normal distributed garbage collection mechanism. <p>
* normal distributed garbage collection mechanism.
*
* @param id the activation identifier for the object being activated
* @param force if true, the activator contacts the group to obtain

View File

@ -1644,12 +1644,13 @@ public final class DateTimeFormatter {
* @return a formatter based on this formatter with the requested resolver style, not null
*/
public DateTimeFormatter withResolverFields(TemporalField... resolverFields) {
Objects.requireNonNull(resolverFields, "resolverFields");
Set<TemporalField> fields = new HashSet<>(Arrays.asList(resolverFields));
Set<TemporalField> fields = null;
if (resolverFields != null) {
fields = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(resolverFields)));
}
if (Objects.equals(this.resolverFields, fields)) {
return this;
}
fields = Collections.unmodifiableSet(fields);
return new DateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, fields, chrono, zone);
}
@ -1693,11 +1694,12 @@ public final class DateTimeFormatter {
* @return a formatter based on this formatter with the requested resolver style, not null
*/
public DateTimeFormatter withResolverFields(Set<TemporalField> resolverFields) {
Objects.requireNonNull(resolverFields, "resolverFields");
if (Objects.equals(this.resolverFields, resolverFields)) {
return this;
}
resolverFields = Collections.unmodifiableSet(new HashSet<>(resolverFields));
if (resolverFields != null) {
resolverFields = Collections.unmodifiableSet(new HashSet<>(resolverFields));
}
return new DateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone);
}

View File

@ -939,7 +939,7 @@ public final class DateTimeFormatterBuilder {
* During parsing, the offset is parsed using the format defined above.
* If the offset cannot be parsed then an exception is thrown unless the
* section of the formatter is optional.
* <p>
*
* @param style the format style to use, not null
* @return this, for chaining, not null
* @throws IllegalArgumentException if style is neither {@link TextStyle#FULL

View File

@ -65,9 +65,10 @@ import java.util.Objects;
* new strings whose contents can, if desired, be computed from the match
* result. The {@link #appendReplacement appendReplacement} and {@link
* #appendTail appendTail} methods can be used in tandem in order to collect
* the result into an existing string buffer, or the more convenient {@link
* #replaceAll replaceAll} method can be used to create a string in which every
* matching subsequence in the input sequence is replaced.
* the result into an existing string buffer or string builder. Alternatively,
* the more convenient {@link #replaceAll replaceAll} method can be used to
* create a string in which every matching subsequence in the input sequence
* is replaced.
*
* <p> The explicit state of a matcher includes the start and end indices of
* the most recent successful match. It also includes the start and end
@ -792,15 +793,115 @@ public final class Matcher implements MatchResult {
* that does not exist in the pattern
*/
public Matcher appendReplacement(StringBuffer sb, String replacement) {
// If no match, return error
if (first < 0)
throw new IllegalStateException("No match available");
// Process substitution string to replace group references with groups
int cursor = 0;
StringBuilder result = new StringBuilder();
appendExpandedReplacement(replacement, result);
// Append the intervening text
sb.append(text, lastAppendPosition, first);
// Append the match substitution
sb.append(result);
lastAppendPosition = last;
return this;
}
/**
* Implements a non-terminal append-and-replace step.
*
* <p> This method performs the following actions: </p>
*
* <ol>
*
* <li><p> It reads characters from the input sequence, starting at the
* append position, and appends them to the given string builder. It
* stops after reading the last character preceding the previous match,
* that is, the character at index {@link
* #start()}&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>. </p></li>
*
* <li><p> It appends the given replacement string to the string builder.
* </p></li>
*
* <li><p> It sets the append position of this matcher to the index of
* the last character matched, plus one, that is, to {@link #end()}.
* </p></li>
*
* </ol>
*
* <p> The replacement string may contain references to subsequences
* captured during the previous match: Each occurrence of
* <tt>$</tt><i>g</i><tt></tt> will be replaced by the result of
* evaluating {@link #group(int) group}<tt>(</tt><i>g</i><tt>)</tt>.
* The first number after the <tt>$</tt> is always treated as part of
* the group reference. Subsequent numbers are incorporated into g if
* they would form a legal group reference. Only the numerals '0'
* through '9' are considered as potential components of the group
* reference. If the second group matched the string <tt>"foo"</tt>, for
* example, then passing the replacement string <tt>"$2bar"</tt> would
* cause <tt>"foobar"</tt> to be appended to the string builder. A dollar
* sign (<tt>$</tt>) may be included as a literal in the replacement
* string by preceding it with a backslash (<tt>\$</tt>).
*
* <p> Note that backslashes (<tt>\</tt>) and dollar signs (<tt>$</tt>) in
* the replacement string may cause the results to be different than if it
* were being treated as a literal replacement string. Dollar signs may be
* treated as references to captured subsequences as described above, and
* backslashes are used to escape literal characters in the replacement
* string.
*
* <p> This method is intended to be used in a loop together with the
* {@link #appendTail appendTail} and {@link #find find} methods. The
* following code, for example, writes <tt>one dog two dogs in the
* yard</tt> to the standard-output stream: </p>
*
* <blockquote><pre>
* Pattern p = Pattern.compile("cat");
* Matcher m = p.matcher("one cat two cats in the yard");
* StringBuilder sb = new StringBuilder();
* while (m.find()) {
* m.appendReplacement(sb, "dog");
* }
* m.appendTail(sb);
* System.out.println(sb.toString());</pre></blockquote>
*
* @param sb
* The target string builder
* @param replacement
* The replacement string
* @return This matcher
*
* @throws IllegalStateException
* If no match has yet been attempted,
* or if the previous match operation failed
* @throws IllegalArgumentException
* If the replacement string refers to a named-capturing
* group that does not exist in the pattern
* @throws IndexOutOfBoundsException
* If the replacement string refers to a capturing group
* that does not exist in the pattern
* @since 1.9
*/
public Matcher appendReplacement(StringBuilder sb, String replacement) {
// If no match, return error
if (first < 0)
throw new IllegalStateException("No match available");
StringBuilder result = new StringBuilder();
appendExpandedReplacement(replacement, result);
// Append the intervening text
sb.append(text, lastAppendPosition, first);
// Append the match substitution
sb.append(result);
lastAppendPosition = last;
return this;
}
/**
* Processes replacement string to replace group references with
* groups.
*/
private StringBuilder appendExpandedReplacement(
String replacement, StringBuilder result) {
int cursor = 0;
while (cursor < replacement.length()) {
char nextChar = replacement.charAt(cursor);
if (nextChar == '\\') {
@ -852,8 +953,8 @@ public final class Matcher implements MatchResult {
cursor++;
} else {
// The first number is always a group
refNum = (int)nextChar - '0';
if ((refNum < 0)||(refNum > 9))
refNum = nextChar - '0';
if ((refNum < 0) || (refNum > 9))
throw new IllegalArgumentException(
"Illegal group reference");
cursor++;
@ -864,7 +965,7 @@ public final class Matcher implements MatchResult {
break;
}
int nextDigit = replacement.charAt(cursor) - '0';
if ((nextDigit < 0)||(nextDigit > 9)) { // not a number
if ((nextDigit < 0) || (nextDigit > 9)) { // not a number
break;
}
int newRefNum = (refNum * 10) + nextDigit;
@ -884,13 +985,7 @@ public final class Matcher implements MatchResult {
cursor++;
}
}
// Append the intervening text
sb.append(text, lastAppendPosition, first);
// Append the match substitution
sb.append(result);
lastAppendPosition = last;
return this;
return result;
}
/**
@ -912,6 +1007,27 @@ public final class Matcher implements MatchResult {
return sb;
}
/**
* Implements a terminal append-and-replace step.
*
* <p> This method reads characters from the input sequence, starting at
* the append position, and appends them to the given string builder. It is
* intended to be invoked after one or more invocations of the {@link
* #appendReplacement appendReplacement} method in order to copy the
* remainder of the input sequence. </p>
*
* @param sb
* The target string builder
*
* @return The target string builder
*
* @since 1.9
*/
public StringBuilder appendTail(StringBuilder sb) {
sb.append(text, lastAppendPosition, getTextLength());
return sb;
}
/**
* Replaces every subsequence of the input sequence that matches the
* pattern with the given replacement string.
@ -950,7 +1066,7 @@ public final class Matcher implements MatchResult {
reset();
boolean result = find();
if (result) {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
do {
appendReplacement(sb, replacement);
result = find();
@ -1000,7 +1116,7 @@ public final class Matcher implements MatchResult {
reset();
if (!find())
return text.toString();
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
appendReplacement(sb, replacement);
appendTail(sb);
return sb.toString();

View File

@ -112,7 +112,6 @@ fired to notify the listener. The listener's
<tt>namingExceptionThrown()</tt> method is invoked, as shown in the
sample code above,
and the listener is automatically deregistered.
<p>
<h2>Package Specification</h2>

View File

@ -114,7 +114,7 @@ public abstract class ControlFactory {
* <p>
* Note that a control factory
* must be public and must have a public constructor that accepts no arguments.
* <p>
*
* @param ctl The non-null control object containing the OID and BER data.
* @param ctx The possibly null context in which the control is being created.
* If null, no such information is available.

View File

@ -319,7 +319,7 @@ public interface LdapContext extends DirContext {
* clear the response controls. You can call it many times (and get
* back the same controls) until the next context method that may return
* controls is invoked.
*<p>
*
* @return A possibly null array of controls. If null, the previous
* method invoked on this context did not produce any controls.
* @exception NamingException If an error occurred while getting the response

View File

@ -352,7 +352,7 @@ public class Rdn implements Serializable, Comparable<Object> {
* </ul>
* <p>
* If obj is null or not an instance of Rdn, false is returned.
* <p>
*
* @param obj object to be compared for equality with this Rdn.
* @return true if the specified object is equal to this Rdn.
* @see #hashCode()

View File

@ -255,8 +255,6 @@ public class VendorXControlFactory extends ControlFactory {
}
</pre></blockquote>
<p>
<h2>Package Specification</h2>
The JNDI API Specification and related documents can be found in the

View File

@ -81,7 +81,6 @@ them, comparing components, and so on.
The overloads that accept string names are likely to be more useful
for simple applications, such as those that simply read in a name
and look up the corresponding object.
<p>
<h4>Bindings</h4>

View File

@ -120,7 +120,6 @@ public class DirectoryManager extends NamingManager {
*</ul>
* Service providers that implement the <tt>DirContext</tt> interface
* should use this method, not <tt>NamingManager.getObjectInstance()</tt>.
*<p>
*
* @param refInfo The possibly null object for which to create an object.
* @param name The name of this object relative to <code>nameCtx</code>.

View File

@ -92,7 +92,7 @@ public class NamingManager {
* The builder can only be installed if the executing thread is allowed
* (by the security manager's checkSetFactory() method) to do so.
* Once installed, the builder cannot be replaced.
*<p>
*
* @param builder The factory builder to install. If null, no builder
* is installed.
* @exception SecurityException builder cannot be installed

View File

@ -149,7 +149,6 @@ public interface ObjectFactory {
* If a factory uses <code>nameCtx</code> it should synchronize its use
* against concurrent access, since context implementations are not
* guaranteed to be thread-safe.
* <p>
*
* @param obj The possibly null object containing location or reference
* information that can be used in creating an object.

View File

@ -52,7 +52,20 @@ import javax.security.auth.DestroyFailedException;
* application depends on the default JGSS Kerberos mechanism to access the
* KerberosKey. In that case, however, the application will need an
* appropriate
* {@link javax.security.auth.kerberos.ServicePermission ServicePermission}.
* {@link javax.security.auth.kerberos.ServicePermission ServicePermission}.<p>
*
* When creating a {@code KerberosKey} using the
* {@link #KerberosKey(KerberosPrincipal, char[], String)} constructor,
* an implementation may accept non-IANA algorithm names (For example,
* "ArcFourMac" for "rc4-hmac"), but the {@link #getAlgorithm} method
* must always return the IANA algorithm name.<p>
*
* @implNote Old algorithm names used before JDK 9 are supported in the
* {@link #KerberosKey(KerberosPrincipal, char[], String)} constructor in this
* implementation for compatibility reasons, which are "DES" (and null) for
* "des-cbc-md5", "DESede" for "des3-cbc-sha1-kd", "ArcFourHmac" for "rc4-hmac",
* "AES128" for "aes128-cts-hmac-sha1-96", and "AES256" for
* "aes256-cts-hmac-sha1-96".
*
* @author Mayank Upadhyay
* @since 1.4
@ -73,7 +86,7 @@ public class KerberosKey implements SecretKey, Destroyable {
*
* @serial
*/
private int versionNum;
private final int versionNum;
/**
* {@code KeyImpl} is serialized by writing out the ASN1 Encoded bytes
@ -113,13 +126,16 @@ public class KerberosKey implements SecretKey, Destroyable {
}
/**
* Constructs a KerberosKey from a principal's password.
* Constructs a KerberosKey from a principal's password using the specified
* algorithm name. The algorithm name (case insensitive) should be provided
* as the encryption type string defined on the IANA
* <a href="https://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml#kerberos-parameters-1">Kerberos Encryption Type Numbers</a>
* page. The version number of the key generated will be 0.
*
* @param principal the principal that this password belongs to
* @param password the password that should be used to compute the key
* @param algorithm the name for the algorithm that this key will be
* used for. This parameter may be null in which case the default
* algorithm "DES" will be assumed.
* used for
* @throws IllegalArgumentException if the name of the
* algorithm passed is unsupported.
*/
@ -128,6 +144,7 @@ public class KerberosKey implements SecretKey, Destroyable {
String algorithm) {
this.principal = principal;
this.versionNum = 0;
// Pass principal in for salt
key = new KeyImpl(principal, password, algorithm);
}
@ -170,13 +187,18 @@ public class KerberosKey implements SecretKey, Destroyable {
*/
/**
* Returns the standard algorithm name for this key. For
* example, "DES" would indicate that this key is a DES key.
* See Appendix A in the <a href=
* "../../../../../technotes/guides/security/crypto/CryptoSpec.html#AppA">
* Java Cryptography Architecture API Specification &amp; Reference
* </a>
* for information about standard algorithm names.
* Returns the standard algorithm name for this key. The algorithm names
* are the encryption type string defined on the IANA
* <a href="https://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml#kerberos-parameters-1">Kerberos Encryption Type Numbers</a>
* page.
* <p>
* This method can return the following value not defined on the IANA page:
* <ol>
* <li>none: for etype equal to 0</li>
* <li>unknown: for etype greater than 0 but unsupported by
* the implementation</li>
* <li>private: for etype smaller than 0</li>
* </ol>
*
* @return the name of the algorithm associated with this key.
*/

View File

@ -36,7 +36,6 @@ import sun.security.krb5.PrincipalName;
import sun.security.krb5.EncryptionKey;
import sun.security.krb5.EncryptedData;
import sun.security.krb5.KrbException;
import sun.security.krb5.KrbCryptoException;
import sun.security.util.DerValue;
/**
@ -86,8 +85,12 @@ class KeyImpl implements SecretKey, Destroyable, Serializable {
try {
PrincipalName princ = new PrincipalName(principal.getName());
EncryptionKey key =
new EncryptionKey(password, princ.getSalt(), algorithm);
EncryptionKey key;
if ("none".equalsIgnoreCase(algorithm)) {
key = EncryptionKey.NULL_KEY;
} else {
key = new EncryptionKey(password, princ.getSalt(), algorithm);
}
this.keyBytes = key.getBytes();
this.keyType = key.getEType();
} catch (KrbException e) {
@ -118,27 +121,28 @@ class KeyImpl implements SecretKey, Destroyable, Serializable {
switch (eType) {
case EncryptedData.ETYPE_DES_CBC_CRC:
return "des-cbc-crc";
case EncryptedData.ETYPE_DES_CBC_MD5:
return "DES";
return "des-cbc-md5";
case EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD:
return "DESede";
return "des3-cbc-sha1-kd";
case EncryptedData.ETYPE_ARCFOUR_HMAC:
return "ArcFourHmac";
return "rc4-hmac";
case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96:
return "AES128";
return "aes128-cts-hmac-sha1-96";
case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96:
return "AES256";
return "aes256-cts-hmac-sha1-96";
case EncryptedData.ETYPE_NULL:
return "NULL";
return "none";
default:
throw new IllegalArgumentException(
"Unsupported encryption type: " + eType);
return eType > 0 ? "unknown" : "private";
}
}

View File

@ -48,6 +48,12 @@
* {@code <java-home>/lib/security} and failing that, in an OS-specific
* location.<p>
*
* The {@code krb5.conf} file is formatted in the Windows INI file style,
* which contains a series of relations grouped into different sections.
* Each relation contains a key and a value, the value can be an arbitrary
* string or a boolean value. A boolean value can be one of "true", "false",
* "yes", or "no", case-insensitive.<p>
*
* @since JDK1.4
*/
package javax.security.auth.kerberos;

View File

@ -65,7 +65,7 @@ import javax.accessibility.*;
* See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/combobox.html">How to Use Combo Boxes</a>
* in <a href="http://docs.oracle.com/javase/tutorial/"><em>The Java Tutorial</em></a>
* for further information.
* <p>
*
* @see ComboBoxModel
* @see DefaultComboBoxModel
*

View File

@ -123,7 +123,7 @@ public class JFrame extends Frame implements WindowConstants,
* 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.
* <p>
*
* @since 1.3
*/
public static final int EXIT_ON_CLOSE = 3;

View File

@ -260,7 +260,7 @@ import static sun.swing.SwingUtilities2.Section.*;
* See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/list.html">How to Use Lists</a>
* in <a href="http://docs.oracle.com/javase/tutorial/"><em>The Java Tutorial</em></a>
* for further documentation.
* <p>
*
* @see ListModel
* @see AbstractListModel
* @see DefaultListModel

View File

@ -259,7 +259,7 @@ import static javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP
* "Choose one", "Input",
* JOptionPane.INFORMATION_MESSAGE, null,
* possibleValues, possibleValues[0]);
* </pre><p>
* </pre>
* </dl>
* <b>Direct Use:</b><br>
* To create and use an <code>JOptionPane</code> directly, the

View File

@ -661,7 +661,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
* with the following code:
*
* <pre>((Vector)rowData.elementAt(1)).elementAt(5);</pre>
* <p>
*
* @param rowData the data for the new table
* @param columnNames names of each column
*/
@ -678,7 +678,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
* <pre> rowData[1][5]; </pre>
* <p>
* All rows must be of the same length as <code>columnNames</code>.
* <p>
*
* @param rowData the data for the new table
* @param columnNames names of each column
*/

View File

@ -42,10 +42,10 @@ import java.util.*;
* <p>
* The view invokes the following methods on the <code>RowSorter</code>:
* <ul>
* <li><code>toggleSortOrder</code> &#151; The view invokes this when the
* <li><code>toggleSortOrder</code> &#8212; The view invokes this when the
* appropriate user gesture has occurred to trigger a sort. For example,
* the user clicked a column header in a table.
* <li>One of the model change methods &#151; The view invokes a model
* <li>One of the model change methods &#8212; The view invokes a model
* change method when the underlying model
* has changed. There may be order dependencies in how the events are
* delivered, so a <code>RowSorter</code> should not update its mapping
@ -59,10 +59,10 @@ import java.util.*;
* <code>RowSorter</code> provides notification of changes by way of
* <code>RowSorterListener</code>. Two types of notification are sent:
* <ul>
* <li><code>RowSorterEvent.Type.SORT_ORDER_CHANGED</code> &#151; notifies
* <li><code>RowSorterEvent.Type.SORT_ORDER_CHANGED</code> &#8212; notifies
* listeners that the sort order has changed. This is typically followed
* by a notification that the sort has changed.
* <li><code>RowSorterEvent.Type.SORTED</code> &#151; notifies listeners that
* <li><code>RowSorterEvent.Type.SORTED</code> &#8212; notifies listeners that
* the mapping maintained by the <code>RowSorter</code> has changed in
* some way.
* </ul>

View File

@ -991,7 +991,7 @@ public class SpringLayout implements LayoutManager2 {
* If <code>constraints</code> is an instance of
* <code>SpringLayout.Constraints</code>,
* associates the constraints with the specified component.
* <p>
*
* @param component the component being added
* @param constraints the component's constraints
*
@ -1029,7 +1029,7 @@ public class SpringLayout implements LayoutManager2 {
* <pre>
* value(e1, c1) = value(e2, c2) + pad</pre>
* to take place during all subsequent layout operations.
* <p>
*
* @param e1 the edge of the dependent
* @param c1 the component of the dependent
* @param pad the fixed distance between dependent and anchor
@ -1056,7 +1056,7 @@ public class SpringLayout implements LayoutManager2 {
* <code>SpringLayout.VERTICAL_CENTER</code>,
* <code>SpringLayout.HORIZONTAL_CENTER</code> or
* <code>SpringLayout.BASELINE</code>.
* <p>
*
* @param e1 the edge of the dependent
* @param c1 the component of the dependent
* @param s the spring linking dependent and anchor

View File

@ -325,7 +325,7 @@ public class BasicButtonUI extends ButtonUI{
/**
* Method which renders the text of the current button.
* <p>
*
* @param g Graphics context
* @param b Current button to render
* @param textRect Bounding rectangle to render the text.

View File

@ -39,7 +39,7 @@ import sun.swing.DefaultLookup;
/**
* Provides the basic look and feel for a JColorChooser.
* <p>
*
* @author Tom Santos
* @author Steve Wilson
*/

View File

@ -664,7 +664,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Renders the text of the current menu item.
* <p>
*
* @param g graphics context
* @param menuItem menu item to render
* @param textRect bounding rectangle for rendering the text

View File

@ -39,7 +39,6 @@ import javax.swing.text.View;
/**
* BasicToggleButton implementation
* <p>
*
* @author Jeff Dinkins
*/

View File

@ -39,7 +39,6 @@ import javax.swing.plaf.basic.BasicSeparatorUI;
/**
* A Basic L&amp;F implementation of ToolBarSeparatorUI. This implementation
* is a "combined" view/controller.
* <p>
*
* @author Jeff Shapiro
*/

View File

@ -44,7 +44,6 @@ import sun.swing.UIAction;
/**
* A Basic L&amp;F implementation of ToolBarUI. This implementation
* is a "combined" view/controller.
* <p>
*
* @author Georges Saab
* @author Jeff Shapiro

View File

@ -41,7 +41,6 @@ import javax.swing.text.View;
/**
* Standard tool tip L&amp;F.
* <p>
*
* @author Dave Moore
*/

View File

@ -50,7 +50,6 @@ import sun.swing.UIAction;
/**
* The basic L&amp;F for a hierarchical data structure.
* <p>
*
* @author Scott Violet
* @author Shannon Hickey (drag and drop)

View File

@ -37,7 +37,6 @@ import javax.swing.plaf.*;
/**
* Metal implementation of JInternalFrame.
* <p>
*
* @author Steve Wilson
*/

View File

@ -56,7 +56,6 @@ import javax.swing.plaf.basic.BasicScrollBarUI;
/**
* Implementation of ScrollBarUI for the Metal Look and Feel
* <p>
*
* @author Tom Santos
* @author Steve Wilson

View File

@ -50,7 +50,6 @@ import javax.swing.plaf.basic.*;
/**
* A Metal Look and Feel implementation of ToolBarUI. This implementation
* is a "combined" view/controller.
* <p>
*
* @author Jeff Shapiro
*/

View File

@ -5,7 +5,7 @@
</head>
<body>
<h1 id="primaryColors">Primary Colors</h1>
<table>
<table summary="Nimbus primary colors">
<tr><th>Key</th><th>Value</th><th>Preview</th></tr>
<tr>
<td width="250"><code>control</code></td>
@ -86,7 +86,7 @@
</table>
<h1 id="secondaryColors">Secondary Colors</h1>
<table>
<table summary="Nimbus secondary colors">
<tr><th>Key</th><th>Value</th><th>Preview</th></tr>
<tr>
<td width="250"><code>activeCaption</code></td>

View File

@ -49,7 +49,7 @@ In addition to the <a
href="#buttonProperties">Button properties</a>, ArrowButton supports
the following properties: </p>
<h5>ArrowButton Specific Properties</h5>
<table border="1">
<table border="1" summary="ArrowButton specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -71,7 +71,7 @@ the following properties: </p>
to the <a href="#buttonProperties">Button properties</a>, JButton
supports the following property: </p>
<h5>JButton Specific Properties</h5>
<table border="1">
<table border="1" summary="JButton specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -94,7 +94,7 @@ button that is receiving focus. </td>
addition to the <a href="#buttonProperties">Button properties</a>,
JCheckBox supports the following property: </p>
<h5>JCheckBox Specific Properties</h5>
<table border="1">
<table border="1" summary="JCheckBox specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -114,7 +114,7 @@ JCheckBox supports the following property: </p>
<h4><a name="JComboBox">JComboBox</a></h4>
<p> JComboBox is a composite component that consists of the following
child Components: </p>
<table border="1">
<table border="1" summary="JComboBox child components">
<thead><tr>
<th>Name</th>
<th>Type</th>
@ -159,9 +159,9 @@ the renderer is a UIResource. </td>
</tr>
</tbody>
</table>
<p> </p>
<h5>JComboBox Specific Properties</h5>
<table border="1">
<table border="1" summary="JComboBox specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -181,7 +181,7 @@ with the keyboard. </td>
<br>
<h4>JFileChooser</h4>
<h5>JFileChooser Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1"
<table cellpadding="2" cellspacing="2" border="1" summary="JFileChooser specific properties"
style="width: 100%; text-align: left;">
<tbody>
<tr>
@ -341,7 +341,7 @@ of the file chooser.<br>
<br>
<h4><a name="JInternalFrame"></a>JInternalFrame</h4>
<h5>JInternalFrame Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1"
<table cellpadding="2" cellspacing="2" border="1" summary="JInternalFrame specific properties"
style="text-align: left; width: 100%;">
<tbody>
<tr>
@ -374,7 +374,7 @@ the system menu will be shown.<br>
internal frame similar to that found in a frame.<br>
</p>
<h5>JInternalFrameTitlePane Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1"
<table cellpadding="2" cellspacing="2" border="1" summary="JInternalFrameTitlePane specific properties"
style="text-align: left; width: 100%;">
<tbody>
<tr>
@ -473,7 +473,7 @@ abililty to close the internal frame.
<p> JList's sets the name of the renderer to List.renderer. JList
supports the following properties: </p>
<h5>JList Specific Properties</h5>
<table border="1">
<table border="1" summary="JList specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -516,7 +516,7 @@ specific to the component and Region.MENU_ITEM_ACCELERATOR.
MENU_ITEM_ACCELERATOR is used for painting the accelerator. Both Regions
paint text using the TEXT_FOREGROUND ColorType. The following set of
properties are supported: </p>
<table border="1">
<table border="1" summary="Menu classes common properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -570,7 +570,7 @@ this is used. </td>
<p> <code>Prefix</code> is one of: CheckBoxMenuItem, Menu, MenuItem, or
RadioButtonMenuItem. </p>
<p> JMenu also supports the following properties: </p>
<table border="1">
<table border="1" summary="JMenu specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -599,7 +599,7 @@ components, they are: OptionPane.button, OptionPane.label,
OptionPane.comboBox, OptionPane.scrollPane, OptionPane.list,
OptionPane.textField, OptionPane.iconLabel. </p>
<h5>JOptionPane Specific Properties</h5>
<table border="1">
<table border="1" summary="JOptionPane specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -713,7 +713,7 @@ it follows the other buttons. </td>
</h4>
<h5>JProgressBar Specific Properties<br>
</h5>
<table cellpadding="2" cellspacing="2" border="1"
<table cellpadding="2" cellspacing="2" border="1" summary="JProgressBar specific properties"
style="text-align: left; width: 100%;">
<tbody>
<tr>
@ -754,7 +754,7 @@ the bouncing box per frame when the progress bar is indeterminate.<br>
addition to the <a href="#buttonProperties">Button properties</a>,
JRadioButton supports the following property: </p>
<h5>JRadioButton Specific Properties</h5>
<table border="1">
<table border="1" summary="JRadioButton specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -774,7 +774,7 @@ JRadioButton supports the following property: </p>
<h4><a name="JScrollBar">JScrollBar</a></h4>
<p> JScrollBar is a composite component that consists of the following
child Components: </p>
<table border="1">
<table border="1" summary="JScrollBar child components">
<thead><tr>
<th>Name</th>
<th>Type</th>
@ -788,9 +788,9 @@ child Components: </p>
</tr>
</tbody>
</table>
<p> </p>
<h5>JScrollBar Specific Properties</h5>
<table border="1">
<table border="1" summary="JScrollBar specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -844,7 +844,7 @@ will be made equal. </td>
<h4><a name="Separator">Separators</a></h4>
<p> All of the separator classes, JSeparator, JPopupMenu.Separator and
JToolBar.Separator use the same property: </p>
<table border="1">
<table border="1" summary="Separator classes common properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -863,7 +863,7 @@ preferred size will include the Insets. </td>
</tbody>
</table>
<p> JToolBar.Separator also supports the following property: </p>
<table border="1">
<table border="1" summary="JToolBar.Separator specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -896,7 +896,7 @@ invoked. </td>
<code>Viewport</code>s border.
</p>
<h5>JScrollPane Specific Properties</h5>
<table border="1">
<table border="1" summary="JScrollPane specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -920,7 +920,7 @@ invoked. The two buttons will be named:
SplitPaneDivider.leftOneTouchButton and
SplitPaneDivider.rightOneTouchButton. </p>
<h5>JSplitPane Specific Properties</h5>
<table border="1">
<table border="1" summary="JSplitPane specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -964,7 +964,7 @@ setOneTouchExpandable. </td>
<br>
<h4><a name="JSlider"></a>JSlider</h4>
<h5>JSlider Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1"
<table cellpadding="2" cellspacing="2" border="1" summary="JSlider specific properties"
style="text-align: left; width: 100%;">
<tbody>
<tr>
@ -1024,7 +1024,7 @@ of the slider.<br>
<br>
<h4><a name="JTabbedPane"></a>JTabbedPane</h4>
<h5>JTabbedPane Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1"
<table cellpadding="2" cellspacing="2" border="1" summary="JTabbedPane specific properties"
style="text-align: left; width: 100%;">
<tbody>
<tr>
@ -1088,7 +1088,7 @@ selected tab.<br>
<p> JTable sets the name of the renderer to Table.cellRenderer.
JTable supports the following properties: </p>
<h5>JTable Specific Properties</h5>
<table border="1">
<table border="1" summary="JTable specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -1133,7 +1133,7 @@ renderer will only succeed if it is a Synth Border. </td>
<p> JTree sets the name of the renderer to Tree.renderer, the name of
the editor is Tree.cellEditor.</p>
<h5>JTree Specific Properties</h5>
<table border="1">
<table border="1" summary="JTree specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -1217,7 +1217,7 @@ and <a href="synthFileFormat.html#e.graphicsUtils">binding it</a> to the tree.</
addition to the <a href="#buttonProperties">Button properties</a>,
JToggleButton supports the following property: </p>
<h5>JToggleButton Specific Properties</h5>
<table border="1">
<table border="1" summary="JToggleButton specific properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -1238,7 +1238,7 @@ JToggleButton supports the following property: </p>
<p> Each of the Button classes (JButton, JCheckBox, JRadioButton,
JToggleButton and SynthArrowButton) support a similar set of properties.
These properties are: </p>
<table border="1">
<table border="1" summary="Button classes common properties">
<thead><tr>
<th>Property</th>
<th>Expected Type</th>
@ -1283,7 +1283,7 @@ JToggleButton.<br>
</p>
<h4><a name="textProperties"></a>Text Properties<br>
</h4>
<table cellpadding="2" cellspacing="2" border="1"
<table cellpadding="2" cellspacing="2" border="1" summary="Text properties"
style="text-align: left; width: 100%;">
<tbody>
<tr>

View File

@ -739,12 +739,12 @@ div.example {
&lt;/state>
&lt;/style>
</pre>
</div>
</div>
<p>
The following outlines which painter will be used for what
SynthPainter method:
SynthPainter method:
</p>
<table border=1>
<table border=1 summary="Painters for SynthPainter methods">
<tr><th>State<th>Method<th>Painter
<tr><td>SELECTED<td>paintButtonBackground<td>stateButtonBackgroundPainter
<tr><td>SELECTED<td>Anything but paintButtonBackground<td>stateFallbackPainter

View File

@ -56,7 +56,6 @@ import static sun.swing.SwingUtilities2.IMPLIED_CR;
* expanded if this view is embedded in a container that does
* tab expansion. ParagraphView is an example of a container
* that does tab expansion.
* <p>
*
* @since 1.3
*

View File

@ -42,7 +42,6 @@ import javax.swing.Icon;
* <p style="text-align:center"><img src="doc-files/paragraph.gif"
* alt="Diagram shows SpaceAbove, FirstLineIndent, LeftIndent, RightIndent,
* and SpaceBelow a paragraph."></p>
* <p>
*
* @author Timothy Prinzing
*/

View File

@ -183,7 +183,6 @@ A view has the following responsibilities:
<li>{@link #removeUpdate removeUpdate}
<li>{@link #changedUpdate changedUpdate}
</ul>
<p>
</dl>
*
* @author Timothy Prinzing

View File

@ -116,7 +116,7 @@ import javax.swing.text.*;
* concepts we do not currently
* support are pseudo selectors, such as <code>A:link { color: red }</code>,
* and the <code>important</code> modifier.
* <p>
*
* @implNote This implementation is currently
* incomplete. It can be replaced with alternative implementations
* that are complete. Future versions of this class will provide

View File

@ -47,7 +47,7 @@ import javax.swing.event.*;
* be incorporated into a larger edit and treated as a single edit.
* <li>If <code>addEdit</code> returns false <code>replaceEdit</code>
* is called on the new edit with the current edit passed in as the
* argument. This is the inverse of <code>addEdit</code> &#151;
* argument. This is the inverse of <code>addEdit</code> &#8212;
* if the new edit returns true from <code>replaceEdit</code>, the new
* edit replaces the current edit.
* </ol>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,7 @@ import java.lang.ref.WeakReference;
* <p><b>NOTE: This class is not synchronized, subclasses must implement
* the appropriate synchronization whwn needed.</b></p>
**/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpListTableCache extends SnmpTableCache {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -49,6 +49,7 @@ import java.lang.ref.WeakReference;
* <p><b>NOTE: This class is not synchronized, subclasses must implement
* the appropriate synchronization whwn needed.</b></p>
**/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpNamedListTableCache extends SnmpListTableCache {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,6 +45,7 @@ import java.lang.ref.WeakReference;
* <p><b>NOTE: This class is not synchronized, subclasses must implement
* the appropriate synchronization when needed.</b></p>
**/
@SuppressWarnings("serial") // JDK implementation class
public abstract class SnmpTableCache implements Serializable {
/**

View File

@ -26,11 +26,11 @@
package sun.security.internal.spec;
import java.security.spec.AlgorithmParameterSpec;
import java.security.AccessController;
import java.security.PrivilegedAction;
/**
* Parameters for SSL/TLS RSA Premaster secret generation.
* This class is used by SSL/TLS client to initialize KeyGenerators of the
* type "TlsRsaPremasterSecret".
* Parameters for SSL/TLS RSA premaster secret.
*
* <p>Instances of this class are immutable.
*
@ -43,90 +43,108 @@ import java.security.spec.AlgorithmParameterSpec;
public class TlsRsaPremasterSecretParameterSpec
implements AlgorithmParameterSpec {
private final int majorVersion;
private final int minorVersion;
private final byte[] encodedSecret;
/*
* The TLS spec says that the version in the RSA premaster secret must
* be the maximum version supported by the client (i.e. the version it
* requested in its client hello version). However, we (and other
* implementations) used to send the active negotiated version. The
* system property below allows to toggle the behavior.
*/
private final static String PROP_NAME =
"com.sun.net.ssl.rsaPreMasterSecretFix";
/*
* Default is "false" (old behavior) for compatibility reasons in
* SSLv3/TLSv1. Later protocols (TLSv1.1+) do not use this property.
*/
private final static boolean rsaPreMasterSecretFix =
AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
public Boolean run() {
String value = System.getProperty(PROP_NAME);
if (value != null && value.equalsIgnoreCase("true")) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}
});
private final int clientVersion;
private final int serverVersion;
/**
* Constructs a new TlsRsaPremasterSecretParameterSpec.
* <P>
* The version numbers will be placed inside the premaster secret to
* detect version rollbacks attacks as described in the TLS specification.
* Note that they do not indicate the protocol version negotiated for
* the handshake.
*
* @param majorVersion the major number of the protocol version
* @param minorVersion the minor number of the protocol version
* @param clientVersion the version of the TLS protocol by which the
* client wishes to communicate during this session
* @param serverVersion the negotiated version of the TLS protocol which
* contains the lower of that suggested by the client in the client
* hello and the highest supported by the server.
*
* @throws IllegalArgumentException if minorVersion or majorVersion are
* negative or larger than 255
* @throws IllegalArgumentException if clientVersion or serverVersion are
* negative or larger than (2^16 - 1)
*/
public TlsRsaPremasterSecretParameterSpec(int majorVersion,
int minorVersion) {
this.majorVersion =
TlsMasterSecretParameterSpec.checkVersion(majorVersion);
this.minorVersion =
TlsMasterSecretParameterSpec.checkVersion(minorVersion);
this.encodedSecret = null;
public TlsRsaPremasterSecretParameterSpec(
int clientVersion, int serverVersion) {
this.clientVersion = checkVersion(clientVersion);
this.serverVersion = checkVersion(serverVersion);
}
/**
* Constructs a new TlsRsaPremasterSecretParameterSpec.
* <P>
* The version numbers will be placed inside the premaster secret to
* detect version rollbacks attacks as described in the TLS specification.
* Note that they do not indicate the protocol version negotiated for
* the handshake.
* <P>
* Usually, the encoded secret key is a random number that acts as
* dummy pre_master_secret to avoid vulnerabilities described by
* section 7.4.7.1, RFC 5246.
* Returns the version of the TLS protocol by which the client wishes to
* communicate during this session.
*
* @param majorVersion the major number of the protocol version
* @param minorVersion the minor number of the protocol version
* @param encodedSecret the encoded secret key
*
* @throws IllegalArgumentException if minorVersion or majorVersion are
* negative or larger than 255, or encodedSecret is not exactly 48 bytes.
* @return the version of the TLS protocol in ClientHello message
*/
public TlsRsaPremasterSecretParameterSpec(int majorVersion,
int minorVersion, byte[] encodedSecret) {
this.majorVersion =
TlsMasterSecretParameterSpec.checkVersion(majorVersion);
this.minorVersion =
TlsMasterSecretParameterSpec.checkVersion(minorVersion);
if (encodedSecret == null || encodedSecret.length != 48) {
throw new IllegalArgumentException(
"Encoded secret is not exactly 48 bytes");
}
this.encodedSecret = encodedSecret.clone();
public int getClientVersion() {
return clientVersion;
}
/**
* Returns the major version.
* Returns the negotiated version of the TLS protocol which contains the
* lower of that suggested by the client in the client hello and the
* highest supported by the server.
*
* @return the major version.
* @return the negotiated version of the TLS protocol in ServerHello message
*/
public int getServerVersion() {
return serverVersion;
}
/**
* Returns the major version used in RSA premaster secret.
*
* @return the major version used in RSA premaster secret.
*/
public int getMajorVersion() {
return majorVersion;
if (rsaPreMasterSecretFix || clientVersion >= 0x0302) {
// 0x0302: TLSv1.1
return (clientVersion >>> 8) & 0xFF;
}
return (serverVersion >>> 8) & 0xFF;
}
/**
* Returns the minor version.
* Returns the minor version used in RSA premaster secret.
*
* @return the minor version.
* @return the minor version used in RSA premaster secret.
*/
public int getMinorVersion() {
return minorVersion;
if (rsaPreMasterSecretFix || clientVersion >= 0x0302) {
// 0x0302: TLSv1.1
return clientVersion & 0xFF;
}
return serverVersion & 0xFF;
}
/**
* Returns the encoded secret.
*
* @return the encoded secret, may be null if no encoded secret.
*/
public byte[] getEncodedSecret() {
return encodedSecret == null ? null : encodedSecret.clone();
private int checkVersion(int version) {
if ((version < 0) || (version > 0xFFFF)) {
throw new IllegalArgumentException(
"Version must be between 0 and 65,535");
}
return version;
}
}

View File

@ -32,20 +32,15 @@ package sun.security.krb5;
import java.io.File;
import java.io.FileInputStream;
import java.util.Hashtable;
import java.util.Vector;
import java.util.ArrayList;
import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import sun.net.dns.ResolverConfiguration;
import sun.security.krb5.internal.crypto.EType;
import sun.security.krb5.internal.Krb5;
@ -231,6 +226,31 @@ public class Config {
return v.lastElement();
}
/**
* Gets the boolean value for the specified keys. Returns TRUE if the
* string value is "yes", or "true", FALSE if "no", or "false", or null
* if otherwise or not defined. The comparision is case-insensitive.
*
* @param keys the keys, see {@link #get(String...)}
* @return the boolean value, or null if there is no value defined or the
* value does not look like a boolean value.
* @throws IllegalArgumentException see {@link #get(String...)}
*/
public Boolean getBooleanObject(String... keys) {
String s = get(keys);
if (s == null) {
return null;
}
switch (s.toLowerCase(Locale.US)) {
case "yes": case "true":
return Boolean.TRUE;
case "no": case "false":
return Boolean.FALSE;
default:
return null;
}
}
/**
* Gets all values for the specified keys.
* @throws IllegalArgumentException if any of the keys is illegal
@ -316,23 +336,6 @@ public class Config {
return value;
}
/**
* Gets the boolean value for the specified keys.
* @param keys the keys
* @return the boolean value, false is returned if it cannot be
* found or the value is not "true" (case insensitive).
* @throw IllegalArgumentException if any of the keys is illegal
* @see #get(java.lang.String[])
*/
public boolean getBooleanValue(String... keys) {
String val = get(keys);
if (val != null && val.equalsIgnoreCase("true")) {
return true;
} else {
return false;
}
}
/**
* Parses a string to an integer. The convertible strings include the
* string representations of positive integers, negative integers, and
@ -341,7 +344,7 @@ public class Config {
*
* @param input the String to be converted to an Integer.
* @return an numeric value represented by the string
* @exception NumberFormationException if the String does not contain a
* @exception NumberFormatException if the String does not contain a
* parsable integer.
*/
private int parseIntValue(String input) throws NumberFormatException {
@ -927,32 +930,20 @@ public class Config {
* use addresses if "no_addresses" or "noaddresses" is set to false
*/
public boolean useAddresses() {
boolean useAddr = false;
// use addresses if "no_addresses" is set to false
String value = get("libdefaults", "no_addresses");
useAddr = (value != null && value.equalsIgnoreCase("false"));
if (useAddr == false) {
// use addresses if "noaddresses" is set to false
value = get("libdefaults", "noaddresses");
useAddr = (value != null && value.equalsIgnoreCase("false"));
}
return useAddr;
return getBooleanObject("libdefaults", "no_addresses") == Boolean.FALSE ||
getBooleanObject("libdefaults", "noaddresses") == Boolean.FALSE;
}
/**
* Check if need to use DNS to locate Kerberos services
* Check if need to use DNS to locate Kerberos services for name. If not
* defined, check dns_fallback, whose default value is true.
*/
private boolean useDNS(String name) {
String value = get("libdefaults", name);
if (value == null) {
value = get("libdefaults", "dns_fallback");
if ("false".equalsIgnoreCase(value)) {
return false;
} else {
return true;
}
Boolean value = getBooleanObject("libdefaults", name);
if (value != null) {
return value.booleanValue();
} else {
return value.equalsIgnoreCase("true");
return getBooleanObject("libdefaults", "dns_fallback") != Boolean.FALSE;
}
}

View File

@ -271,15 +271,22 @@ public class EncryptionKey
String salt,
String algorithm) throws KrbCryptoException {
if (algorithm == null || algorithm.equalsIgnoreCase("DES")) {
if (algorithm == null || algorithm.equalsIgnoreCase("DES")
|| algorithm.equalsIgnoreCase("des-cbc-md5")) {
keyType = EncryptedData.ETYPE_DES_CBC_MD5;
} else if (algorithm.equalsIgnoreCase("DESede")) {
} else if (algorithm.equalsIgnoreCase("des-cbc-crc")) {
keyType = EncryptedData.ETYPE_DES_CBC_CRC;
} else if (algorithm.equalsIgnoreCase("DESede")
|| algorithm.equalsIgnoreCase("des3-cbc-sha1-kd")) {
keyType = EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD;
} else if (algorithm.equalsIgnoreCase("AES128")) {
} else if (algorithm.equalsIgnoreCase("AES128")
|| algorithm.equalsIgnoreCase("aes128-cts-hmac-sha1-96")) {
keyType = EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96;
} else if (algorithm.equalsIgnoreCase("ArcFourHmac")) {
} else if (algorithm.equalsIgnoreCase("ArcFourHmac")
|| algorithm.equalsIgnoreCase("rc4-hmac")) {
keyType = EncryptedData.ETYPE_ARCFOUR_HMAC;
} else if (algorithm.equalsIgnoreCase("AES256")) {
} else if (algorithm.equalsIgnoreCase("AES256")
|| algorithm.equalsIgnoreCase("aes256-cts-hmac-sha1-96")) {
keyType = EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96;
// validate if AES256 is enabled
if (!EType.isSupported(keyType)) {

View File

@ -299,14 +299,14 @@ public class KDCOptions extends KerberosFlags {
if ((options & KDC_OPT_RENEWABLE_OK) == KDC_OPT_RENEWABLE_OK) {
set(RENEWABLE_OK, true);
} else {
if (config.getBooleanValue("libdefaults", "renewable")) {
if (config.getBooleanObject("libdefaults", "renewable") == Boolean.TRUE) {
set(RENEWABLE_OK, true);
}
}
if ((options & KDC_OPT_PROXIABLE) == KDC_OPT_PROXIABLE) {
set(PROXIABLE, true);
} else {
if (config.getBooleanValue("libdefaults", "proxiable")) {
if (config.getBooleanObject("libdefaults", "proxiable") == Boolean.TRUE) {
set(PROXIABLE, true);
}
}
@ -314,7 +314,7 @@ public class KDCOptions extends KerberosFlags {
if ((options & KDC_OPT_FORWARDABLE) == KDC_OPT_FORWARDABLE) {
set(FORWARDABLE, true);
} else {
if (config.getBooleanValue("libdefaults", "forwardable")) {
if (config.getBooleanObject("libdefaults", "forwardable") == Boolean.TRUE) {
set(FORWARDABLE, true);
}
}

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