changeset 6171:f7d45462b225

8003950: Adds missing Override annotations and removes unnecessary imports in sun.security.ssl Reviewed-by: xuelei Contributed-by: Florian Weimer <fweimer@redhat.com>
author xuelei
date Sat, 24 Nov 2012 04:09:19 -0800
parents 621c379d909d
children d30c13172254
files src/share/classes/sun/security/ssl/AppInputStream.java src/share/classes/sun/security/ssl/AppOutputStream.java src/share/classes/sun/security/ssl/BaseSSLSocketImpl.java src/share/classes/sun/security/ssl/ByteBufferInputStream.java src/share/classes/sun/security/ssl/CipherBox.java src/share/classes/sun/security/ssl/CipherSuite.java src/share/classes/sun/security/ssl/CipherSuiteList.java src/share/classes/sun/security/ssl/ClientHandshaker.java src/share/classes/sun/security/ssl/DHClientKeyExchange.java src/share/classes/sun/security/ssl/ECDHClientKeyExchange.java src/share/classes/sun/security/ssl/ECDHCrypt.java src/share/classes/sun/security/ssl/EngineInputRecord.java src/share/classes/sun/security/ssl/EngineOutputRecord.java src/share/classes/sun/security/ssl/EngineWriter.java src/share/classes/sun/security/ssl/ExtensionType.java src/share/classes/sun/security/ssl/HandshakeHash.java src/share/classes/sun/security/ssl/HandshakeInStream.java src/share/classes/sun/security/ssl/HandshakeMessage.java src/share/classes/sun/security/ssl/HandshakeOutStream.java src/share/classes/sun/security/ssl/Handshaker.java src/share/classes/sun/security/ssl/HelloExtension.java src/share/classes/sun/security/ssl/HelloExtensions.java src/share/classes/sun/security/ssl/InputRecord.java src/share/classes/sun/security/ssl/JsseJce.java src/share/classes/sun/security/ssl/KerberosClientKeyExchange.java src/share/classes/sun/security/ssl/KeyManagerFactoryImpl.java src/share/classes/sun/security/ssl/Krb5Helper.java src/share/classes/sun/security/ssl/OutputRecord.java src/share/classes/sun/security/ssl/ProtocolList.java src/share/classes/sun/security/ssl/ProtocolVersion.java src/share/classes/sun/security/ssl/RSAClientKeyExchange.java src/share/classes/sun/security/ssl/RSASignature.java src/share/classes/sun/security/ssl/RenegotiationInfoExtension.java src/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java src/share/classes/sun/security/ssl/SSLContextImpl.java src/share/classes/sun/security/ssl/SSLEngineImpl.java src/share/classes/sun/security/ssl/SSLServerSocketFactoryImpl.java src/share/classes/sun/security/ssl/SSLServerSocketImpl.java src/share/classes/sun/security/ssl/SSLSessionContextImpl.java src/share/classes/sun/security/ssl/SSLSessionImpl.java src/share/classes/sun/security/ssl/SSLSocketFactoryImpl.java src/share/classes/sun/security/ssl/SSLSocketImpl.java src/share/classes/sun/security/ssl/ServerHandshaker.java src/share/classes/sun/security/ssl/ServerNameExtension.java src/share/classes/sun/security/ssl/SessionId.java src/share/classes/sun/security/ssl/SunJSSE.java src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java src/share/classes/sun/security/ssl/SupportedEllipticPointFormatsExtension.java src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java src/share/classes/sun/security/ssl/UnknownExtension.java src/share/classes/sun/security/ssl/X509KeyManagerImpl.java src/share/classes/sun/security/ssl/X509TrustManagerImpl.java
diffstat 53 files changed, 356 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/AppInputStream.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/AppInputStream.java	Sat Nov 24 04:09:19 2012 -0800
@@ -55,6 +55,7 @@
      * Return the minimum number of bytes that can be read without blocking.
      * Currently not synchronized.
      */
