--- old/src/java.base/share/classes/javax/net/ssl/SSLContext.java Fri May 29 00:47:22 2015
+++ new/src/java.base/share/classes/javax/net/ssl/SSLContext.java Fri May 29 00:47:21 2015
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,12 +32,12 @@
/**
* Instances of this class represent a secure socket protocol
* implementation which acts as a factory for secure socket
- * factories or SSLEngine
s. This class is initialized
+ * factories or {@code SSLEngine}s. This class is initialized
* with an optional set of key and trust managers and source of
* secure random bytes.
*
*
Every implementation of the Java platform is required to support the
- * following standard SSLContext
protocol:
+ * following standard {@code SSLContext} protocol:
*
If a default context was set using the {@link #setDefault
* SSLContext.setDefault()} method, it is returned. Otherwise, the first
* call of this method triggers the call
- * SSLContext.getInstance("Default")
.
+ * {@code SSLContext.getInstance("Default")}.
* If successful, that object is made the default SSL context and returned.
*
*
The default context is immediately
@@ -106,8 +106,8 @@
* @param context the SSLContext
* @throws NullPointerException if context is null
* @throws SecurityException if a security manager exists and its
- * checkPermission
method does not allow
- * SSLPermission("setDefaultSSLContext")
+ * {@code checkPermission} method does not allow
+ * {@code SSLPermission("setDefaultSSLContext")}
* @since 1.6
*/
public static synchronized void setDefault(SSLContext context) {
@@ -122,7 +122,7 @@
}
/**
- * Returns a SSLContext
object that implements the
+ * Returns a {@code SSLContext} object that implements the
* specified secure socket protocol.
*
*
This method traverses the list of registered security Providers,
@@ -141,7 +141,7 @@
* Documentation
* for information about standard protocol names.
*
- * @return the new SSLContext
object.
+ * @return the new {@code SSLContext} object.
*
* @exception NoSuchAlgorithmException if no Provider supports a
* SSLContextSpi implementation for the
@@ -159,7 +159,7 @@
}
/**
- * Returns a SSLContext
object that implements the
+ * Returns a {@code SSLContext} object that implements the
* specified secure socket protocol.
*
*
A new SSLContext object encapsulating the
@@ -179,7 +179,7 @@
*
* @param provider the name of the provider.
*
- * @return the new SSLContext
object.
+ * @return the new {@code SSLContext} object.
*
* @throws NoSuchAlgorithmException if a SSLContextSpi
* implementation for the specified protocol is not
@@ -202,7 +202,7 @@
}
/**
- * Returns a SSLContext
object that implements the
+ * Returns a {@code SSLContext} object that implements the
* specified secure socket protocol.
*
*
A new SSLContext object encapsulating the
@@ -219,7 +219,7 @@
*
* @param provider an instance of the provider.
*
- * @return the new SSLContext
object.
+ * @return the new {@code SSLContext} object.
*
* @throws NoSuchAlgorithmException if a SSLContextSpi
* implementation for the specified protocol is not available
@@ -239,13 +239,13 @@
}
/**
- * Returns the protocol name of this SSLContext
object.
+ * Returns the protocol name of this {@code SSLContext} object.
*
*
This is the same name that was specified in one of the
- * getInstance
calls that created this
- * SSLContext
object.
+ * {@code getInstance} calls that created this
+ * {@code SSLContext} object.
*
- * @return the protocol name of this SSLContext
object.
+ * @return the protocol name of this {@code SSLContext} object.
*/
public final String getProtocol() {
return this.protocol;
@@ -252,9 +252,9 @@
}
/**
- * Returns the provider of this SSLContext
object.
+ * Returns the provider of this {@code SSLContext} object.
*
- * @return the provider of this SSLContext
object
+ * @return the provider of this {@code SSLContext} object
*/
public final Provider getProvider() {
return this.provider;
@@ -283,12 +283,14 @@
}
/**
- * Returns a SocketFactory
object for this
+ * Returns a {@code SocketFactory} object for this
* context.
*
- * @return the SocketFactory
object
+ * @return the {@code SocketFactory} object
+ * @throws UnsupportedOperationException if the underlying provider
+ * does not implement the operation.
* @throws IllegalStateException if the SSLContextImpl requires
- * initialization and the init()
has not been called
+ * initialization and the {@code init()} has not been called
*/
public final SSLSocketFactory getSocketFactory() {
return contextSpi.engineGetSocketFactory();
@@ -295,12 +297,14 @@
}
/**
- * Returns a ServerSocketFactory
object for
+ * Returns a {@code ServerSocketFactory} object for
* this context.
*
- * @return the ServerSocketFactory
object
+ * @return the {@code ServerSocketFactory} object
+ * @throws UnsupportedOperationException if the underlying provider
+ * does not implement the operation.
* @throws IllegalStateException if the SSLContextImpl requires
- * initialization and the init()
has not been called
+ * initialization and the {@code init()} has not been called
*/
public final SSLServerSocketFactory getServerSocketFactory() {
return contextSpi.engineGetServerSocketFactory();
@@ -307,7 +311,7 @@
}
/**
- * Creates a new SSLEngine
using this context.
+ * Creates a new {@code SSLEngine} using this context.
*
* Applications using this factory method are providing no hints
* for an internal session reuse strategy. If hints are desired,
@@ -317,11 +321,11 @@
* Some cipher suites (such as Kerberos) require remote hostname
* information, in which case this factory method should not be used.
*
- * @return the SSLEngine
object
+ * @return the {@code SSLEngine} object
* @throws UnsupportedOperationException if the underlying provider
* does not implement the operation.
* @throws IllegalStateException if the SSLContextImpl requires
- * initialization and the init()
has not been called
+ * initialization and the {@code init()} has not been called
* @since 1.5
*/
public final SSLEngine createSSLEngine() {
@@ -338,7 +342,7 @@
}
/**
- * Creates a new SSLEngine
using this context using
+ * Creates a new {@code SSLEngine} using this context using
* advisory peer information.
*
* Applications using this factory method are providing hints
@@ -349,11 +353,11 @@
*
* @param peerHost the non-authoritative name of the host
* @param peerPort the non-authoritative port
- * @return the new SSLEngine
object
+ * @return the new {@code SSLEngine} object
* @throws UnsupportedOperationException if the underlying provider
* does not implement the operation.
* @throws IllegalStateException if the SSLContextImpl requires
- * initialization and the init()
has not been called
+ * initialization and the {@code init()} has not been called
* @since 1.5
*/
public final SSLEngine createSSLEngine(String peerHost, int peerPort) {