+    @Override
     public int available() throws IOException {
         if (c.checkEOF() || (r.isAppDataValid() == false)) {
             return 0;
@@ -65,6 +66,7 @@
     /**
      * Read a single byte, returning -1 on non-fault EOF status.
      */
+    @Override
     public synchronized int read() throws IOException {
         int n = read(oneByte, 0, 1);
         if (n <= 0) { // EOF
@@ -79,6 +81,7 @@
      * are responsible only for blocking to fill at most one buffer,
      * and returning "-1" on non-fault EOF status.
      */
+    @Override
     public synchronized int read(byte b[], int off, int len)
             throws IOException {
         if (b == null) {
@@ -124,6 +127,7 @@
      * is static and may garbled by concurrent use, but we are not interested
      * in the data anyway.
      */
+    @Override
     public synchronized long skip(long n) throws IOException {
         long skipped = 0;
         while (n > 0) {
@@ -141,6 +145,7 @@
     /*
      * Socket close is already synchronized, no need to block here.
      */
+    @Override
     public void close() throws IOException {
         c.close();
     }
--- a/src/share/classes/sun/security/ssl/AppOutputStream.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/AppOutputStream.java	Sat Nov 24 04:09:19 2012 -0800
@@ -56,6 +56,7 @@
     /**
      * Write the data out, NOW.
      */
+    @Override
     synchronized public void write(byte b[], int off, int len)
             throws IOException {
         if (b == null) {
@@ -131,6 +132,7 @@
     /**
      * Write one byte now.
      */
+    @Override
     synchronized public void write(int i) throws IOException {
         oneByte[0] = (byte)i;
         write(oneByte, 0, 1);
@@ -139,6 +141,7 @@
     /*
      * Socket close is already synchronized, no need to block here.
      */
+    @Override
     public void close() throws IOException {
         c.close();
     }
--- a/src/share/classes/sun/security/ssl/BaseSSLSocketImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/BaseSSLSocketImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -102,6 +102,7 @@
      * associated with this socket, if any.
      * @see java.net.Socket#getChannel
      */
+    @Override
     public final SocketChannel getChannel() {
         if (self == this) {
             return super.getChannel();
@@ -114,6 +115,7 @@
      * Binds the address to the socket.
      * @see java.net.Socket#bind
      */
+    @Override
     public void bind(SocketAddress bindpoint) throws IOException {
         /*
          * Bind to this socket
@@ -131,6 +133,7 @@
      * Returns the address of the endpoint this socket is connected to
      * @see java.net.Socket#getLocalSocketAddress
      */
+    @Override
     public SocketAddress getLocalSocketAddress() {
         if (self == this) {
             return super.getLocalSocketAddress();
@@ -143,6 +146,7 @@
      * Returns the address of the endpoint this socket is connected to
      * @see java.net.Socket#getRemoteSocketAddress
      */
+    @Override
     public SocketAddress getRemoteSocketAddress() {
         if (self == this) {
             return super.getRemoteSocketAddress();
@@ -164,6 +168,7 @@
      * @param   endpoint the <code>SocketAddress</code>
      * @throws  IOException if an error occurs during the connection
      */
+    @Override
     public final void connect(SocketAddress endpoint) throws IOException {
         connect(endpoint, 0);
     }
@@ -172,6 +177,7 @@
      * Returns the connection state of the socket.
      * @see java.net.Socket#isConnected
      */
+    @Override
     public final boolean isConnected() {
         if (self == this) {
             return super.isConnected();
@@ -184,6 +190,7 @@
      * Returns the binding state of the socket.
      * @see java.net.Socket#isBound
      */
+    @Override
     public final boolean isBound() {
         if (self == this) {
             return super.isBound();
@@ -203,6 +210,7 @@
      *
      * @throws UnsupportedOperationException
      */
+    @Override
     public final void shutdownInput() throws IOException {
         throw new UnsupportedOperationException("The method shutdownInput()" +
                    " is not supported in SSLSocket");
@@ -215,6 +223,7 @@
      *
      * @throws UnsupportedOperationException
      */
+    @Override
     public final void shutdownOutput() throws IOException {
         throw new UnsupportedOperationException("The method shutdownOutput()" +
                    " is not supported in SSLSocket");
@@ -225,6 +234,7 @@
      * Returns the input state of the socket
      * @see java.net.Socket#isInputShutdown
      */
+    @Override
     public final boolean isInputShutdown() {
         if (self == this) {
             return super.isInputShutdown();
@@ -237,6 +247,7 @@
      * Returns the output state of the socket
      * @see java.net.Socket#isOutputShutdown
      */
+    @Override
     public final boolean isOutputShutdown() {
         if (self == this) {
             return super.isOutputShutdown();
@@ -252,6 +263,7 @@
      * rather than forcing them to be explicitly reclaimed at
      * the penalty of prematurly killing SSL sessions.
      */
+    @Override
     protected final void finalize() throws Throwable {
         try {
             close();
@@ -281,6 +293,7 @@
     /**
      * Returns the address of the remote peer for this connection.
      */
+    @Override
     public final InetAddress getInetAddress() {
         if (self == this) {
             return super.getInetAddress();
@@ -295,6 +308,7 @@
      * @return the local address to which the socket is bound.
      * @since   JDK1.1
      */
+    @Override
     public final InetAddress getLocalAddress() {
         if (self == this) {
             return super.getLocalAddress();
@@ -306,6 +320,7 @@
     /**
      * Returns the number of the remote port that this connection uses.
      */
+    @Override
     public final int getPort() {
         if (self == this) {
             return super.getPort();
@@ -317,6 +332,7 @@
     /**
      * Returns the number of the local port that this connection uses.
      */
+    @Override
     public final int getLocalPort() {
         if (self == this) {
             return super.getLocalPort();
@@ -333,6 +349,7 @@
      * Enables or disables the Nagle optimization.
      * @see java.net.Socket#setTcpNoDelay
      */
+    @Override
     public final void setTcpNoDelay(boolean value) throws SocketException {
         if (self == this) {
             super.setTcpNoDelay(value);
@@ -348,6 +365,7 @@
      *
      * @see java.net.Socket#getTcpNoDelay
      */
+    @Override
     public final boolean getTcpNoDelay() throws SocketException {
         if (self == this) {
             return super.getTcpNoDelay();
@@ -360,6 +378,7 @@
      * Assigns the socket's linger timeout.
      * @see java.net.Socket#setSoLinger
      */
+    @Override
     public final void setSoLinger(boolean flag, int linger)
             throws SocketException {
         if (self == this) {
@@ -373,6 +392,7 @@
      * Returns the socket's linger timeout.
      * @see java.net.Socket#getSoLinger
      */
+    @Override
     public final int getSoLinger() throws SocketException {
         if (self == this) {
             return super.getSoLinger();
@@ -388,6 +408,7 @@
      * this for an SSLSocket. An implementation can be provided if a need
      * arises in future.
      */
+    @Override
     public final void sendUrgentData(int data) throws SocketException {
         throw new SocketException("This method is not supported "
                         + "by SSLSockets");
@@ -401,6 +422,7 @@
      * Setting OOBInline does not have any effect on SSLSocket,
      * since currently we don't support sending urgent data.
      */
+    @Override
     public final void setOOBInline(boolean on) throws SocketException {
         throw new SocketException("This method is ineffective, since"
                 + " sending urgent data is not supported by SSLSockets");
@@ -410,6 +432,7 @@
      * Tests if OOBINLINE is enabled.
      * @see java.net.Socket#getOOBInline
      */
+    @Override
     public final boolean getOOBInline() throws SocketException {
         throw new SocketException("This method is ineffective, since"
                 + " sending urgent data is not supported by SSLSockets");
@@ -419,6 +442,7 @@
      * Returns the socket timeout.
      * @see java.net.Socket#getSoTimeout
      */
+    @Override
     public final int getSoTimeout() throws SocketException {
         if (self == this) {
             return super.getSoTimeout();
@@ -427,6 +451,7 @@
         }
     }
 
+    @Override
     public final void setSendBufferSize(int size) throws SocketException {
         if (self == this) {
             super.setSendBufferSize(size);
@@ -435,6 +460,7 @@
         }
     }
 
+    @Override
     public final int getSendBufferSize() throws SocketException {
         if (self == this) {
             return super.getSendBufferSize();
@@ -443,6 +469,7 @@
         }
     }
 
+    @Override
     public final void setReceiveBufferSize(int size) throws SocketException {
         if (self == this) {
             super.setReceiveBufferSize(size);
@@ -451,6 +478,7 @@
         }
     }
 
+    @Override
     public final int getReceiveBufferSize() throws SocketException {
         if (self == this) {
             return super.getReceiveBufferSize();
@@ -463,6 +491,7 @@
      * Enable/disable SO_KEEPALIVE.
      * @see java.net.Socket#setKeepAlive
      */
+    @Override
     public final void setKeepAlive(boolean on) throws SocketException {
         if (self == this) {
             super.setKeepAlive(on);
@@ -475,6 +504,7 @@
      * Tests if SO_KEEPALIVE is enabled.
      * @see java.net.Socket#getKeepAlive
      */
+    @Override
     public final boolean getKeepAlive() throws SocketException {
         if (self == this) {
             return super.getKeepAlive();
@@ -488,6 +518,7 @@
      * packets sent from this Socket.
      * @see java.net.Socket#setTrafficClass
      */
+    @Override
     public final void setTrafficClass(int tc) throws SocketException {
         if (self == this) {
             super.setTrafficClass(tc);
@@ -501,6 +532,7 @@
      * sent from this Socket.
      * @see java.net.Socket#getTrafficClass
      */
+    @Override
     public final int getTrafficClass() throws SocketException {
         if (self == this) {
             return super.getTrafficClass();
@@ -513,6 +545,7 @@
      * Enable/disable SO_REUSEADDR.
      * @see java.net.Socket#setReuseAddress
      */
+    @Override
     public final void setReuseAddress(boolean on) throws SocketException {
         if (self == this) {
             super.setReuseAddress(on);
@@ -525,6 +558,7 @@
      * Tests if SO_REUSEADDR is enabled.
      * @see java.net.Socket#getReuseAddress
      */
+    @Override
     public final boolean getReuseAddress() throws SocketException {
         if (self == this) {
             return super.getReuseAddress();
@@ -538,6 +572,7 @@
      *
      * @see java.net.Socket#setPerformancePreferences(int, int, int)
      */
+    @Override
     public void setPerformancePreferences(int connectionTime,
             int latency, int bandwidth) {
         if (self == this) {
--- a/src/share/classes/sun/security/ssl/ByteBufferInputStream.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ByteBufferInputStream.java	Sat Nov 24 04:09:19 2012 -0800
@@ -50,6 +50,7 @@
      *
      * Increments position().
      */
+    @Override
     public int read() throws IOException {
 
         if (bb == null) {
@@ -67,6 +68,7 @@
      *
      * Increments position().
      */
+    @Override
     public int read(byte b[]) throws IOException {
 
         if (bb == null) {
@@ -81,6 +83,7 @@
      *
      * Increments position().
      */
+    @Override
     public int read(byte b[], int off, int len) throws IOException {
 
         if (bb == null) {
@@ -108,6 +111,7 @@
      * Skips over and discards <code>n</code> bytes of data from this input
      * stream.
      */
+    @Override
     public long skip(long n) throws IOException {
 
         if (bb == null) {
@@ -135,6 +139,7 @@
      * from this input stream without blocking by the next caller of a
      * method for this input stream.
      */
+    @Override
     public int available() throws IOException {
 
         if (bb == null) {
@@ -150,6 +155,7 @@
      *
      * @exception  IOException  if an I/O error occurs.
      */
+    @Override
     public void close() throws IOException {
         bb = null;
     }
@@ -157,12 +163,14 @@
     /**
      * Marks the current position in this input stream.
      */
+    @Override
     public synchronized void mark(int readlimit) {}
 
     /**
      * Repositions this stream to the position at the time the
      * <code>mark</code> method was last called on this input stream.
      */
+    @Override
     public synchronized void reset() throws IOException {
         throw new IOException("mark/reset not supported");
     }
@@ -171,6 +179,7 @@
      * Tests if this input stream supports the <code>mark</code> and
      * <code>reset</code> methods.
      */
+    @Override
     public boolean markSupported() {
         return false;
     }
--- a/src/share/classes/sun/security/ssl/CipherBox.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/CipherBox.java	Sat Nov 24 04:09:19 2012 -0800
@@ -32,7 +32,6 @@
 
 import java.security.*;
 import javax.crypto.*;
-import javax.crypto.spec.SecretKeySpec;
 import javax.crypto.spec.IvParameterSpec;
 
 import java.nio.*;
--- a/src/share/classes/sun/security/ssl/CipherSuite.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/CipherSuite.java	Sat Nov 24 04:09:19 2012 -0800
@@ -37,7 +37,6 @@
 import javax.crypto.spec.IvParameterSpec;
 import javax.crypto.spec.SecretKeySpec;
 
-import sun.security.ssl.CipherSuite.*;
 import static sun.security.ssl.CipherSuite.KeyExchange.*;
 import static sun.security.ssl.CipherSuite.PRF.*;
 import static sun.security.ssl.JsseJce.*;
@@ -203,6 +202,7 @@
      * Note that for unsupported CipherSuites parsed from a handshake
      * message we violate the equals() contract.
      */
+    @Override
     public int compareTo(CipherSuite o) {
         return o.priority - priority;
     }
@@ -210,6 +210,7 @@
     /**
      * Returns this.name.
      */
+    @Override
     public String toString() {
         return name;
     }
@@ -378,6 +379,7 @@
             }
         }
 
+        @Override
         public String toString() {
             return name;
         }
@@ -527,6 +529,7 @@
             return b.booleanValue();
         }
 
+        @Override
         public String toString() {
             return description;
         }
@@ -562,6 +565,7 @@
             return new MAC(this, protocolVersion, secret);
         }
 
+        @Override
         public String toString() {
             return name;
         }
--- a/src/share/classes/sun/security/ssl/CipherSuiteList.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/CipherSuiteList.java	Sat Nov 24 04:09:19 2012 -0800
@@ -177,6 +177,7 @@
         return suiteNames.clone();
     }
 
+    @Override
     public String toString() {
         return cipherSuites.toString();
     }
--- a/src/share/classes/sun/security/ssl/ClientHandshaker.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ClientHandshaker.java	Sat Nov 24 04:09:19 2012 -0800
@@ -45,7 +45,6 @@
 import javax.security.auth.Subject;
 
 import sun.security.ssl.HandshakeMessage.*;
-import sun.security.ssl.CipherSuite.*;
 import static sun.security.ssl.CipherSuite.KeyExchange.*;
 
 /**
@@ -128,6 +127,7 @@
      * is processed, and writes responses as needed using the connection
      * in the constructor.
      */
+    @Override
     void processMessage(byte type, int messageLen) throws IOException {
         if (state > type
                 && (type != HandshakeMessage.ht_hello_request
@@ -505,6 +505,7 @@
                     try {
                         subject = AccessController.doPrivileged(
                             new PrivilegedExceptionAction<Subject>() {
+                            @Override
                             public Subject run() throws Exception {
                                 return Krb5Helper.getClientSubject(getAccSE());
                             }});
@@ -1104,6 +1105,7 @@
     /*
      * Returns a ClientHello message to kickstart renegotiations
      */
+    @Override
     HandshakeMessage getKickstartMessage() throws SSLException {
         // session ID of the ClientHello message
         SessionId sessionId = SSLSessionImpl.nullSession.getSessionId();
@@ -1279,6 +1281,7 @@
     /*
      * Fault detected during handshake.
      */
+    @Override
     void handshakeAlert(byte description) throws SSLProtocolException {
         String message = Alerts.alertDescription(description);
 
--- a/src/share/classes/sun/security/ssl/DHClientKeyExchange.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/DHClientKeyExchange.java	Sat Nov 24 04:09:19 2012 -0800
@@ -39,6 +39,7 @@
  */
 final class DHClientKeyExchange extends HandshakeMessage {
 
+    @Override
     int messageType() {
         return ht_client_key_exchange;
     }
@@ -75,6 +76,7 @@
         dh_Yc = input.getBytes16();
     }
 
+    @Override
     int messageLength() {
         if (dh_Yc == null) {
             return 0;
@@ -83,10 +85,12 @@
         }
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putBytes16(dh_Yc);
     }
 
+    @Override
     void print(PrintStream s) throws IOException {
         s.println("*** ClientKeyExchange, DH");
 
--- a/src/share/classes/sun/security/ssl/ECDHClientKeyExchange.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ECDHClientKeyExchange.java	Sat Nov 24 04:09:19 2012 -0800
@@ -41,6 +41,7 @@
  */
 final class ECDHClientKeyExchange extends HandshakeMessage {
 
+    @Override
     int messageType() {
         return ht_client_key_exchange;
     }
@@ -63,14 +64,17 @@
         encodedPoint = input.getBytes8();
     }
 
+    @Override
     int messageLength() {
         return encodedPoint.length + 1;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putBytes8(encodedPoint);
     }
 
+    @Override
     void print(PrintStream s) throws IOException {
         s.println("*** ECDHClientKeyExchange");
 
--- a/src/share/classes/sun/security/ssl/ECDHCrypt.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ECDHCrypt.java	Sat Nov 24 04:09:19 2012 -0800
@@ -31,7 +31,6 @@
 
 import javax.crypto.SecretKey;
 import javax.crypto.KeyAgreement;
-import javax.crypto.spec.*;
 
 /**
  * Helper class for the ECDH key exchange. It generates the appropriate
--- a/src/share/classes/sun/security/ssl/EngineInputRecord.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/EngineInputRecord.java	Sat Nov 24 04:09:19 2012 -0800
@@ -64,6 +64,7 @@
         this.engine = engine;
     }
 
+    @Override
     byte contentType() {
         if (internalData) {
             return super.contentType();
@@ -271,6 +272,7 @@
      * data to be generated/output before the exception is ever
      * generated.
      */
+    @Override
     void writeBuffer(OutputStream s, byte [] buf, int off, int len)
             throws IOException {
         /*
--- a/src/share/classes/sun/security/ssl/EngineOutputRecord.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/EngineOutputRecord.java	Sat Nov 24 04:09:19 2012 -0800
@@ -29,9 +29,6 @@
 import java.io.*;
 import java.nio.*;
 
-import javax.net.ssl.SSLException;
-import sun.misc.HexDumpEncoder;
-
 
 /**
  * A OutputRecord class extension which uses external ByteBuffers
@@ -95,6 +92,7 @@
         finishedMsg = true;
     }
 
+    @Override
     public void flush() throws IOException {
         finishedMsg = false;
     }
--- a/src/share/classes/sun/security/ssl/EngineWriter.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/EngineWriter.java	Sat Nov 24 04:09:19 2012 -0800
@@ -25,7 +25,6 @@
 
 package sun.security.ssl;
 
-import javax.net.ssl.*;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.LinkedList;
--- a/src/share/classes/sun/security/ssl/ExtensionType.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ExtensionType.java	Sat Nov 24 04:09:19 2012 -0800
@@ -38,6 +38,7 @@
         this.name = name;
     }
 
+    @Override
     public String toString() {
         return name;
     }
--- a/src/share/classes/sun/security/ssl/HandshakeHash.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/HandshakeHash.java	Sat Nov 24 04:09:19 2012 -0800
@@ -28,9 +28,6 @@
 
 import java.io.ByteArrayOutputStream;
 import java.security.*;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
 import java.util.Locale;
 import java.util.Set;
 
@@ -391,11 +388,13 @@
         // }
     }
 
+    @Override
     protected int engineGetDigestLength() {
         checkState();
         return digests[0].getDigestLength();
     }
 
+    @Override
     protected void engineUpdate(byte b) {
         checkState();
         for (int i = 0; (i < digests.length) && (digests[i] != null); i++) {
@@ -403,6 +402,7 @@
         }
     }
 
+    @Override
     protected void engineUpdate(byte[] b, int offset, int len) {
         checkState();
         for (int i = 0; (i < digests.length) && (digests[i] != null); i++) {
@@ -410,6 +410,7 @@
         }
     }
 
+    @Override
     protected byte[] engineDigest() {
         checkState();
         byte[] digest = digests[0].digest();
@@ -417,6 +418,7 @@
         return digest;
     }
 
+    @Override
     protected int engineDigest(byte[] buf, int offset, int len)
             throws DigestException {
         checkState();
@@ -436,6 +438,7 @@
         }
     }
 
+    @Override
     protected void engineReset() {
         checkState();
         for (int i = 0; (i < digests.length) && (digests[i] != null); i++) {
@@ -443,6 +446,7 @@
         }
     }
 
+    @Override
     public Object clone() {
         checkState();
         for (int i = digests.length - 1; i >= 0; i--) {
--- a/src/share/classes/sun/security/ssl/HandshakeInStream.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/HandshakeInStream.java	Sat Nov 24 04:09:19 2012 -0800
@@ -28,7 +28,6 @@
 
 import java.io.InputStream;
 import java.io.IOException;
-import java.security.MessageDigest;
 
 import javax.net.ssl.SSLException;
 
@@ -74,6 +73,7 @@
      * Note that this returns the bytes remaining in the buffer, not
      * the bytes remaining in the current handshake message.
      */
+    @Override
     public int available() {
         return r.available();
     }
@@ -81,6 +81,7 @@
     /*
      * Get a byte of handshake data.
      */
+    @Override
     public int read() throws IOException {
         int n = r.read();
         if (n == -1) {
@@ -92,6 +93,7 @@
     /*
      * Get a bunch of bytes of handshake data.
      */
+    @Override
     public int read(byte b [], int off, int len) throws IOException {
         // we read from a ByteArrayInputStream, it always returns the
         // data in a single read if enough is available
@@ -105,6 +107,7 @@
     /*
      * Skip some handshake data.
      */
+    @Override
     public long skip(long n) throws IOException {
         return r.skip(n);
     }
@@ -117,6 +120,7 @@
      * read, data that has already been consumed is lost even if marked).
      */
 
+    @Override
     public void mark(int readlimit) {
         r.mark(readlimit);
     }
@@ -126,6 +130,7 @@
         r.reset();
     }
 
+    @Override
     public boolean markSupported() {
         return true;
     }
--- a/src/share/classes/sun/security/ssl/HandshakeMessage.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/HandshakeMessage.java	Sat Nov 24 04:09:19 2012 -0800
@@ -170,6 +170,7 @@
  * session parameters after a connection has been (re)established.
  */
 static final class HelloRequest extends HandshakeMessage {
+    @Override
     int messageType() { return ht_hello_request; }
 
     HelloRequest() { }
@@ -179,13 +180,16 @@
         // nothing in this message
     }
 
+    @Override
     int messageLength() { return 0; }
 
+    @Override
     void send(HandshakeOutStream out) throws IOException
     {
         // nothing in this messaage
     }
 
+    @Override
     void print(PrintStream out) throws IOException
     {
         out.println("*** HelloRequest (empty)");
@@ -329,6 +333,7 @@
 static final
 class ServerHello extends HandshakeMessage
 {
+    @Override
     int messageType() { return ht_server_hello; }
 
     ProtocolVersion     protocolVersion;
@@ -355,6 +360,7 @@
         }
     }
 
+    @Override
     int messageLength()
     {
         // almost fixed size, except session ID and extensions:
@@ -366,6 +372,7 @@
         return 38 + sessionId.length() + extensions.length();
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException
     {
         s.putInt8(protocolVersion.major);
@@ -378,6 +385,7 @@
         extensions.send(s);
     }
 
+    @Override
     void print(PrintStream s) throws IOException
     {
         s.println("*** ServerHello, " + protocolVersion);
@@ -416,6 +424,7 @@
 static final
 class CertificateMsg extends HandshakeMessage
 {
+    @Override
     int messageType() { return ht_certificate; }
 
     private X509Certificate[] chain;
@@ -450,6 +459,7 @@
         chain = v.toArray(new X509Certificate[v.size()]);
     }
 
+    @Override
     int messageLength() {
         if (encodedChain == null) {
             messageLength = 3;
@@ -468,6 +478,7 @@
         return messageLength;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putInt24(messageLength() - 3);
         for (byte[] b : encodedChain) {
@@ -475,6 +486,7 @@
         }
     }
 
+    @Override
     void print(PrintStream s) throws IOException {
         s.println("*** Certificate chain");
 
@@ -528,6 +540,7 @@
  */
 static abstract class ServerKeyExchange extends HandshakeMessage
 {
+    @Override
     int messageType() { return ht_server_key_exchange; }
 }
 
@@ -635,17 +648,20 @@
         return signature.verify(signatureBytes);
     }
 
+    @Override
     int messageLength() {
         return 6 + rsa_modulus.length + rsa_exponent.length
                + signatureBytes.length;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putBytes16(rsa_modulus);
         s.putBytes16(rsa_exponent);
         s.putBytes16(signatureBytes);
     }
 
+    @Override
     void print(PrintStream s) throws IOException {
         s.println("*** RSA ServerKeyExchange");
 
@@ -874,6 +890,7 @@
         dh_Ys = toByteArray(obj.getPublicKey());
     }
 
+    @Override
     int messageLength() {
         int temp = 6;   // overhead for p, g, y(s) values.
 
@@ -895,6 +912,7 @@
         return temp;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putBytes16(dh_p);
         s.putBytes16(dh_g);
@@ -914,6 +932,7 @@
         }
     }
 
+    @Override
     void print(PrintStream s) throws IOException {
         s.println("*** Diffie-Hellman ServerKeyExchange");
 
@@ -1118,6 +1137,7 @@
         sig.update(pointBytes);
     }
 
+    @Override
     int messageLength() {
         int sigLen = 0;
         if (signatureBytes != null) {
@@ -1130,6 +1150,7 @@
         return 4 + pointBytes.length + sigLen;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putInt8(CURVE_NAMED_CURVE);
         s.putInt16(curveId);
@@ -1145,6 +1166,7 @@
         }
     }
 
+    @Override
     void print(PrintStream s) throws IOException {
         s.println("*** ECDH ServerKeyExchange");
 
@@ -1479,6 +1501,7 @@
 static final
 class ServerHelloDone extends HandshakeMessage
 {
+    @Override
     int messageType() { return ht_server_hello_done; }
 
     ServerHelloDone() { }
@@ -1488,16 +1511,19 @@
         // nothing to do
     }
 
+    @Override
     int messageLength()
     {
         return 0;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException
     {
         // nothing to send
     }
 
+    @Override
     void print(PrintStream s) throws IOException
     {
         s.println("*** ServerHelloDone");
@@ -1712,6 +1738,7 @@
 
     private static void makeAccessible(final AccessibleObject o) {
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            @Override
             public Object run() {
                 o.setAccessible(true);
                 return null;
--- a/src/share/classes/sun/security/ssl/HandshakeOutStream.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/HandshakeOutStream.java	Sat Nov 24 04:09:19 2012 -0800
@@ -28,7 +28,6 @@
 
 import java.io.OutputStream;
 import java.io.IOException;
-import java.security.MessageDigest;
 
 /**
  * Output stream for handshake data.  This is used only internally
@@ -87,6 +86,7 @@
      * Hashes are updated automatically if something gets flushed to the
      * network (e.g. a big cert message etc).
      */
+    @Override
     public void write(byte buf[], int off, int len) throws IOException {
         while (len > 0) {
             int howmuch = Math.min(len, r.availableDataBytes());
@@ -104,6 +104,7 @@
     /*
      * write-a-byte
      */
+    @Override
     public void write(int i) throws IOException {
         if (r.availableDataBytes() < 1) {
             flush();
@@ -111,6 +112,7 @@
         r.write(i);
     }
 
+    @Override
     public void flush() throws IOException {
         if (socket != null) {
             try {
--- a/src/share/classes/sun/security/ssl/Handshaker.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/Handshaker.java	Sat Nov 24 04:09:19 2012 -0800
@@ -820,6 +820,7 @@
             processLoop();
         } else {
             delegateTask(new PrivilegedExceptionAction<Void>() {
+                @Override
                 public Void run() throws Exception {
                     processLoop();
                     return null;
--- a/src/share/classes/sun/security/ssl/HelloExtension.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/HelloExtension.java	Sat Nov 24 04:09:19 2012 -0800
@@ -40,6 +40,7 @@
 
     abstract void send(HandshakeOutStream s) throws IOException;
 
+    @Override
     public abstract String toString();
 
 }
--- a/src/share/classes/sun/security/ssl/HelloExtensions.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/HelloExtensions.java	Sat Nov 24 04:09:19 2012 -0800
@@ -29,8 +29,6 @@
 import java.io.PrintStream;
 import java.util.*;
 import javax.net.ssl.*;
-import java.nio.charset.StandardCharsets;
-import java.security.spec.ECParameterSpec;
 
 /**
  * This file contains all the classes relevant to TLS Extensions for the
--- a/src/share/classes/sun/security/ssl/InputRecord.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/InputRecord.java	Sat Nov 24 04:09:19 2012 -0800
@@ -28,8 +28,6 @@
 
 import java.io.*;
 import java.nio.*;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
 
 import javax.crypto.BadPaddingException;
 
@@ -285,6 +283,7 @@
      * Prevent any more data from being read into this record,
      * and flag the record as holding no data.
      */
+    @Override
     public void close() {
         appDataValid = false;
         isClosed = true;
--- a/src/share/classes/sun/security/ssl/JsseJce.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/JsseJce.java	Sat Nov 24 04:09:19 2012 -0800
@@ -71,6 +71,7 @@
         try {
             AccessController.doPrivileged(
                 new PrivilegedExceptionAction<Void>() {
+                    @Override
                     public Void run() throws Exception {
                         // Test for Kerberos using the bootstrap class loader
                         Class.forName("sun.security.krb5.PrincipalName", true,
@@ -114,6 +115,7 @@
         SunCertificates(final Provider p) {
             super("SunCertificates", 1.0d, "SunJSSE internal");
             AccessController.doPrivileged(new PrivilegedAction<Object>() {
+                @Override
                 public Object run() {
                     // copy certificate related services from the Sun provider
                     for (Map.Entry<Object,Object> entry : p.entrySet()) {
--- a/src/share/classes/sun/security/ssl/KerberosClientKeyExchange.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/KerberosClientKeyExchange.java	Sat Nov 24 04:09:19 2012 -0800
@@ -44,6 +44,7 @@
 
     private static final Class<?> implClass = AccessController.doPrivileged(
             new PrivilegedAction<Class<?>>() {
+                @Override
                 public Class<?> run() {
                     try {
                         return Class.forName(IMPL_CLASS, true, null);
--- a/src/share/classes/sun/security/ssl/KeyManagerFactoryImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/KeyManagerFactoryImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -45,6 +45,7 @@
     /**
      * Returns one key manager for each type of key material.
      */
+    @Override
     protected KeyManager[] engineGetKeyManagers() {
         if (!isInitialized) {
             throw new IllegalStateException(
@@ -56,6 +57,7 @@
     // Factory for the SunX509 keymanager
     public static final class SunX509 extends KeyManagerFactoryImpl {
 
+        @Override
         protected void engineInit(KeyStore ks, char[] password) throws
                 KeyStoreException, NoSuchAlgorithmException,
                 UnrecoverableKeyException {
@@ -69,6 +71,7 @@
             isInitialized = true;
         }
 
+        @Override
         protected void engineInit(ManagerFactoryParameters spec) throws
                 InvalidAlgorithmParameterException {
             throw new InvalidAlgorithmParameterException(
@@ -80,6 +83,7 @@
     // Factory for the X509 keymanager
     public static final class X509 extends KeyManagerFactoryImpl {
 
+        @Override
         protected void engineInit(KeyStore ks, char[] password) throws
                 KeyStoreException, NoSuchAlgorithmException,
                 UnrecoverableKeyException {
@@ -102,6 +106,7 @@
             isInitialized = true;
         }
 
+        @Override
         protected void engineInit(ManagerFactoryParameters params) throws
                 InvalidAlgorithmParameterException {
             if (params instanceof KeyStoreBuilderParameters == false) {
--- a/src/share/classes/sun/security/ssl/Krb5Helper.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/Krb5Helper.java	Sat Nov 24 04:09:19 2012 -0800
@@ -47,6 +47,7 @@
 
     private static final Krb5Proxy proxy =
         AccessController.doPrivileged(new PrivilegedAction<Krb5Proxy>() {
+            @Override
             public Krb5Proxy run() {
                 try {
                     Class<?> c = Class.forName(IMPL_CLASS, true, null);
--- a/src/share/classes/sun/security/ssl/OutputRecord.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/OutputRecord.java	Sat Nov 24 04:09:19 2012 -0800
@@ -116,6 +116,7 @@
      * Reset the record so that it can be refilled, starting
      * immediately after the header.
      */
+    @Override
     public synchronized void reset() {
         super.reset();
         count = headerSize;
--- a/src/share/classes/sun/security/ssl/ProtocolList.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ProtocolList.java	Sat Nov 24 04:09:19 2012 -0800
@@ -147,6 +147,7 @@
         return protocolNames.clone();
     }
 
+    @Override
     public String toString() {
         return protocols.toString();
     }
--- a/src/share/classes/sun/security/ssl/ProtocolVersion.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ProtocolVersion.java	Sat Nov 24 04:09:19 2012 -0800
@@ -165,6 +165,7 @@
         }
     }
 
+    @Override
     public String toString() {
         return name;
     }
@@ -172,6 +173,7 @@
     /**
      * Compares this object with the specified object for order.
      */
+    @Override
     public int compareTo(ProtocolVersion protocolVersion) {
         return this.v - protocolVersion.v;
     }
--- a/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java	Sat Nov 24 04:09:19 2012 -0800
@@ -28,10 +28,8 @@
 
 import java.io.*;
 import java.security.*;
-import java.security.interfaces.*;
 
 import javax.crypto.*;
-import javax.crypto.spec.*;
 
 import javax.net.ssl.*;
 
--- a/src/share/classes/sun/security/ssl/RSASignature.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/RSASignature.java	Sat Nov 24 04:09:19 2012 -0800
@@ -26,8 +26,6 @@
 
 package sun.security.ssl;
 
-import java.util.Arrays;
-
 import java.security.*;
 
 /**
@@ -106,6 +104,7 @@
         }
     }
 
+    @Override
     protected void engineInitVerify(PublicKey publicKey)
             throws InvalidKeyException {
         checkNull(publicKey);
@@ -113,11 +112,13 @@
         rawRsa.initVerify(publicKey);
     }
 
+    @Override
     protected void engineInitSign(PrivateKey privateKey)
             throws InvalidKeyException {
         engineInitSign(privateKey, null);
     }
 
+    @Override
     protected void engineInitSign(PrivateKey privateKey, SecureRandom random)
             throws InvalidKeyException {
         checkNull(privateKey);
@@ -133,6 +134,7 @@
         }
     }
 
+    @Override
     protected void engineUpdate(byte b) {
         initDigests();
         isReset = false;
@@ -140,6 +142,7 @@
         sha.update(b);
     }
 
+    @Override
     protected void engineUpdate(byte[] b, int off, int len) {
         initDigests();
         isReset = false;
@@ -161,21 +164,25 @@
         }
     }
 
+    @Override
     protected byte[] engineSign() throws SignatureException {
         rawRsa.update(getDigest());
         return rawRsa.sign();
     }
 
+    @Override
     protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
         return engineVerify(sigBytes, 0, sigBytes.length);
     }
 
+    @Override
     protected boolean engineVerify(byte[] sigBytes, int offset, int length)
             throws SignatureException {
         rawRsa.update(getDigest());
         return rawRsa.verify(sigBytes, offset, length);
     }
 
+    @Override
     protected void engineSetParameter(String param, Object value)
             throws InvalidParameterException {
         if (param.equals("hashes") == false) {
@@ -191,6 +198,7 @@
         sha = digests[1];
     }
 
+    @Override
     protected Object engineGetParameter(String param)
             throws InvalidParameterException {
         throw new InvalidParameterException("Parameters not supported");
--- a/src/share/classes/sun/security/ssl/RenegotiationInfoExtension.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/RenegotiationInfoExtension.java	Sat Nov 24 04:09:19 2012 -0800
@@ -85,10 +85,12 @@
 
 
     // Length of the encoded extension, including the type and length fields
+    @Override
     int length() {
         return 5 + renegotiated_connection.length;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putInt16(type.id);
         s.putInt16(renegotiated_connection.length + 1);
@@ -103,6 +105,7 @@
         return renegotiated_connection;
     }
 
+    @Override
     public String toString() {
         return "Extension " + type + ", renegotiated_connection: " +
                     (renegotiated_connection.length == 0 ? "<empty>" :
--- a/src/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java	Sat Nov 24 04:09:19 2012 -0800
@@ -111,6 +111,7 @@
         }
     }
 
+    @Override
     public boolean permits(Set<CryptoPrimitive> primitives,
             String algorithm, AlgorithmParameters parameters) {
 
@@ -139,6 +140,7 @@
         return permitted;
     }
 
+    @Override
     public boolean permits(Set<CryptoPrimitive> primitives, Key key) {
 
         boolean permitted = true;
@@ -162,6 +164,7 @@
         return permitted;
     }
 
+    @Override
     public boolean permits(Set<CryptoPrimitive> primitives,
             String algorithm, Key key, AlgorithmParameters parameters) {
 
@@ -204,6 +207,7 @@
             }
         }
 
+        @Override
         public boolean permits(Set<CryptoPrimitive> primitives,
                 String algorithm, AlgorithmParameters parameters) {
 
@@ -237,10 +241,12 @@
             return false;
         }
 
+        @Override
         final public boolean permits(Set<CryptoPrimitive> primitives, Key key) {
             return true;
         }
 
+        @Override
         final public boolean permits(Set<CryptoPrimitive> primitives,
                 String algorithm, Key key, AlgorithmParameters parameters) {
 
--- a/src/share/classes/sun/security/ssl/SSLContextImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLContextImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -71,6 +71,7 @@
         serverCache = new SSLSessionContextImpl();
     }
 
+    @Override
     protected void engineInit(KeyManager[] km, TrustManager[] tm,
                                 SecureRandom sr) throws KeyManagementException {
         isInitialized = false;
@@ -177,6 +178,7 @@
         return DummyX509KeyManager.INSTANCE;
     }
 
+    @Override
     protected SSLSocketFactory engineGetSocketFactory() {
         if (!isInitialized) {
             throw new IllegalStateException(
@@ -185,6 +187,7 @@
        return new SSLSocketFactoryImpl(this);
     }
 
+    @Override
     protected SSLServerSocketFactory engineGetServerSocketFactory() {
         if (!isInitialized) {
             throw new IllegalStateException("SSLContext is not initialized");
@@ -192,6 +195,7 @@
         return new SSLServerSocketFactoryImpl(this);
     }
 
+    @Override
     protected SSLEngine engineCreateSSLEngine() {
         if (!isInitialized) {
             throw new IllegalStateException(
@@ -200,6 +204,7 @@
         return new SSLEngineImpl(this);
     }
 
+    @Override
     protected SSLEngine engineCreateSSLEngine(String host, int port) {
         if (!isInitialized) {
             throw new IllegalStateException(
@@ -208,10 +213,12 @@
         return new SSLEngineImpl(this, host, port);
     }
 
+    @Override
     protected SSLSessionContext engineGetClientSessionContext() {
         return clientCache;
     }
 
+    @Override
     protected SSLSessionContext engineGetServerSessionContext() {
         return serverCache;
     }
@@ -463,14 +470,17 @@
             }
         }
 
+        @Override
         SSLParameters getDefaultServerSSLParams() {
             return defaultServerSSLParams;
         }
 
+        @Override
         SSLParameters getDefaultClientSSLParams() {
             return defaultClientSSLParams;
         }
 
+        @Override
         SSLParameters getSupportedSSLParams() {
             return supportedSSLParams;
         }
@@ -506,6 +516,7 @@
             }
         }
 
+        @Override
         protected void engineInit(KeyManager[] km, TrustManager[] tm,
             SecureRandom sr) throws KeyManagementException {
             throw new KeyManagementException
@@ -544,6 +555,7 @@
             final Map<String,String> props = new HashMap<>();
             AccessController.doPrivileged(
                         new PrivilegedExceptionAction<Object>() {
+                @Override
                 public Object run() throws Exception {
                     props.put("keyStore",  System.getProperty(
                                 "javax.net.ssl.keyStore", ""));
@@ -583,6 +595,7 @@
                         !NONE.equals(defaultKeyStore)) {
                     fs = AccessController.doPrivileged(
                             new PrivilegedExceptionAction<FileInputStream>() {
+                        @Override
                         public FileInputStream run() throws Exception {
                             return new FileInputStream(defaultKeyStore);
                         }
@@ -697,14 +710,17 @@
             }
         }
 
+        @Override
         SSLParameters getDefaultServerSSLParams() {
             return defaultServerSSLParams;
         }
 
+        @Override
         SSLParameters getDefaultClientSSLParams() {
             return defaultClientSSLParams;
         }
 
+        @Override
         SSLParameters getSupportedSSLParams() {
             return supportedSSLParams;
         }
@@ -761,14 +777,17 @@
             }
         }
 
+        @Override
         SSLParameters getDefaultServerSSLParams() {
             return defaultServerSSLParams;
         }
 
+        @Override
         SSLParameters getDefaultClientSSLParams() {
             return defaultClientSSLParams;
         }
 
+        @Override
         SSLParameters getSupportedSSLParams() {
             return supportedSSLParams;
         }
@@ -1041,28 +1060,34 @@
         this.km = km;
     }
 
+    @Override
     public String[] getClientAliases(String keyType, Principal[] issuers) {
         return km.getClientAliases(keyType, issuers);
     }
 
+    @Override
     public String chooseClientAlias(String[] keyType, Principal[] issuers,
             Socket socket) {
         return km.chooseClientAlias(keyType, issuers, socket);
     }
 
+    @Override
     public String[] getServerAliases(String keyType, Principal[] issuers) {
         return km.getServerAliases(keyType, issuers);
     }
 
+    @Override
     public String chooseServerAlias(String keyType, Principal[] issuers,
             Socket socket) {
         return km.chooseServerAlias(keyType, issuers, socket);
     }
 
+    @Override
     public X509Certificate[] getCertificateChain(String alias) {
         return km.getCertificateChain(alias);
     }
 
+    @Override
     public PrivateKey getPrivateKey(String alias) {
         return km.getPrivateKey(alias);
     }
@@ -1087,6 +1112,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String[] getClientAliases(String keyType, Principal[] issuers) {
         return null;
     }
@@ -1096,6 +1122,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String chooseClientAlias(String[] keyTypes, Principal[] issuers,
             Socket socket) {
         return null;
@@ -1106,6 +1133,7 @@
      * engine given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String chooseEngineClientAlias(
             String[] keyTypes, Principal[] issuers, SSLEngine engine) {
         return null;
@@ -1116,6 +1144,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String[] getServerAliases(String keyType, Principal[] issuers) {
         return null;
     }
@@ -1125,6 +1154,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String chooseServerAlias(String keyType, Principal[] issuers,
             Socket socket) {
         return null;
@@ -1135,6 +1165,7 @@
      * given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String chooseEngineServerAlias(
             String keyType, Principal[] issuers, SSLEngine engine) {
         return null;
@@ -1148,6 +1179,7 @@
      * @return the certificate chain (ordered with the user's certificate first
      * and the root certificate authority last)
      */
+    @Override
     public X509Certificate[] getCertificateChain(String alias) {
         return null;
     }
@@ -1160,6 +1192,7 @@
      *
      * @return the requested key
      */
+    @Override
     public PrivateKey getPrivateKey(String alias) {
         return null;
     }
--- a/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -553,6 +553,7 @@
     /*
      * Is a handshake currently underway?
      */
+    @Override
     public SSLEngineResult.HandshakeStatus getHandshakeStatus() {
         return getHSStatus(null);
     }
@@ -736,6 +737,7 @@
     /*
      * Start a SSLEngine handshake
      */
+    @Override
     public void beginHandshake() throws SSLException {
         try {
             kickstartHandshake();
@@ -755,6 +757,7 @@
      * Unwraps a buffer.  Does a variety of checks before grabbing
      * the unwrapLock, which blocks multiple unwraps from occuring.
      */
+    @Override
     public SSLEngineResult unwrap(ByteBuffer netData, ByteBuffer [] appData,
             int offset, int length) throws SSLException {
 
@@ -1155,6 +1158,7 @@
      * Wraps a buffer.  Does a variety of checks before grabbing
      * the wrapLock, which blocks multiple wraps from occuring.
      */
+    @Override
     public SSLEngineResult wrap(ByteBuffer [] appData,
             int offset, int length, ByteBuffer netData) throws SSLException {
 
@@ -1476,6 +1480,7 @@
         connectionState = cs_CLOSED;
     }
 
+    @Override
     synchronized public void closeOutbound() {
         /*
          * Dump out a close_notify to the remote side
@@ -1491,6 +1496,7 @@
     /**
      * Returns the outbound application data closure state
      */
+    @Override
     public boolean isOutboundDone() {
         return writer.isOutboundDone();
     }
@@ -1527,6 +1533,7 @@
      * lock here, and do the real work in the internal verison.
      * We do check for truncation attacks.
      */
+    @Override
     synchronized public void closeInbound() throws SSLException {
         /*
          * Currently closes the outbound side as well.  The IETF TLS
@@ -1559,6 +1566,7 @@
     /**
      * Returns the network inbound data closure state
      */
+    @Override
     synchronized public boolean isInboundDone() {
         return inboundDone;
     }
@@ -1576,6 +1584,7 @@
      * These can be long lived, and frequently correspond to an
      * entire login session for some user.
      */
+    @Override
     synchronized public SSLSession getSession() {
         return sess;
     }
@@ -1593,6 +1602,7 @@
      * Returns a delegated <code>Runnable</code> task for
      * this <code>SSLEngine</code>.
      */
+    @Override
     synchronized public Runnable getDelegatedTask() {
         if (handshaker != null) {
             return handshaker.getTask();
@@ -1847,6 +1857,7 @@
      * whether we enable session creations.  Otherwise,
      * we will need to wait for the next handshake.
      */
+    @Override
     synchronized public void setEnableSessionCreation(boolean flag) {
         enableSessionCreation = flag;
 
@@ -1859,6 +1870,7 @@
      * Returns true if new connections may cause creation of new SSL
      * sessions.
      */
+    @Override
     synchronized public boolean getEnableSessionCreation() {
         return enableSessionCreation;
     }
@@ -1872,6 +1884,7 @@
      * whether client authentication is needed.  Otherwise,
      * we will need to wait for the next handshake.
      */
+    @Override
     synchronized public void setNeedClientAuth(boolean flag) {
         doClientAuth = (flag ?
             SSLEngineImpl.clauth_required : SSLEngineImpl.clauth_none);
@@ -1883,6 +1896,7 @@
         }
     }
 
+    @Override
     synchronized public boolean getNeedClientAuth() {
         return (doClientAuth == SSLEngineImpl.clauth_required);
     }
@@ -1895,6 +1909,7 @@
      * whether client authentication is requested.  Otherwise,
      * we will need to wait for the next handshake.
      */
+    @Override
     synchronized public void setWantClientAuth(boolean flag) {
         doClientAuth = (flag ?
             SSLEngineImpl.clauth_requested : SSLEngineImpl.clauth_none);
@@ -1906,6 +1921,7 @@
         }
     }
 
+    @Override
     synchronized public boolean getWantClientAuth() {
         return (doClientAuth == SSLEngineImpl.clauth_requested);
     }
@@ -1916,6 +1932,7 @@
      * client or server mode.  Must be called before any SSL
      * traffic has started.
      */
+    @Override
     @SuppressWarnings("fallthrough")
     synchronized public void setUseClientMode(boolean flag) {
         switch (connectionState) {
@@ -1979,6 +1996,7 @@
         }
     }
 
+    @Override
     synchronized public boolean getUseClientMode() {
         return !roleIsServer;
     }
@@ -1994,6 +2012,7 @@
      *
      * @return an array of cipher suite names
      */
+    @Override
     public String[] getSupportedCipherSuites() {
         return sslContext.getSupportedCipherSuiteList().toStringArray();
     }
@@ -2007,6 +2026,7 @@
      *
      * @param suites Names of all the cipher suites to enable.
      */
+    @Override
     synchronized public void setEnabledCipherSuites(String[] suites) {
         enabledCipherSuites = new CipherSuiteList(suites);
         if ((handshaker != null) && !handshaker.activated()) {
@@ -2024,6 +2044,7 @@
      *
      * @return an array of cipher suite names
      */
+    @Override
     synchronized public String[] getEnabledCipherSuites() {
         return enabledCipherSuites.toStringArray();
     }
@@ -2034,6 +2055,7 @@
      * A subset of the supported protocols may be enabled for this connection
      * @return an array of protocol names.
      */
+    @Override
     public String[] getSupportedProtocols() {
         return sslContext.getSuportedProtocolList().toStringArray();
     }
@@ -2047,6 +2069,7 @@
      * @exception IllegalArgumentException when one of the protocols
      *  named by the parameter is not supported.
      */
+    @Override
     synchronized public void setEnabledProtocols(String[] protocols) {
         enabledProtocols = new ProtocolList(protocols);
         if ((handshaker != null) && !handshaker.activated()) {
@@ -2054,6 +2077,7 @@
         }
     }
 
+    @Override
     synchronized public String[] getEnabledProtocols() {
         return enabledProtocols.toStringArray();
     }
@@ -2061,6 +2085,7 @@
     /**
      * Returns the SSLParameters in effect for this SSLEngine.
      */
+    @Override
     synchronized public SSLParameters getSSLParameters() {
         SSLParameters params = super.getSSLParameters();
 
@@ -2076,6 +2101,7 @@
     /**
      * Applies SSLParameters to this engine.
      */
+    @Override
     synchronized public void setSSLParameters(SSLParameters params) {
         super.setSSLParameters(params);
 
@@ -2107,6 +2133,7 @@
     /**
      * Returns a printable representation of this end of the connection.
      */
+    @Override
     public String toString() {
         StringBuilder retval = new StringBuilder(80);
 
--- a/src/share/classes/sun/security/ssl/SSLServerSocketFactoryImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLServerSocketFactoryImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -67,10 +67,12 @@
      * @throws IOException if the socket cannot be created
      * @see java.net.Socket#bind(java.net.SocketAddress)
      */
+    @Override
     public ServerSocket createServerSocket() throws IOException {
         return new SSLServerSocketImpl(context);
     }
 
+    @Override
     public ServerSocket createServerSocket (int port)
     throws IOException
     {
@@ -78,12 +80,14 @@
     }
 
 
+    @Override
     public ServerSocket createServerSocket (int port, int backlog)
     throws IOException
     {
         return new SSLServerSocketImpl (port, backlog, context);
     }
 
+    @Override
     public ServerSocket
     createServerSocket (int port, int backlog, InetAddress ifAddress)
     throws IOException
@@ -98,6 +102,7 @@
      * (preventing person-in-the-middle attacks) and where traffic
      * is encrypted to provide confidentiality.
      */
+    @Override
     public String[] getDefaultCipherSuites() {
         return context.getDefaultCipherSuiteList(true).toStringArray();
     }
@@ -112,6 +117,7 @@
      *
      * @return an array of cipher suite names
      */
+    @Override
     public String[] getSupportedCipherSuites() {
         return context.getSupportedCipherSuiteList().toStringArray();
     }
--- a/src/share/classes/sun/security/ssl/SSLServerSocketImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLServerSocketImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -29,13 +29,11 @@
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.Socket;
-import java.net.ServerSocket;
 
 import java.security.AlgorithmConstraints;
 
 import java.util.*;
 
-import javax.net.ServerSocketFactory;
 import javax.net.ssl.SSLException;
 import javax.net.ssl.SSLServerSocket;
 import javax.net.ssl.SSLParameters;
@@ -172,6 +170,7 @@
      *
      * @return an array of cipher suite names
      */
+    @Override
     public String[] getSupportedCipherSuites() {
         return sslContext.getSupportedCipherSuiteList().toStringArray();
     }
@@ -181,6 +180,7 @@
      * for use by newly accepted connections.  A null return indicates
      * that the system defaults are in effect.
      */
+    @Override
     synchronized public String[] getEnabledCipherSuites() {
         return enabledCipherSuites.toStringArray();
     }
@@ -192,11 +192,13 @@
      * @param suites Names of all the cipher suites to enable; null
      *  means to accept system defaults.
      */
+    @Override
     synchronized public void setEnabledCipherSuites(String[] suites) {
         enabledCipherSuites = new CipherSuiteList(suites);
         checkedEnabled = false;
     }
 
+    @Override
     public String[] getSupportedProtocols() {
         return sslContext.getSuportedProtocolList().toStringArray();
     }
@@ -210,10 +212,12 @@
      * @exception IllegalArgumentException when one of the protocols
      *  named by the parameter is not supported.
      */
+    @Override
     synchronized public void setEnabledProtocols(String[] protocols) {
         enabledProtocols = new ProtocolList(protocols);
     }
 
+    @Override
     synchronized public String[] getEnabledProtocols() {
         return enabledProtocols.toStringArray();
     }
@@ -222,11 +226,13 @@
      * Controls whether the connections which are accepted must include
      * client authentication.
      */
+    @Override
     public void setNeedClientAuth(boolean flag) {
         doClientAuth = (flag ?
             SSLEngineImpl.clauth_required : SSLEngineImpl.clauth_none);
     }
 
+    @Override
     public boolean getNeedClientAuth() {
         return (doClientAuth == SSLEngineImpl.clauth_required);
     }
@@ -235,11 +241,13 @@
      * Controls whether the connections which are accepted should request
      * client authentication.
      */
+    @Override
     public void setWantClientAuth(boolean flag) {
         doClientAuth = (flag ?
             SSLEngineImpl.clauth_requested : SSLEngineImpl.clauth_none);
     }
 
+    @Override
     public boolean getWantClientAuth() {
         return (doClientAuth == SSLEngineImpl.clauth_requested);
     }
@@ -250,6 +258,7 @@
      * FTP clients, which accept connections from servers and should be
      * rejoining the already-negotiated SSL connection.
      */
+    @Override
     public void setUseClientMode(boolean flag) {
         /*
          * If we need to change the socket mode and the enabled
@@ -264,6 +273,7 @@
         useServerMode = !flag;
     }
 
+    @Override
     public boolean getUseClientMode() {
         return !useServerMode;
     }
@@ -273,6 +283,7 @@
      * Controls whether new connections may cause creation of new SSL
      * sessions.
      */
+    @Override
     public void setEnableSessionCreation(boolean flag) {
         enableSessionCreation = flag;
     }
@@ -281,6 +292,7 @@
      * Returns true if new connections may cause creation of new SSL
      * sessions.
      */
+    @Override
     public boolean getEnableSessionCreation() {
         return enableSessionCreation;
     }
@@ -288,6 +300,7 @@
     /**
      * Returns the SSLParameters in effect for newly accepted connections.
      */
+    @Override
     synchronized public SSLParameters getSSLParameters() {
         SSLParameters params = super.getSSLParameters();
 
@@ -302,6 +315,7 @@
     /**
      * Applies SSLParameters to newly accepted connections.
      */
+    @Override
     synchronized public void setSSLParameters(SSLParameters params) {
         super.setSSLParameters(params);
 
@@ -319,6 +333,7 @@
      * information provided in the authentication context which was
      * presented during construction.
      */
+    @Override
     public Socket accept() throws IOException {
         SSLSocketImpl s = new SSLSocketImpl(sslContext, useServerMode,
             enabledCipherSuites, doClientAuth, enableSessionCreation,
@@ -333,6 +348,7 @@
     /**
      * Provides a brief description of this SSL socket.
      */
+    @Override
     public String toString() {
         return "[SSL: "+ super.toString() + "]";
     }
--- a/src/share/classes/sun/security/ssl/SSLSessionContextImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLSessionContextImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -26,24 +26,14 @@
 
 package sun.security.ssl;
 
-import java.io.*;
-import java.net.*;
-import java.util.Date;
 import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.NoSuchElementException;
 import java.util.Vector;
 import java.util.Locale;
 
 import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLSessionContext;
-import javax.net.ssl.SSLSessionBindingListener;
-import javax.net.ssl.SSLSessionBindingEvent;
-import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.net.ssl.SSLSession;
 
 import sun.security.util.Cache;
-import sun.security.util.Cache.CacheVisitor;
 
 
 final class SSLSessionContextImpl implements SSLSessionContext {
@@ -69,6 +59,7 @@
     /**
      * Returns the <code>SSLSession</code> bound to the specified session id.
      */
+    @Override
     public SSLSession getSession(byte[] sessionId) {
         if (sessionId == null) {
             throw new NullPointerException("session id cannot be null");
@@ -85,6 +76,7 @@
     /**
      * Returns an enumeration of the active SSL sessions.
      */
+    @Override
     public Enumeration<byte[]> getIds() {
         SessionCacheVisitor scVisitor = new SessionCacheVisitor();
         sessionCache.accept(scVisitor);
@@ -99,6 +91,7 @@
      * should be timed within the shorter one of the old timeout and the
      * new timeout.
      */
+    @Override
     public void setSessionTimeout(int seconds)
                  throws IllegalArgumentException {
         if (seconds < 0) {
@@ -115,6 +108,7 @@
     /**
      * Gets the timeout limit for cached <code>SSLSession</code> objects
      */
+    @Override
     public int getSessionTimeout() {
         return timeout;
     }
@@ -123,6 +117,7 @@
      * Sets the size of the cache used for storing
      * <code>SSLSession</code> objects.
      */
+    @Override
     public void setSessionCacheSize(int size)
                  throws IllegalArgumentException {
         if (size < 0)
@@ -139,6 +134,7 @@
      * Gets the size of the cache used for storing
      * <code>SSLSession</code> objects.
      */
+    @Override
     public int getSessionCacheSize() {
         return cacheLimit;
     }
@@ -207,6 +203,7 @@
         try {
         String s = java.security.AccessController.doPrivileged(
                 new java.security.PrivilegedAction<String>() {
+                @Override
                 public String run() {
                     return System.getProperty(
                         "javax.net.ssl.sessionCacheSize");
@@ -238,6 +235,7 @@
         Vector<byte[]> ids = null;
 
         // public void visit(java.util.Map<K,V> map) {}
+        @Override
         public void visit(java.util.Map<SessionId, SSLSessionImpl> map) {
             ids = new Vector<>(map.size());
 
--- a/src/share/classes/sun/security/ssl/SSLSessionImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLSessionImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -26,12 +26,10 @@
 
 package sun.security.ssl;
 
-import java.io.*;
 import java.net.*;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Vector;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -45,20 +43,14 @@
 
 import javax.crypto.SecretKey;
 
-import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLSessionContext;
 import javax.net.ssl.SSLSessionBindingListener;
 import javax.net.ssl.SSLSessionBindingEvent;
 import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLPermission;
-import javax.net.ssl.SSLException;
 import javax.net.ssl.ExtendedSSLSession;
 import javax.net.ssl.SNIServerName;
 
-import javax.security.auth.x500.X500Principal;
-
-import static sun.security.ssl.CipherSuite.*;
 import static sun.security.ssl.CipherSuite.KeyExchange.*;
 
 /**
@@ -250,6 +242,7 @@
             !invalidated && isLocalAuthenticationValid();
     }
 
+    @Override
     public synchronized boolean isValid() {
         return isRejoinable();
     }
@@ -277,6 +270,7 @@
      * Returns the ID for this session.  The ID is fixed for the
      * duration of the session; neither it, nor its value, changes.
      */
+    @Override
     public byte[] getId() {
         return sessionId.getId();
     }
@@ -286,6 +280,7 @@
      * are currently valid in this process.  For client sessions,
      * this returns null.
      */
+    @Override
     public SSLSessionContext getSessionContext() {
         /*
          * An interim security policy until we can do something
@@ -332,6 +327,7 @@
     /**
      * Returns the name of the cipher suite in use on this session
      */
+    @Override
     public String getCipherSuite() {
         return getSuite().name;
     }
@@ -343,6 +339,7 @@
     /**
      * Returns the standard name of the protocol in use on this session
      */
+    @Override
     public String getProtocol() {
         return getProtocolVersion().name;
     }
@@ -357,6 +354,7 @@
     /**
      * Returns the hashcode for this session
      */
+    @Override
     public int hashCode() {
         return sessionId.hashCode();
     }
@@ -365,6 +363,7 @@
     /**
      * Returns true if sessions have same ids, false otherwise.
      */
+    @Override
     public boolean equals(Object obj) {
 
         if (obj == this) {
@@ -391,6 +390,7 @@
      * @return array of peer X.509 certs, with the peer's own cert
      *  first in the chain, and with the "root" CA last.
      */
+    @Override
     public java.security.cert.Certificate[] getPeerCertificates()
             throws SSLPeerUnverifiedException {
         //
@@ -421,6 +421,7 @@
      * @return array of peer X.509 certs, with the peer's own cert
      *  first in the chain, and with the "root" CA last.
      */
+    @Override
     public java.security.cert.Certificate[] getLocalCertificates() {
         //
         // clone to preserve integrity of session ... caller can't
@@ -440,6 +441,7 @@
      * @return array of peer X.509 certs, with the peer's own cert
      *  first in the chain, and with the "root" CA last.
      */
+    @Override
     public javax.security.cert.X509Certificate[] getPeerCertificateChain()
             throws SSLPeerUnverifiedException {
         //
@@ -511,6 +513,7 @@
      * @throws SSLPeerUnverifiedException if the peer's identity has not
      *          been verified
      */
+    @Override
     public Principal getPeerPrincipal()
                 throws SSLPeerUnverifiedException
     {
@@ -537,6 +540,7 @@
      * Principal for Kerberos cipher suites. If no principal was
      * sent, then null is returned.
      */
+    @Override
     public Principal getLocalPrincipal() {
 
         if ((cipherSuite.keyExchange == K_KRB5) ||
@@ -551,6 +555,7 @@
     /**
      * Returns the time this session was created.
      */
+    @Override
     public long getCreationTime() {
         return creationTime;
     }
@@ -559,6 +564,7 @@
      * Returns the last time this session was used to initialize
      * a connection.
      */
+    @Override
     public long getLastAccessedTime() {
         return (lastUsedTime != 0) ? lastUsedTime : creationTime;
     }
@@ -582,6 +588,7 @@
         }
     }
 
+    @Override
     public String getPeerHost() {
         return host;
     }
@@ -590,6 +597,7 @@
      * Need to provide the port info for caching sessions based on
      * host and port. Accessed by SSLSessionContextImpl
      */
+    @Override
     public int getPeerPort() {
         return port;
     }
@@ -604,6 +612,7 @@
      * Invalidate a session.  Active connections may still exist, but
      * no connections will be able to rejoin this session.
      */
+    @Override
     synchronized public void invalidate() {
         //
         // Can't invalidate the NULL session -- this would be
@@ -634,6 +643,7 @@
      * Assigns a session value.  Session change events are given if
      * appropriate, to any original value as well as the new value.
      */
+    @Override
     public void putValue(String key, Object value) {
         if ((key == null) || (value == null)) {
             throw new IllegalArgumentException("arguments can not be null");
@@ -660,6 +670,7 @@
     /**
      * Returns the specified session value.
      */
+    @Override
     public Object getValue(String key) {
         if (key == null) {
             throw new IllegalArgumentException("argument can not be null");
@@ -674,6 +685,7 @@
      * Removes the specified session value, delivering a session changed
      * event as appropriate.
      */
+    @Override
     public void removeValue(String key) {
         if (key == null) {
             throw new IllegalArgumentException("argument can not be null");
@@ -694,6 +706,7 @@
     /**
      * Lists the names of the session values.
      */
+    @Override
     public String[] getValueNames() {
         Enumeration<SecureKey> e;
         Vector<Object> v = new Vector<>();
@@ -741,6 +754,7 @@
      * Gets the current size of the largest SSL/TLS packet that is expected
      * when using this session.
      */
+    @Override
     public synchronized int getPacketBufferSize() {
         return acceptLargeFragments ?
                 Record.maxLargeRecordSize : Record.maxRecordSize;
@@ -750,6 +764,7 @@
      * Gets the current size of the largest application data that is
      * expected when using this session.
      */
+    @Override
     public synchronized int getApplicationBufferSize() {
         return getPacketBufferSize() - Record.headerSize;
     }
@@ -795,6 +810,7 @@
     }
 
     /** Returns a string representation of this SSL session */
+    @Override
     public String toString() {
         return "[Session-" + sessionCount
             + ", " + getCipherSuite()
@@ -805,6 +821,7 @@
      * When SSL sessions are finalized, all values bound to
      * them are removed.
      */
+    @Override
     public void finalize() {
         String[] names = getValueNames();
         for (int i = 0; i < names.length; i++) {
@@ -847,10 +864,12 @@
         return securityCtx;
     }
 
+    @Override
     public int hashCode() {
         return appKey.hashCode() ^ securityCtx.hashCode();
     }
 
+    @Override
     public boolean equals(Object o) {
         return o instanceof SecureKey && ((SecureKey)o).appKey.equals(appKey)
                         && ((SecureKey)o).securityCtx.equals(securityCtx);
--- a/src/share/classes/sun/security/ssl/SSLSocketFactoryImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLSocketFactoryImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -28,7 +28,6 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.SSLSocket;
 
 
 /**
@@ -69,6 +68,7 @@
      * @return the unconnected socket
      * @see java.net.Socket#connect(java.net.SocketAddress, int)
      */
+    @Override
     public Socket createSocket() {
         return new SSLSocketImpl(context);
     }
@@ -82,6 +82,7 @@
      * @param host name of the host with which to connect
      * @param port number of the server's port
      */
+    @Override
     public Socket createSocket(String host, int port)
     throws IOException, UnknownHostException
     {
@@ -104,6 +105,7 @@
      * @exception IOException if the connection can't be established
      * @exception UnknownHostException if the host is not known
      */
+    @Override
     public Socket createSocket(Socket s, String host, int port,
             boolean autoClose) throws IOException {
         return new SSLSocketImpl(context, s, host, port, autoClose);
@@ -129,6 +131,7 @@
      * @param address the server's host
      * @param port its port
      */
+    @Override
     public Socket createSocket(InetAddress address, int port)
     throws IOException
     {
@@ -143,6 +146,7 @@
      * has been configured. The socket will also bind() to the local
      * address and port supplied.
      */
+    @Override
     public Socket createSocket(String host, int port,
         InetAddress clientAddress, int clientPort)
     throws IOException
@@ -158,6 +162,7 @@
      * context which has been configured. The socket will also bind() to
      * the local address and port supplied.
      */
+    @Override
     public Socket createSocket(InetAddress address, int port,
         InetAddress clientAddress, int clientPort)
     throws IOException
@@ -174,6 +179,7 @@
      * (preventing person-in-the-middle attacks) and where traffic
      * is encrypted to provide confidentiality.
      */
+    @Override
     public String[] getDefaultCipherSuites() {
         return context.getDefaultCipherSuiteList(false).toStringArray();
     }
@@ -186,6 +192,7 @@
      * which do not protect data confidentiality.  Servers may also need
      * certain kinds of certificates to use certain cipher suites.
      */
+    @Override
     public String[] getSupportedCipherSuites() {
         return context.getSupportedCipherSuiteList().toStringArray();
     }
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -36,7 +36,6 @@
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
-import java.nio.charset.StandardCharsets;
 
 import javax.crypto.BadPaddingException;
 import javax.net.ssl.*;
@@ -626,6 +625,7 @@
      * @throws  IOException if an error occurs during the connection
      * @throws  SocketTimeoutException if timeout expires before connecting
      */
+    @Override
     public void connect(SocketAddress endpoint, int timeout)
             throws IOException {
 
@@ -1357,6 +1357,7 @@
     /**
      * Starts an SSL handshake on this connection.
      */
+    @Override
     public void startHandshake() throws IOException {
         // start an ssl handshake that could be resumed from timeout exception
         startHandshake(true);
@@ -1481,6 +1482,7 @@
     /**
      * Return whether the socket has been explicitly closed by the application.
      */
+    @Override
     public boolean isClosed() {
         return getConnectionState() == cs_APP_CLOSED;
     }
@@ -1567,6 +1569,7 @@
      * rather than leaving it for finalization, so that your remote
      * peer does not experience a protocol error.
      */
+    @Override
     public void close() throws IOException {
         if ((debug != null) && Debug.isOn("ssl")) {
             System.out.println(Thread.currentThread().getName() +
@@ -2155,6 +2158,7 @@
      * Data read from this stream was always integrity protected in
      * transit, and will usually have been confidentiality protected.
      */
+    @Override
     synchronized public InputStream getInputStream() throws IOException {
         if (isClosed()) {
             throw new SocketException("Socket is closed");
@@ -2176,6 +2180,7 @@
      * Data written on this stream is always integrity protected, and
      * will usually be confidentiality protected.
      */
+    @Override
     synchronized public OutputStream getOutputStream() throws IOException {
         if (isClosed()) {
             throw new SocketException("Socket is closed");
@@ -2197,6 +2202,7 @@
      * be long lived, and frequently correspond to an entire login session
      * for some user.
      */
+    @Override
     public SSLSession getSession() {
         /*
          * Force a synchronous handshake, if appropriate.
@@ -2235,6 +2241,7 @@
      * whether we enable session creations.  Otherwise,
      * we will need to wait for the next handshake.
      */
+    @Override
     synchronized public void setEnableSessionCreation(boolean flag) {
         enableSessionCreation = flag;
 
@@ -2247,6 +2254,7 @@
      * Returns true if new connections may cause creation of new SSL
      * sessions.
      */
+    @Override
     synchronized public boolean getEnableSessionCreation() {
         return enableSessionCreation;
     }
@@ -2260,6 +2268,7 @@
      * whether client authentication is needed.  Otherwise,
      * we will need to wait for the next handshake.
      */
+    @Override
     synchronized public void setNeedClientAuth(boolean flag) {
         doClientAuth = (flag ?
             SSLEngineImpl.clauth_required : SSLEngineImpl.clauth_none);
@@ -2271,6 +2280,7 @@
         }
     }
 
+    @Override
     synchronized public boolean getNeedClientAuth() {
         return (doClientAuth == SSLEngineImpl.clauth_required);
     }
@@ -2283,6 +2293,7 @@
      * whether client authentication is requested.  Otherwise,
      * we will need to wait for the next handshake.
      */
+    @Override
     synchronized public void setWantClientAuth(boolean flag) {
         doClientAuth = (flag ?
             SSLEngineImpl.clauth_requested : SSLEngineImpl.clauth_none);
@@ -2294,6 +2305,7 @@
         }
     }
 
+    @Override
     synchronized public boolean getWantClientAuth() {
         return (doClientAuth == SSLEngineImpl.clauth_requested);
     }
@@ -2304,6 +2316,7 @@
      * client or server mode.  Must be called before any SSL
      * traffic has started.
      */
+    @Override
     @SuppressWarnings("fallthrough")
     synchronized public void setUseClientMode(boolean flag) {
         switch (connectionState) {
@@ -2359,6 +2372,7 @@
         }
     }
 
+    @Override
     synchronized public boolean getUseClientMode() {
         return !roleIsServer;
     }
@@ -2374,6 +2388,7 @@
      *
      * @return an array of cipher suite names
      */
+    @Override
     public String[] getSupportedCipherSuites() {
         return sslContext.getSupportedCipherSuiteList().toStringArray();
     }
@@ -2387,6 +2402,7 @@
      *
      * @param suites Names of all the cipher suites to enable.
      */
+    @Override
     synchronized public void setEnabledCipherSuites(String[] suites) {
         enabledCipherSuites = new CipherSuiteList(suites);
         if ((handshaker != null) && !handshaker.activated()) {
@@ -2404,6 +2420,7 @@
      *
      * @return an array of cipher suite names
      */
+    @Override
     synchronized public String[] getEnabledCipherSuites() {
         return enabledCipherSuites.toStringArray();
     }
@@ -2414,6 +2431,7 @@
      * A subset of the supported protocols may be enabled for this connection
      * @return an array of protocol names.
      */
+    @Override
     public String[] getSupportedProtocols() {
         return sslContext.getSuportedProtocolList().toStringArray();
     }
@@ -2427,6 +2445,7 @@
      * @exception IllegalArgumentException when one of the protocols
      *  named by the parameter is not supported.
      */
+    @Override
     synchronized public void setEnabledProtocols(String[] protocols) {
         enabledProtocols = new ProtocolList(protocols);
         if ((handshaker != null) && !handshaker.activated()) {
@@ -2434,6 +2453,7 @@
         }
     }
 
+    @Override
     synchronized public String[] getEnabledProtocols() {
         return enabledProtocols.toStringArray();
     }
@@ -2442,6 +2462,7 @@
      * Assigns the socket timeout.
      * @see java.net.Socket#setSoTimeout
      */
+    @Override
     public void setSoTimeout(int timeout) throws SocketException {
         if ((debug != null) && Debug.isOn("ssl")) {
             System.out.println(Thread.currentThread().getName() +
@@ -2455,6 +2476,7 @@
      * Registers an event listener to receive notifications that an
      * SSL handshake has completed on this connection.
      */
+    @Override
     public synchronized void addHandshakeCompletedListener(
             HandshakeCompletedListener listener) {
         if (listener == null) {
@@ -2471,6 +2493,7 @@
     /**
      * Removes a previously registered handshake completion listener.
      */
+    @Override
     public synchronized void removeHandshakeCompletedListener(
             HandshakeCompletedListener listener) {
         if (handshakeListeners == null) {
@@ -2487,6 +2510,7 @@
     /**
      * Returns the SSLParameters in effect for this SSLSocket.
      */
+    @Override
     synchronized public SSLParameters getSSLParameters() {
         SSLParameters params = super.getSSLParameters();
 
@@ -2502,6 +2526,7 @@
     /**
      * Applies SSLParameters to this socket.
      */
+    @Override
     synchronized public void setSSLParameters(SSLParameters params) {
         super.setSSLParameters(params);
 
@@ -2550,6 +2575,7 @@
             event = e;
         }
 
+        @Override
         public void run() {
             // Don't need to synchronize, as it only runs in one thread.
             for (Map.Entry<HandshakeCompletedListener,AccessControlContext>
@@ -2558,6 +2584,7 @@
                 final HandshakeCompletedListener l = entry.getKey();
                 AccessControlContext acc = entry.getValue();
                 AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                    @Override
                     public Void run() {
                         l.handshakeCompleted(event);
                         return null;
@@ -2570,6 +2597,7 @@
     /**
      * Returns a printable representation of this end of the connection.
      */
+    @Override
     public String toString() {
         StringBuffer retval = new StringBuffer(80);
 
--- a/src/share/classes/sun/security/ssl/ServerHandshaker.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ServerHandshaker.java	Sat Nov 24 04:09:19 2012 -0800
@@ -43,7 +43,6 @@
 import sun.security.ssl.HandshakeMessage.*;
 import sun.security.ssl.CipherSuite.*;
 import sun.security.ssl.SignatureAndHashAlgorithm.*;
-import static sun.security.ssl.CipherSuite.*;
 import static sun.security.ssl.CipherSuite.KeyExchange.*;
 
 /**
@@ -144,6 +143,7 @@
      * It updates the state machine as each message is processed, and writes
      * responses as needed using the connection in the constructor.
      */
+    @Override
     void processMessage(byte type, int message_len)
             throws IOException {
         //
@@ -526,6 +526,7 @@
                         try {
                             subject = AccessController.doPrivileged(
                                 new PrivilegedExceptionAction<Subject>() {
+                                @Override
                                 public Subject run() throws Exception {
                                     return
                                         Krb5Helper.getServerSubject(getAccSE());
@@ -1329,6 +1330,7 @@
             kerberosKeys = AccessController.doPrivileged(
                 // Eliminate dependency on KerberosKey
                 new PrivilegedExceptionAction<SecretKey[]>() {
+                @Override
                 public SecretKey[] run() throws Exception {
                     // get kerberos key for the default principal
                     return Krb5Helper.getServerKeys(acc);
@@ -1600,6 +1602,7 @@
     /*
      * Returns a HelloRequest message to kickstart renegotiations
      */
+    @Override
     HandshakeMessage getKickstartMessage() {
         return new HelloRequest();
     }
@@ -1608,6 +1611,7 @@
     /*
      * Fault detected during handshake.
      */
+    @Override
     void handshakeAlert(byte description) throws SSLProtocolException {
 
         String message = Alerts.alertDescription(description);
--- a/src/share/classes/sun/security/ssl/ServerNameExtension.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/ServerNameExtension.java	Sat Nov 24 04:09:19 2012 -0800
@@ -243,10 +243,12 @@
         return false;
     }
 
+    @Override
     int length() {
         return listLength == 0 ? 4 : 6 + listLength;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putInt16(type.id);
         if (listLength == 0) {
@@ -262,6 +264,7 @@
         }
     }
 
+    @Override
     public String toString() {
         StringBuffer buffer = new StringBuffer();
         for (SNIServerName sniName : sniMap.values()) {
--- a/src/share/classes/sun/security/ssl/SessionId.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SessionId.java	Sat Nov 24 04:09:19 2012 -0800
@@ -68,6 +68,7 @@
     }
 
     /** Returns the ID as a string */
+    @Override
     public String toString ()
     {
         int             len = sessionId.length;
@@ -85,6 +86,7 @@
 
 
     /** Returns a value which is the same for session IDs which are equal */
+    @Override
     public int hashCode ()
     {
         int     retval = 0;
@@ -95,6 +97,7 @@
     }
 
     /** Returns true if the parameter is the same session ID */
+    @Override
     public boolean equals (Object obj)
     {
         if (!(obj instanceof SessionId))
--- a/src/share/classes/sun/security/ssl/SunJSSE.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SunJSSE.java	Sat Nov 24 04:09:19 2012 -0800
@@ -148,6 +148,7 @@
 
     private void registerAlgorithms(final boolean isfips) {
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            @Override
             public Object run() {
                 doRegister(isfips);
                 return null;
--- a/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -166,6 +166,7 @@
      * @return the certificate chain (ordered with the user's certificate first
      * and the root certificate authority last)
      */
+    @Override
     public X509Certificate[] getCertificateChain(String alias) {
         if (alias == null) {
             return null;
@@ -181,6 +182,7 @@
     /*
      * Returns the key associated with the given alias
      */
+    @Override
     public PrivateKey getPrivateKey(String alias) {
         if (alias == null) {
             return null;
@@ -198,6 +200,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String chooseClientAlias(String[] keyTypes, Principal[] issuers,
             Socket socket) {
         /*
@@ -228,6 +231,7 @@
      *
      * @since 1.5
      */
+    @Override
     public String chooseEngineClientAlias(String[] keyType,
             Principal[] issuers, SSLEngine engine) {
         /*
@@ -242,6 +246,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String chooseServerAlias(String keyType,
             Principal[] issuers, Socket socket) {
         /*
@@ -283,6 +288,7 @@
      *
      * @since 1.5
      */
+    @Override
     public String chooseEngineServerAlias(String keyType,
             Principal[] issuers, SSLEngine engine) {
         /*
@@ -297,6 +303,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String[] getClientAliases(String keyType, Principal[] issuers) {
         return getAliases(keyType, issuers);
     }
@@ -306,6 +313,7 @@
      * socket given the public key type and the list of
      * certificate issuer authorities recognized by the peer (if any).
      */
+    @Override
     public String[] getServerAliases(String keyType, Principal[] issuers) {
         return getAliases(keyType, issuers);
     }
--- a/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java	Sat Nov 24 04:09:19 2012 -0800
@@ -94,10 +94,12 @@
         return curveIds;
     }
 
+    @Override
     int length() {
         return 6 + (curveIds.length << 1);
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putInt16(type.id);
         int k = curveIds.length << 1;
@@ -108,6 +110,7 @@
         }
     }
 
+    @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("Extension " + type + ", curve names: {");
--- a/src/share/classes/sun/security/ssl/SupportedEllipticPointFormatsExtension.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/SupportedEllipticPointFormatsExtension.java	Sat Nov 24 04:09:19 2012 -0800
@@ -67,10 +67,12 @@
         }
     }
 
+    @Override
     int length() {
         return 5 + formats.length;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putInt16(type.id);
         s.putInt16(formats.length + 1);
@@ -91,6 +93,7 @@
         }
     }
 
+    @Override
     public String toString() {
         List<String> list = new ArrayList<String>();
         for (byte format : formats) {
--- a/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -27,11 +27,9 @@
 
 import java.util.*;
 import java.io.*;
-import java.math.*;
 import java.security.*;
 import java.security.cert.*;
 import javax.net.ssl.*;
-import java.security.spec.AlgorithmParameterSpec;
 
 import sun.security.validator.Validator;
 
@@ -45,6 +43,7 @@
         // empty
     }
 
+    @Override
     protected void engineInit(KeyStore ks) throws KeyStoreException {
         if (ks == null) {
             try {
@@ -85,6 +84,7 @@
     abstract X509TrustManager getInstance(ManagerFactoryParameters spec)
             throws InvalidAlgorithmParameterException;
 
+    @Override
     protected void engineInit(ManagerFactoryParameters spec) throws
             InvalidAlgorithmParameterException {
         trustManager = getInstance(spec);
@@ -94,6 +94,7 @@
     /**
      * Returns one trust manager for each type of trust material.
      */
+    @Override
     protected TrustManager[] engineGetTrustManagers() {
         if (!isInitialized) {
             throw new IllegalStateException(
@@ -109,6 +110,7 @@
             throws Exception {
         return AccessController.doPrivileged(
                 new PrivilegedExceptionAction<FileInputStream>() {
+                    @Override
                     public FileInputStream run() throws Exception {
                         try {
                             if (file.exists()) {
@@ -139,6 +141,7 @@
         KeyStore ks = null;
 
         AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+            @Override
             public Void run() throws Exception {
                 props.put("trustStore", System.getProperty(
                                 "javax.net.ssl.trustStore"));
@@ -239,9 +242,11 @@
     }
 
     public static final class SimpleFactory extends TrustManagerFactoryImpl {
+        @Override
         X509TrustManager getInstance(KeyStore ks) throws KeyStoreException {
             return new X509TrustManagerImpl(Validator.TYPE_SIMPLE, ks);
         }
+        @Override
         X509TrustManager getInstance(ManagerFactoryParameters spec)
                 throws InvalidAlgorithmParameterException {
             throw new InvalidAlgorithmParameterException
@@ -251,9 +256,11 @@
    }
 
     public static final class PKIXFactory extends TrustManagerFactoryImpl {
+        @Override
         X509TrustManager getInstance(KeyStore ks) throws KeyStoreException {
             return new X509TrustManagerImpl(Validator.TYPE_PKIX, ks);
         }
+        @Override
         X509TrustManager getInstance(ManagerFactoryParameters spec)
                 throws InvalidAlgorithmParameterException {
             if (spec instanceof CertPathTrustManagerParameters == false) {
--- a/src/share/classes/sun/security/ssl/UnknownExtension.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/UnknownExtension.java	Sat Nov 24 04:09:19 2012 -0800
@@ -41,15 +41,18 @@
         }
     }
 
+    @Override
     int length() {
         return 4 + data.length;
     }
 
+    @Override
     void send(HandshakeOutStream s) throws IOException {
         s.putInt16(type.id);
         s.putBytes16(data);
     }
 
+    @Override
     public String toString() {
         return "Unsupported extension " + type + ", data: " +
             Debug.toString(data);
--- a/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -102,29 +102,34 @@
     // public methods
     //
 
+    @Override
     public X509Certificate[] getCertificateChain(String alias) {
         PrivateKeyEntry entry = getEntry(alias);
         return entry == null ? null :
                 (X509Certificate[])entry.getCertificateChain();
     }
 
+    @Override
     public PrivateKey getPrivateKey(String alias) {
         PrivateKeyEntry entry = getEntry(alias);
         return entry == null ? null : entry.getPrivateKey();
     }
 
+    @Override
     public String chooseClientAlias(String[] keyTypes, Principal[] issuers,
             Socket socket) {
         return chooseAlias(getKeyTypes(keyTypes), issuers, CheckType.CLIENT,
                         getAlgorithmConstraints(socket));
     }
 
+    @Override
     public String chooseEngineClientAlias(String[] keyTypes,
             Principal[] issuers, SSLEngine engine) {
         return chooseAlias(getKeyTypes(keyTypes), issuers, CheckType.CLIENT,
                         getAlgorithmConstraints(engine));
     }
 
+    @Override
     public String chooseServerAlias(String keyType,
             Principal[] issuers, Socket socket) {
         return chooseAlias(getKeyTypes(keyType), issuers, CheckType.SERVER,
@@ -142,6 +147,7 @@
                          // It is not a really HTTPS endpoint identification.
     }
 
+    @Override
     public String chooseEngineServerAlias(String keyType,
             Principal[] issuers, SSLEngine engine) {
         return chooseAlias(getKeyTypes(keyType), issuers, CheckType.SERVER,
@@ -159,10 +165,12 @@
                          // It is not a really HTTPS endpoint identification.
     }
 
+    @Override
     public String[] getClientAliases(String keyType, Principal[] issuers) {
         return getAliases(keyType, issuers, CheckType.CLIENT, null);
     }
 
+    @Override
     public String[] getServerAliases(String keyType, Principal[] issuers) {
         return getAliases(keyType, issuers, CheckType.SERVER, null);
     }
@@ -488,11 +496,13 @@
             this.checkResult = checkResult;
         }
 
+        @Override
         public int compareTo(EntryStatus other) {
             int result = this.checkResult.compareTo(other.checkResult);
             return (result == 0) ? (this.keyIndex - other.keyIndex) : result;
         }
 
+        @Override
         public String toString() {
             String s = alias + " (verified: " + checkResult + ")";
             if (builderIndex == 0) {
--- a/src/share/classes/sun/security/ssl/X509TrustManagerImpl.java	Sat Nov 24 03:34:27 2012 -0800
+++ b/src/share/classes/sun/security/ssl/X509TrustManagerImpl.java	Sat Nov 24 04:09:19 2012 -0800
@@ -28,7 +28,6 @@
 
 import java.net.Socket;
 import javax.net.ssl.SSLSession;
-import java.nio.charset.StandardCharsets;
 
 import java.util.*;
 import java.security.*;