changeset 11228:233b64e0e5e2

Merge
author hseigel
date Sat, 27 Dec 2014 13:27:07 -0500
parents ffb595b1ff47 2c76a16c2ac8
children 2efb43f9275e
files src/java.base/share/classes/sun/nio/fs/AbstractPath.java
diffstat 197 files changed, 2607 insertions(+), 962 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/com/sun/crypto/provider/CipherBlockChaining.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/CipherBlockChaining.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
 package com.sun.crypto.provider;
 
 import java.security.InvalidKeyException;
+import java.security.ProviderException;
+
 
 /**
  * This class represents ciphers in cipher block chaining (CBC) mode.
@@ -122,31 +124,31 @@
      *
      * <p>The input plain text <code>plain</code>, starting at
      * <code>plainOffset</code> and ending at
-     * <code>(plainOffset + len - 1)</code>, is encrypted.
+     * <code>(plainOffset + plainLen - 1)</code>, is encrypted.
      * The result is stored in <code>cipher</code>, starting at
      * <code>cipherOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>plainLen</code> is a multiple of the embedded cipher's block size,
-     * as any excess bytes are ignored.
-     *
      * @param plain the buffer with the input data to be encrypted
      * @param plainOffset the offset in <code>plain</code>
      * @param plainLen the length of the input data
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @exception ProviderException if <code>len</code> is not
+     * a multiple of the block size
      * @return the length of the encrypted data
      */
     int encrypt(byte[] plain, int plainOffset, int plainLen,
                 byte[] cipher, int cipherOffset)
     {
-        int i;
+        if ((plainLen % blockSize) != 0) {
+            throw new ProviderException("Internal error in input buffering");
+        }
         int endIndex = plainOffset + plainLen;
 
         for (; plainOffset < endIndex;
              plainOffset+=blockSize, cipherOffset += blockSize) {
-            for (i=0; i<blockSize; i++) {
-                k[i] = (byte)(plain[i+plainOffset] ^ r[i]);
+            for (int i = 0; i < blockSize; i++) {
+                k[i] = (byte)(plain[i + plainOffset] ^ r[i]);
             }
             embeddedCipher.encryptBlock(k, 0, cipher, cipherOffset);
             System.arraycopy(cipher, cipherOffset, r, 0, blockSize);
@@ -159,14 +161,10 @@
      *
      * <p>The input cipher text <code>cipher</code>, starting at
      * <code>cipherOffset</code> and ending at
-     * <code>(cipherOffset + len - 1)</code>, is decrypted.
+     * <code>(cipherOffset + cipherLen - 1)</code>, is decrypted.
      * The result is stored in <code>plain</code>, starting at
      * <code>plainOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>cipherLen</code> is a multiple of the embedded cipher's block
-     * size, as any excess bytes are ignored.
-     *
      * <p>It is also the application's responsibility to make sure that
      * <code>init</code> has been called before this method is called.
      * (This check is omitted here, to avoid double checking.)
@@ -176,23 +174,23 @@
      * @param cipherLen the length of the input data
      * @param plain the buffer for the result
      * @param plainOffset the offset in <code>plain</code>
+     * @exception ProviderException if <code>len</code> is not
+     * a multiple of the block size
      * @return the length of the decrypted data
-     *
-     * @exception IllegalBlockSizeException if input data whose length does
-     * not correspond to the embedded cipher's block size is passed to the
-     * embedded cipher
      */
     int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
                 byte[] plain, int plainOffset)
     {
-        int i;
+        if ((cipherLen % blockSize) != 0) {
+            throw new ProviderException("Internal error in input buffering");
+        }
         int endIndex = cipherOffset + cipherLen;
 
         for (; cipherOffset < endIndex;
              cipherOffset += blockSize, plainOffset += blockSize) {
             embeddedCipher.decryptBlock(cipher, cipherOffset, k, 0);
-            for (i = 0; i < blockSize; i++) {
-                plain[i+plainOffset] = (byte)(k[i] ^ r[i]);
+            for (int i = 0; i < blockSize; i++) {
+                plain[i + plainOffset] = (byte)(k[i] ^ r[i]);
             }
             System.arraycopy(cipher, cipherOffset, r, 0, blockSize);
         }
--- a/src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java	Sat Dec 27 13:27:07 2014 -0500
@@ -708,7 +708,7 @@
             len -= blockSize;
         }
         // do not count the trailing bytes which do not make up a unit
-        len = (len > 0 ? (len - (len%unitBytes)) : 0);
+        len = (len > 0 ? (len - (len % unitBytes)) : 0);
 
         // check output buffer capacity
         if ((output == null) ||
@@ -747,6 +747,9 @@
                     int bufferCapacity = buffer.length - buffered;
                     if (bufferCapacity != 0) {
                         temp = Math.min(bufferCapacity, inputConsumed);
+                        if (unitBytes != blockSize) {
+                            temp -= ((buffered + temp) % unitBytes);
+                        }
                         System.arraycopy(input, inputOffset, buffer, buffered, temp);
                         inputOffset += temp;
                         inputConsumed -= temp;
--- a/src/java.base/share/classes/com/sun/crypto/provider/CipherFeedback.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/CipherFeedback.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 package com.sun.crypto.provider;
 
 import java.security.InvalidKeyException;
+import java.security.ProviderException;
 
 /**
  * This class represents ciphers in cipher-feedback (CFB) mode.
@@ -133,66 +134,72 @@
      *
      * <p>The input plain text <code>plain</code>, starting at
      * <code>plainOffset</code> and ending at
-     * <code>(plainOffset + len - 1)</code>, is encrypted.
+     * <code>(plainOffset + plainLen - 1)</code>, is encrypted.
      * The result is stored in <code>cipher</code>, starting at
      * <code>cipherOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>plainLen</code> is a multiple of the stream unit size
-     * <code>numBytes</code>, as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
      * @param plain the buffer with the input data to be encrypted
      * @param plainOffset the offset in <code>plain</code>
      * @param plainLen the length of the input data
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @exception ProviderException if <code>plainLen</code> is not
+     * a multiple of the <code>numBytes</code>
      * @return the length of the encrypted data
      */
     int encrypt(byte[] plain, int plainOffset, int plainLen,
-                byte[] cipher, int cipherOffset)
-    {
-        int i, len;
-        len = blockSize - numBytes;
+                byte[] cipher, int cipherOffset) {
+        if ((plainLen % numBytes) != 0) {
+            throw new ProviderException("Internal error in input buffering");
+        }
+
+        int nShift = blockSize - numBytes;
         int loopCount = plainLen / numBytes;
+
+        for (; loopCount > 0 ;
+             plainOffset += numBytes, cipherOffset += numBytes,
+             loopCount--) {
+            embeddedCipher.encryptBlock(register, 0, k, 0);
+            if (nShift != 0) {
+                System.arraycopy(register, numBytes, register, 0, nShift);
+            }
+            for (int i = 0; i < numBytes; i++) {
+                register[nShift + i] = cipher[i + cipherOffset] =
+                        (byte)(k[i] ^ plain[i + plainOffset]);
+            }
+        }
+        return plainLen;
+    }
+
+    /**
+     * Performs the last encryption operation.
+     *
+     * <p>The input plain text <code>plain</code>, starting at
+     * <code>plainOffset</code> and ending at
+     * <code>(plainOffset + plainLen - 1)</code>, is encrypted.
+     * The result is stored in <code>cipher</code>, starting at
+     * <code>cipherOffset</code>.
+     *
+     * @param plain the buffer with the input data to be encrypted
+     * @param plainOffset the offset in <code>plain</code>
+     * @param plainLen the length of the input data
+     * @param cipher the buffer for the result
+     * @param cipherOffset the offset in <code>cipher</code>
+     * @return the number of bytes placed into <code>cipher</code>
+     */
+    int encryptFinal(byte[] plain, int plainOffset, int plainLen,
+                     byte[] cipher, int cipherOffset) {
+
         int oddBytes = plainLen % numBytes;
-
-        if (len == 0) {
-            for (; loopCount > 0 ;
-                 plainOffset += numBytes, cipherOffset += numBytes,
-                 loopCount--) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i = 0; i < blockSize; i++)
-                    register[i] = cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-            }
-            if (oddBytes > 0) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i=0; i<oddBytes; i++)
-                    register[i] = cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-            }
-        } else {
-            for (; loopCount > 0 ;
-                 plainOffset += numBytes, cipherOffset += numBytes,
-                 loopCount--) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                System.arraycopy(register, numBytes, register, 0, len);
-                for (i=0; i<numBytes; i++)
-                    register[i+len] = cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-
-            }
-            if (oddBytes != 0) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                System.arraycopy(register, numBytes, register, 0, len);
-                for (i=0; i<oddBytes; i++) {
-                    register[i+len] = cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-                }
+        int len = encrypt(plain, plainOffset, (plainLen - oddBytes),
+                          cipher, cipherOffset);
+        plainOffset += len;
+        cipherOffset += len;
+        if (oddBytes != 0) {
+            embeddedCipher.encryptBlock(register, 0, k, 0);
+            for (int i = 0; i < oddBytes; i++) {
+                 cipher[i + cipherOffset] =
+                    (byte)(k[i] ^ plain[i + plainOffset]);
             }
         }
         return plainLen;
@@ -203,17 +210,52 @@
      *
      * <p>The input cipher text <code>cipher</code>, starting at
      * <code>cipherOffset</code> and ending at
-     * <code>(cipherOffset + len - 1)</code>, is decrypted.
+     * <code>(cipherOffset + cipherLen - 1)</code>, is decrypted.
      * The result is stored in <code>plain</code>, starting at
      * <code>plainOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>cipherLen</code> is a multiple of the stream unit size
-     * <code>numBytes</code>, as any excess bytes are ignored.
+     * @param cipher the buffer with the input data to be decrypted
+     * @param cipherOffset the offset in <code>cipherOffset</code>
+     * @param cipherLen the length of the input data
+     * @param plain the buffer for the result
+     * @param plainOffset the offset in <code>plain</code>
+     * @exception ProviderException if <code>cipherLen</code> is not
+     * a multiple of the <code>numBytes</code>
+     * @return the length of the decrypted data
+     */
+    int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
+                byte[] plain, int plainOffset) {
+        if ((cipherLen % numBytes) != 0) {
+            throw new ProviderException("Internal error in input buffering");
+        }
+
+        int nShift = blockSize - numBytes;
+        int loopCount = cipherLen / numBytes;
+
+        for (; loopCount > 0;
+             plainOffset += numBytes, cipherOffset += numBytes,
+             loopCount--) {
+            embeddedCipher.encryptBlock(register, 0, k, 0);
+            if (nShift != 0) {
+                System.arraycopy(register, numBytes, register, 0, nShift);
+            }
+            for (int i = 0; i < numBytes; i++) {
+                register[i + nShift] = cipher[i + cipherOffset];
+                plain[i + plainOffset]
+                    = (byte)(cipher[i + cipherOffset] ^ k[i]);
+            }
+        }
+        return cipherLen;
+    }
+
+    /**
+     * Performs the last decryption operation.
      *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
+     * <p>The input cipher text <code>cipher</code>, starting at
+     * <code>cipherOffset</code> and ending at
+     * <code>(cipherOffset + cipherLen - 1)</code>, is decrypted.
+     * The result is stored in <code>plain</code>, starting at
+     * <code>plainOffset</code>.
      *
      * @param cipher the buffer with the input data to be decrypted
      * @param cipherOffset the offset in <code>cipherOffset</code>
@@ -222,53 +264,19 @@
      * @param plainOffset the offset in <code>plain</code>
      * @return the length of the decrypted data
      */
-    int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
-                byte[] plain, int plainOffset)
-    {
-        int i, len;
-        len = blockSize - numBytes;
-        int loopCount = cipherLen / numBytes;
+    int decryptFinal(byte[] cipher, int cipherOffset, int cipherLen,
+                byte[] plain, int plainOffset) {
+
         int oddBytes = cipherLen % numBytes;
-
-        if (len == 0) {
-            for (; loopCount > 0;
-                 plainOffset += numBytes, cipherOffset += numBytes,
-                 loopCount--) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i = 0; i < blockSize; i++) {
-                    register[i] = cipher[i+cipherOffset];
-                    plain[i+plainOffset]
-                        = (byte)(cipher[i+cipherOffset] ^ k[i]);
-                }
-            }
-            if (oddBytes > 0) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i=0; i<oddBytes; i++) {
-                    register[i] = cipher[i+cipherOffset];
-                    plain[i+plainOffset]
-                        = (byte)(cipher[i+cipherOffset] ^ k[i]);
-                }
-            }
-        } else {
-            for (; loopCount > 0;
-                 plainOffset += numBytes, cipherOffset += numBytes,
-                 loopCount--) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                System.arraycopy(register, numBytes, register, 0, len);
-                for (i=0; i<numBytes; i++) {
-                    register[i+len] = cipher[i+cipherOffset];
-                    plain[i+plainOffset]
-                        = (byte)(cipher[i+cipherOffset] ^ k[i]);
-                }
-            }
-            if (oddBytes != 0) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                System.arraycopy(register, numBytes, register, 0, len);
-                for (i=0; i<oddBytes; i++) {
-                    register[i+len] = cipher[i+cipherOffset];
-                    plain[i+plainOffset]
-                        = (byte)(cipher[i+cipherOffset] ^ k[i]);
-                }
+        int len = decrypt(cipher, cipherOffset, (cipherLen - oddBytes),
+                          plain, plainOffset);
+        cipherOffset += len;
+        plainOffset += len;
+        if (oddBytes != 0) {
+            embeddedCipher.encryptBlock(register, 0, k, 0);
+            for (int i = 0; i < oddBytes; i++) {
+                plain[i + plainOffset]
+                    = (byte)(cipher[i + cipherOffset] ^ k[i]);
             }
         }
         return cipherLen;
--- a/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 201313, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 
 import java.security.InvalidKeyException;
 
+
 /**
  * This class represents ciphers in counter (CTR) mode.
  *
@@ -136,14 +137,6 @@
      * The result is stored in <code>cipher</code>, starting at
      * <code>cipherOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>plainLen</code> is a multiple of the embedded cipher's block size,
-     * as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
      * @param in the buffer with the input data to be encrypted
      * @param inOffset the offset in <code>plain</code>
      * @param len the length of the input data
@@ -155,30 +148,7 @@
         return crypt(in, inOff, len, out, outOff);
     }
 
-    /**
-     * Performs decryption operation.
-     *
-     * <p>The input cipher text <code>cipher</code>, starting at
-     * <code>cipherOffset</code> and ending at
-     * <code>(cipherOffset + len - 1)</code>, is decrypted.
-     * The result is stored in <code>plain</code>, starting at
-     * <code>plainOffset</code>.
-     *
-     * <p>It is the application's responsibility to make sure that
-     * <code>cipherLen</code> is a multiple of the embedded cipher's block
-     * size, as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
-     * @param in the buffer with the input data to be decrypted
-     * @param inOff the offset in <code>cipherOffset</code>
-     * @param len the length of the input data
-     * @param out the buffer for the result
-     * @param outOff the offset in <code>plain</code>
-     * @return the length of the decrypted data
-     */
+    // CTR encrypt and decrypt are identical
     int decrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
         return crypt(in, inOff, len, out, outOff);
     }
--- a/src/java.base/share/classes/com/sun/crypto/provider/ElectronicCodeBook.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/ElectronicCodeBook.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 package com.sun.crypto.provider;
 
 import java.security.InvalidKeyException;
+import java.security.ProviderException;
 
 /**
  * This class represents ciphers in electronic codebook (ECB) mode.
@@ -96,28 +97,24 @@
     /**
      * Performs encryption operation.
      *
-     * <p>The input plain text <code>plain</code>, starting at
-     * <code>plainOffset</code> and ending at
-     * <code>(plainOffset + len - 1)</code>, is encrypted.
-     * The result is stored in <code>cipher</code>, starting at
-     * <code>cipherOffset</code>.
-     *
-     * <p>It is the application's responsibility to make sure that
-     * <code>plainLen</code> is a multiple of the embedded cipher's block size,
-     * as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
+     * <p>The input plain text <code>in</code>, starting at
+     * <code>inOff</code> and ending at * <code>(inOff + len - 1)</code>,
+     * is encrypted. The result is stored in <code>out</code>, starting at
+     * <code>outOff</code>.
      *
      * @param in the buffer with the input data to be encrypted
-     * @param inOffset the offset in <code>plain</code>
+     * @param inOff the offset in <code>plain</code>
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOff the offset in <code>cipher</code>
+     * @exception ProviderException if <code>len</code> is not
+     * a multiple of the block size
      * @return the length of the encrypted data
      */
     int encrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+        if ((len % blockSize) != 0) {
+             throw new ProviderException("Internal error in input buffering");
+        }
         for (int i = len; i >= blockSize; i -= blockSize) {
             embeddedCipher.encryptBlock(in, inOff, out, outOff);
             inOff += blockSize;
@@ -129,28 +126,24 @@
     /**
      * Performs decryption operation.
      *
-     * <p>The input cipher text <code>cipher</code>, starting at
-     * <code>cipherOffset</code> and ending at
-     * <code>(cipherOffset + len - 1)</code>, is decrypted.
-     * The result is stored in <code>plain</code>, starting at
-     * <code>plainOffset</code>.
-     *
-     * <p>It is the application's responsibility to make sure that
-     * <code>cipherLen</code> is a multiple of the embedded cipher's block
-     * size, as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
+     * <p>The input cipher text <code>in</code>, starting at
+     * <code>inOff</code> and ending at * <code>(inOff + len - 1)</code>,
+     * is decrypted.The result is stored in <code>out</code>, starting at
+     * <code>outOff</code>.
      *
      * @param in the buffer with the input data to be decrypted
      * @param inOff the offset in <code>cipherOffset</code>
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOff the offset in <code>plain</code>
+     * @exception ProviderException if <code>len</code> is not
+     * a multiple of the block size
      * @return the length of the decrypted data
      */
     int decrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+        if ((len % blockSize) != 0) {
+             throw new ProviderException("Internal error in input buffering");
+        }
         for (int i = len; i >= blockSize; i -= blockSize) {
             embeddedCipher.decryptBlock(in, inOff, out, outOff);
             inOff += blockSize;
--- a/src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -371,21 +371,19 @@
      * and ending at <code>(inOff + len - 1)</code>, is encrypted. The result
      * is stored in <code>out</code>, starting at <code>outOfs</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>len</code> is a multiple of the embedded cipher's block size,
-     * otherwise, a ProviderException will be thrown.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
      * @param in the buffer with the input data to be encrypted
      * @param inOfs the offset in <code>in</code>
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOfs the offset in <code>out</code>
+     * @exception ProviderException if <code>len</code> is not
+     * a multiple of the block size
+     * @return the number of bytes placed into the <code>out</code> buffer
      */
     int encrypt(byte[] in, int inOfs, int len, byte[] out, int outOfs) {
+        if ((len % blockSize) != 0) {
+             throw new ProviderException("Internal error in input buffering");
+        }
         processAAD();
         if (len > 0) {
             gctrPAndC.update(in, inOfs, len, out, outOfs);
@@ -398,9 +396,6 @@
     /**
      * Performs encryption operation for the last time.
      *
-     * <p>NOTE: <code>len</code> may not be multiple of the embedded
-     * cipher's block size for this call.
-     *
      * @param in the input buffer with the data to be encrypted
      * @param inOfs the offset in <code>in</code>
      * @param len the length of the input data
@@ -439,21 +434,19 @@
      * is decrypted. The result is stored in <code>out</code>, starting at
      * <code>outOfs</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>len</code> is a multiple of the embedded cipher's block
-     * size, as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
      * @param in the buffer with the input data to be decrypted
      * @param inOfs the offset in <code>in</code>
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOfs the offset in <code>out</code>
+     * @exception ProviderException if <code>len</code> is not
+     * a multiple of the block size
+     * @return the number of bytes placed into the <code>out</code> buffer
      */
     int decrypt(byte[] in, int inOfs, int len, byte[] out, int outOfs) {
+        if ((len % blockSize) != 0) {
+             throw new ProviderException("Internal error in input buffering");
+        }
         processAAD();
 
         if (len > 0) {
--- a/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java	Sat Dec 27 13:27:07 2014 -0500
@@ -898,4 +898,20 @@
         md.update("Mighty Aphrodite".getBytes("UTF8"));
         return md;
     }
+
+    /**
+     * Probe the first few bytes of the keystore data stream for a valid
+     * JCEKS keystore encoding.
+     */
+    @Override
+    public boolean engineProbe(InputStream stream) throws IOException {
+        DataInputStream dataStream;
+        if (stream instanceof DataInputStream) {
+            dataStream = (DataInputStream)stream;
+        } else {
+            dataStream = new DataInputStream(stream);
+        }
+
+        return JCEKS_MAGIC == dataStream.readInt();
+    }
 }
--- a/src/java.base/share/classes/com/sun/crypto/provider/OutputFeedback.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/OutputFeedback.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 package com.sun.crypto.provider;
 
 import java.security.InvalidKeyException;
+import java.security.ProviderException;
 
 /**
  * This class represents ciphers in output-feedback (OFB) mode.
@@ -132,17 +133,52 @@
      *
      * <p>The input plain text <code>plain</code>, starting at
      * <code>plainOffset</code> and ending at
-     * <code>(plainOffset + len - 1)</code>, is encrypted.
+     * <code>(plainOffset + plainLen - 1)</code>, is encrypted.
      * The result is stored in <code>cipher</code>, starting at
      * <code>cipherOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>plainLen</code> is a multiple of the stream unit size
-     * <code>numBytes</code>, as any excess bytes are ignored.
+     * @param plain the buffer with the input data to be encrypted
+     * @param plainOffset the offset in <code>plain</code>
+     * @param plainLen the length of the input data
+     * @param cipher the buffer for the result
+     * @param cipherOffset the offset in <code>cipher</code>
+     * @exception ProviderException if <code>plainLen</code> is not
+     * a multiple of the <code>numBytes</code>
+     * @return the length of the encrypted data
+     */
+    int encrypt(byte[] plain, int plainOffset, int plainLen,
+                byte[] cipher, int cipherOffset) {
+
+        if ((plainLen % numBytes) != 0) {
+            throw new ProviderException("Internal error in input buffering");
+        }
+        int nShift = blockSize - numBytes;
+        int loopCount = plainLen / numBytes;
+
+        for (; loopCount > 0;
+             plainOffset += numBytes, cipherOffset += numBytes,
+             loopCount--) {
+            embeddedCipher.encryptBlock(register, 0, k, 0);
+            for (int i = 0; i < numBytes; i++) {
+                cipher[i + cipherOffset] =
+                    (byte)(k[i] ^ plain[i + plainOffset]);
+                if (nShift != 0) {
+                    System.arraycopy(register, numBytes, register, 0, nShift);
+                }
+                System.arraycopy(k, 0, register, nShift, numBytes);
+            }
+        }
+        return plainLen;
+    }
+
+    /**
+     * Performs last encryption operation.
      *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
+     * <p>The input plain text <code>plain</code>, starting at
+     * <code>plainOffset</code> and ending at
+     * <code>(plainOffset + plainLen - 1)</code>, is encrypted.
+     * The result is stored in <code>cipher</code>, starting at
+     * <code>cipherOffset</code>.
      *
      * @param plain the buffer with the input data to be encrypted
      * @param plainOffset the offset in <code>plain</code>
@@ -151,82 +187,34 @@
      * @param cipherOffset the offset in <code>cipher</code>
      * @return the length of the encrypted data
      */
-    int encrypt(byte[] plain, int plainOffset, int plainLen,
-                byte[] cipher, int cipherOffset)
-    {
-        int i;
-        int len = blockSize - numBytes;
-        int loopCount = plainLen / numBytes;
+    int encryptFinal(byte[] plain, int plainOffset, int plainLen,
+                     byte[] cipher, int cipherOffset) {
         int oddBytes = plainLen % numBytes;
+        int len = encrypt(plain, plainOffset, (plainLen - oddBytes),
+                          cipher, cipherOffset);
+        plainOffset += len;
+        cipherOffset += len;
 
-        if (len == 0) {
-            for (; loopCount > 0;
-                 plainOffset += numBytes, cipherOffset += numBytes,
-                 loopCount--) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i=0; i<numBytes; i++)
-                    cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-                System.arraycopy(k, 0, register, 0, numBytes);
-            }
-            if (oddBytes > 0) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i=0; i<oddBytes; i++)
-                    cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-                System.arraycopy(k, 0, register, 0, numBytes);
-            }
-        } else {
-            for (; loopCount > 0;
-                 plainOffset += numBytes, cipherOffset += numBytes,
-                 loopCount--) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i=0; i<numBytes; i++)
-                    cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-                System.arraycopy(register, numBytes, register, 0, len);
-                System.arraycopy(k, 0, register, len, numBytes);
-            }
-            if (oddBytes > 0) {
-                embeddedCipher.encryptBlock(register, 0, k, 0);
-                for (i=0; i<oddBytes; i++)
-                    cipher[i+cipherOffset] =
-                        (byte)(k[i] ^ plain[i+plainOffset]);
-                System.arraycopy(register, numBytes, register, 0, len);
-                System.arraycopy(k, 0, register, len, numBytes);
+        if (oddBytes != 0) {
+            embeddedCipher.encryptBlock(register, 0, k, 0);
+            for (int i = 0; i < oddBytes; i++) {
+                cipher[i + cipherOffset] =
+                    (byte)(k[i] ^ plain[ i + plainOffset]);
             }
         }
         return plainLen;
     }
 
-    /**
-     * Performs decryption operation.
-     *
-     * <p>The input cipher text <code>cipher</code>, starting at
-     * <code>cipherOffset</code> and ending at
-     * <code>(cipherOffset + len - 1)</code>, is decrypted.
-     * The result is stored in <code>plain</code>, starting at
-     * <code>plainOffset</code>.
-     *
-     * <p>It is the application's responsibility to make sure that
-     * <code>cipherLen</code> is a multiple of the stream unit size
-     * <code>numBytes</code>, as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
-     * @param cipher the buffer with the input data to be decrypted
-     * @param cipherOffset the offset in <code>cipherOffset</code>
-     * @param cipherLen the length of the input data
-     * @param plain the buffer for the result
-     * @param plainOffset the offset in <code>plain</code>
-     * @return the length of the decrypted data
-     */
+    // OFB encrypt and decrypt are identical
     int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
-                        byte[] plain, int plainOffset)
-    {
-        // OFB encrypt and decrypt are identical
+                byte[] plain, int plainOffset) {
         return encrypt(cipher, cipherOffset, cipherLen, plain, plainOffset);
     }
+
+    // OFB encrypt and decrypt are identical
+    int decryptFinal(byte[] cipher, int cipherOffset, int cipherLen,
+                     byte[] plain, int plainOffset) {
+        // OFB encrypt and decrypt are identical
+        return encryptFinal(cipher, cipherOffset, cipherLen, plain, plainOffset);
+    }
 }
--- a/src/java.base/share/classes/com/sun/crypto/provider/PCBC.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/com/sun/crypto/provider/PCBC.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
 package com.sun.crypto.provider;
 
 import java.security.InvalidKeyException;
+import java.security.ProviderException;
+
 
 /**
  * This class represents ciphers in Plaintext Cipher Block Chaining (PCBC)
@@ -118,38 +120,36 @@
      *
      * <p>The input plain text <code>plain</code>, starting at
      * <code>plainOffset</code> and ending at
-     * <code>(plainOffset + len - 1)</code>, is encrypted.
+     * <code>(plainOffset + plainLen - 1)</code>, is encrypted.
      * The result is stored in <code>cipher</code>, starting at
      * <code>cipherOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>plainLen</code> is a multiple of the embedded cipher's block size,
-     * as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
      * @param plain the buffer with the input data to be encrypted
      * @param plainOffset the offset in <code>plain</code>
      * @param plainLen the length of the input data
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @exception ProviderException if <code>plainLen</code> is not
+     * a multiple of the block size
+     * @return the length of the encrypted data
      */
     int encrypt(byte[] plain, int plainOffset, int plainLen,
                 byte[] cipher, int cipherOffset)
     {
+        if ((plainLen % blockSize) != 0) {
+            throw new ProviderException("Internal error in input buffering");
+        }
         int i;
         int endIndex = plainOffset + plainLen;
 
         for (; plainOffset < endIndex;
              plainOffset += blockSize, cipherOffset += blockSize) {
-            for (i=0; i<blockSize; i++) {
-                k[i] ^= plain[i+plainOffset];
+            for (i = 0; i < blockSize; i++) {
+                k[i] ^= plain[i + plainOffset];
             }
             embeddedCipher.encryptBlock(k, 0, cipher, cipherOffset);
             for (i = 0; i < blockSize; i++) {
-                k[i] = (byte)(plain[i+plainOffset] ^ cipher[i+cipherOffset]);
+                k[i] = (byte)(plain[i + plainOffset] ^ cipher[i + cipherOffset]);
             }
         }
         return plainLen;
@@ -160,27 +160,25 @@
      *
      * <p>The input cipher text <code>cipher</code>, starting at
      * <code>cipherOffset</code> and ending at
-     * <code>(cipherOffset + len - 1)</code>, is decrypted.
+     * <code>(cipherOffset + cipherLen - 1)</code>, is decrypted.
      * The result is stored in <code>plain</code>, starting at
      * <code>plainOffset</code>.
      *
-     * <p>It is the application's responsibility to make sure that
-     * <code>cipherLen</code> is a multiple of the embedded cipher's block
-     * size, as any excess bytes are ignored.
-     *
-     * <p>It is also the application's responsibility to make sure that
-     * <code>init</code> has been called before this method is called.
-     * (This check is omitted here, to avoid double checking.)
-     *
      * @param cipher the buffer with the input data to be decrypted
      * @param cipherOffset the offset in <code>cipherOffset</code>
      * @param cipherLen the length of the input data
      * @param plain the buffer for the result
      * @param plainOffset the offset in <code>plain</code>
+     * @exception ProviderException if <code>cipherLen</code> is not
+     * a multiple of the block size
+     * @return the length of the decrypted data
      */
     int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
                 byte[] plain, int plainOffset)
     {
+        if ((cipherLen % blockSize) != 0) {
+             throw new ProviderException("Internal error in input buffering");
+        }
         int i;
         int endIndex = cipherOffset + cipherLen;
 
@@ -189,10 +187,10 @@
             embeddedCipher.decryptBlock(cipher, cipherOffset,
                                    plain, plainOffset);
             for (i = 0; i < blockSize; i++) {
-                plain[i+plainOffset] ^= k[i];
+                plain[i + plainOffset] ^= k[i];
             }
             for (i = 0; i < blockSize; i++) {
-                k[i] = (byte)(plain[i+plainOffset] ^ cipher[i+cipherOffset]);
+                k[i] = (byte)(plain[i + plainOffset] ^ cipher[i + cipherOffset]);
             }
         }
         return cipherLen;
--- a/src/java.base/share/classes/java/nio/file/Path.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/java/nio/file/Path.java	Sat Dec 27 13:27:07 2014 -0500
@@ -29,6 +29,7 @@
 import java.io.IOException;
 import java.net.URI;
 import java.util.Iterator;
+import java.util.NoSuchElementException;
 
 /**
  * An object that may be used to locate a file in a file system. It will
@@ -246,6 +247,12 @@
      * "{@code foo/bar}" starts with "{@code foo}" and "{@code foo/bar}". It
      * does not start with "{@code f}" or "{@code fo}".
      *
+     * @implSpec
+     * The default implementation is equivalent for this path to:
+     * <pre>{@code
+     *     startsWith(getFileSystem().getPath(other));
+     * }</pre>
+     *
      * @param   other
      *          the given path string
      *
@@ -255,7 +262,9 @@
      * @throws  InvalidPathException
      *          If the path string cannot be converted to a Path.
      */
-    boolean startsWith(String other);
+    default boolean startsWith(String other) {
+        return startsWith(getFileSystem().getPath(other));
+    }
 
     /**
      * Tests if this path ends with the given path.
@@ -294,6 +303,12 @@
      * Path}"{@code foo/bar}" with the {@code String} "{@code bar/}" returns
      * {@code true}.
      *
+     * @implSpec
+     * The default implementation is equivalent for this path to:
+     * <pre>{@code
+     *     endsWith(getFileSystem().getPath(other));
+     * }</pre>
+     *
      * @param   other
      *          the given path string
      *
@@ -303,7 +318,9 @@
      * @throws  InvalidPathException
      *          If the path string cannot be converted to a Path.
      */
-    boolean endsWith(String other);
+    default boolean endsWith(String other) {
+        return endsWith(getFileSystem().getPath(other));
+    }
 
     /**
      * Returns a path that is this path with redundant name elements eliminated.
@@ -365,6 +382,12 @@
      * invoking this method with the path string "{@code gus}" will result in
      * the {@code Path} "{@code foo/bar/gus}".
      *
+     * @implSpec
+     * The default implementation is equivalent for this path to:
+     * <pre>{@code
+     *     resolve(getFileSystem().getPath(other));
+     * }</pre>
+     *
      * @param   other
      *          the path string to resolve against this path
      *
@@ -375,7 +398,9 @@
      *
      * @see FileSystem#getPath
      */
-    Path resolve(String other);
+    default Path resolve(String other) {
+        return resolve(getFileSystem().getPath(other));
+    }
 
     /**
      * Resolves the given path against this path's {@link #getParent parent}
@@ -389,6 +414,14 @@
      * returns this path's parent, or where this path doesn't have a parent, the
      * empty path.
      *
+     * @implSpec
+     * The default implementation is equivalent for this path to:
+     * <pre>{@code
+     *     (getParent() == null) ? other : getParent().resolve(other);
+     * }</pre>
+     * unless {@code other == null}, in which case a
+     * {@code NullPointerException} is thrown.
+     *
      * @param   other
      *          the path to resolve against this path's parent
      *
@@ -396,13 +429,24 @@
      *
      * @see #resolve(Path)
      */
-    Path resolveSibling(Path other);
+    default Path resolveSibling(Path other) {
+        if (other == null)
+            throw new NullPointerException();
+        Path parent = getParent();
+        return (parent == null) ? other : parent.resolve(other);
+    }
 
     /**
      * Converts a given path string to a {@code Path} and resolves it against
      * this path's {@link #getParent parent} path in exactly the manner
      * specified by the {@link #resolveSibling(Path) resolveSibling} method.
      *
+     * @implSpec
+     * The default implementation is equivalent for this path to:
+     * <pre>{@code
+     *     resolveSibling(getFileSystem().getPath(other));
+     * }</pre>
+     *
      * @param   other
      *          the path string to resolve against this path's parent
      *
@@ -413,7 +457,9 @@
      *
      * @see FileSystem#getPath
      */
-    Path resolveSibling(String other);
+    default Path resolveSibling(String other) {
+        return resolveSibling(getFileSystem().getPath(other));
+    }
 
     /**
      * Constructs a relative path between this path and a given path.
@@ -590,12 +636,28 @@
      * File} object returned by this method is {@link #equals equal} to the
      * original {@code File}.
      *
+     * @implSpec
+     * The default implementation is equivalent for this path to:
+     * <pre>{@code
+     *     new File(toString());
+     * }</pre>
+     * if the {@code FileSystem} which created this {@code Path} is the default
+     * file system; otherwise an {@code UnsupportedOperationException} is
+     * thrown.
+     *
      * @return  a {@code File} object representing this path
      *
      * @throws  UnsupportedOperationException
      *          if this {@code Path} is not associated with the default provider
      */
-    File toFile();
+    default File toFile() {
+        if (getFileSystem() == FileSystems.getDefault()) {
+            return new File(toString());
+        } else {
+            throw new UnsupportedOperationException("Path not associated with "
+                    + "default file system.");
+        }
+    }
 
     // -- watchable --
 
@@ -681,6 +743,13 @@
      *
      *     WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
      * </pre>
+     *
+     * @implSpec
+     * The default implementation is equivalent for this path to:
+     * <pre>{@code
+     *     register(watcher, events, new WatchEvent.Modifier[0]);
+     * }</pre>
+     *
      * @param   watcher
      *          The watch service to which this object is to be registered
      * @param   events
@@ -706,9 +775,10 @@
      *          method is invoked to check read access to the file.
      */
     @Override
-    WatchKey register(WatchService watcher,
-                      WatchEvent.Kind<?>... events)
-        throws IOException;
+    default WatchKey register(WatchService watcher,
+                      WatchEvent.Kind<?>... events) throws IOException {
+        return register(watcher, events, new WatchEvent.Modifier[0]);
+    }
 
     // -- Iterable --
 
@@ -721,10 +791,36 @@
      * is the name of the file or directory denoted by this path. The {@link
      * #getRoot root} component, if present, is not returned by the iterator.
      *
+     * @implSpec
+     * The default implementation returns an {@code Iterator<Path>} which, for
+     * this path, traverses the {@code Path}s returned by
+     * {@code getName(index)}, where {@code index} ranges from zero to
+     * {@code getNameCount() - 1}, inclusive.
+     *
      * @return  an iterator over the name elements of this path.
      */
     @Override
-    Iterator<Path> iterator();
+    default Iterator<Path> iterator() {
+        return new Iterator<Path>() {
+            private int i = 0;
+
+            @Override
+            public boolean hasNext() {
+                return (i < getNameCount());
+            }
+
+            @Override
+            public Path next() {
+                if (i < getNameCount()) {
+                    Path result = getName(i);
+                    i++;
+                    return result;
+                } else {
+                    throw new NoSuchElementException();
+                }
+            }
+        };
+    }
 
     // -- compareTo/equals/hashCode --
 
--- a/src/java.base/share/classes/java/security/KeyStore.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/java/security/KeyStore.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,9 +92,23 @@
  * be used (in a variety of formats).
  *
  * <p> Typical ways to request a KeyStore object include
+ * specifying an existing keystore file,
  * relying on the default type and providing a specific keystore type.
  *
  * <ul>
+ * <li>To specify an existing keystore file:
+ * <pre>
+ *    // get keystore password
+ *    char[] password = getPassword();
+ *
+ *    // probe the keystore file and load the keystore entries
+ *    KeyStore ks = KeyStore.getInstance(new File("keyStoreName"), password);
+ *</pre>
+ * The system will probe the specified file to determine its keystore type
+ * and return a keystore implementation with its entries already loaded.
+ * When this approach is used there is no need to call the keystore's
+ * {@link #load(java.io.InputStream, char[]) load} method.
+ *
  * <li>To rely on the default type:
  * <pre>
  *    KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
@@ -110,7 +124,8 @@
  * </ul>
  *
  * <p> Before a keystore can be accessed, it must be
- * {@link #load(java.io.InputStream, char[]) loaded}.
+ * {@link #load(java.io.InputStream, char[]) loaded}
+ * (unless it was already loaded during instantiation).
  * <pre>
  *    KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
  *
@@ -179,6 +194,7 @@
 
 public class KeyStore {
 
+    private static final Debug kdebug = Debug.getInstance("keystore");
     private static final Debug pdebug =
                         Debug.getInstance("provider", "Provider");
     private static final boolean skipDebug =
@@ -1594,6 +1610,188 @@
     }
 
     /**
+     * Returns a loaded keystore object of the appropriate keystore type.
+     * First the keystore type is determined by probing the specified file.
+     * Then a keystore object is instantiated and loaded using the data from
+     * that file.
+     * A password may be supplied to unlock the keystore data or perform an
+     * integrity check.
+     *
+     * <p>
+     * This method traverses the list of registered security {@link Providers},
+     * starting with the most preferred Provider.
+     * For each {@link KeyStoreSpi} implementation supported by a Provider,
+     * it invokes the {@link engineProbe} method to determine if it supports
+     * the specified keystore.
+     * A new KeyStore object is returned that encapsulates the KeyStoreSpi
+     * implementation from the first Provider that supports the specified file.
+     *
+     * <p> Note that the list of registered providers may be retrieved via
+     * the {@link Security#getProviders() Security.getProviders()} method.
+     *
+     * @param  file the keystore file
+     * @param  password the keystore password, which may be {@code null}
+     *
+     * @return a keystore object loaded with keystore data
+     *
+     * @throws KeyStoreException if no Provider supports a KeyStoreSpi
+     *             implementation for the specified keystore file.
+     * @throws IOException if there is an I/O or format problem with the
+     *             keystore data, if a password is required but not given,
+     *             or if the given password was incorrect. If the error is
+     *             due to a wrong password, the {@link Throwable#getCause cause}
+     *             of the {@code IOException} should be an
+     *             {@code UnrecoverableKeyException}.
+     * @throws NoSuchAlgorithmException if the algorithm used to check the
+     *             integrity of the keystore cannot be found.
+     * @throws CertificateException if any of the certificates in the
+     *             keystore could not be loaded.
+     * @throws IllegalArgumentException if file does not exist or does not
+     *             refer to a normal file.
+     * @throws NullPointerException if file is {@code null}.
+     * @throws SecurityException if a security manager exists and its
+     *             {@link java.lang.SecurityManager#checkRead} method denies
+     *             read access to the specified file.
+     *
+     * @see Provider
+     *
+     * @since 1.9
+     */
+    public static final KeyStore getInstance(File file, char[] password)
+        throws KeyStoreException, IOException, NoSuchAlgorithmException,
+            CertificateException {
+        return getInstance(file, password, null, true);
+    }
+
+    /**
+     * Returns a loaded keystore object of the appropriate keystore type.
+     * First the keystore type is determined by probing the specified file.
+     * Then a keystore object is instantiated and loaded using the data from
+     * that file.
+     * A {@code LoadStoreParameter} may be supplied which specifies how to
+     * unlock the keystore data or perform an integrity check.
+     *
+     * <p>
+     * This method traverses the list of registered security {@link Providers},
+     * starting with the most preferred Provider.
+     * For each {@link KeyStoreSpi} implementation supported by a Provider,
+     * it invokes the {@link engineProbe} method to determine if it supports
+     * the specified keystore.
+     * A new KeyStore object is returned that encapsulates the KeyStoreSpi
+     * implementation from the first Provider that supports the specified file.
+     *
+     * <p> Note that the list of registered providers may be retrieved via
+     * the {@link Security#getProviders() Security.getProviders()} method.
+     *
+     * @param  file the keystore file
+     * @param  param the {@code LoadStoreParameter} that specifies how to load
+     *             the keystore, which may be {@code null}
+     *
+     * @return a keystore object loaded with keystore data
+     *
+     * @throws KeyStoreException if no Provider supports a KeyStoreSpi
+     *             implementation for the specified keystore file.
+     * @throws IOException if there is an I/O or format problem with the
+     *             keystore data. If the error is due to an incorrect
+     *             {@code ProtectionParameter} (e.g. wrong password)
+     *             the {@link Throwable#getCause cause} of the
+     *             {@code IOException} should be an
+     *             {@code UnrecoverableKeyException}.
+     * @throws NoSuchAlgorithmException if the algorithm used to check the
+     *             integrity of the keystore cannot be found.
+     * @throws CertificateException if any of the certificates in the
+     *             keystore could not be loaded.
+     * @throws IllegalArgumentException if file does not exist or does not
+     *             refer to a normal file, or if param is not recognized.
+     * @throws NullPointerException if file is {@code null}.
+     * @throws SecurityException if a security manager exists and its
+     *             {@link java.lang.SecurityManager#checkRead} method denies
+     *             read access to the specified file.
+     *
+     * @see Provider
+     *
+     * @since 1.9
+     */
+    public static final KeyStore getInstance(File file,
+        LoadStoreParameter param) throws KeyStoreException, IOException,
+            NoSuchAlgorithmException, CertificateException {
+        return getInstance(file, null, param, false);
+    }
+
+    // Used by getInstance(File, char[]) & getInstance(File, LoadStoreParameter)
+    private static final KeyStore getInstance(File file, char[] password,
+        LoadStoreParameter param, boolean hasPassword)
+            throws KeyStoreException, IOException, NoSuchAlgorithmException,
+                CertificateException {
+
+        if (file == null) {
+            throw new NullPointerException();
+        }
+
+        if (file.isFile() == false) {
+            throw new IllegalArgumentException(
+                "File does not exist or it does not refer to a normal file: " +
+                    file);
+        }
+
+        KeyStore keystore = null;
+
+        try (DataInputStream dataStream =
+            new DataInputStream(
+                new BufferedInputStream(
+                    new FileInputStream(file)))) {
+
+            dataStream.mark(Integer.MAX_VALUE);
+
+            // Detect the keystore type
+            for (String type : Security.getAlgorithms("KeyStore")) {
+                Object[] objs = null;
+
+                try {
+                    objs = Security.getImpl(type, "KeyStore", (String)null);
+
+                    KeyStoreSpi impl = (KeyStoreSpi)objs[0];
+                    if (impl.engineProbe(dataStream)) {
+
+                        if (kdebug != null) {
+                            kdebug.println(type + " keystore detected: " +
+                                file);
+                        }
+
+                        keystore = new KeyStore(impl, (Provider)objs[1], type);
+                        break;
+                    }
+                } catch (NoSuchAlgorithmException | NoSuchProviderException e) {
+                    // ignore
+                    if (kdebug != null) {
+                        kdebug.println(type + " not found - " + e);
+                    }
+                } catch (IOException e) {
+                    // ignore
+                    if (kdebug != null) {
+                        kdebug.println("I/O error in " + file + " - " + e);
+                    }
+                }
+                dataStream.reset(); // prepare the stream for the next probe
+            }
+
+            // Load the keystore data
+            if (keystore != null) {
+                if (hasPassword) {
+                    dataStream.reset(); // prepare the stream for loading
+                    keystore.load(dataStream, password);
+                } else {
+                    keystore.load(param);
+                }
+                return keystore;
+            }
+        }
+
+        throw new KeyStoreException("Unrecognized keystore format: " +
+            keystore);
+    }
+
+    /**
      * A description of a to-be-instantiated KeyStore object.
      *
      * <p>An instance of this class encapsulates the information needed to
@@ -1713,7 +1911,7 @@
          * by invoking the CallbackHandler.
          *
          * <p>Subsequent calls to {@link #getKeyStore} return the same object
-         * as the initial call. If the initial call to failed with a
+         * as the initial call. If the initial call failed with a
          * KeyStoreException, subsequent calls also throw a
          * KeyStoreException.
          *
@@ -1760,6 +1958,50 @@
                 AccessController.getContext());
         }
 
+        /**
+         * Returns a new Builder object.
+         *
+         * <p>The first call to the {@link #getKeyStore} method on the returned
+         * builder will create a KeyStore using {@code file} to detect the
+         * keystore type and then call its {@link KeyStore#load load()} method.
+         * It uses the same algorithm to determine the keystore type as
+         * described in {@link KeyStore#getInstance(File, LoadStoreParameter)}.
+         * The {@code inputStream} argument is constructed from {@code file}.
+         * If {@code protection} is a {@code PasswordProtection}, the password
+         * is obtained by calling the {@code getPassword} method.
+         * Otherwise, if {@code protection} is a
+         * {@code CallbackHandlerProtection},
+         * the password is obtained by invoking the CallbackHandler.
+         *
+         * <p>Subsequent calls to {@link #getKeyStore} return the same object
+         * as the initial call. If the initial call failed with a
+         * KeyStoreException, subsequent calls also throw a KeyStoreException.
+         *
+         * <p>Calls to {@link #getProtectionParameter getProtectionParameter()}
+         * will return a {@link KeyStore.PasswordProtection PasswordProtection}
+         * object encapsulating the password that was used to invoke the
+         * {@code load} method.
+         *
+         * <p><em>Note</em> that the {@link #getKeyStore} method is executed
+         * within the {@link AccessControlContext} of the code invoking this
+         * method.
+         *
+         * @return a new Builder object
+         * @param file the File that contains the KeyStore data
+         * @param protection the ProtectionParameter securing the KeyStore data
+         * @throws NullPointerException if file or protection is null
+         * @throws IllegalArgumentException if protection is not an instance
+         *   of either PasswordProtection or CallbackHandlerProtection; or
+         *   if file does not exist or does not refer to a normal file
+         *
+         * @since 1.9
+         */
+        public static Builder newInstance(File file,
+            ProtectionParameter protection) {
+
+            return newInstance("", null, file, protection);
+        }
+
         private static final class FileBuilder extends Builder {
 
             private final String type;
@@ -1817,42 +2059,46 @@
                     }
                     public KeyStore run0() throws Exception {
                         KeyStore ks;
-                        if (provider == null) {
-                            ks = KeyStore.getInstance(type);
+                        char[] password = null;
+
+                        // Acquire keystore password
+                        if (protection instanceof PasswordProtection) {
+                            password =
+                                ((PasswordProtection)protection).getPassword();
+                            keyProtection = protection;
                         } else {
-                            ks = KeyStore.getInstance(type, provider);
+                            CallbackHandler handler =
+                                ((CallbackHandlerProtection)protection)
+                                    .getCallbackHandler();
+                            PasswordCallback callback = new PasswordCallback
+                                ("Password for keystore " + file.getName(),
+                                    false);
+                            handler.handle(new Callback[] {callback});
+                            password = callback.getPassword();
+                            if (password == null) {
+                                throw new KeyStoreException("No password" +
+                                                            " provided");
+                            }
+                            callback.clearPassword();
+                            keyProtection = new PasswordProtection(password);
                         }
-                        InputStream in = null;
-                        char[] password = null;
-                        try {
-                            in = new FileInputStream(file);
-                            if (protection instanceof PasswordProtection) {
-                                password =
-                                ((PasswordProtection)protection).getPassword();
-                                keyProtection = protection;
+
+                        if (type.isEmpty()) {
+                            // Instantiate keystore and load keystore data
+                            ks = KeyStore.getInstance(file, password);
+                        } else {
+                            // Instantiate keystore
+                            if (provider == null) {
+                                ks = KeyStore.getInstance(type);
                             } else {
-                                CallbackHandler handler =
-                                    ((CallbackHandlerProtection)protection)
-                                    .getCallbackHandler();
-                                PasswordCallback callback = new PasswordCallback
-                                    ("Password for keystore " + file.getName(),
-                                    false);
-                                handler.handle(new Callback[] {callback});
-                                password = callback.getPassword();
-                                if (password == null) {
-                                    throw new KeyStoreException("No password" +
-                                                                " provided");
-                                }
-                                callback.clearPassword();
-                                keyProtection = new PasswordProtection(password);
+                                ks = KeyStore.getInstance(type, provider);
                             }
-                            ks.load(in, password);
-                            return ks;
-                        } finally {
-                            if (in != null) {
-                                in.close();
+                            // Load keystore data
+                            try (InputStream in = new FileInputStream(file)) {
+                                ks.load(in, password);
                             }
                         }
+                        return ks;
                     }
                 };
                 try {
@@ -1998,5 +2244,4 @@
             return protection;
         }
     }
-
 }
--- a/src/java.base/share/classes/java/security/KeyStoreSpi.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/java/security/KeyStoreSpi.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -590,4 +590,27 @@
         }
         return false;
     }
+
+    /**
+     * Probes the specified input stream to determine whether it contains a
+     * keystore that is supported by this implementation, or not.
+     *
+     * <p>
+     * @implSpec
+     * This method returns false by default. Keystore implementations should
+     * override this method to peek at the data stream directly or to use other
+     * content detection mechanisms.
+     *
+     * @param  stream the keystore data to be probed
+     *
+     * @return true if the keystore data is supported, otherwise false
+     *
+     * @throws IOException if there is an I/O problem with the keystore data.
+     * @throws NullPointerException if stream is {@code null}.
+     *
+     * @since 1.9
+     */
+    public boolean engineProbe(InputStream stream) throws IOException {
+        return false;
+    }
 }
--- a/src/java.base/share/classes/sun/nio/fs/AbstractPath.java	Sat Dec 27 07:09:32 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.fs;
-
-import java.nio.file.*;
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * Base implementation class of {@code Path}.
- */
-
-abstract class AbstractPath implements Path {
-    protected AbstractPath() { }
-
-    @Override
-    public final boolean startsWith(String other) {
-        return startsWith(getFileSystem().getPath(other));
-    }
-
-    @Override
-    public final boolean endsWith(String other) {
-        return endsWith(getFileSystem().getPath(other));
-    }
-
-    @Override
-    public final Path resolve(String other) {
-        return resolve(getFileSystem().getPath(other));
-    }
-
-    @Override
-    public final Path resolveSibling(Path other) {
-        if (other == null)
-            throw new NullPointerException();
-        Path parent = getParent();
-        return (parent == null) ? other : parent.resolve(other);
-    }
-
-    @Override
-    public final Path resolveSibling(String other) {
-        return resolveSibling(getFileSystem().getPath(other));
-    }
-
-    @Override
-    public final Iterator<Path> iterator() {
-        return new Iterator<Path>() {
-            private int i = 0;
-            @Override
-            public boolean hasNext() {
-                return (i < getNameCount());
-            }
-            @Override
-            public Path next() {
-                if (i < getNameCount()) {
-                    Path result = getName(i);
-                    i++;
-                    return result;
-                } else {
-                    throw new NoSuchElementException();
-                }
-            }
-            @Override
-            public void remove() {
-                throw new UnsupportedOperationException();
-            }
-        };
-    }
-
-    @Override
-    public final File toFile() {
-        return new File(toString());
-    }
-
-    @Override
-    public final WatchKey register(WatchService watcher,
-                                   WatchEvent.Kind<?>... events)
-        throws IOException
-    {
-        return register(watcher, events, new WatchEvent.Modifier[0]);
-    }
-}
--- a/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Sat Dec 27 13:27:07 2014 -0500
@@ -69,6 +69,8 @@
 import sun.security.pkcs.ContentInfo;
 import sun.security.x509.AlgorithmId;
 import sun.security.pkcs.EncryptedPrivateKeyInfo;
+import sun.security.provider.JavaKeyStore.JKS;
+import sun.security.util.KeyStoreDelegator;
 
 
 /**
@@ -129,6 +131,13 @@
  */
 public final class PKCS12KeyStore extends KeyStoreSpi {
 
+    // special PKCS12 keystore that supports PKCS12 and JKS file formats
+    public static final class DualFormatPKCS12 extends KeyStoreDelegator {
+        public DualFormatPKCS12() {
+            super("PKCS12", PKCS12KeyStore.class, "JKS", JKS.class);
+        }
+    }
+
     public static final int VERSION_3 = 3;
 
     private static final String[] KEY_PROTECTION_ALGORITHM = {
@@ -1053,6 +1062,39 @@
     }
 
     /**
+     * Determines if the keystore {@code Entry} for the specified
+     * {@code alias} is an instance or subclass of the specified
+     * {@code entryClass}.
+     *
+     * @param alias the alias name
+     * @param entryClass the entry class
+     *
+     * @return true if the keystore {@code Entry} for the specified
+     *          {@code alias} is an instance or subclass of the
+     *          specified {@code entryClass}, false otherwise
+     *
+     * @since 1.5
+     */
+    @Override
+    public boolean
+        engineEntryInstanceOf(String alias,
+                              Class<? extends KeyStore.Entry> entryClass)
+    {
+        if (entryClass == KeyStore.TrustedCertificateEntry.class) {
+            return engineIsCertificateEntry(alias);
+        }
+
+        Entry entry = entries.get(alias.toLowerCase(Locale.ENGLISH));
+        if (entryClass == KeyStore.PrivateKeyEntry.class) {
+            return (entry != null && entry instanceof PrivateKeyEntry);
+        }
+        if (entryClass == KeyStore.SecretKeyEntry.class) {
+            return (entry != null && entry instanceof SecretKeyEntry);
+        }
+        return false;
+    }
+
+    /**
      * Returns the (alias) name of the first keystore entry whose certificate
      * matches the given certificate.
      *
@@ -1084,7 +1126,7 @@
             } else {
                 continue;
             }
-            if (certElem.equals(cert)) {
+            if (certElem != null && certElem.equals(cert)) {
                 return alias;
             }
         }
@@ -1923,7 +1965,12 @@
                 safeContentsData = safeContents.getData();
             } else if (contentType.equals((Object)ContentInfo.ENCRYPTED_DATA_OID)) {
                 if (password == null) {
-                   continue;
+
+                    if (debug != null) {
+                        debug.println("Warning: skipping PKCS#7 encryptedData" +
+                            " content-type - no password was supplied");
+                    }
+                    continue;
                 }
 
                 if (debug != null) {
@@ -1965,8 +2012,9 @@
                             password = new char[1];
                             continue;
                         }
-                        throw new IOException(
-                            "failed to decrypt safe contents entry: " + e, e);
+                        throw new IOException("keystore password was incorrect",
+                            new UnrecoverableKeyException(
+                                "failed to decrypt safe contents entry: " + e));
                     }
                 }
             } else {
@@ -2284,4 +2332,73 @@
         counter++;
         return (String.valueOf(counter));
     }
+
+    /*
+     * PKCS12 permitted first 24 bytes:
+     *
+     * 30 82 -- -- 02 01 03 30 82 -- -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 8-
+     * 30 -- 02 01 03 30 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 -- 04 -- -- --
+     * 30 81 -- 02 01 03 30 81 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 81 -- 04
+     * 30 82 -- -- 02 01 03 30 81 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 81 --
+     * 30 83 -- -- -- 02 01 03 30 82 -- -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0
+     * 30 83 -- -- -- 02 01 03 30 83 -- -- -- 06 09 2A 86 48 86 F7 0D 01 07 01
+     * 30 84 -- -- -- -- 02 01 03 30 83 -- -- -- 06 09 2A 86 48 86 F7 0D 01 07
+     * 30 84 -- -- -- -- 02 01 03 30 84 -- -- -- -- 06 09 2A 86 48 86 F7 0D 01
+     */
+
+    private static final long[][] PKCS12_HEADER_PATTERNS = {
+        { 0x3082000002010330L, 0x82000006092A8648L, 0x86F70D010701A080L },
+        { 0x3000020103300006L, 0x092A864886F70D01L, 0x0701A00004000000L },
+        { 0x3081000201033081L, 0x0006092A864886F7L, 0x0D010701A0810004L },
+        { 0x3082000002010330L, 0x810006092A864886L, 0xF70D010701A08100L },
+        { 0x3083000000020103L, 0x3082000006092A86L, 0x4886F70D010701A0L },
+        { 0x3083000000020103L, 0x308200000006092AL, 0x864886F70D010701L },
+        { 0x3084000000000201L, 0x0330820000000609L, 0x2A864886F70D0107L },
+        { 0x3084000000000201L, 0x0330820000000006L, 0x092A864886F70D01L }
+    };
+
+    private static final long[][] PKCS12_HEADER_MASKS = {
+        { 0xFFFF0000FFFFFFFFL, 0xFF0000FFFFFFFFFFL, 0xFFFFFFFFFFFFFFF0L },
+        { 0xFF00FFFFFFFF00FFL, 0xFFFFFFFFFFFFFFFFL, 0xFFFFFF00FF000000L },
+        { 0xFFFF00FFFFFFFFFFL, 0x00FFFFFFFFFFFFFFL, 0xFFFFFFFFFFFF00FFL },
+        { 0xFFFF0000FFFFFFFFL, 0xFF00FFFFFFFFFFFFL, 0xFFFFFFFFFFFFFF00L },
+        { 0xFFFF000000FFFFFFL, 0xFFFF0000FFFFFFFFL, 0xFFFFFFFFFFFFFFFFL },
+        { 0xFFFF000000FFFFFFL, 0xFFFF000000FFFFFFL, 0xFFFFFFFFFFFFFFFFL },
+        { 0xFFFF00000000FFFFL, 0xFFFFFF000000FFFFL, 0xFFFFFFFFFFFFFFFFL },
+        { 0xFFFF00000000FFFFL, 0xFFFFFF00000000FFL, 0xFFFFFFFFFFFFFFFFL }
+    };
+
+    /**
+     * Probe the first few bytes of the keystore data stream for a valid
+     * PKCS12 keystore encoding.
+     */
+    @Override
+    public boolean engineProbe(InputStream stream) throws IOException {
+
+        DataInputStream dataStream;
+        if (stream instanceof DataInputStream) {
+            dataStream = (DataInputStream)stream;
+        } else {
+            dataStream = new DataInputStream(stream);
+        }
+
+        long firstPeek = dataStream.readLong();
+        long nextPeek = dataStream.readLong();
+        long finalPeek = dataStream.readLong();
+        boolean result = false;
+
+        for (int i = 0; i < PKCS12_HEADER_PATTERNS.length; i++) {
+            if (PKCS12_HEADER_PATTERNS[i][0] ==
+                    (firstPeek & PKCS12_HEADER_MASKS[i][0]) &&
+                (PKCS12_HEADER_PATTERNS[i][1] ==
+                    (nextPeek & PKCS12_HEADER_MASKS[i][1])) &&
+                (PKCS12_HEADER_PATTERNS[i][2] ==
+                    (finalPeek & PKCS12_HEADER_MASKS[i][2]))) {
+                result = true;
+                break;
+            }
+        }
+
+        return result;
+    }
 }
--- a/src/java.base/share/classes/sun/security/provider/JavaKeyStore.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/sun/security/provider/JavaKeyStore.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,9 +31,11 @@
 import java.security.cert.CertificateFactory;
 import java.security.cert.CertificateException;
 import java.util.*;
+
 import sun.misc.IOUtils;
-
 import sun.security.pkcs.EncryptedPrivateKeyInfo;
+import sun.security.pkcs12.PKCS12KeyStore;
+import sun.security.util.KeyStoreDelegator;
 
 /**
  * This class provides the keystore implementation referred to as "JKS".
@@ -49,7 +51,7 @@
  * @since 1.2
  */
 
-abstract class JavaKeyStore extends KeyStoreSpi {
+public abstract class JavaKeyStore extends KeyStoreSpi {
 
     // regular JKS
     public static final class JKS extends JavaKeyStore {
@@ -65,6 +67,13 @@
         }
     }
 
+    // special JKS that supports JKS and PKCS12 file formats
+    public static final class DualFormatJKS extends KeyStoreDelegator {
+        public DualFormatJKS() {
+            super("JKS", JKS.class, "PKCS12", PKCS12KeyStore.class);
+        }
+    }
+
     private static final int MAGIC = 0xfeedfeed;
     private static final int VERSION_1 = 0x01;
     private static final int VERSION_2 = 0x02;
@@ -799,4 +808,20 @@
         md.update("Mighty Aphrodite".getBytes("UTF8"));
         return md;
     }
+
+    /**
+     * Probe the first few bytes of the keystore data stream for a valid
+     * JKS keystore encoding.
+     */
+    @Override
+    public boolean engineProbe(InputStream stream) throws IOException {
+        DataInputStream dataStream;
+        if (stream instanceof DataInputStream) {
+            dataStream = (DataInputStream)stream;
+        } else {
+            dataStream = new DataInputStream(stream);
+        }
+
+        return MAGIC == dataStream.readInt();
+    }
 }
--- a/src/java.base/share/classes/sun/security/provider/Sun.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/sun/security/provider/Sun.java	Sat Dec 27 13:27:07 2014 -0500
@@ -40,7 +40,7 @@
 
     private static final String INFO = "SUN " +
     "(DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; " +
-    "SecureRandom; X.509 certificates; JKS & DKS keystores; " +
+    "SecureRandom; X.509 certificates; PKCS12, JKS & DKS keystores; " +
     "PKIX CertPathValidator; " +
     "PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; " +
     "JavaLoginConfig Configuration)";
--- a/src/java.base/share/classes/sun/security/provider/SunEntries.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/sun/security/provider/SunEntries.java	Sat Dec 27 13:27:07 2014 -0500
@@ -228,7 +228,10 @@
         /*
          * KeyStore
          */
-        map.put("KeyStore.JKS", "sun.security.provider.JavaKeyStore$JKS");
+        map.put("KeyStore.PKCS12",
+                        "sun.security.pkcs12.PKCS12KeyStore$DualFormatPKCS12");
+        map.put("KeyStore.JKS",
+                        "sun.security.provider.JavaKeyStore$DualFormatJKS");
         map.put("KeyStore.CaseExactJKS",
                         "sun.security.provider.JavaKeyStore$CaseExactJKS");
         map.put("KeyStore.DKS", "sun.security.provider.DomainKeyStore$DKS");
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Sat Dec 27 13:27:07 2014 -0500
@@ -124,6 +124,7 @@
 
     private Set<Pair <String, String>> providers = null;
     private String storetype = null;
+    private boolean hasStoretypeOption = false;
     private String srcProviderName = null;
     private String providerName = null;
     private String pathlist = null;
@@ -483,11 +484,13 @@
             } else if (collator.compare(flags, "-storetype") == 0 ||
                     collator.compare(flags, "-deststoretype") == 0) {
                 storetype = args[++i];
+                hasStoretypeOption = true;
             } else if (collator.compare(flags, "-srcstorepass") == 0) {
                 srcstorePass = getPass(modifier, args[++i]);
                 passwords.add(srcstorePass);
             } else if (collator.compare(flags, "-srcstoretype") == 0) {
                 srcstoretype = args[++i];
+                hasStoretypeOption = true;
             } else if (collator.compare(flags, "-srckeypass") == 0) {
                 srckeyPass = getPass(modifier, args[++i]);
                 passwords.add(srckeyPass);
@@ -809,36 +812,42 @@
         }
 
         // Create new keystore
-        if (providerName == null) {
-            keyStore = KeyStore.getInstance(storetype);
+        // Probe for keystore type when filename is available
+        if (ksfile != null && ksStream != null && providerName == null &&
+            hasStoretypeOption == false) {
+            keyStore = KeyStore.getInstance(ksfile, storePass);
         } else {
-            keyStore = KeyStore.getInstance(storetype, providerName);
-        }
-
-        /*
-         * Load the keystore data.
-         *
-         * At this point, it's OK if no keystore password has been provided.
-         * We want to make sure that we can load the keystore data, i.e.,
-         * the keystore data has the right format. If we cannot load the
-         * keystore, why bother asking the user for his or her password?
-         * Only if we were able to load the keystore, and no keystore
-         * password has been provided, will we prompt the user for the
-         * keystore password to verify the keystore integrity.
-         * This means that the keystore is loaded twice: first load operation
-         * checks the keystore format, second load operation verifies the
-         * keystore integrity.
-         *
-         * If the keystore password has already been provided (at the
-         * command line), however, the keystore is loaded only once, and the
-         * keystore format and integrity are checked "at the same time".
-         *
-         * Null stream keystores are loaded later.
-         */
-        if (!nullStream) {
-            keyStore.load(ksStream, storePass);
-            if (ksStream != null) {
-                ksStream.close();
+            if (providerName == null) {
+                keyStore = KeyStore.getInstance(storetype);
+            } else {
+                keyStore = KeyStore.getInstance(storetype, providerName);
+            }
+
+            /*
+             * Load the keystore data.
+             *
+             * At this point, it's OK if no keystore password has been provided.
+             * We want to make sure that we can load the keystore data, i.e.,
+             * the keystore data has the right format. If we cannot load the
+             * keystore, why bother asking the user for his or her password?
+             * Only if we were able to load the keystore, and no keystore
+             * password has been provided, will we prompt the user for the
+             * keystore password to verify the keystore integrity.
+             * This means that the keystore is loaded twice: first load operation
+             * checks the keystore format, second load operation verifies the
+             * keystore integrity.
+             *
+             * If the keystore password has already been provided (at the
+             * command line), however, the keystore is loaded only once, and the
+             * keystore format and integrity are checked "at the same time".
+             *
+             * Null stream keystores are loaded later.
+             */
+            if (!nullStream) {
+                keyStore.load(ksStream, storePass);
+                if (ksStream != null) {
+                    ksStream.close();
+                }
             }
         }
 
@@ -1881,6 +1890,7 @@
         boolean isPkcs11 = false;
 
         InputStream is = null;
+        File srcksfile = null;
 
         if (P11KEYSTORE.equalsIgnoreCase(srcstoretype) ||
                 KeyStoreUtil.isWindowsKeyStore(srcstoretype)) {
@@ -1893,7 +1903,7 @@
             isPkcs11 = true;
         } else {
             if (srcksfname != null) {
-                File srcksfile = new File(srcksfname);
+                srcksfile = new File(srcksfname);
                     if (srcksfile.exists() && srcksfile.length() == 0) {
                         throw new Exception(rb.getString
                                 ("Source.keystore.file.exists.but.is.empty.") +
@@ -1908,10 +1918,16 @@
 
         KeyStore store;
         try {
-            if (srcProviderName == null) {
-                store = KeyStore.getInstance(srcstoretype);
+            // Probe for keystore type when filename is available
+            if (srcksfile != null && is != null && srcProviderName == null &&
+                hasStoretypeOption == false) {
+                store = KeyStore.getInstance(srcksfile, srcstorePass);
             } else {
-                store = KeyStore.getInstance(srcstoretype, srcProviderName);
+                if (srcProviderName == null) {
+                    store = KeyStore.getInstance(srcstoretype);
+                } else {
+                    store = KeyStore.getInstance(srcstoretype, srcProviderName);
+                }
             }
 
             if (srcstorePass == null
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/sun/security/util/KeyStoreDelegator.java	Sat Dec 27 13:27:07 2014 -0500
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.util;
+
+import java.io.*;
+import java.security.*;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+import java.security.cert.CertificateException;
+import java.util.*;
+
+import sun.security.util.Debug;
+
+/**
+ * This class delegates to a primary or secondary keystore implementation.
+ *
+ * @since 1.9
+ */
+
+public class KeyStoreDelegator extends KeyStoreSpi {
+
+    private static final String KEYSTORE_TYPE_COMPAT = "keystore.type.compat";
+    private static final Debug debug = Debug.getInstance("keystore");
+
+    private String primaryType;   // the primary keystore's type
+    private String secondaryType; // the secondary keystore's type
+    private Class<? extends KeyStoreSpi> primaryKeyStore;
+                                  // the primary keystore's class
+    private Class<? extends KeyStoreSpi> secondaryKeyStore;
+                                  // the secondary keystore's class
+    private String type; // the delegate's type
+    private KeyStoreSpi keystore; // the delegate
+    private boolean compatModeEnabled = true;
+
+    public KeyStoreDelegator(
+        String primaryType,
+        Class<? extends KeyStoreSpi> primaryKeyStore,
+        String secondaryType,
+        Class<? extends KeyStoreSpi> secondaryKeyStore) {
+
+        // Check whether compatibility mode has been disabled
+        compatModeEnabled = "true".equalsIgnoreCase(
+            AccessController.doPrivileged((PrivilegedAction<String>) () ->
+                Security.getProperty(KEYSTORE_TYPE_COMPAT)));
+
+        if (compatModeEnabled) {
+            this.primaryType = primaryType;
+            this.secondaryType = secondaryType;
+            this.primaryKeyStore = primaryKeyStore;
+            this.secondaryKeyStore = secondaryKeyStore;
+        } else {
+            this.primaryType = primaryType;
+            this.secondaryType = null;
+            this.primaryKeyStore = primaryKeyStore;
+            this.secondaryKeyStore = null;
+
+            if (debug != null) {
+                debug.println("WARNING: compatibility mode disabled for " +
+                    primaryType + " and " + secondaryType + " keystore types");
+            }
+        }
+    }
+
+    @Override
+    public Key engineGetKey(String alias, char[] password)
+        throws NoSuchAlgorithmException, UnrecoverableKeyException {
+        return keystore.engineGetKey(alias, password);
+    }
+
+    @Override
+    public Certificate[] engineGetCertificateChain(String alias) {
+        return keystore.engineGetCertificateChain(alias);
+    }
+
+    @Override
+    public Certificate engineGetCertificate(String alias) {
+        return keystore.engineGetCertificate(alias);
+    }
+
+    @Override
+    public Date engineGetCreationDate(String alias) {
+        return keystore.engineGetCreationDate(alias);
+    }
+
+    @Override
+    public void engineSetKeyEntry(String alias, Key key, char[] password,
+        Certificate[] chain) throws KeyStoreException {
+        keystore.engineSetKeyEntry(alias, key, password, chain);
+    }
+
+    @Override
+    public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
+        throws KeyStoreException {
+        keystore.engineSetKeyEntry(alias, key, chain);
+    }
+
+    @Override
+    public void engineSetCertificateEntry(String alias, Certificate cert)
+        throws KeyStoreException {
+        keystore.engineSetCertificateEntry(alias, cert);
+    }
+
+    @Override
+    public void engineDeleteEntry(String alias) throws KeyStoreException {
+        keystore.engineDeleteEntry(alias);
+    }
+
+    @Override
+    public Enumeration<String> engineAliases() {
+        return keystore.engineAliases();
+    }
+
+    @Override
+    public boolean engineContainsAlias(String alias) {
+        return keystore.engineContainsAlias(alias);
+    }
+
+    @Override
+    public int engineSize() {
+        return keystore.engineSize();
+    }
+
+    @Override
+    public boolean engineIsKeyEntry(String alias) {
+        return keystore.engineIsKeyEntry(alias);
+    }
+
+    @Override
+    public boolean engineIsCertificateEntry(String alias) {
+        return keystore.engineIsCertificateEntry(alias);
+    }
+
+    @Override
+    public String engineGetCertificateAlias(Certificate cert) {
+        return keystore.engineGetCertificateAlias(cert);
+    }
+
+    @Override
+    public KeyStore.Entry engineGetEntry(String alias,
+        KeyStore.ProtectionParameter protParam)
+            throws KeyStoreException, NoSuchAlgorithmException,
+                UnrecoverableEntryException {
+        return keystore.engineGetEntry(alias, protParam);
+    }
+
+    @Override
+    public void engineSetEntry(String alias, KeyStore.Entry entry,
+        KeyStore.ProtectionParameter protParam)
+            throws KeyStoreException {
+        keystore.engineSetEntry(alias, entry, protParam);
+    }
+
+    @Override
+    public boolean engineEntryInstanceOf(String alias,
+        Class<? extends KeyStore.Entry> entryClass) {
+        return keystore.engineEntryInstanceOf(alias, entryClass);
+    }
+
+    @Override
+    public void engineStore(OutputStream stream, char[] password)
+        throws IOException, NoSuchAlgorithmException, CertificateException {
+
+        if (debug != null) {
+            debug.println("Storing keystore in " + type + " format");
+        }
+        keystore.engineStore(stream, password);
+    }
+
+    @Override
+    public void engineLoad(InputStream stream, char[] password)
+        throws IOException, NoSuchAlgorithmException, CertificateException {
+
+        // A new keystore is always created in the primary keystore format
+        if (stream == null) {
+            try {
+                keystore = primaryKeyStore.newInstance();
+
+            } catch (InstantiationException | IllegalAccessException e) {
+                // can safely ignore
+            }
+            type = primaryType;
+
+            if (debug != null) {
+                debug.println("Creating a new keystore in " + type + " format");
+            }
+            keystore.engineLoad(stream, password);
+
+        } else {
+            // First try the primary keystore then try the secondary keystore
+            try (InputStream bufferedStream = new BufferedInputStream(stream)) {
+                bufferedStream.mark(Integer.MAX_VALUE);
+
+                try {
+                    keystore = primaryKeyStore.newInstance();
+                    type = primaryType;
+                    keystore.engineLoad(bufferedStream, password);
+
+                } catch (Exception e) {
+
+                    // incorrect password
+                    if (e instanceof IOException &&
+                        e.getCause() instanceof UnrecoverableKeyException) {
+                        throw (IOException)e;
+                    }
+
+                    try {
+                        // Ignore secondary keystore when no compatibility mode
+                        if (!compatModeEnabled) {
+                            throw e;
+                        }
+
+                        keystore = secondaryKeyStore.newInstance();
+                        type = secondaryType;
+                        bufferedStream.reset();
+                        keystore.engineLoad(bufferedStream, password);
+
+                        if (debug != null) {
+                            debug.println("WARNING: switching from " +
+                              primaryType + " to " + secondaryType +
+                              " keystore file format has altered the " +
+                              "keystore security level");
+                        }
+
+                    } catch (InstantiationException |
+                        IllegalAccessException e2) {
+                        // can safely ignore
+
+                    } catch (IOException |
+                        NoSuchAlgorithmException |
+                        CertificateException e3) {
+
+                        // incorrect password
+                        if (e3 instanceof IOException &&
+                            e3.getCause() instanceof
+                                UnrecoverableKeyException) {
+                            throw (IOException)e3;
+                        }
+                        // rethrow the outer exception
+                        if (e instanceof IOException) {
+                            throw (IOException)e;
+                        } else if (e instanceof CertificateException) {
+                            throw (CertificateException)e;
+                        } else if (e instanceof NoSuchAlgorithmException) {
+                            throw (NoSuchAlgorithmException)e;
+                        }
+                    }
+                }
+            }
+
+            if (debug != null) {
+                debug.println("Loaded a keystore in " + type + " format");
+            }
+        }
+    }
+
+    /**
+     * Probe the first few bytes of the keystore data stream for a valid
+     * keystore encoding. Only the primary keystore implementation is probed.
+     */
+    @Override
+    public boolean engineProbe(InputStream stream) throws IOException {
+
+        boolean result = false;
+
+        try {
+            keystore = primaryKeyStore.newInstance();
+            type = primaryType;
+            result = keystore.engineProbe(stream);
+
+        } catch (Exception e) {
+            throw new IOException(e);
+
+        } finally {
+            // reset
+            if (result == false) {
+                type = null;
+                keystore = null;
+            }
+        }
+
+        return result;
+    }
+}
--- a/src/java.base/share/conf/security/java.security	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/share/conf/security/java.security	Sat Dec 27 13:27:07 2014 -0500
@@ -183,7 +183,17 @@
 #
 # Default keystore type.
 #
-keystore.type=jks
+keystore.type=pkcs12
+
+#
+# Controls compatibility mode for JKS and PKCS12 keystore types.
+#
+# When set to 'true', both JKS and PKCS12 keystore types support loading
+# keystore files in either JKS or PKCS12 format. When set to 'false' the
+# JKS keystore type supports loading only JKS keystore files and the PKCS12
+# keystore type supports loading only PKCS12 keystore files.
+#
+keystore.type.compat=true
 
 #
 # List of comma-separated packages that start with or equal this string
--- a/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Sat Dec 27 13:27:07 2014 -0500
@@ -40,9 +40,7 @@
  * Solaris/Linux implementation of java.nio.file.Path
  */
 
-class UnixPath
-    extends AbstractPath
-{
+class UnixPath implements Path {
     private static ThreadLocal<SoftReference<CharsetEncoder>> encoder =
         new ThreadLocal<SoftReference<CharsetEncoder>>();
 
--- a/src/java.base/windows/classes/sun/nio/fs/WindowsPath.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.base/windows/classes/sun/nio/fs/WindowsPath.java	Sat Dec 27 13:27:07 2014 -0500
@@ -41,7 +41,7 @@
  * Windows implementation of Path
  */
 
-class WindowsPath extends AbstractPath {
+class WindowsPath implements Path {
 
     // The maximum path that does not require long path prefix. On Windows
     // the maximum path is 260 minus 1 (NUL) but for directories it is 260
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Sat Dec 27 13:27:07 2014 -0500
@@ -70,6 +70,7 @@
         return comboBox == null ? true : comboBox.isEnabled();
     }
 
+    @SuppressWarnings("deprecation")
     public boolean isFocusTraversable() {
         return false;
     }
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -303,6 +303,7 @@
             }
         }
 
+        @SuppressWarnings("deprecation")
         public void hide() {
             final Container parent = getParent();
             final Rectangle r = this.getBounds();
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2231,6 +2231,7 @@
             return total;
         }
 
+        @SuppressWarnings("deprecation")
         public void layoutContainer(final Container parent) {
             /* Some of the code in this method deals with changing the
              * visibility of components to hide and show the contents for the
@@ -2725,6 +2726,7 @@
             return calculateMaxTabWidth(tabPlacement);
         }
 
+        @SuppressWarnings("deprecation")
         public void layoutContainer(final Container parent) {
             /* Some of the code in this method deals with changing the
              * visibility of components to hide and show the contents for the
--- a/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenu.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenu.java	Sat Dec 27 13:27:07 2014 -0500
@@ -229,6 +229,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void addNotify() {
         synchronized (getTreeLock()) {
             super.addNotify();
@@ -354,6 +355,7 @@
     public void setIndeterminate(boolean indeterminate) { }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void setToolTipText(final String text) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
@@ -363,6 +365,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void setIcon(final Icon i) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
--- a/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuBar.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuBar.java	Sat Dec 27 13:27:07 2014 -0500
@@ -246,6 +246,7 @@
             fSubmenus.remove(menu);
     }
 
+    @SuppressWarnings("deprecation")
     public Menu add(final Menu m, final int index) {
         synchronized (getTreeLock()) {
             if (m.getParent() != null) {
--- a/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItem.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItem.java	Sat Dec 27 13:27:07 2014 -0500
@@ -97,6 +97,7 @@
         fMenuItem.removeComponentListener(this);
     }
 
+    @SuppressWarnings("deprecation")
     static void syncLabelAndKS(MenuItem menuItem, String label, KeyStroke ks) {
         final MenuComponentPeer peer = menuItem.getPeer();
         if (!(peer instanceof CMenuItem)) {
@@ -165,6 +166,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void setToolTipText(final String text) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
@@ -173,6 +175,7 @@
         cmi.setToolTipText(text);
     }
 
+    @SuppressWarnings("deprecation")
     public void setIcon(final Icon i) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
--- a/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java	Sat Dec 27 13:27:07 2014 -0500
@@ -57,6 +57,7 @@
     }
 
     ScreenMenuPropertyListener fPropertyListener;
+    @SuppressWarnings("deprecation")
     public void addNotify() {
         super.addNotify();
 
@@ -154,6 +155,7 @@
         setVisible(false);
     }
 
+    @SuppressWarnings("deprecation")
     public void setToolTipText(final String text) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
@@ -161,6 +163,7 @@
         ((CMenuItem)peer).setToolTipText(text);
     }
 
+    @SuppressWarnings("deprecation")
     public void setIcon(final Icon i) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
@@ -205,6 +208,7 @@
             }
         }
 
+    @SuppressWarnings("deprecation")
     public void setIndeterminate(final boolean indeterminate) {
         final MenuComponentPeer peer = getPeer();
         if (peer instanceof CCheckboxMenuItem) {
--- a/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -202,6 +202,7 @@
         return true;
     }
 
+    @SuppressWarnings("deprecation")
     private static void enterFullScreenExclusive(Window w) {
         FullScreenCapable peer = (FullScreenCapable)w.getPeer();
         if (peer != null) {
@@ -209,6 +210,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private static void exitFullScreenExclusive(Window w) {
         FullScreenCapable peer = (FullScreenCapable)w.getPeer();
         if (peer != null) {
--- a/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -125,6 +125,7 @@
         return fConfig;
     }
 
+    @SuppressWarnings("deprecation")
     protected void setBounds(int x, int y, int w, int h) {
         fBounds.reshape(x, y, w, y + h);
     }
--- a/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLVolatileSurfaceManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLVolatileSurfaceManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,6 +74,7 @@
      * Create a pbuffer-based SurfaceData object (or init the backbuffer
      * of an existing window if this is a double buffered GraphicsConfig)
      */
+    @SuppressWarnings("deprecation")
     protected SurfaceData initAcceleratedSurface() {
         SurfaceData sData = null;
         Component comp = vImg.getComponent();
--- a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1243,6 +1243,7 @@
         changeFocusedWindow(activate, null);
     }
 
+    @SuppressWarnings("deprecation")
     private boolean isOneOfOwnersOf(LWWindowPeer peer) {
         Window owner = (peer != null ? peer.getTarget().getOwner() : null);
         while (owner != null) {
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,6 +88,7 @@
         super.startDrag(dsc, cursor, dragImage, dragImageOffset);
     }
 
+    @SuppressWarnings("deprecation")
     protected void startDrag(Transferable transferable, long[] formats, Map<Long, DataFlavor> formatMap) {
         DragGestureEvent trigger = getTrigger();
         InputEvent         triggerEvent = trigger.getTriggerEvent();
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Sat Dec 27 13:27:07 2014 -0500
@@ -46,6 +46,7 @@
         show();
     }
 
+    @SuppressWarnings("deprecation")
     public void addNotify() {
         if (getPeer() == null) {
             LWCToolkit toolkit = (LWCToolkit)Toolkit.getDefaultToolkit();
@@ -60,6 +61,7 @@
 
     public void unregisterAccelerator(AWTKeyStroke stroke) {}
 
+    @SuppressWarnings("deprecation")
     protected long getLayerPtr() {
         LWWindowPeer peer = (LWWindowPeer)getPeer();
         return peer.getLayerPtr();
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -385,6 +385,7 @@
 
     // java.awt.Toolkit#getNativeContainer() is not available
     //    from this package
+    @SuppressWarnings("deprecation")
     private LWComponentPeer<?, ?> getNearestNativePeer(Component comp) {
         if (comp==null)
             return null;
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuBar.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuBar.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void addHelpMenu(Menu m) {
         CMenu cMenu = (CMenu)m.getPeer();
         nativeSetHelpMenu(getModel(), cMenu.getModel());
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Sat Dec 27 13:27:07 2014 -0500
@@ -190,6 +190,7 @@
             nativeSetNSWindowRepresentedFilename(c.getNSWindowPtr(), filename);
         }}
     }) {
+        @SuppressWarnings("deprecation")
         public CPlatformWindow convertJComponentToTarget(final JRootPane p) {
             Component root = SwingUtilities.getRoot(p);
             if (root == null || (LWWindowPeer)root.getPeer() == null) return null;
@@ -519,6 +520,7 @@
     }
 
     @Override // PlatformWindow
+    @SuppressWarnings("deprecation")
     public void setVisible(boolean visible) {
         final long nsWindowPtr = getNSWindowPtr();
 
@@ -674,6 +676,7 @@
     }
 
     @Override  // PlatformWindow
+    @SuppressWarnings("deprecation")
     public void toFront() {
         final long nsWindowPtr = getNSWindowPtr();
         LWCToolkit lwcToolkit = (LWCToolkit) Toolkit.getDefaultToolkit();
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java	Sat Dec 27 13:27:07 2014 -0500
@@ -68,6 +68,7 @@
         updateImage();
     }
 
+    @SuppressWarnings("deprecation")
     private CPopupMenu checkAndCreatePopupPeer() {
         CPopupMenu menuPeer = null;
         if (popup != null) {
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	Sat Dec 27 13:27:07 2014 -0500
@@ -78,6 +78,7 @@
      * Synthetic event delivery for focus management
      */
     @Override
+    @SuppressWarnings("deprecation")
     public void synthesizeWindowActivation(boolean activated) {
         if (isActive != activated) {
             isActive = activated;
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Sat Dec 27 13:27:07 2014 -0500
@@ -104,6 +104,67 @@
 
 @implementation AWTWindow_Normal
 AWT_NS_WINDOW_IMPLEMENTATION
+
+// Gesture support
+- (void)postGesture:(NSEvent *)event as:(jint)type a:(jdouble)a b:(jdouble)b {
+    AWT_ASSERT_APPKIT_THREAD;
+
+    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    jobject platformWindow = [((AWTWindow *)self.delegate).javaPlatformWindow jObjectWithEnv:env];
+    if (platformWindow != NULL) {
+        // extract the target AWT Window object out of the CPlatformWindow
+        static JNF_MEMBER_CACHE(jf_target, jc_CPlatformWindow, "target", "Ljava/awt/Window;");
+        jobject awtWindow = JNFGetObjectField(env, platformWindow, jf_target);
+        if (awtWindow != NULL) {
+            // translate the point into Java coordinates
+            NSPoint loc = [event locationInWindow];
+            loc.y = [self frame].size.height - loc.y;
+
+            // send up to the GestureHandler to recursively dispatch on the AWT event thread
+            static JNF_CLASS_CACHE(jc_GestureHandler, "com/apple/eawt/event/GestureHandler");
+            static JNF_STATIC_MEMBER_CACHE(sjm_handleGestureFromNative, jc_GestureHandler, "handleGestureFromNative", "(Ljava/awt/Window;IDDDD)V");
+            JNFCallStaticVoidMethod(env, sjm_handleGestureFromNative, awtWindow, type, (jdouble)loc.x, (jdouble)loc.y, (jdouble)a, (jdouble)b);
+            (*env)->DeleteLocalRef(env, awtWindow);
+        }
+        (*env)->DeleteLocalRef(env, platformWindow);
+    }
+}
+
+- (void)beginGestureWithEvent:(NSEvent *)event {
+    [self postGesture:event
+                   as:com_apple_eawt_event_GestureHandler_PHASE
+                    a:-1.0
+                    b:0.0];
+}
+
+- (void)endGestureWithEvent:(NSEvent *)event {
+    [self postGesture:event
+                   as:com_apple_eawt_event_GestureHandler_PHASE
+                    a:1.0
+                    b:0.0];
+}
+
+- (void)magnifyWithEvent:(NSEvent *)event {
+    [self postGesture:event
+                   as:com_apple_eawt_event_GestureHandler_MAGNIFY
+                    a:[event magnification]
+                    b:0.0];
+}
+
+- (void)rotateWithEvent:(NSEvent *)event {
+    [self postGesture:event
+                   as:com_apple_eawt_event_GestureHandler_ROTATE
+                    a:[event rotation]
+                    b:0.0];
+}
+
+- (void)swipeWithEvent:(NSEvent *)event {
+    [self postGesture:event
+                   as:com_apple_eawt_event_GestureHandler_SWIPE
+                    a:[event deltaX]
+                    b:[event deltaY]];
+}
+
 @end
 @implementation AWTWindow_Panel
 AWT_NS_WINDOW_IMPLEMENTATION
@@ -399,67 +460,6 @@
 }
 
 
-// Gesture support
-- (void)postGesture:(NSEvent *)event as:(jint)type a:(jdouble)a b:(jdouble)b {
-AWT_ASSERT_APPKIT_THREAD;
-
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
-    jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
-    if (platformWindow != NULL) {
-        // extract the target AWT Window object out of the CPlatformWindow
-        static JNF_MEMBER_CACHE(jf_target, jc_CPlatformWindow, "target", "Ljava/awt/Window;");
-        jobject awtWindow = JNFGetObjectField(env, platformWindow, jf_target);
-        if (awtWindow != NULL) {
-            // translate the point into Java coordinates
-            NSPoint loc = [event locationInWindow];
-            loc.y = [self.nsWindow frame].size.height - loc.y;
-
-            // send up to the GestureHandler to recursively dispatch on the AWT event thread
-            static JNF_CLASS_CACHE(jc_GestureHandler, "com/apple/eawt/event/GestureHandler");
-            static JNF_STATIC_MEMBER_CACHE(sjm_handleGestureFromNative, jc_GestureHandler, "handleGestureFromNative", "(Ljava/awt/Window;IDDDD)V");
-            JNFCallStaticVoidMethod(env, sjm_handleGestureFromNative, awtWindow, type, (jdouble)loc.x, (jdouble)loc.y, (jdouble)a, (jdouble)b);
-            (*env)->DeleteLocalRef(env, awtWindow);
-        }
-        (*env)->DeleteLocalRef(env, platformWindow);
-    }
-}
-
-- (void)beginGestureWithEvent:(NSEvent *)event {
-    [self postGesture:event
-                   as:com_apple_eawt_event_GestureHandler_PHASE
-                    a:-1.0
-                    b:0.0];
-}
-
-- (void)endGestureWithEvent:(NSEvent *)event {
-    [self postGesture:event
-                   as:com_apple_eawt_event_GestureHandler_PHASE
-                    a:1.0
-                    b:0.0];
-}
-
-- (void)magnifyWithEvent:(NSEvent *)event {
-    [self postGesture:event
-                   as:com_apple_eawt_event_GestureHandler_MAGNIFY
-                    a:[event magnification]
-                    b:0.0];
-}
-
-- (void)rotateWithEvent:(NSEvent *)event {
-    [self postGesture:event
-                   as:com_apple_eawt_event_GestureHandler_ROTATE
-                    a:[event rotation]
-                    b:0.0];
-}
-
-- (void)swipeWithEvent:(NSEvent *)event {
-    [self postGesture:event
-                   as:com_apple_eawt_event_GestureHandler_SWIPE
-                    a:[event deltaX]
-                    b:[event deltaY]];
-}
-
-
 // NSWindowDelegate methods
 
 - (void) _deliverMoveResizeEvent {
--- a/src/java.desktop/macosx/native/libawt_lwawt/font/AWTStrike.m	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/macosx/native/libawt_lwawt/font/AWTStrike.m	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,11 @@
 
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
 #import "java_awt_geom_PathIterator.h"
-#import "sun_awt_SunHints.h"
 #import "sun_font_CStrike.h"
 #import "sun_font_CStrikeDisposer.h"
 #import "CGGlyphImages.h"
 #import "CGGlyphOutlines.h"
-#import "AWTStrike.h"
 #import "CoreTextSupport.h"
-//#import "jni_util.h"
 #include "fontscalerdefs.h"
 
 /* Use THIS_FILE when it is available. */
@@ -65,10 +62,10 @@
         invDevTx.b *= -1;
         invDevTx.c *= -1;
         fFontTx = CGAffineTransformConcat(CGAffineTransformConcat(tx, invDevTx), sInverseTX);
-        fDevTx = CGAffineTransformInvert(invDevTx);
+        fDevTx = CGAffineTransformInvert(CGAffineTransformConcat(invDevTx, sInverseTX));
 
         // the "font size" is the square root of the determinant of the matrix
-        fSize = sqrt(abs(fFontTx.a * fFontTx.d - fFontTx.b * fFontTx.c));
+        fSize = sqrt(fabs(fFontTx.a * fFontTx.d - fFontTx.b * fFontTx.c));
     }
     return self;
 }
--- a/src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 public class ColorEditor extends Panel implements PropertyEditor {
     private static final long serialVersionUID = 1781257185164716054L;
 
+    @SuppressWarnings("deprecation")
     public ColorEditor() {
         setLayout(null);
 
@@ -69,10 +70,12 @@
         changeColor(c);
     }
 
+    @SuppressWarnings("deprecation")
     public Dimension preferredSize() {
         return new Dimension(ourWidth, 40);
     }
 
+    @SuppressWarnings("deprecation")
     public boolean keyUp(Event e, int key) {
         if (e.target == text) {
             try {
@@ -107,6 +110,7 @@
 
     }
 
+    @SuppressWarnings("deprecation")
     public boolean action(Event e, Object arg) {
         if (e.target == choser) {
             changeColor(colors[choser.getSelectedIndex()]);
--- a/src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 public class FontEditor extends Panel implements java.beans.PropertyEditor {
     private static final long serialVersionUID = 6732704486002715933L;
 
+    @SuppressWarnings("deprecation")
     public FontEditor() {
         setLayout(null);
 
@@ -62,6 +63,7 @@
     }
 
 
+    @SuppressWarnings("deprecation")
     public Dimension preferredSize() {
         return new Dimension(300, 40);
     }
@@ -93,6 +95,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private void changeFont(Font f) {
         font = f;
         if (sample != null) {
@@ -124,6 +127,7 @@
                    font.getStyle() + ", " + font.getSize() + ")";
     }
 
+    @SuppressWarnings("deprecation")
     public boolean action(Event e, Object arg) {
         String family = familyChoser.getSelectedItem();
         int style = styles[styleChoser.getSelectedIndex()];
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -143,6 +143,7 @@
         return map;
     }
 
+    @SuppressWarnings("deprecation")
     public String getFileName() {
         JFileChooser fc = getFileChooser();
         String typedInName = fileNameTextField != null ?
@@ -419,6 +420,7 @@
 
 
 
+    @SuppressWarnings("deprecation")
     protected class SelectionListener implements ListSelectionListener {
         public void valueChanged(ListSelectionEvent e) {
             if (!e.getValueIsAdjusting()) {
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -245,6 +245,7 @@
                 e.isPopupTrigger(), MouseEvent.NOBUTTON));
         }
 
+        @SuppressWarnings("deprecation")
         public boolean isFocusTraversable() {
             return false;
         }
@@ -336,6 +337,7 @@
                 e.getClickCount(), e.isPopupTrigger(), MouseEvent.NOBUTTON ));
         }
 
+        @SuppressWarnings("deprecation")
         public boolean isFocusTraversable() {
             return false;
         }
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Sat Dec 27 13:27:07 2014 -0500
@@ -242,6 +242,7 @@
             setBorderPainted(false);
         }
 
+        @SuppressWarnings("deprecation")
         public boolean isFocusTraversable() {
             return false;
         }
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopPaneUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopPaneUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,6 +60,7 @@
         super.installDefaults();
     }
 
+    @SuppressWarnings("deprecation")
     protected void installKeyboardActions() {
         super.installKeyboardActions();
 
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2487,6 +2487,7 @@
     /**
      * Calculates the dialog unit mapping.
      */
+    @SuppressWarnings("deprecation")
     private void calculateBaseUnits() {
         // This calculation comes from:
         // http://support.microsoft.com/default.aspx?scid=kb;EN-US;125681
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsPopupWindow.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsPopupWindow.java	Sat Dec 27 13:27:07 2014 -0500
@@ -78,6 +78,7 @@
         paint(g);
     }
 
+    @SuppressWarnings("deprecation")
     public void hide() {
         super.hide();
         /** We need to call removeNotify() here because hide() does
@@ -89,6 +90,7 @@
         removeNotify();
     }
 
+    @SuppressWarnings("deprecation")
     public void show() {
         super.show();
         this.pack();
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java	Sat Dec 27 13:27:07 2014 -0500
@@ -700,6 +700,7 @@
             setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
         }
 
+        @SuppressWarnings("deprecation")
         public boolean isFocusTraversable() {
             return false;
         }
--- a/src/java.desktop/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java	Sat Dec 27 13:27:07 2014 -0500
@@ -167,9 +167,9 @@
         for (int i = 0; i < allchannelnames.length; i++) {
             if ((channelmask & m) != 0L) {
                 if (i < channelnames.length) {
-                    sb.append(channelnames[i] + " ");
+                    sb.append(channelnames[i]).append(' ');
                 } else {
-                    sb.append(allchannelnames[i] + " ");
+                    sb.append(allchannelnames[i]).append(' ');
                 }
             }
             m *= 2L;
--- a/src/java.desktop/share/classes/java/awt/Canvas.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Canvas.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,6 +70,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     void setGraphicsConfiguration(GraphicsConfiguration gc) {
         synchronized(getTreeLock()) {
             CanvasPeer peer = (CanvasPeer)getPeer();
--- a/src/java.desktop/share/classes/java/awt/Container.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Container.java	Sat Dec 27 13:27:07 2014 -0500
@@ -805,6 +805,7 @@
      * to new heavyweight parent.
      * @since 1.5
      */
+    @SuppressWarnings("deprecation")
     private void reparentTraverse(ContainerPeer parentPeer, Container child) {
         checkTreeLock();
 
@@ -828,6 +829,7 @@
      * Container must be heavyweight.
      * @since 1.5
      */
+    @SuppressWarnings("deprecation")
     private void reparentChild(Component comp) {
         checkTreeLock();
         if (comp == null) {
@@ -4189,6 +4191,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private void recursiveShowHeavyweightChildren() {
         if (!hasHeavyweightDescendants() || !isVisible()) {
             return;
@@ -4210,6 +4213,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private void recursiveHideHeavyweightChildren() {
         if (!hasHeavyweightDescendants()) {
             return;
@@ -4231,6 +4235,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private void recursiveRelocateHeavyweightChildren(Point origin) {
         for (int index = 0; index < getComponentCount(); index++) {
             Component comp = getComponent(index);
--- a/src/java.desktop/share/classes/java/awt/DefaultFocusTraversalPolicy.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/DefaultFocusTraversalPolicy.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,6 +93,7 @@
      * @return <code>true</code> if aComponent meets the above requirements;
      *         <code>false</code> otherwise
      */
+    @SuppressWarnings("deprecation")
     protected boolean accept(Component aComponent) {
         if (!(aComponent.isVisible() && aComponent.isDisplayable() &&
               aComponent.isEnabled()))
--- a/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -796,6 +796,7 @@
      * @return <code>true</code>
      * @see Component#dispatchEvent
      */
+    @SuppressWarnings("deprecation")
     public boolean dispatchKeyEvent(KeyEvent e) {
         Component focusOwner = (((AWTEvent)e).isPosted) ? getFocusOwner() : e.getComponent();
 
@@ -1021,6 +1022,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private boolean preDispatchKeyEvent(KeyEvent ke) {
         if (((AWTEvent) ke).isPosted) {
             Component focusOwner = getFocusOwner();
--- a/src/java.desktop/share/classes/java/awt/Dialog.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Dialog.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -749,6 +749,7 @@
      * @see Component#isDisplayable
      * @see #removeNotify
      */
+    @SuppressWarnings("deprecation")
     public void addNotify() {
         synchronized (getTreeLock()) {
             if (parent != null && parent.getPeer() == null) {
@@ -897,6 +898,7 @@
     /**
      * @return true if we actually showed, false if we just called toFront()
      */
+    @SuppressWarnings("deprecation")
     private boolean conditionalShow(Component toFocus, AtomicLong time) {
         boolean retval;
 
--- a/src/java.desktop/share/classes/java/awt/FileDialog.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/FileDialog.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -314,6 +314,7 @@
      * Creates the file dialog's peer.  The peer allows us to change the look
      * of the file dialog without changing its functionality.
      */
+    @SuppressWarnings("deprecation")
     public void addNotify() {
         synchronized(getTreeLock()) {
             if (parent != null && parent.getPeer() == null) {
--- a/src/java.desktop/share/classes/java/awt/FontMetrics.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/FontMetrics.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -409,6 +409,7 @@
      * @see       #charsWidth(char[], int, int)
      * @see       #stringWidth(String)
      */
+    @SuppressWarnings("deprecation")
     public int bytesWidth(byte data[], int off, int len) {
         return stringWidth(new String(data, 0, off, len));
     }
--- a/src/java.desktop/share/classes/java/awt/Graphics.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Graphics.java	Sat Dec 27 13:27:07 2014 -0500
@@ -843,6 +843,7 @@
      * @see         java.awt.Graphics#drawChars
      * @see         java.awt.Graphics#drawString
      */
+    @SuppressWarnings("deprecation")
     public void drawBytes(byte data[], int offset, int length, int x, int y) {
         drawString(new String(data, 0, offset, length), x, y);
     }
--- a/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java	Sat Dec 27 13:27:07 2014 -0500
@@ -28,6 +28,7 @@
 
 import java.awt.image.BufferedImage;
 import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Locale;
 
 import sun.font.FontManager;
@@ -161,43 +162,38 @@
      */
     private static boolean getHeadlessProperty() {
         if (headless == null) {
-            java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Object>() {
-                public Object run() {
-                    String nm = System.getProperty("java.awt.headless");
+            AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+                String nm = System.getProperty("java.awt.headless");
 
-                    if (nm == null) {
-                        /* No need to ask for DISPLAY when run in a browser */
-                        if (System.getProperty("javaplugin.version") != null) {
-                            headless = defaultHeadless = Boolean.FALSE;
+                if (nm == null) {
+                    /* No need to ask for DISPLAY when run in a browser */
+                    if (System.getProperty("javaplugin.version") != null) {
+                        headless = defaultHeadless = Boolean.FALSE;
+                    } else {
+                        String osName = System.getProperty("os.name");
+                        if (osName.contains("OS X") && "sun.awt.HToolkit".equals(
+                                System.getProperty("awt.toolkit")))
+                        {
+                            headless = defaultHeadless = Boolean.TRUE;
                         } else {
-                            String osName = System.getProperty("os.name");
-                            if (osName.contains("OS X") && "sun.awt.HToolkit".equals(
-                                    System.getProperty("awt.toolkit")))
-                            {
-                                headless = defaultHeadless = Boolean.TRUE;
-                            } else {
-                                headless = defaultHeadless =
-                                    Boolean.valueOf(("Linux".equals(osName) ||
-                                                     "SunOS".equals(osName) ||
-                                                     "FreeBSD".equals(osName) ||
-                                                     "NetBSD".equals(osName) ||
-                                                     "OpenBSD".equals(osName) ||
-                                                     "AIX".equals(osName)) &&
-                                                     (System.getenv("DISPLAY") == null));
-                            }
+                            final String display = System.getenv("DISPLAY");
+                            headless = defaultHeadless =
+                                ("Linux".equals(osName) ||
+                                 "SunOS".equals(osName) ||
+                                 "FreeBSD".equals(osName) ||
+                                 "NetBSD".equals(osName) ||
+                                 "OpenBSD".equals(osName) ||
+                                 "AIX".equals(osName)) &&
+                                 (display == null || display.trim().isEmpty());
                         }
-                    } else if (nm.equals("true")) {
-                        headless = Boolean.TRUE;
-                    } else {
-                        headless = Boolean.FALSE;
                     }
-                    return null;
+                } else {
+                    headless = Boolean.valueOf(nm);
                 }
-                }
-            );
+                return null;
+            });
         }
-        return headless.booleanValue();
+        return headless;
     }
 
     /**
--- a/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -3054,6 +3054,7 @@
         return (wto != wfrom);
     }
 
+    @SuppressWarnings("deprecation")
     static Component getHeavyweight(Component comp) {
         if (comp == null || comp.getPeer() == null) {
             return null;
--- a/src/java.desktop/share/classes/java/awt/PopupMenu.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/PopupMenu.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -153,6 +153,7 @@
      *                parent's hierarchy
      * @exception RuntimeException if the parent is not showing on screen
      */
+    @SuppressWarnings("deprecation")
     public void show(Component origin, int x, int y) {
         // Use localParent for thread safety.
         MenuContainer localParent = parent;
--- a/src/java.desktop/share/classes/java/awt/ScrollPane.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/ScrollPane.java	Sat Dec 27 13:27:07 2014 -0500
@@ -732,6 +732,7 @@
         /**
          * Invoked when the value of the adjustable has changed.
          */
+        @SuppressWarnings("deprecation")
         public void adjustmentValueChanged(AdjustmentEvent e) {
             Adjustable adj = e.getAdjustable();
             int value = e.getValue();
@@ -831,6 +832,7 @@
     /**
      * Invoked when the value of the adjustable has changed.
      */
+    @SuppressWarnings("deprecation")
     public void adjustmentValueChanged(AdjustmentEvent e) {
         Adjustable adj = e.getAdjustable();
         int value = e.getValue();
--- a/src/java.desktop/share/classes/java/awt/SplashScreen.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/SplashScreen.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -203,6 +203,7 @@
      * @return URL for the current splash screen image file
      * @throws IllegalStateException if the splash screen has already been closed
      */
+    @SuppressWarnings("deprecation")
     public URL getImageURL() throws IllegalStateException {
         synchronized (SplashScreen.class) {
             checkVisible();
--- a/src/java.desktop/share/classes/java/awt/Window.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Window.java	Sat Dec 27 13:27:07 2014 -0500
@@ -755,6 +755,7 @@
      * @see Container#removeNotify
      * @since 1.0
      */
+    @SuppressWarnings("deprecation")
     public void addNotify() {
         synchronized (getTreeLock()) {
             Container parent = this.parent;
@@ -798,6 +799,7 @@
      * @see Component#isDisplayable
      * @see #setMinimumSize
      */
+    @SuppressWarnings("deprecation")
     public void pack() {
         Container parent = this.parent;
         if (parent != null && parent.getPeer() == null) {
@@ -1070,6 +1072,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     static void updateChildFocusableWindowState(Window w) {
         if (w.getPeer() != null && w.isShowing()) {
             ((WindowPeer)w.getPeer()).updateFocusableWindowState();
@@ -1157,6 +1160,7 @@
      * as reported in javadoc. So we need to implement this functionality even if a
      * child overrides dispose() in a wrong way without calling super.dispose().
      */
+    @SuppressWarnings("deprecation")
     void disposeImpl() {
         dispose();
         if (getPeer() != null) {
@@ -3623,6 +3627,7 @@
      *
      * @since 1.7
      */
+    @SuppressWarnings("deprecation")
     public void setOpacity(float opacity) {
         synchronized (getTreeLock()) {
             if (opacity < 0.0f || opacity > 1.0f) {
@@ -3721,6 +3726,7 @@
      *
      * @since 1.7
      */
+    @SuppressWarnings("deprecation")
     public void setShape(Shape shape) {
         synchronized (getTreeLock()) {
             if (shape != null) {
@@ -3838,6 +3844,7 @@
      * @see GraphicsConfiguration#isTranslucencyCapable()
      */
     @Override
+    @SuppressWarnings("deprecation")
     public void setBackground(Color bgColor) {
         Color oldBg = getBackground();
         super.setBackground(bgColor);
@@ -3890,6 +3897,7 @@
         return bg != null ? bg.getAlpha() == 255 : true;
     }
 
+    @SuppressWarnings("deprecation")
     private void updateWindow() {
         synchronized (getTreeLock()) {
             WindowPeer peer = (WindowPeer)getPeer();
@@ -4080,6 +4088,7 @@
                 window.securityWarningHeight = height;
             }
 
+            @SuppressWarnings("deprecation")
             public void setSecurityWarningPosition(Window window,
                     Point2D point, float alignmentX, float alignmentY)
             {
--- a/src/java.desktop/share/classes/java/awt/datatransfer/StringSelection.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/datatransfer/StringSelection.java	Sat Dec 27 13:27:07 2014 -0500
@@ -47,6 +47,7 @@
     private static final int STRING = 0;
     private static final int PLAIN_TEXT = 1;
 
+    @SuppressWarnings("deprecation")
     private static final DataFlavor[] flavors = {
         DataFlavor.stringFlavor,
         DataFlavor.plainTextFlavor // deprecated
--- a/src/java.desktop/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Sat Dec 27 13:27:07 2014 -0500
@@ -624,6 +624,7 @@
         return new ArrayList<>(returnValue);
     }
 
+    @SuppressWarnings("deprecation")
     private static Set<DataFlavor> convertMimeTypeToDataFlavors(
         final String baseType) {
 
--- a/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java	Sat Dec 27 13:27:07 2014 -0500
@@ -499,6 +499,7 @@
      *
      */
 
+    @SuppressWarnings("deprecation")
     public void addNotify(ComponentPeer peer) {
         if (peer == componentPeer) return;
 
@@ -690,6 +691,7 @@
          * update the geometry of the autoscroll region
          */
 
+        @SuppressWarnings("deprecation")
         private void updateRegion() {
            Insets    i    = autoScroll.getAutoscrollInsets();
            Dimension size = component.getSize();
--- a/src/java.desktop/share/classes/javax/print/ServiceUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/print/ServiceUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -149,6 +149,7 @@
      * or attributes is null, or the initial PrintService is not in the
      * list of browsable services.
      */
+    @SuppressWarnings("deprecation")
     public static PrintService printDialog(GraphicsConfiguration gc,
                                            int x, int y,
                                            PrintService[] services,
--- a/src/java.desktop/share/classes/javax/swing/DebugGraphics.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/DebugGraphics.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1453,6 +1453,7 @@
 
     /** Returns a DebugGraphics for use in buffering window.
       */
+    @SuppressWarnings("deprecation")
     private Graphics debugGraphics() {
         DebugGraphics        debugGraphics;
         DebugGraphicsInfo    info = info();
--- a/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1213,15 +1213,15 @@
             registerComponents(horizontalGroup, HORIZONTAL);
             registerComponents(verticalGroup, VERTICAL);
         }
-        StringBuffer buffer = new StringBuffer();
-        buffer.append("HORIZONTAL\n");
-        createSpringDescription(buffer, horizontalGroup, "  ", HORIZONTAL);
-        buffer.append("\nVERTICAL\n");
-        createSpringDescription(buffer, verticalGroup, "  ", VERTICAL);
-        return buffer.toString();
+        StringBuilder sb = new StringBuilder();
+        sb.append("HORIZONTAL\n");
+        createSpringDescription(sb, horizontalGroup, "  ", HORIZONTAL);
+        sb.append("\nVERTICAL\n");
+        createSpringDescription(sb, verticalGroup, "  ", VERTICAL);
+        return sb.toString();
     }
 
-    private void createSpringDescription(StringBuffer buffer, Spring spring,
+    private void createSpringDescription(StringBuilder sb, Spring spring,
             String indent, int axis) {
         String origin = "";
         String padding = "";
@@ -1239,20 +1239,19 @@
             padding = ", userCreated=" + paddingSpring.getUserCreated() +
                     ", matches=" + paddingSpring.getMatchDescription();
         }
-        buffer.append(indent + spring.getClass().getName() + " " +
-                Integer.toHexString(spring.hashCode()) + " " +
-                origin +
-                ", size=" + spring.getSize() +
-                ", alignment=" + spring.getAlignment() +
-                " prefs=[" + spring.getMinimumSize(axis) +
-                " " + spring.getPreferredSize(axis) +
-                " " + spring.getMaximumSize(axis) +
-                padding + "]\n");
+        sb.append(indent).append(spring.getClass().getName()).append(' ')
+                .append(Integer.toHexString(spring.hashCode())).append(' ')
+                .append(origin).append(", size=").append(spring.getSize())
+                .append(", alignment=").append(spring.getAlignment())
+                .append(" prefs=[").append(spring.getMinimumSize(axis))
+                .append(' ').append(spring.getPreferredSize(axis)).append(' ')
+                .append(spring.getMaximumSize(axis)).append(padding)
+                .append("]\n");
         if (spring instanceof Group) {
             List<Spring> springs = ((Group)spring).springs;
             indent += "  ";
             for (int counter = 0; counter < springs.size(); counter++) {
-                createSpringDescription(buffer, springs.get(counter), indent,
+                createSpringDescription(sb, springs.get(counter), indent,
                         axis);
             }
         }
--- a/src/java.desktop/share/classes/javax/swing/JApplet.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JApplet.java	Sat Dec 27 13:27:07 2014 -0500
@@ -243,6 +243,7 @@
     *      hidden: true
     * description: The menubar for accessing pulldown menus from this applet.
     */
+    @SuppressWarnings("deprecation")
     public void setJMenuBar(JMenuBar menuBar) {
         getRootPane().setMenuBar(menuBar);
     }
@@ -253,6 +254,7 @@
     * @return the menubar set on this applet
     * @see #setJMenuBar
     */
+    @SuppressWarnings("deprecation")
     public JMenuBar getJMenuBar() {
         return getRootPane().getMenuBar();
     }
--- a/src/java.desktop/share/classes/javax/swing/JColorChooser.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JColorChooser.java	Sat Dec 27 13:27:07 2014 -0500
@@ -133,6 +133,7 @@
      * returns true.
      * @see java.awt.GraphicsEnvironment#isHeadless
      */
+    @SuppressWarnings("deprecation")
     public static Color showDialog(Component component,
         String title, Color initialColor) throws HeadlessException {
 
@@ -543,17 +544,17 @@
      * @return  a string representation of this <code>JColorChooser</code>
      */
     protected String paramString() {
-        StringBuilder chooserPanelsString = new StringBuilder("");
-        for (int i=0; i<chooserPanels.length; i++) {
-            chooserPanelsString.append("[" + chooserPanels[i].toString()
-                                       + "]");
+        StringBuilder chooserPanelsString = new StringBuilder();
+        for (AbstractColorChooserPanel panel : chooserPanels) {
+            chooserPanelsString.append('[').append(panel)
+                               .append(']');
         }
-        String previewPanelString = (previewPanel != null ?
-                                     previewPanel.toString() : "");
+        String previewPanelString = (previewPanel != null ? previewPanel
+                .toString() : "");
 
-        return super.paramString() +
-        ",chooserPanels=" + chooserPanelsString.toString() +
-        ",previewPanel=" + previewPanelString;
+        return super.paramString() + ",chooserPanels="
+                + chooserPanelsString.toString() + ",previewPanel="
+                + previewPanelString;
     }
 
 /////////////////
@@ -654,6 +655,7 @@
         okButton.getAccessibleContext().setAccessibleDescription(okString);
         okButton.setActionCommand("OK");
         okButton.addActionListener(new ActionListener() {
+            @SuppressWarnings("deprecation")
             public void actionPerformed(ActionEvent e) {
                 hide();
             }
@@ -685,6 +687,7 @@
 
         cancelButton.setActionCommand("cancel");
         cancelButton.addActionListener(new ActionListener() {
+            @SuppressWarnings("deprecation")
             public void actionPerformed(ActionEvent e) {
                 hide();
             }
@@ -723,6 +726,7 @@
         this.addWindowListener(new Closer());
     }
 
+    @SuppressWarnings("deprecation")
     public void show() {
         initialColor = chooserPane.getColor();
         super.show();
@@ -734,6 +738,7 @@
 
     @SuppressWarnings("serial") // JDK-implementation class
     class Closer extends WindowAdapter implements Serializable{
+        @SuppressWarnings("deprecation")
         public void windowClosing(WindowEvent e) {
             cancelButton.doClick(0);
             Window w = e.getWindow();
--- a/src/java.desktop/share/classes/javax/swing/JComponent.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JComponent.java	Sat Dec 27 13:27:07 2014 -0500
@@ -5049,6 +5049,7 @@
         this.paintingChild = paintingChild;
     }
 
+    @SuppressWarnings("deprecation")
     void _paintImmediately(int x, int y, int w, int h) {
         Graphics g;
         Container c;
--- a/src/java.desktop/share/classes/javax/swing/JDialog.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JDialog.java	Sat Dec 27 13:27:07 2014 -0500
@@ -849,6 +849,7 @@
     *      hidden: true
     * description: The menubar for accessing pulldown menus from this dialog.
     */
+    @SuppressWarnings("deprecation")
     public void setJMenuBar(JMenuBar menu) {
         getRootPane().setMenuBar(menu);
     }
@@ -859,6 +860,7 @@
     * @return the menubar set on this dialog
     * @see #setJMenuBar
     */
+    @SuppressWarnings("deprecation")
     public JMenuBar getJMenuBar() {
         return getRootPane().getMenuBar();
     }
--- a/src/java.desktop/share/classes/javax/swing/JFileChooser.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JFileChooser.java	Sat Dec 27 13:27:07 2014 -0500
@@ -757,6 +757,7 @@
      * returns true.
      * @see java.awt.GraphicsEnvironment#isHeadless
      */
+    @SuppressWarnings("deprecation")
     public int showDialog(Component parent, String approveButtonText)
         throws HeadlessException {
         if (dialog != null) {
--- a/src/java.desktop/share/classes/javax/swing/JFrame.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JFrame.java	Sat Dec 27 13:27:07 2014 -0500
@@ -494,6 +494,7 @@
     *      hidden: true
     * description: The menubar for accessing pulldown menus from this frame.
     */
+    @SuppressWarnings("deprecation")
     public void setJMenuBar(JMenuBar menubar) {
         getRootPane().setMenuBar(menubar);
     }
@@ -504,6 +505,7 @@
     *
     * @see #setJMenuBar
     */
+    @SuppressWarnings("deprecation")
     public JMenuBar getJMenuBar() {
         return getRootPane().getMenuBar();
     }
--- a/src/java.desktop/share/classes/javax/swing/JInternalFrame.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JInternalFrame.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1494,6 +1494,7 @@
      * @param width  an integer giving the component's new width in pixels
      * @param height an integer giving the component's new height in pixels
      */
+    @SuppressWarnings("deprecation")
     public void reshape(int x, int y, int width, int height) {
         super.reshape(x, y, width, height);
         validate();
@@ -1735,6 +1736,7 @@
      * @see InternalFrameEvent#INTERNAL_FRAME_OPENED
      * @see #setVisible
      */
+    @SuppressWarnings("deprecation")
     public void show() {
         // bug 4312922
         if (isVisible()) {
@@ -1766,6 +1768,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void hide() {
         if (isIcon()) {
             getDesktopIcon().setVisible(false);
--- a/src/java.desktop/share/classes/javax/swing/JList.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JList.java	Sat Dec 27 13:27:07 2014 -0500
@@ -3663,6 +3663,7 @@
                 }
             }
 
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac instanceof AccessibleComponent) {
--- a/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Sat Dec 27 13:27:07 2014 -0500
@@ -566,6 +566,7 @@
      *   <code>true</code>
      * @see java.awt.GraphicsEnvironment#isHeadless
      */
+    @SuppressWarnings("deprecation")
     public static Object showInputDialog(Component parentComponent,
         Object message, String title, int messageType, Icon icon,
         Object[] selectionValues, Object initialSelectionValue)
@@ -855,6 +856,7 @@
      *   <code>true</code>
      * @see java.awt.GraphicsEnvironment#isHeadless
      */
+    @SuppressWarnings("deprecation")
     public static int showOptionDialog(Component parentComponent,
         Object message, String title, int optionType, int messageType,
         Icon icon, Object[] options, Object initialValue)
--- a/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Sat Dec 27 13:27:07 2014 -0500
@@ -333,6 +333,7 @@
      * @see #addChangeListener
      * @see EventListenerList
      */
+    @SuppressWarnings("deprecation")
     protected void fireStateChanged() {
         /* --- Begin code to deal with visibility --- */
 
@@ -949,6 +950,7 @@
      * @see #addTab
      * @see #insertTab
      */
+    @SuppressWarnings("deprecation")
     public void removeTabAt(int index) {
         checkIndex(index);
 
@@ -1557,6 +1559,7 @@
      *    attribute: visualUpdate true
      *  description: The component at the specified tab index.
      */
+    @SuppressWarnings("deprecation")
     public void setComponentAt(int index, Component component) {
         Page page = pages.get(index);
         if (component != page.component) {
--- a/src/java.desktop/share/classes/javax/swing/JTable.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JTable.java	Sat Dec 27 13:27:07 2014 -0500
@@ -5810,6 +5810,7 @@
      *                where 0 is the first column
      * @return the <code>Component</code> being edited
      */
+    @SuppressWarnings("deprecation")
     public Component prepareEditor(TableCellEditor editor, int row, int column) {
         Object value = getValueAt(row, column);
         boolean isSelected = isCellSelected(row, column);
@@ -8788,6 +8789,7 @@
                 }
             }
 
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac instanceof AccessibleComponent) {
@@ -9640,6 +9642,7 @@
              * @see AccessibleState#FOCUSED
              * @see AccessibleStateSet
              */
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac instanceof AccessibleComponent) {
--- a/src/java.desktop/share/classes/javax/swing/JViewport.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JViewport.java	Sat Dec 27 13:27:07 2014 -0500
@@ -829,6 +829,7 @@
      *
      * @see JComponent#reshape(int, int, int, int)
      */
+    @SuppressWarnings("deprecation")
     public void reshape(int x, int y, int w, int h) {
         boolean sizeChanged = (getWidth() != w) || (getHeight() != h);
         if (sizeChanged) {
@@ -1447,6 +1448,7 @@
      * Returns true if the component needs to be completely repainted after
      * a blit and a paint is received.
      */
+    @SuppressWarnings("deprecation")
     private boolean needsRepaintAfterBlit() {
         // Find the first heavy weight ancestor. isObscured and
         // canDetermineObscurity are only appropriate for heavy weights.
--- a/src/java.desktop/share/classes/javax/swing/Popup.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/Popup.java	Sat Dec 27 13:27:07 2014 -0500
@@ -253,6 +253,7 @@
             paint(g);
         }
 
+        @SuppressWarnings("deprecation")
         public void show() {
             this.pack();
             if (getWidth() > 0 && getHeight() > 0) {
--- a/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java	Sat Dec 27 13:27:07 2014 -0500
@@ -260,6 +260,7 @@
      * @see #setMaximum
      * @see #close
      */
+    @SuppressWarnings("deprecation")
     public void setProgress(int nv) {
         if (nv >= max) {
             close();
--- a/src/java.desktop/share/classes/javax/swing/RepaintManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/RepaintManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -401,6 +401,7 @@
      *
      * @see JComponent#repaint
      */
+    @SuppressWarnings("deprecation")
     private void addDirtyRegion0(Container c, int x, int y, int w, int h) {
         /* Special cases we don't have to bother with.
          */
--- a/src/java.desktop/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Sat Dec 27 13:27:07 2014 -0500
@@ -195,6 +195,7 @@
         return true;
     }
 
+    @SuppressWarnings("deprecation")
     private void enumerateCycle(Container container, List<Component> cycle) {
         if (!(container.isVisible() && container.isDisplayable())) {
             return;
--- a/src/java.desktop/share/classes/javax/swing/SwingUtilities.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/SwingUtilities.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1929,6 +1929,7 @@
         public void windowDeactivated(WindowEvent e) {
         }
 
+        @SuppressWarnings("deprecation")
         public void show() {
             // This frame can never be shown
         }
--- a/src/java.desktop/share/classes/javax/swing/UIManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/UIManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1436,6 +1436,7 @@
     /*
      * Sets default swing focus traversal policy.
      */
+    @SuppressWarnings("deprecation")
     private static void maybeInitializeFocusPolicy(JComponent comp) {
         // Check for JRootPane which indicates that a swing toplevel
         // is coming, in which case a swing default focus policy
--- a/src/java.desktop/share/classes/javax/swing/package.html	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/package.html	Sat Dec 27 13:27:07 2014 -0500
@@ -3,7 +3,7 @@
 
 <HEAD>
 <!--
-Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
 This code is free software; you can redistribute it and/or modify it
@@ -68,6 +68,8 @@
 the event dispatching thread. The following two examples work equally
 well for transferring control and starting up a Swing application:
 <pre>
+import javax.swing.SwingUtilities;
+
 public class MyApp implements Runnable {
     public void run() {
         // Invoked on the event dispatching thread.
@@ -75,16 +77,18 @@
     }
 
     public static void main(String[] args) {
-        SwingUtilities.invokeLater(new MyApp(args));
+        SwingUtilities.invokeLater(new MyApp());
     }
 }
 </pre>
 Or:
 <pre>
+import javax.swing.SwingUtilities;
+
 public class MyApp {
     MyApp(String[] args) {
-        // Invoked on the event dispatching thread. Do any initialization
-        // here.
+        // Invoked on the event dispatching thread.
+        // Do any initialization here.
     }
 
     public void show() {
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicArrowButton.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicArrowButton.java	Sat Dec 27 13:27:07 2014 -0500
@@ -216,6 +216,7 @@
          *
          * @return {@code false}
          */
+        @SuppressWarnings("deprecation")
         public boolean isFocusTraversable() {
           return false;
         }
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Sat Dec 27 13:27:07 2014 -0500
@@ -223,6 +223,7 @@
     /**
      * Implementation of ComboPopup.show().
      */
+    @SuppressWarnings("deprecation")
     public void show() {
         comboBox.firePopupMenuWillBecomeVisible();
         setListSelection(comboBox.getSelectedIndex());
@@ -234,6 +235,7 @@
     /**
      * Implementation of ComboPopup.hide().
      */
+    @SuppressWarnings("deprecation")
     public void hide() {
         MenuSelectionManager manager = MenuSelectionManager.defaultManager();
         MenuElement [] selection = manager.getSelectedPath();
@@ -1032,6 +1034,7 @@
     /**
      * Overridden to unconditionally return false.
      */
+    @SuppressWarnings("deprecation")
     public boolean isFocusTraversable() {
         return false;
     }
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -502,6 +502,7 @@
         public void mouseReleased(MouseEvent evt) {
         }
 
+        @SuppressWarnings("deprecation")
         public void valueChanged(ListSelectionEvent evt) {
             if(!evt.getValueIsAdjusting()) {
                 JFileChooser chooser = getFileChooser();
@@ -1305,6 +1306,7 @@
          * @return  The representation of the data to be transfered.
          *
          */
+        @SuppressWarnings("deprecation")
         protected Transferable createTransferable(JComponent c) {
             Object[] values = null;
             if (c instanceof JList) {
@@ -1330,8 +1332,8 @@
 
             for (Object obj : values) {
                 String val = ((obj == null) ? "" : obj.toString());
-                plainBuf.append(val + "\n");
-                htmlBuf.append("  <li>" + val + "\n");
+                plainBuf.append(val).append('\n');
+                htmlBuf.append("  <li>").append(val).append('\n');
             }
 
             // remove the last newline
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Sat Dec 27 13:27:07 2014 -0500
@@ -926,6 +926,7 @@
      * This class should be treated as a &quot;protected&quot; inner class.
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
+    @SuppressWarnings("deprecation")
     public class SystemMenuBar extends JMenuBar {
         public boolean isFocusTraversable() { return false; }
         public void requestFocus() {}
@@ -963,6 +964,7 @@
                 setOpaque(((Boolean)opacity).booleanValue());
             }
         }
+        @SuppressWarnings("deprecation")
         public boolean isFocusTraversable() { return false; }
         public void requestFocus() {}
         public AccessibleContext getAccessibleContext() {
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2931,6 +2931,7 @@
          * @return  The representation of the data to be transfered.
          *
          */
+        @SuppressWarnings("deprecation")
         protected Transferable createTransferable(JComponent c) {
             if (c instanceof JList) {
                 JList<?> list = (JList) c;
@@ -2948,8 +2949,8 @@
                 for (int i = 0; i < values.length; i++) {
                     Object obj = values[i];
                     String val = ((obj == null) ? "" : obj.toString());
-                    plainStr.append(val + "\n");
-                    htmlStr.append("  <li>" + val + "\n");
+                    plainStr.append(val).append('\n');
+                    htmlStr.append("  <li>").append(val).append('\n');
                 }
 
                 // remove the last newline
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java	Sat Dec 27 13:27:07 2014 -0500
@@ -441,6 +441,7 @@
                 }
             }
             // Don't want the button to participate in focus traversable.
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 return false;
             }
@@ -497,6 +498,7 @@
                 }
             }
             // Don't want the button to participate in focus traversable.
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 return false;
             }
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1191,6 +1191,7 @@
      * Should be messaged before the dragging session starts, resets
      * lastDragLocation and dividerSize.
      */
+    @SuppressWarnings("deprecation")
     protected void startDragging() {
         Component       leftC = splitPane.getLeftComponent();
         Component       rightC = splitPane.getRightComponent();
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2395,6 +2395,7 @@
             return total;
         }
 
+        @SuppressWarnings("deprecation")
         public void layoutContainer(Container parent) {
             /* Some of the code in this method deals with changing the
             * visibility of components to hide and show the contents for the
@@ -2903,6 +2904,7 @@
             return calculateMaxTabWidth(tabPlacement);
         }
 
+        @SuppressWarnings("deprecation")
         public void layoutContainer(Container parent) {
             /* Some of the code in this method deals with changing the
              * visibility of components to hide and show the contents for the
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2230,11 +2230,11 @@
                     for (int col = 0; col < cols.length; col++) {
                         Object obj = table.getValueAt(rows[row], cols[col]);
                         String val = ((obj == null) ? "" : obj.toString());
-                        plainStr.append(val + "\t");
-                        htmlStr.append("  <td>" + val + "</td>\n");
+                        plainStr.append(val).append('\t');
+                        htmlStr.append("  <td>").append(val).append("</td>\n");
                     }
                     // we want a newline at the end of each line and not a tab
-                    plainStr.deleteCharAt(plainStr.length() - 1).append("\n");
+                    plainStr.deleteCharAt(plainStr.length() - 1).append('\n');
                     htmlStr.append("</tr>\n");
                 }
 
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2644,6 +2644,7 @@
             /**
              * The only richer format supported is the file list flavor
              */
+            @SuppressWarnings("deprecation")
             protected Object getRicherData(DataFlavor flavor) throws UnsupportedFlavorException {
                 if (richText == null) {
                     return null;
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -421,6 +421,7 @@
      *
      * @param direction a direction
      */
+    @SuppressWarnings("deprecation")
     protected void navigateFocusedComp(int direction)
     {
         int nComp = toolBar.getComponentCount();
@@ -886,6 +887,7 @@
      * @param b {@code true} if the {@code JToolBar} is floating
      * @param p the position
      */
+    @SuppressWarnings("deprecation")
     public void setFloating(boolean b, Point p) {
         if (toolBar.isFloatable()) {
             boolean visible = false;
@@ -1080,6 +1082,7 @@
      * @param position the relative to the {@code JTollBar} position
      * @param origin the screen position of {@code JToolBar} before dragging
      */
+    @SuppressWarnings("deprecation")
     protected void dragTo(Point position, Point origin)
     {
         if (toolBar.isFloatable())
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2363,6 +2363,7 @@
      * @param messageCancel message to cancel editing
      * @param messageTree message to tree
      */
+    @SuppressWarnings("deprecation")
     protected void completeEditing(boolean messageStop,
                                    boolean messageCancel,
                                    boolean messageTree) {
@@ -3618,8 +3619,8 @@
                     boolean leaf = model.isLeaf(node);
                     String label = getDisplayString(path, true, leaf);
 
-                    plainStr.append(label + "\n");
-                    htmlStr.append("  <li>" + label + "\n");
+                    plainStr.append(label).append('\n');
+                    htmlStr.append("  <li>").append(label).append('\n');
                 }
 
                 // remove the last newline
--- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java	Sat Dec 27 13:27:07 2014 -0500
@@ -161,6 +161,7 @@
         iconOnly = onlyIcon;
     }
 
+    @SuppressWarnings("deprecation")
     public boolean isFocusTraversable() {
         return false;
     }
--- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Sat Dec 27 13:27:07 2014 -0500
@@ -441,6 +441,7 @@
          * @param the Container for which this layout manager is being used
          * @return a Dimension object containing the layout's preferred size
          */
+        @SuppressWarnings("deprecation")
         public Dimension preferredLayoutSize(Container parent) {
             Dimension cpd, mbd, tpd;
             int cpWidth = 0;
@@ -493,6 +494,7 @@
          * @param the Container for which this layout manager is being used
          * @return a Dimension object containing the layout's minimum size
          */
+        @SuppressWarnings("deprecation")
         public Dimension minimumLayoutSize(Container parent) {
             Dimension cpd, mbd, tpd;
             int cpWidth = 0;
@@ -544,6 +546,7 @@
          * @param the Container for which this layout manager is being used
          * @return a Dimension object containing the layout's maximum size
          */
+        @SuppressWarnings("deprecation")
         public Dimension maximumLayoutSize(Container target) {
             Dimension cpd, mbd, tpd;
             int cpWidth = Integer.MAX_VALUE;
@@ -607,6 +610,7 @@
          *
          * @param the Container for which this layout manager is being used
          */
+        @SuppressWarnings("deprecation")
         public void layoutContainer(Container parent) {
             JRootPane root = (JRootPane) parent;
             Rectangle b = root.getBounds();
--- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java	Sat Dec 27 13:27:07 2014 -0500
@@ -185,6 +185,7 @@
             }
 
             // Don't want the button to participate in focus traversable.
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 return false;
             }
@@ -294,6 +295,7 @@
             }
 
             // Don't want the button to participate in focus traversable.
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 return false;
             }
--- a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1427,6 +1427,7 @@
                 }
             }
 
+            @SuppressWarnings("deprecation")
             public boolean isFocusTraversable() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac instanceof AccessibleComponent) {
--- a/src/java.desktop/share/classes/javax/swing/text/GlyphPainter1.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/GlyphPainter1.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -218,6 +218,7 @@
         return p1;
     }
 
+    @SuppressWarnings("deprecation")
     void sync(GlyphView v) {
         Font f = v.getFont();
         if ((metrics == null) || (! f.equals(metrics.getFont()))) {
--- a/src/java.desktop/share/classes/javax/swing/text/StyleContext.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/StyleContext.java	Sat Dec 27 13:27:07 2014 -0500
@@ -279,6 +279,7 @@
      * @param f the font
      * @return the metrics
      */
+    @SuppressWarnings("deprecation")
     public FontMetrics getFontMetrics(Font f) {
         // The Toolkit implementations cache, so we just forward
         // to the default toolkit.
--- a/src/java.desktop/share/classes/javax/swing/text/html/AccessibleHTML.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/AccessibleHTML.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -916,6 +916,7 @@
              * @return the zero-based index of the character under Point p; if
              * Point is invalid returns -1.
              */
+            @SuppressWarnings("deprecation")
             public int getIndexAtPoint(Point p) {
                 View v = getView();
                 if (v != null) {
--- a/src/java.desktop/share/classes/javax/swing/text/html/FormView.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/FormView.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -599,6 +599,7 @@
      * @param point associated with the mouse click.
      * @return the image data.
      */
+    @SuppressWarnings("deprecation")
     private String getImageData(Point point) {
 
         String mouseCoords = point.x + ":" + point.y;
@@ -816,6 +817,7 @@
      * URLEncoder.encode() method before being added to the
      * buffer.
      */
+    @SuppressWarnings("deprecation")
     private void appendBuffer(StringBuilder buffer, String name, String value) {
         if (buffer.length() > 0) {
             buffer.append('&');
--- a/src/java.desktop/share/classes/javax/swing/text/html/FrameView.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/FrameView.java	Sat Dec 27 13:27:07 2014 -0500
@@ -218,6 +218,7 @@
      * the scrolling attribute.  If not defined, the default is "auto" which
      * maps to the scrollbar's being displayed as needed.
      */
+    @SuppressWarnings("deprecation")
     private void createScrollPane() {
         AttributeSet attributes = getElement().getAttributes();
         String scrolling = (String)attributes.getAttribute(HTML.Attribute.SCROLLING);
--- a/src/java.desktop/share/classes/javax/swing/text/html/HiddenTagView.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/HiddenTagView.java	Sat Dec 27 13:27:07 2014 -0500
@@ -129,6 +129,7 @@
 
     // local methods
 
+    @SuppressWarnings("deprecation")
     void updateYAlign(Font font) {
         Container c = getContainer();
         FontMetrics fm = (c != null) ? c.getFontMetrics(font) :
--- a/src/java.desktop/share/classes/javax/swing/text/html/IsindexView.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/IsindexView.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,6 +88,7 @@
      * contents of the JTextField.  The search
      * contents are URLEncoded.
      */
+    @SuppressWarnings("deprecation")
     public void actionPerformed(ActionEvent evt) {
 
         String data = textField.getText();
--- a/src/java.desktop/share/classes/javax/swing/text/html/LineView.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/LineView.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -161,6 +161,7 @@
     /**
      * Returns the location for the tab.
      */
+    @SuppressWarnings("deprecation")
     protected float getPreTab(float x, int tabOffset) {
         Document d = getDocument();
         View v = getViewAtPosition(tabOffset, null);
--- a/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2562,6 +2562,7 @@
             }
         }
 
+        @SuppressWarnings("deprecation")
         void paint(Graphics g, float x, float y, float w, float h, View v) {
             Rectangle clip = g.getClipRect();
             if (clip != null) {
--- a/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Sat Dec 27 13:27:07 2014 -0500
@@ -234,6 +234,7 @@
      * Minimum size
      */
     @Override
+    @SuppressWarnings("deprecation")
     public Dimension minimumSize() {
         return new Dimension(defaultAppletSize.width,
                              defaultAppletSize.height);
@@ -243,6 +244,7 @@
      * Preferred size
      */
     @Override
+    @SuppressWarnings("deprecation")
     public Dimension preferredSize() {
         return new Dimension(currentAppletSize.width,
                              currentAppletSize.height);
@@ -700,6 +702,7 @@
      * applet event processing so that it can be gracefully interrupted from
      * things like HotJava.
      */
+    @SuppressWarnings("deprecation")
     private void runLoader() {
         if (status != APPLET_DISPOSE) {
             showAppletStatus("notdisposed");
--- a/src/java.desktop/share/classes/sun/applet/AppletProps.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/applet/AppletProps.java	Sat Dec 27 13:27:07 2014 -0500
@@ -44,6 +44,7 @@
     TextField proxyPort;
     Choice accessMode;
 
+    @SuppressWarnings("deprecation")
     AppletProps() {
         setTitle(amh.getMessage("title"));
         Panel p = new Panel();
@@ -100,6 +101,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     void apply() {
         String proxyHostValue = proxyHost.getText().trim();
         String proxyPortValue = proxyPort.getText().trim();
@@ -172,6 +174,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public boolean action(Event evt, Object obj) {
         if (amh.getMessage("button.apply").equals(obj)) {
             apply();
@@ -197,6 +200,7 @@
 /* Dialog class to display property-related errors to user */
 @SuppressWarnings("serial") // JDK implementation class
 class AppletPropsErrorDialog extends Dialog {
+    @SuppressWarnings("deprecation")
     public AppletPropsErrorDialog(Frame parent, String title, String message,
                 String buttonText) {
         super(parent, title, true);
@@ -212,6 +216,7 @@
              fRect.y + ((fRect.height - dDim.height) / 2));
     }
 
+    @SuppressWarnings("deprecation")
     public boolean action(Event event, Object object) {
         hide();
         dispose();
--- a/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -121,6 +121,7 @@
     /**
      * get the current (first) instance of an AppletClassLoader on the stack.
      */
+    @SuppressWarnings("deprecation")
     private AppletClassLoader currentAppletClassLoader()
     {
         // try currentClassLoader first
@@ -308,6 +309,7 @@
      * @exception  SecurityException  if the caller does not have
      *             permission to access the AWT event queue.
      */
+    @SuppressWarnings("deprecation")
     public void checkAwtEventQueueAccess() {
         AppContext appContext = AppContext.getAppContext();
         AppletClassLoader appletClassLoader = currentAppletClassLoader();
--- a/src/java.desktop/share/classes/sun/applet/AppletViewer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/applet/AppletViewer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -48,6 +48,7 @@
     /**
      * Create the tag frame.
      */
+    @SuppressWarnings("deprecation")
     TextFrame(int x, int y, String title, String text) {
         setTitle(title);
         TextArea txt = new TextArea(20, 60);
@@ -156,6 +157,7 @@
     /**
      * Create the applet viewer.
      */
+    @SuppressWarnings("deprecation")
     public AppletViewer(int x, int y, URL doc, Hashtable<String, String> atts,
                         PrintStream statusMsgStream, AppletViewerFactory factory) {
         this.factory = factory;
@@ -228,6 +230,7 @@
             }
 
             @Override
+            @SuppressWarnings("deprecation")
             public void appletStateChanged(AppletEvent evt)
             {
                 AppletPanel src = (AppletPanel)evt.getSource();
@@ -594,6 +597,7 @@
     /**
      * Make sure the atrributes are uptodate.
      */
+    @SuppressWarnings("deprecation")
     public void updateAtts() {
         Dimension d = panel.size();
         Insets in = panel.insets();
@@ -648,6 +652,7 @@
     /**
      * Save the applet to a well known file (for now) as a serialized object
      */
+    @SuppressWarnings("deprecation")
     void appletSave() {
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
 
@@ -699,6 +704,7 @@
     /**
      * Clone the viewer and the applet.
      */
+    @SuppressWarnings("deprecation")
     void appletClone() {
         Point p = location();
         updateAtts();
@@ -711,6 +717,7 @@
     /**
      * Show the applet tag.
      */
+    @SuppressWarnings("deprecation")
     void appletTag() {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         updateAtts();
@@ -724,6 +731,7 @@
     /**
      * Show the applet info.
      */
+    @SuppressWarnings("deprecation")
     void appletInfo() {
         String str = panel.applet.getAppletInfo();
         if (str == null) {
--- a/src/java.desktop/share/classes/sun/awt/AppContext.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/awt/AppContext.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -413,6 +413,7 @@
      *                                    contained within this AppContext
      * @since      1.2
      */
+    @SuppressWarnings("deprecation")
     public void dispose() throws IllegalThreadStateException {
         // Check to be sure that the current Thread isn't in this AppContext
         if (this.threadGroup.parentOf(Thread.currentThread().getThreadGroup())) {
--- a/src/java.desktop/share/classes/sun/awt/DebugSettings.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/awt/DebugSettings.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -146,6 +146,7 @@
     /*
      * Sets up default property values
      */
+    @SuppressWarnings("deprecation")
     private void loadDefaultProperties() {
         // is there a more inefficient way to setup default properties?
         // maybe, but this has got to be close to 100% non-optimal
--- a/src/java.desktop/share/classes/sun/awt/LightweightFrame.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/awt/LightweightFrame.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,6 +88,7 @@
     @Override public final void toFront() {}
     @Override public final void toBack() {}
 
+    @SuppressWarnings("deprecation")
     @Override public void addNotify() {
         synchronized (getTreeLock()) {
             if (getPeer() == null) {
@@ -114,6 +115,7 @@
      * @param activate if <code>true</code>, activates the frame;
      *                 otherwise, deactivates the frame
      */
+    @SuppressWarnings("deprecation")
     public void emulateActivation(boolean activate) {
         ((FramePeer)getPeer()).emulateActivation(activate);
     }
--- a/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Sat Dec 27 13:27:07 2014 -0500
@@ -713,6 +713,7 @@
     }
 
 
+    @SuppressWarnings("deprecation")
     static final SoftCache imgCache = new SoftCache();
 
     static Image getImageFromHash(Toolkit tk, URL url) {
--- a/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -717,6 +717,7 @@
      * Primary translation function for translating a Transferable into
      * a byte array, given a source DataFlavor and target format.
      */
+    @SuppressWarnings("deprecation")
     public byte[] translateTransferable(Transferable contents,
                                         DataFlavor flavor,
                                         long format) throws IOException
@@ -1287,6 +1288,7 @@
      * an InputStream into an Object, given a source format and a target
      * DataFlavor.
      */
+    @SuppressWarnings("deprecation")
     public Object translateStream(InputStream str, DataFlavor flavor,
                                   long format, Transferable localeTransferable)
         throws IOException
--- a/src/java.desktop/share/classes/sun/awt/image/GifImageDecoder.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/awt/image/GifImageDecoder.java	Sat Dec 27 13:27:07 2014 -0500
@@ -114,7 +114,7 @@
     /**
      * produce an image from the stream.
      */
-    @SuppressWarnings("fallthrough")
+    @SuppressWarnings({"fallthrough", "deprecation"})
     public void produceImage() throws IOException, ImageFormatException {
         try {
             readHeader();
--- a/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,6 +59,7 @@
 
     private static class ObserverCache {
 
+        @SuppressWarnings("deprecation")
         static final SoftCache INSTANCE = new SoftCache();
     }
 
@@ -80,7 +81,7 @@
         }
 
         synchronized (ObserverCache.INSTANCE) {
-            ImageObserver o = (ImageObserver) ObserverCache.INSTANCE.get(image);
+            ImageObserver o = (ImageObserver) ObserverCache.INSTANCE.get(observer);
 
             if (o == null) {
 
@@ -109,7 +110,7 @@
                                     image, flags, x, y, width, height);
                         };
 
-                ObserverCache.INSTANCE.put(image, o);
+                ObserverCache.INSTANCE.put(observer, o);
             }
             return o;
         }
--- a/src/java.desktop/share/classes/sun/font/StandardGlyphVector.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/StandardGlyphVector.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1894,9 +1894,9 @@
             }
         }
         catch(Exception e) {
-            buf.append(" " + e.getMessage());
+            buf.append(' ').append(e.getMessage());
         }
-        buf.append("}");
+        buf.append('}');
 
         return buf;
     }
--- a/src/java.desktop/share/classes/sun/print/PSPrinterJob.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/print/PSPrinterJob.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1214,6 +1214,7 @@
      * of distinct PS fonts needed to draw this text. This saves us
      * doing this processing one extra time.
      */
+    @SuppressWarnings("deprecation")
     protected int platformFontCount(Font font, String str) {
         if (mFontProps == null) {
             return 0;
@@ -1228,6 +1229,7 @@
         return (psFonts == null) ? 0 : psFonts.length;
     }
 
+    @SuppressWarnings("deprecation")
      protected boolean textOut(Graphics g, String str, float x, float y,
                                Font mLastFont, FontRenderContext frc,
                                float width) {
@@ -2123,6 +2125,7 @@
          * @param w the width of the applet panel in the browser window
          * @param h the width of the applet panel in the browser window
          */
+        @SuppressWarnings("deprecation")
         public PluginPrinter(Component applet,
                              PrintStream stream,
                              int x, int y, int w, int h) {
--- a/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Sat Dec 27 13:27:07 2014 -0500
@@ -745,6 +745,7 @@
      * return a PageFormat corresponding to the updated attributes,
      * or null if the user cancelled the dialog.
      */
+    @SuppressWarnings("deprecation")
     public PageFormat pageDialog(final PrintRequestAttributeSet attributes)
         throws HeadlessException {
         if (GraphicsEnvironment.isHeadless()) {
--- a/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Sat Dec 27 13:27:07 2014 -0500
@@ -792,6 +792,7 @@
             return label;
         }
 
+        @SuppressWarnings("deprecation")
         public void actionPerformed(ActionEvent e) {
             Object source = e.getSource();
 
--- a/src/java.desktop/share/classes/sun/swing/FilePane.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/swing/FilePane.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1355,6 +1355,7 @@
     /**
      * @param index visual index of the file to be edited
      */
+    @SuppressWarnings("deprecation")
     private void editFileName(int index) {
         JFileChooser chooser = getFileChooser();
         File currentDirectory = chooser.getCurrentDirectory();
@@ -1521,6 +1522,7 @@
     }
 
 
+    @SuppressWarnings("deprecation")
     void setFileSelected() {
         if (getFileChooser().isMultiSelectionEnabled() && !isDirectorySelected()) {
             File[] files = getFileChooser().getSelectedFiles(); // Should be selected
--- a/src/java.desktop/share/classes/sun/swing/JLightweightFrame.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/swing/JLightweightFrame.java	Sat Dec 27 13:27:07 2014 -0500
@@ -241,6 +241,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void notifyDisplayChanged(final int scaleFactor) {
         if (scaleFactor != this.scaleFactor) {
             if (!copyBufferEnabled) content.paintLock();
@@ -260,6 +261,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void addNotify() {
         super.addNotify();
         if (getPeer() instanceof DisplayChangedListener) {
--- a/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Sat Dec 27 13:27:07 2014 -0500
@@ -358,6 +358,7 @@
      * @param c Graphics Graphics
      * @param font Font to get FontMetrics for
      */
+    @SuppressWarnings("deprecation")
     public static FontMetrics getFontMetrics(JComponent c, Graphics g,
                                              Font font) {
         if (c != null) {
@@ -1706,6 +1707,7 @@
      * This is not a general-purpose method and is here only to permit
      * sharing code.
      */
+    @SuppressWarnings("deprecation")
     public static boolean tabbedPaneChangeFocusTo(Component comp) {
         if (comp != null) {
             if (comp.isFocusTraversable()) {
--- a/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java	Sat Dec 27 13:27:07 2014 -0500
@@ -71,6 +71,7 @@
     }
 
     // Must be executed on EDT.
+    @SuppressWarnings("deprecation")
     protected void show(Point corner, int indent) {
         assert SunToolkit.isDispatchThreadForAppContext(this);
 
@@ -98,6 +99,7 @@
         closer.schedule();
     }
 
+    @SuppressWarnings("deprecation")
     public void hide() {
         closer.close();
     }
@@ -125,6 +127,7 @@
         }
 
         // WARNING: this method may be executed on Toolkit thread.
+        @SuppressWarnings("deprecation")
         private void doClose() {
             SunToolkit.executeOnEventHandlerThread(InfoWindow.this, new Runnable() {
                 public void run() {
--- a/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java	Sat Dec 27 13:27:07 2014 -0500
@@ -225,6 +225,7 @@
         return index == focusedIndex;
     }
 
+    @SuppressWarnings("deprecation")
     void setFont(Font newFont) {
         if (newFont != font) {
             font = newFont;
--- a/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java	Sat Dec 27 13:27:07 2014 -0500
@@ -326,6 +326,7 @@
      * check for adding duplicate items
      * @param item item to add
      */
+    @SuppressWarnings("deprecation")
     public void addItem(MenuItem item) {
         XMenuItemPeer mp = (XMenuItemPeer)item.getPeer();
         if (mp != null) {
--- a/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -499,6 +499,7 @@
     }
 
     // Stolen from TinyChoicePeer
+    @SuppressWarnings("deprecation")
     public Dimension getMinimumSize() {
         // TODO: move this impl into ListHelper?
         FontMetrics fm = getFontMetrics(target.getFont());
--- a/src/java.desktop/unix/classes/sun/awt/X11/XClipboard.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XClipboard.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -281,6 +281,11 @@
             }
         }
 
-        checkChange(formats);
+        XToolkit.awtUnlock();
+        try {
+            checkChange(formats);
+        } finally {
+            XToolkit.awtLock();
+        }
     }
 }
--- a/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -167,6 +167,7 @@
         return System.getProperty("sun.awt.X11.XComponentPeer.reparentNotSupported", "false").equals("false");
     }
 
+    @SuppressWarnings("deprecation")
     public boolean isObscured() {
         Container container  = (target instanceof Container) ?
             (Container)target : target.getParent();
@@ -279,6 +280,7 @@
     }
 
     // TODO: consider moving it to KeyboardFocusManagerPeerImpl
+    @SuppressWarnings("deprecation")
     final public boolean requestFocus(Component lightweightChild, boolean temporary,
                                       boolean focusedWindowChangeAllowed, long time,
                                       CausedFocusEvent.Cause cause)
@@ -388,6 +390,7 @@
     /**
      * @see java.awt.peer.ComponentPeer
      */
+    @SuppressWarnings("deprecation")
     public void setEnabled(final boolean value) {
         if (enableLog.isLoggable(PlatformLogger.Level.FINE)) {
             enableLog.fine("{0}ing {1}", (value ? "Enabl" : "Disabl"), this);
@@ -1324,6 +1327,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private void addTree(Collection<Long> order, Set<Long> set, Container cont) {
         for (int i = 0; i < cont.getComponentCount(); i++) {
             Component comp = cont.getComponent(i);
@@ -1344,6 +1348,7 @@
 
     /****** DropTargetPeer implementation ********************/
 
+    @SuppressWarnings("deprecation")
     public void addDropTarget(DropTarget dt) {
         Component comp = target;
         while(!(comp == null || comp instanceof Window)) {
@@ -1358,6 +1363,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void removeDropTarget(DropTarget dt) {
         Component comp = target;
         while(!(comp == null || comp instanceof Window)) {
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -110,6 +110,7 @@
         return theInstance;
     }
 
+    @SuppressWarnings("deprecation")
     protected void startDrag(Transferable transferable,
                              long[] formats, Map<Long, DataFlavor> formatMap) {
         Component component = getTrigger().getComponent();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -188,6 +188,7 @@
     // If source is an XEmbedCanvasPeer, passes the event to it for processing and
     // return true if the event is forwarded to the XEmbed child.
     // Otherwise, does nothing and return false.
+    @SuppressWarnings("deprecation")
     private boolean processSunDropTargetEvent(SunDropTargetEvent event) {
         Object source = event.getSource();
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XEmbedChildProxyPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XEmbedChildProxyPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -166,6 +166,7 @@
         XToolkit.postEvent(XToolkit.targetToAppContext(proxy), event);
     }
 
+    @SuppressWarnings("deprecation")
     boolean simulateMotifRequestFocus(Component lightweightChild, boolean temporary,
                                       boolean focusedWindowChangeAllowed, long time)
     {
--- a/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddedFrame.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddedFrame.java	Sat Dec 27 13:27:07 2014 -0500
@@ -61,6 +61,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void addNotify()
     {
         if (getPeer() == null) {
@@ -77,6 +78,7 @@
     /*
      * The method shouldn't be called in case of active XEmbed.
      */
+    @SuppressWarnings("deprecation")
     public boolean traverseIn(boolean direction) {
         XEmbeddedFramePeer peer = (XEmbeddedFramePeer)getPeer();
         if (peer != null) {
@@ -89,6 +91,7 @@
         return false;
     }
 
+    @SuppressWarnings("deprecation")
     protected boolean traverseOut(boolean direction) {
         XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
         if (direction == FORWARD) {
@@ -103,6 +106,7 @@
     /*
      * The method shouldn't be called in case of active XEmbed.
      */
+    @SuppressWarnings("deprecation")
     public void synthesizeWindowActivation(boolean doActivate) {
         XEmbeddedFramePeer peer = (XEmbeddedFramePeer)getPeer();
         if (peer != null) {
@@ -114,12 +118,14 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void registerAccelerator(AWTKeyStroke stroke) {
         XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
         if (xefp != null) {
             xefp.registerAccelerator(stroke);
         }
     }
+    @SuppressWarnings("deprecation")
     public void unregisterAccelerator(AWTKeyStroke stroke) {
         XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
         if (xefp != null) {
--- a/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddingContainer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddingContainer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,7 @@
         XToolkit.removeEventDispatcher(embedder.getWindow(), this);
     }
 
+    @SuppressWarnings("deprecation")
     void add(long child) {
         if (checkXEmbed(child)) {
             Component proxy = createChildProxy(child);
--- a/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -135,6 +135,7 @@
         this.target = target;
     }
 
+    @SuppressWarnings("deprecation")
     private void init(FileDialog target) {
         fileDialog = target; //new Dialog(target, target.getTitle(), false);
         this.title = target.getTitle();
@@ -414,6 +415,7 @@
     /**
      * handle the cancel event
      */
+    @SuppressWarnings("deprecation")
     void handleCancel() {
         KeyboardFocusManager.getCurrentKeyboardFocusManager()
             .removeKeyEventDispatcher(this);
@@ -435,6 +437,7 @@
     /**
      * handle the quit event
      */
+    @SuppressWarnings("deprecation")
     void handleQuitButton() {
         dir = null;
         file = null;
@@ -444,6 +447,7 @@
     /**
      * set the entry of the new dir with f
      */
+    @SuppressWarnings("deprecation")
     void setFilterEntry(String d, String f) {
         File fe = new File(d);
 
@@ -638,6 +642,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public boolean dispatchKeyEvent(KeyEvent keyEvent) {
         int id = keyEvent.getID();
         int keyCode = keyEvent.getKeyCode();
@@ -774,6 +779,7 @@
     }
 
     // 03/02/2005 b5097243 Pressing 'ESC' on a file dlg does not dispose the dlg on Xtoolkit
+    @SuppressWarnings("deprecation")
     public void setVisible(boolean b){
         if (fileDialog == null) {
             init(target);
@@ -852,6 +858,7 @@
     public final static int VERTICAL = 1;
     int orientation;
 
+    @SuppressWarnings("deprecation")
     public Separator(int length, int thickness, int orient) {
         super();
         orientation = orient;
@@ -863,6 +870,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void paint(Graphics g) {
         int x1, y1, x2, y2;
         Rectangle bbox = bounds();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -108,6 +108,7 @@
         setExtendedState(state);
     }
 
+    @SuppressWarnings("deprecation")
     public void setMenuBar(MenuBar mb) {
         // state_lock should always be the second after awt_lock
         XToolkit.awtLock();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XInputMethod.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XInputMethod.java	Sat Dec 27 13:27:07 2014 -0500
@@ -137,6 +137,7 @@
         XToolkit.awtUnlock();
     }
 
+    @SuppressWarnings("deprecation")
     long getCurrentParentWindow() {
         return ((XWindow)clientComponentWindow.getPeer()).getContentWindow();
     }
--- a/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -163,6 +163,7 @@
         postPaintEvent();
     }
 
+    @SuppressWarnings("deprecation")
     public void addHelpMenu(Menu m) {
         XMenuPeer mp = (XMenuPeer)m.getPeer();
         synchronized(getMenuTreeLock()) {
@@ -179,6 +180,7 @@
     /**
      * called from XFramePeer.setMenuBar
      */
+    @SuppressWarnings("deprecation")
     public void init(Frame frame) {
         this.target = frame;
         this.framePeer = (XFramePeer)frame.getPeer();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XMouseInfoPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XMouseInfoPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,6 +75,7 @@
         return 0;
     }
 
+    @SuppressWarnings("deprecation")
     public boolean isWindowUnderMouse(Window w) {
 
         long display = XToolkit.getDisplay();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XPanelPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XPanelPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -76,6 +76,7 @@
 
     }
 
+    @SuppressWarnings("deprecation")
     public void setBackground(Color c) {
         Component comp;
         int i;
@@ -101,6 +102,7 @@
         setForegroundForHierarchy((Container) target, c);
     }
 
+    @SuppressWarnings("deprecation")
     private void setForegroundForHierarchy(Container cont, Color c) {
         synchronized(target.getTreeLock()) {
             int n = cont.getComponentCount();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XRepaintArea.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XRepaintArea.java	Sat Dec 27 13:27:07 2014 -0500
@@ -55,6 +55,7 @@
     /**
      * Calls <code>Component.paint(Graphics)</code> with given Graphics.
      */
+    @SuppressWarnings("deprecation")
     protected void paintComponent(Component comp, Graphics g) {
         if (comp != null) {
             final XComponentPeer peer = (XComponentPeer) comp.getPeer();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -141,6 +141,7 @@
         repaint();
     }
 
+    @SuppressWarnings("deprecation")
     Dimension getChildSize() {
         ScrollPane sp = (ScrollPane)target;
         if (sp.countComponents() > 0) {
@@ -151,6 +152,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     boolean setScrollbarSpace() {
         ScrollPane sp = (ScrollPane)target;
         boolean changed = false;
@@ -268,6 +270,7 @@
     /**
      * Scroll the contents to position x, y
      */
+    @SuppressWarnings("deprecation")
     void scroll(int x, int y, int flag, int type) {
         checkSecurity();
         ScrollPane sp = (ScrollPane)target;
@@ -569,6 +572,7 @@
      * ToDo(aim): needs to query native motif for more accurate size and
      * color information.
      */
+    @SuppressWarnings("deprecation")
     public void print(Graphics g) {
         ScrollPane sp = (ScrollPane)target;
         Dimension d = sp.size();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,7 @@
         DEFAULT_WIDTH_LINUX = XToolkit.getUIDefaults().getInt("ScrollBar.defaultWidth");
     }
 
+    @SuppressWarnings("deprecation")
     public void preInit(XCreateWindowParams params) {
         super.preInit(params);
         Scrollbar target = (Scrollbar) this.target;
--- a/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1164,6 +1164,7 @@
         }
 
         @Override
+        @SuppressWarnings("deprecation")
         public ComponentPeer getPeer() {
             return (ComponentPeer) (xwin);
         }
--- a/src/java.desktop/unix/classes/sun/awt/X11/XTextFieldPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XTextFieldPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -208,6 +208,7 @@
      * @see java.awt.peer.TextComponentPeer
      */
     @Override
+    @SuppressWarnings("deprecation")
     public String getText() {
         return xtext.getText();
     }
@@ -564,6 +565,7 @@
         }
 
         @Override
+        @SuppressWarnings("deprecation")
         public void actionPerformed( ActionEvent actionEvent ) {
             peer.postEvent(new ActionEvent(peer.target,
                                            ActionEvent.ACTION_PERFORMED,
@@ -598,6 +600,7 @@
         }
 
         @Override
+        @SuppressWarnings("deprecation")
         public ComponentPeer getPeer() {
             return (ComponentPeer) peer;
         }
--- a/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Sat Dec 27 13:27:07 2014 -0500
@@ -2438,12 +2438,14 @@
             awtUnlock();
         }
     }
+    @SuppressWarnings("deprecation")
     public void grab(Window w) {
         if (w.getPeer() != null) {
             ((XWindowPeer)w.getPeer()).setGrab(true);
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void ungrab(Window w) {
         if (w.getPeer() != null) {
            ((XWindowPeer)w.getPeer()).setGrab(false);
--- a/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -347,6 +347,7 @@
     }
 
     // It's synchronized with disposal by EDT.
+    @SuppressWarnings("deprecation")
     public void showPopupMenu(int x, int y) {
         if (isDisposed())
             return;
@@ -415,6 +416,7 @@
         canvas.addMouseMotionListener(eventProxy);
     }
 
+    @SuppressWarnings("deprecation")
     long getWindow() {
         return ((XEmbeddedFramePeer)eframe.getPeer()).getWindow();
     }
--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Sat Dec 27 13:27:07 2014 -0500
@@ -282,6 +282,7 @@
         return reparented;
     }
 
+    @SuppressWarnings("deprecation")
     static long getParentWindowID(Component target) {
 
         ComponentPeer peer = target.getParent().getPeer();
@@ -298,6 +299,7 @@
     }
 
 
+    @SuppressWarnings("deprecation")
     static XWindow getParentXWindowObject(Component target) {
         if (target == null) return null;
         Component temp = target.getParent();
@@ -374,6 +376,7 @@
                            target.getFont());
     }
 
+    @SuppressWarnings("deprecation")
     public FontMetrics getFontMetrics(Font font) {
         return Toolkit.getDefaultToolkit().getFontMetrics(font);
     }
--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -210,6 +210,7 @@
     private static native String getLocalHostname();
     private static native int getJvmPID();
 
+    @SuppressWarnings("deprecation")
     void postInit(XCreateWindowParams params) {
         super.postInit(params);
 
@@ -400,6 +401,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void recursivelySetIcon(java.util.List<IconInfo> icons) {
         dumpIcons(winAttr.icons);
         setIconHints(icons);
--- a/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -325,6 +325,7 @@
         return (isFullScreenSupported() && (getFullScreenWindow() != null));
     }
 
+    @SuppressWarnings("deprecation")
     private static void enterFullScreenExclusive(Window w) {
         X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
         if (peer != null) {
@@ -333,6 +334,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private static void exitFullScreenExclusive(Window w) {
         X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
         if (peer != null) {
--- a/src/java.desktop/unix/classes/sun/java2d/opengl/GLXVolatileSurfaceManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/java2d/opengl/GLXVolatileSurfaceManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,6 +73,7 @@
      * Create a pbuffer-based SurfaceData object (or init the backbuffer
      * of an existing window if this is a double buffered GraphicsConfig)
      */
+    @SuppressWarnings("deprecation")
     protected SurfaceData initAcceleratedSurface() {
         SurfaceData sData;
         Component comp = vImg.getComponent();
--- a/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java	Sat Dec 27 13:27:07 2014 -0500
@@ -329,6 +329,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public synchronized void setFullScreenWindow(Window w) {
         Window old = getFullScreenWindow();
         if (w == old) {
@@ -404,6 +405,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public synchronized void setDisplayMode(DisplayMode dm) {
         if (!isDisplayChangeSupported()) {
             super.setDisplayMode(dm);
--- a/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Sat Dec 27 13:27:07 2014 -0500
@@ -606,6 +606,7 @@
 
     // java.awt.Toolkit#getNativeContainer() is not available
     //  from this package
+    @SuppressWarnings("deprecation")
     private WComponentPeer getNearestNativePeer(Component comp)
     {
         if (comp==null)     return null;
--- a/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -46,6 +46,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void setCurrentFocusOwner(Component comp) {
         setNativeFocusOwner(comp != null ? comp.getPeer() : null);
     }
--- a/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -39,6 +39,7 @@
     // ListPeer implementation
 
     @Override
+    @SuppressWarnings("deprecation")
     public int[] getSelectedIndexes() {
         List l = (List)target;
         int len = l.countItems();
@@ -92,6 +93,7 @@
 
     @Override
     public native void delItems(int start, int end);
+    @SuppressWarnings("deprecation")
     public void clear() {
         List l = (List)target;
         delItems(0, l.countItems());
@@ -129,6 +131,7 @@
     native void create(WComponentPeer parent);
 
     @Override
+    @SuppressWarnings("deprecation")
     void initialize() {
         List li = (List)target;
 
--- a/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -199,6 +199,7 @@
         }
 
         @Override
+        @SuppressWarnings("deprecation")
         public void run() {
             if (getScrollChild() == null) {
                 return;
--- a/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java	Sat Dec 27 13:27:07 2014 -0500
@@ -82,6 +82,7 @@
 
         SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
                 @Override
+                @SuppressWarnings("deprecation")
                 public void run() {
                     PopupMenu newPopup = ((TrayIcon)target).getPopupMenu();
                     if (popup != newPopup) {
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,6 +61,7 @@
     private BufferCapabilities bufferCaps;
     private D3DGraphicsDevice device;
 
+    @SuppressWarnings("deprecation")
     protected D3DGraphicsConfig(D3DGraphicsDevice device) {
         super(device, 0);
         this.device = device;
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java	Sat Dec 27 13:27:07 2014 -0500
@@ -176,6 +176,7 @@
                                                                  long hwnd);
 
     @Override
+    @SuppressWarnings("deprecation")
     protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
     {
         final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
@@ -246,6 +247,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     protected void addFSWindowListener(Window w) {
         // if the window is not a toplevel (has an owner) we have to use the
         // real toplevel to enter the full-screen mode with (4933099).
@@ -273,6 +275,7 @@
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     protected void removeFSWindowListener(Window w) {
         realFSWindow.removeWindowListener(fsWindowListener);
         fsWindowListener = null;
@@ -337,6 +340,7 @@
                                                        int bitDepth,
                                                        int refreshRate);
     @Override
+    @SuppressWarnings("deprecation")
     protected void configDisplayMode(final int screen, final WindowPeer w,
                                      final int width, final int height,
                                      final int bitDepth, final int refreshRate)
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -523,6 +523,7 @@
      * @param comp component to check for hw children
      * @return true if Component has heavyweight children
      */
+    @SuppressWarnings("deprecation")
     private static boolean hasHWChildren(Component comp) {
         if (comp instanceof Container) {
             for (Component c : ((Container)comp).getComponents()) {
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,6 +79,7 @@
      * Create a pbuffer-based SurfaceData object (or init the backbuffer
      * of an existing window if this is a double buffered GraphicsConfig).
      */
+    @SuppressWarnings("deprecation")
     protected SurfaceData initAcceleratedSurface() {
         SurfaceData sData;
         Component comp = vImg.getComponent();
--- a/src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,7 @@
         wglAvailable = initWGL();
     }
 
+    @SuppressWarnings("deprecation")
     protected WGLGraphicsConfig(Win32GraphicsDevice device, int visualnum,
                                 long configInfo, ContextCapabilities oglCaps)
     {
--- a/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,6 +73,7 @@
      * Create a pbuffer-based SurfaceData object (or init the backbuffer
      * of an existing window if this is a double buffered GraphicsConfig).
      */
+    @SuppressWarnings("deprecation")
     protected SurfaceData initAcceleratedSurface() {
         SurfaceData sData;
         Component comp = vImg.getComponent();
--- a/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/UcryptoMech.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/UcryptoMech.java	Sat Dec 27 13:27:07 2014 -0500
@@ -37,6 +37,7 @@
     CRYPTO_AES_ECB(1, new String[]
         { "Cipher.AES/ECB/NoPadding;com.oracle.security.ucrypto.NativeCipher$AesEcbNoPadding",
           "Cipher.AES/ECB/PKCS5Padding;com.oracle.security.ucrypto.NativeCipherWithJavaPadding$AesEcbPKCS5",
+          "Alg.Alias.Cipher.AES;AES/ECB/PKCS5Padding",
           "Cipher.AES_128/ECB/NoPadding;com.oracle.security.ucrypto.NativeCipher$Aes128EcbNoPadding",
           "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.1;AES_128/ECB/NoPadding",
           "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.1;AES_128/ECB/NoPadding",
@@ -81,7 +82,8 @@
         { "Cipher.AES/CFB128/NoPadding;com.oracle.security.ucrypto.NativeCipher$AesCfb128NoPadding",
           "Cipher.AES/CFB128/PKCS5Padding;com.oracle.security.ucrypto.NativeCipherWithJavaPadding$AesCfb128PKCS5" }),
     CRYPTO_RSA_PKCS(31, new String[]
-        { "Cipher.RSA/ECB/PKCS1Padding;com.oracle.security.ucrypto.NativeRSACipher$PKCS1Padding" }),
+        { "Cipher.RSA/ECB/PKCS1Padding;com.oracle.security.ucrypto.NativeRSACipher$PKCS1Padding",
+          "Alg.Alias.Cipher.RSA;RSA/ECB/PKCS1Padding" }),
     CRYPTO_RSA_X_509(32, new String[]
         { "Cipher.RSA/ECB/NoPadding;com.oracle.security.ucrypto.NativeRSACipher$NoPadding" }),
     CRYPTO_MD5_RSA_PKCS(33, new String[]
--- a/src/jdk.dev/share/classes/sun/tools/native2ascii/Main.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/src/jdk.dev/share/classes/sun/tools/native2ascii/Main.java	Sat Dec 27 13:27:07 2014 -0500
@@ -71,11 +71,8 @@
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.Charset;
 import java.nio.charset.IllegalCharsetNameException;
-import java.nio.file.Files;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.UnsupportedCharsetException;
-import sun.tools.native2ascii.A2NFilter;
-import sun.tools.native2ascii.N2AFilter;
 
 /**
  * Main program of the native2ascii
@@ -94,7 +91,7 @@
     /**
      * Run the converter
      */
-    public synchronized boolean convert(String argv[]){
+    public synchronized boolean convert(String argv[]) {
         List<String> v = new ArrayList<>(2);
         File outputFile = null;
         boolean createOutputFile = false;
@@ -102,14 +99,14 @@
         // Parse arguments
         for (int i = 0; i < argv.length; i++) {
             if (argv[i].equals("-encoding")) {
-                if ((i + 1) < argv.length){
+                if ((i + 1) < argv.length) {
                     encodingString = argv[++i];
                 } else {
                     error(getMsg("err.bad.arg"));
                     usage();
                     return false;
                 }
-            } else if (argv[i].equals("-reverse")){
+            } else if (argv[i].equals("-reverse")) {
                 reverse = true;
             } else {
                 if (v.size() > 1) {
@@ -119,15 +116,18 @@
                 v.add(argv[i]);
             }
         }
-        if (encodingString == null)
-           defaultEncoding = Charset.defaultCharset().name();
 
+        if (encodingString == null) {
+            defaultEncoding = Charset.defaultCharset().name();
+        }
         char[] lineBreak = System.getProperty("line.separator").toCharArray();
+
         try {
             initializeConverter();
 
-            if (v.size() == 1)
+            if (v.size() == 1) {
                 inputFileName = v.get(0);
+            }
 
             if (v.size() == 2) {
                 inputFileName = v.get(0);
@@ -137,40 +137,38 @@
 
             if (createOutputFile) {
                 outputFile = new File(outputFileName);
-                    if (outputFile.exists() && !outputFile.canWrite()) {
-                        throw new Exception(formatMsg("err.cannot.write", outputFileName));
-                    }
+                if (outputFile.exists() && !outputFile.canWrite()) {
+                    throw new Exception(formatMsg("err.cannot.write", outputFileName));
+                }
             }
 
-            if (reverse){
-                BufferedReader reader = getA2NInput(inputFileName);
-                Writer osw = getA2NOutput(outputFileName);
-                String line;
-
-                while ((line = reader.readLine()) != null) {
-                    osw.write(line.toCharArray());
-                    osw.write(lineBreak);
-                    if (outputFileName == null) { // flush stdout
-                        osw.flush();
+            if (reverse) {
+                try (BufferedReader reader = getA2NInput(inputFileName);
+                        Writer osw = getA2NOutput(outputFileName);) {
+                    String line;
+                    while ((line = reader.readLine()) != null) {
+                        osw.write(line.toCharArray());
+                        osw.write(lineBreak);
+                        if (outputFileName == null) { // flush stdout
+                            osw.flush();
+                        }
                     }
                 }
-                reader.close();  // Close the stream.
-                osw.close();
             } else {
-             //N2A
-                String inLine;
-                BufferedReader in = getN2AInput(inputFileName);
-                BufferedWriter out = getN2AOutput(outputFileName);
-
-                while ((inLine = in.readLine()) != null) {
-                    out.write(inLine.toCharArray());
-                    out.write(lineBreak);
-                    if (outputFileName == null) { // flush stdout
-                        out.flush();
+                // N2A
+                try (BufferedReader in = getN2AInput(inputFileName);
+                        BufferedWriter out = getN2AOutput(outputFileName);) {
+                    String inLine;
+                    while ((inLine = in.readLine()) != null) {
+                        out.write(inLine.toCharArray());
+                        out.write(lineBreak);
+                        if (outputFileName == null) { // flush stdout
+                            out.flush();
+                        }
                     }
                 }
-                out.close();
             }
+
             // Since we are done rename temporary file to desired output file
             if (createOutputFile) {
                 if (outputFile.exists()) {
@@ -182,8 +180,7 @@
                 }
                 tempFile.renameTo(outputFile);
             }
-
-        } catch(Exception e){
+        } catch (Exception e) {
             error(e.toString());
             return false;
         }
--- a/test/ProblemList.txt	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/ProblemList.txt	Sat Dec 27 13:27:07 2014 -0500
@@ -239,9 +239,6 @@
 java/security/KeyPairGenerator/SolarisShortDSA.java             solaris-all
 sun/security/tools/keytool/standard.sh                          solaris-all
 
-# 8049312
-com/sun/crypto/provider/Cipher/AES/CICO.java			generic-all
-
 # 8062758
 java/security/Security/ClassLoaderDeadlock/Deadlock2.sh         generic-all
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/oracle/security/ucrypto/TestAlias.java	Sat Dec 27 13:27:07 2014 -0500
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8043349
+ * @summary Ensure the cipher aliases of AES and RSA works correctly
+ */
+import java.io.*;
+import java.security.*;
+import java.security.spec.*;
+import java.util.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class TestAlias extends UcryptoTest {
+
+    private static final String[] CIPHER_ALGOS = {
+        "AES/ECB/PKCS5Padding",
+        "AES",
+        "RSA/ECB/PKCS1Padding",
+        "RSA",
+    };
+
+    public static void main(String[] args) throws Exception {
+        main(new TestAlias(), null);
+    }
+
+    public void doTest(Provider prov) throws Exception {
+        Cipher c;
+        for (int i = 0; i < (CIPHER_ALGOS.length - 1); i+=2) {
+            String fullTransformation = CIPHER_ALGOS[i];
+            try {
+                c = Cipher.getInstance(fullTransformation, prov);
+            } catch (NoSuchAlgorithmException nsae) {
+                System.out.println("Skip unsupported algo: " + fullTransformation);
+                continue;
+            }
+            c = Cipher.getInstance(CIPHER_ALGOS[i+1], prov);
+        }
+
+        System.out.println("Test Passed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java	Sat Dec 27 13:27:07 2014 -0500
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import static java.awt.image.BufferedImage.TYPE_INT_RGB;
+import static java.lang.Math.toRadians;
+
+/**
+ * @test
+ * @bug 8065373
+ * @summary Verifies that we get correct direction, when draw rotated string.
+ * @author Sergey Bylokhov
+ * @run main DrawRotatedStringUsingRotatedFont
+ */
+public final class DrawRotatedStringUsingRotatedFont {
+
+    private static final int SIZE = 500;
+    private static final String STR = "MMMMMMMMMMMMMMMM";
+
+    private static AffineTransform[] txs = {
+                            AffineTransform.getRotateInstance(toRadians(00)),
+                            AffineTransform.getRotateInstance(toRadians(45)),
+                            AffineTransform.getRotateInstance(toRadians(-45)),
+                            AffineTransform.getRotateInstance(toRadians(90)),
+                            AffineTransform.getRotateInstance(toRadians(-90)),
+                            AffineTransform.getRotateInstance(toRadians(135)),
+                            AffineTransform.getRotateInstance(toRadians(-135)),
+                            AffineTransform.getRotateInstance(toRadians(180)),
+                            AffineTransform.getRotateInstance(toRadians(-180)),
+                            AffineTransform.getRotateInstance(toRadians(225)),
+                            AffineTransform.getRotateInstance(toRadians(-225)),
+                            AffineTransform.getRotateInstance(toRadians(270)),
+                            AffineTransform.getRotateInstance(toRadians(-270)),
+                            AffineTransform.getRotateInstance(toRadians(315)),
+                            AffineTransform.getRotateInstance(toRadians(-315)),
+                            AffineTransform.getRotateInstance(toRadians(360)),
+                            AffineTransform.getRotateInstance(toRadians(-360))
+    };
+
+    public static void main(final String[] args) throws IOException {
+        for (final AffineTransform tx2 : txs) {
+            for (final AffineTransform tx1 : txs) {
+                for (final boolean aa : new boolean[]{true, false}) {
+                    final BufferedImage bi1 = createImage(aa, tx1, tx2);
+                    final BufferedImage bi2 = createImage(aa, tx2, tx1);
+                    compareImage(bi1, bi2);
+                    fillTextArea(bi1, tx1, tx2);
+                    fillTextArea(bi2, tx2, tx1);
+                    checkColors(bi1, bi2);
+                }
+            }
+        }
+        System.out.println("Passed");
+    }
+
+    /**
+     * Compares two images.
+     */
+    private static void compareImage(final BufferedImage bi1,
+                                     final BufferedImage bi2)
+            throws IOException {
+        for (int i = 0; i < SIZE; ++i) {
+            for (int j = 0; j < SIZE; ++j) {
+                if (bi1.getRGB(i, j) != bi2.getRGB(i, j)) {
+                    ImageIO.write(bi1, "png", new File("image1.png"));
+                    ImageIO.write(bi2, "png", new File("image2.png"));
+                    throw new RuntimeException("Failed: wrong text location");
+                }
+            }
+        }
+    }
+
+    /**
+     * Checks an image color. RED and GREEN are allowed only.
+     */
+    private static void checkColors(final BufferedImage bi1,
+                                    final BufferedImage bi2)
+            throws IOException {
+        for (int i = 0; i < SIZE; ++i) {
+            for (int j = 0; j < SIZE; ++j) {
+                final int rgb1 = bi1.getRGB(i, j);
+                final int rgb2 = bi2.getRGB(i, j);
+                if (rgb1 != rgb2 || rgb1 != 0xFFFF0000 && rgb1 != 0xFF00FF00) {
+                    ImageIO.write(bi1, "png", new File("image1.png"));
+                    ImageIO.write(bi2, "png", new File("image2.png"));
+                    throw new RuntimeException("Failed: wrong text location");
+                }
+            }
+        }
+    }
+
+    /**
+     * Creates an BufferedImage and draws a text, using two transformations,
+     * one for graphics and one for font.
+     */
+    private static BufferedImage createImage(final boolean aa,
+                                             final AffineTransform gtx,
+                                             final AffineTransform ftx) {
+        final BufferedImage bi = new BufferedImage(SIZE, SIZE, TYPE_INT_RGB);
+        final Graphics2D bg = bi.createGraphics();
+        bg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+                            aa ? RenderingHints.VALUE_ANTIALIAS_ON
+                               : RenderingHints.VALUE_ANTIALIAS_OFF);
+        bg.setColor(Color.RED);
+        bg.fillRect(0, 0, SIZE, SIZE);
+        bg.translate(100, 100);
+        bg.transform(gtx);
+        bg.setColor(Color.BLACK);
+        bg.setFont(bg.getFont().deriveFont(20.0f).deriveFont(ftx));
+        bg.drawString(STR, 0, 0);
+        bg.dispose();
+        return bi;
+    }
+
+    /**
+     * Fills the area of text using green solid color.
+     */
+    private static void fillTextArea(final BufferedImage bi,
+                                     final AffineTransform tx1,
+                                     final AffineTransform tx2) {
+        final Graphics2D bg = bi.createGraphics();
+        bg.translate(100, 100);
+        bg.transform(tx1);
+        bg.transform(tx2);
+        bg.setColor(Color.GREEN);
+        final Font font = bg.getFont().deriveFont(20.0f);
+        bg.setFont(font);
+        bg.fill(font.getStringBounds(STR, bg.getFontRenderContext()));
+        bg.dispose();
+    }
+}
+
--- a/test/java/awt/GraphicsEnvironment/TestDetectHeadless/TestDetectHeadless.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/java/awt/GraphicsEnvironment/TestDetectHeadless/TestDetectHeadless.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -28,7 +28,7 @@
 #
 
 # @test
-# @bug 8058930
+# @bug 8058930 7077826
 # @summary java.awt.GraphicsEnvironment.getHeadlessProperty() does not work for AIX
 #
 # @build TestDetectHeadless
@@ -36,7 +36,7 @@
 
 OS=`uname -s`
 case "$OS" in
-    Windows* | CYGWIN* )
+    Windows* | CYGWIN* | Darwin)
         echo "Passed"; exit 0 ;;
     * ) unset DISPLAY ;;
 esac
@@ -44,4 +44,14 @@
 ${TESTJAVA}/bin/java ${TESTVMOPTS} \
     -cp ${TESTCLASSES} TestDetectHeadless
 
+if [ $? -ne 0 ]; then
+	exit 1;
+fi
+
+DISPLAY=
+export DISPLAY
+
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -cp ${TESTCLASSES} TestDetectHeadless
+
 exit $?
--- a/test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -21,23 +21,15 @@
 
 ${TESTJAVA}/bin/javac -cp ${TESTSRC} -d . ${TESTSRC}/BadDisplayTest.java
 
+OS=`uname -s`
+case "$OS" in
+    Windows* | CYGWIN* | Darwin)
+        echo "Passed"; exit 0 ;;
+esac
 
-DISPLAY=
+DISPLAY=SomeBadDisplay
 export DISPLAY
 
-OS=`uname -s`
-case "$OS" in
-  SunOS )
-    ${TESTJAVA}/bin/java ${TESTVMOPTS} BadDisplayTest
-    ;;
-  Linux )
-    ${TESTJAVA}/bin/java ${TESTVMOPTS} BadDisplayTest
-     ;;
-  * )
-    echo "Unsupported System: ${OS}"
-    exit 0;
-    ;;
-esac
+${TESTJAVA}/bin/java ${TESTVMOPTS} BadDisplayTest
 
 exit $?
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java	Sat Dec 27 13:27:07 2014 -0500
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.awt.image.BufferedImage;
+import java.awt.image.ImageObserver;
+import static java.awt.image.ImageObserver.*;
+import java.io.File;
+import javax.imageio.ImageIO;
+/*
+ * @test
+ * @bug 8065627
+ * @summary Animated GIFs fail to display on a HiDPI display
+ * @author Alexander Scherbatiy
+ * @run main MultiResolutionImageObserverTest
+ */
+
+public class MultiResolutionImageObserverTest {
+
+    private static final int TIMEOUT = 500;
+
+    public static void main(String[] args) throws Exception {
+
+        generateImages();
+        Toolkit toolkit = Toolkit.getDefaultToolkit();
+        Image image = Toolkit.getDefaultToolkit().getImage(IMAGE_NAME_1X);
+
+        LoadImageObserver sizeObserver
+                = new LoadImageObserver(WIDTH | HEIGHT);
+        toolkit.prepareImage(image, -1, -1, sizeObserver);
+        waitForImageLoading(sizeObserver, "The first observer is not called");
+
+        LoadImageObserver bitsObserver
+                = new LoadImageObserver(SOMEBITS | FRAMEBITS | ALLBITS);
+
+        BufferedImage buffImage = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g2d = (Graphics2D) buffImage.createGraphics();
+        g2d.scale(2, 2);
+        g2d.drawImage(image, 0, 0, bitsObserver);
+        waitForImageLoading(bitsObserver, "The second observer is not called!");
+        g2d.dispose();
+    }
+
+    private static void waitForImageLoading(LoadImageObserver observer,
+            String errorMessage) throws Exception {
+
+        long endTime = System.currentTimeMillis() + TIMEOUT;
+
+        while (!observer.loaded && System.currentTimeMillis() < endTime) {
+            Thread.sleep(TIMEOUT / 10);
+        }
+
+        if (!observer.loaded) {
+            throw new RuntimeException(errorMessage);
+        }
+    }
+
+    private static final String IMAGE_NAME_1X = "image.png";
+    private static final String IMAGE_NAME_2X = "image@2x.png";
+
+    private static void generateImages() throws Exception {
+        generateImage(1);
+        generateImage(2);
+    }
+
+    private static void generateImage(int scale) throws Exception {
+        BufferedImage image = new BufferedImage(
+                scale * 200, scale * 300,
+                BufferedImage.TYPE_INT_RGB);
+        Graphics g = image.createGraphics();
+        g.setColor(scale == 1 ? Color.GREEN : Color.BLUE);
+        g.fillRect(0, 0, scale * 200, scale * 300);
+        File file = new File(scale == 1 ? IMAGE_NAME_1X : IMAGE_NAME_2X);
+        ImageIO.write(image, "png", file);
+        g.dispose();
+    }
+
+    private static class LoadImageObserver implements ImageObserver {
+
+        private final int infoflags;
+        private boolean loaded;
+
+        public LoadImageObserver(int flags) {
+            this.infoflags = flags;
+        }
+
+        @Override
+        public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) {
+
+            if ((flags & infoflags) != 0) {
+                loaded = true;
+            }
+
+            return !loaded;
+        }
+    }
+}
--- a/test/java/net/ResponseCache/ResponseCacheTest.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/java/net/ResponseCache/ResponseCacheTest.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
 import java.net.*;
 import java.util.*;
 import java.io.*;
-import sun.net.www.ParseUtil;
 import javax.net.ssl.*;
 
 /**
@@ -178,11 +177,16 @@
     }
 
     static class MyResponseCache extends ResponseCache {
-        public CacheResponse
-        get(URI uri, String rqstMethod, Map<String,List<String>> rqstHeaders)
-            throws IOException {
-            if (uri.equals(ParseUtil.toURI(url1))) {
-                return new MyCacheResponse(FNPrefix+"file1.cache");
+        public CacheResponse get(URI uri, String rqstMethod,
+                                 Map<String,List<String>> rqstHeaders)
+            throws IOException
+        {
+            try {
+                if (uri.equals(url1.toURI())) {
+                    return new MyCacheResponse(FNPrefix+"file1.cache");
+                }
+            } catch (URISyntaxException ex) {
+                throw new RuntimeException (ex);
             }
             return null;
         }
--- a/test/java/security/KeyStore/PKCS12/ReadP12Test.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/java/security/KeyStore/PKCS12/ReadP12Test.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003,2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,8 +65,7 @@
 
 public class ReadP12Test {
 
-    private final static String IN_KETYSTORE_TYPE = "pkcs12";
-    private final static String IN_KEYSTORE_PRV = "SunJSSE";
+    private final static String IN_KEYSTORE_TYPE = "pkcs12";
     private final static String IN_STORE_PASS = "pass";
 
     public static void main(String args[]) throws Exception {
@@ -124,8 +123,7 @@
         String dir = System.getProperty("test.src", ".");
         String keystorePath = dir + File.separator + "certs" + File.separator
                 + "readP12";
-        inputKeyStore = KeyStore
-                .getInstance(IN_KETYSTORE_TYPE, IN_KEYSTORE_PRV);
+        inputKeyStore = KeyStore.getInstance(IN_KEYSTORE_TYPE);
         // KeyStore have encoded by Base64.getMimeEncoder().encode(),need decode
         // first.
         byte[] input = Files.readAllBytes(Paths.get(keystorePath, inKeyStore));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/security/KeyStore/ProbeKeystores.java	Sat Dec 27 13:27:07 2014 -0500
@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044445
+ * @summary test new methods from JEP-229: Create PKCS12 Keystores by Default
+ */
+
+import java.io.*;
+import java.security.*;
+import java.security.KeyStore.*;
+import java.security.cert.*;
+import javax.crypto.*;
+import javax.security.auth.callback.*;
+
+public class ProbeKeystores {
+    private static final char[] PASSWORD = "changeit".toCharArray();
+    private static final char[] BAD_PASSWORD = "badpasword".toCharArray();
+    private static final String DIR = System.getProperty("test.src", ".");
+    private static final String CERT_FILE = "trusted.pem";
+
+    public static final void main(String[] args) throws Exception {
+        try {
+            test();
+        } finally {
+            cleanup();
+        }
+    }
+
+    private static final void test() throws Exception {
+        cleanup();
+
+        // Testing empty keystores
+
+        init("empty.jks", "JKS");
+        init("empty.jceks", "JCEKS");
+        init("empty.p12", "PKCS12");
+
+        load("empty.jks", "JKS");
+        load("empty.jceks", "JCEKS");
+        load("empty.p12", "PKCS12");
+        load("empty.jks", "PKCS12"); // test compatibility mode
+        load("empty.p12", "JKS"); // test compatibility mode
+        load("empty.jks", "PKCS12", true); // test without compatibility mode
+        load("empty.jks", "JKS", false); // test without compatibility mode
+        load("empty.p12", "JKS", true); // test without compatibility mode
+        load("empty.p12", "PKCS12", false); // test without compatibility mode
+
+        probe("empty.jks", "JKS");
+        probe("empty.jceks", "JCEKS");
+        probe("empty.p12", "PKCS12");
+
+        build("empty.jks", "JKS", true);
+        build("empty.jks", "JKS", false);
+        build("empty.jceks", "JCEKS", true);
+        build("empty.jceks", "JCEKS", false);
+        build("empty.p12", "PKCS12", true);
+        build("empty.p12", "PKCS12", false);
+
+        // Testing keystores containing an X.509 certificate
+
+        X509Certificate cert = loadCertificate(CERT_FILE);
+        init("onecert.jks", "JKS", cert);
+        init("onecert.jceks", "JCEKS", cert);
+        init("onecert.p12", "PKCS12", cert);
+
+        load("onecert.jks", "JKS");
+        load("onecert.jceks", "JCEKS");
+        load("onecert.p12", "PKCS12");
+        load("onecert.jks", "PKCS12"); // test compatibility mode
+        load("onecert.p12", "JKS"); // test compatibility mode
+        load("onecert.jks", "PKCS12", true); // test without compatibility mode
+        load("onecert.jks", "JKS", false); // test without compatibility mode
+        load("onecert.p12", "JKS", true); // test without compatibility mode
+        load("onecert.p12", "PKCS12", false); // test without compatibility mode
+
+        probe("onecert.jks", "JKS");
+        probe("onecert.jceks", "JCEKS");
+        probe("onecert.p12", "PKCS12");
+
+        build("onecert.jks", "JKS", true);
+        build("onecert.jks", "JKS", false);
+        build("onecert.jceks", "JCEKS", true);
+        build("onecert.jceks", "JCEKS", false);
+        build("onecert.p12", "PKCS12", true);
+        build("onecert.p12", "PKCS12", false);
+
+        // Testing keystores containing a secret key
+
+        SecretKey key = generateSecretKey("AES", 128);
+        init("onekey.jceks", "JCEKS", key);
+        init("onekey.p12", "PKCS12", key);
+
+        load("onekey.jceks", "JCEKS");
+        load("onekey.p12", "PKCS12");
+        load("onekey.p12", "JKS"); // test compatibility mode
+        load("onekey.p12", "JKS", true); // test without compatibility mode
+        load("onekey.p12", "PKCS12", false); // test without compatibility mode
+
+        probe("onekey.jceks", "JCEKS");
+        probe("onekey.p12", "PKCS12");
+
+        build("onekey.jceks", "JCEKS", true);
+        build("onekey.jceks", "JCEKS", false);
+        build("onekey.p12", "PKCS12", true);
+        build("onekey.p12", "PKCS12", false);
+
+        System.out.println("OK.");
+    }
+
+    private static void cleanup() {
+        new File("empty.jks").delete();
+        new File("empty.jceks").delete();
+        new File("empty.p12").delete();
+        new File("onecert.jks").delete();
+        new File("onecert.jceks").delete();
+        new File("onecert.p12").delete();
+        new File("onekey.jceks").delete();
+        new File("onekey.p12").delete();
+    }
+
+    // Instantiate an empty keystore using the supplied keystore type
+    private static void init(String file, String type) throws Exception {
+        KeyStore ks = KeyStore.getInstance(type);
+        ks.load(null, null);
+        try (OutputStream stream = new FileOutputStream(DIR + "/" + file)) {
+            ks.store(stream, PASSWORD);
+        }
+        System.out.println("Created a " + type + " keystore named '" + file + "'");
+    }
+
+    // Instantiate a keystore using the supplied keystore type & create an entry
+    private static void init(String file, String type, X509Certificate cert)
+        throws Exception {
+        KeyStore ks = KeyStore.getInstance(type);
+        ks.load(null, null);
+        ks.setEntry("mycert", new KeyStore.TrustedCertificateEntry(cert), null);
+        try (OutputStream stream = new FileOutputStream(DIR + "/" + file)) {
+            ks.store(stream, PASSWORD);
+        }
+        System.out.println("Created a " + type + " keystore named '" + file + "'");
+    }
+
+    // Instantiate a keystore using the supplied keystore type & create an entry
+    private static void init(String file, String type, SecretKey key)
+        throws Exception {
+        KeyStore ks = KeyStore.getInstance(type);
+        ks.load(null, null);
+        ks.setEntry("mykey", new KeyStore.SecretKeyEntry(key),
+            new PasswordProtection(PASSWORD));
+        try (OutputStream stream = new FileOutputStream(DIR + "/" + file)) {
+            ks.store(stream, PASSWORD);
+        }
+        System.out.println("Created a " + type + " keystore named '" + file + "'");
+    }
+
+    // Instantiate a keystore by probing the supplied file for the keystore type
+    private static void probe(String file, String type) throws Exception {
+        // First try with the correct password
+        KeyStore ks = KeyStore.getInstance(new File(DIR, file), PASSWORD);
+        if (!type.equalsIgnoreCase(ks.getType())) {
+            throw new Exception("ERROR: expected a " + type + " keystore, " +
+                "got a " + ks.getType() + " keystore instead");
+        } else {
+            System.out.println("Probed a " + type + " keystore named '" + file + "'");
+        }
+
+        // Next try with an incorrect password
+        try {
+            ks = KeyStore.getInstance(new File(DIR, file), BAD_PASSWORD);
+            throw new Exception("ERROR: expected an exception but got success");
+        } catch (IOException e) {
+            System.out.println("Failed to load a " + type + " keystore named '" + file + "' (as expected)");
+        }
+    }
+
+    // Instantiate a keystore by probing the supplied file for the keystore type
+    private static void build(String file, String type, boolean usePassword)
+        throws Exception {
+
+        Builder builder;
+        if (usePassword) {
+            builder = Builder.newInstance(new File(DIR, file),
+                new PasswordProtection(PASSWORD));
+        } else {
+            builder = Builder.newInstance(new File(DIR, file),
+                new CallbackHandlerProtection(new DummyHandler()));
+        }
+        KeyStore ks = builder.getKeyStore();
+        if (!type.equalsIgnoreCase(ks.getType())) {
+            throw new Exception("ERROR: expected a " + type + " keystore, " +
+                "got a " + ks.getType() + " keystore instead");
+        } else {
+            System.out.println("Built a " + type + " keystore named '" + file + "'");
+        }
+    }
+
+    // Load the keystore entries
+    private static void load(String file, String type) throws Exception {
+        KeyStore ks = KeyStore.getInstance(type);
+        try (InputStream stream = new FileInputStream(DIR + "/" + file)) {
+            ks.load(stream, PASSWORD);
+        }
+        if (!type.equalsIgnoreCase(ks.getType())) {
+            throw new Exception("ERROR: expected a " + type + " keystore, " +
+                "got a " + ks.getType() + " keystore instead");
+        } else {
+            System.out.println("Loaded a " + type + " keystore named '" + file + "'");
+        }
+    }
+
+    // Load the keystore entries (with compatibility mode disabled)
+    private static void load(String file, String type, boolean expectFailure)
+        throws Exception {
+        Security.setProperty("keystore.type.compat", "false");
+        try {
+            load(file, type);
+            if (expectFailure) {
+                throw new Exception("ERROR: expected load to fail but it didn't");
+            }
+        } catch (IOException e) {
+            if (expectFailure) {
+                System.out.println("Failed to load a " + type + " keystore named '" + file + "' (as expected)");
+            } else {
+                throw e;
+            }
+        } finally {
+            Security.setProperty("keystore.type.compat", "true");
+        }
+    }
+
+    // Read an X.509 certificate from the supplied file
+    private static X509Certificate loadCertificate(String certFile)
+        throws Exception {
+        X509Certificate cert = null;
+        try (FileInputStream certStream =
+            new FileInputStream(DIR + "/" + certFile)) {
+            CertificateFactory factory =
+                CertificateFactory.getInstance("X.509");
+            return (X509Certificate) factory.generateCertificate(certStream);
+        }
+    }
+
+    // Generate a secret key using the supplied algorithm name and key size
+    private static SecretKey generateSecretKey(String algorithm, int size)
+        throws NoSuchAlgorithmException {
+        KeyGenerator generator = KeyGenerator.getInstance(algorithm);
+        generator.init(size);
+        return generator.generateKey();
+    }
+
+    private static class DummyHandler implements CallbackHandler {
+        public void handle(Callback[] callbacks)
+            throws IOException, UnsupportedCallbackException {
+            System.out.println("** Callbackhandler invoked");
+            for (int i = 0; i < callbacks.length; i++) {
+                Callback cb = callbacks[i];
+                if (cb instanceof PasswordCallback) {
+                    PasswordCallback pcb = (PasswordCallback)cb;
+                    pcb.setPassword(PASSWORD);
+                    break;
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/security/KeyStore/trusted.pem	Sat Dec 27 13:27:07 2014 -0500
@@ -0,0 +1,29 @@
+-----BEGIN CERTIFICATE-----
+MIIF5DCCBMygAwIBAgIQGVCD3zqdD1ZMZZ/zLAPnQzANBgkqhkiG9w0BAQUFADCBvDELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29t
+L3JwYSAoYykxMDE2MDQGA1UEAxMtVmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZl
+ciBDQSAtIEczMB4XDTEyMDcxMDAwMDAwMFoXDTEzMDczMTIzNTk1OVowgbgxCzAJBgNVBAYTAlVT
+MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRcwFQYDVQQHFA5SZWR3b29kIFNob3JlczEbMBkGA1UEChQS
+T3JhY2xlIENvcnBvcmF0aW9uMRIwEAYDVQQLFAlHbG9iYWwgSVQxMzAxBgNVBAsUKlRlcm1zIG9m
+IHVzZSBhdCB3d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNTEVMBMGA1UEAxQMKi5vcmFjbGUuY29t
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz/dOCGrWzPj62q0ZkF59Oj9Fli4wHAuX
+U4/S0yBXF8j6K7TKWFTQkGZt3+08KUhmLm1CE1DbbyRJT292YNXYXunNaKdABob8kaBO/NESUOEJ
+0SZh7fd0xCSJAAPiwOMrM5jLeb/dEpU6nP74Afrhu5ffvKdcvTRGguj9H2oVsisTK8Z1HsiiwcJG
+JXcrjvdCZoPU4FHvK03XZPAqPHKNSaJOrux6kRIWYjQMlmL+qDOb0nNHa6gBdi+VqqJHJHeAM677
+dcUd0jn2m2OWtUnrM3MJZQof7/z27RTdX5J8np0ChkUgm63biDgRZO7uZP0DARQ0I6lZMlrarT8/
+sct3twIDAQABo4IB4jCCAd4wFwYDVR0RBBAwDoIMKi5vcmFjbGUuY29tMAkGA1UdEwQCMAAwCwYD
+VR0PBAQDAgWgMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHFwMwKjAoBggrBgEFBQcCARYcaHR0cHM6
+Ly93d3cudmVyaXNpZ24uY29tL3JwYTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwbgYI
+KwYBBQUHAQwEYjBgoV6gXDBaMFgwVhYJaW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUS2u5KJYGDLvQ
+UjibKaxLB4shBRgwJhYkaHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nbzEuZ2lmMHIGCCsG
+AQUFBwEBBGYwZDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29tMDwGCCsGAQUF
+BzAChjBodHRwOi8vc3ZyaW50bC1nMy1haWEudmVyaXNpZ24uY29tL1NWUkludGxHMy5jZXIwQQYD
+VR0fBDowODA2oDSgMoYwaHR0cDovL3N2cmludGwtZzMtY3JsLnZlcmlzaWduLmNvbS9TVlJJbnRs
+RzMuY3JsMB8GA1UdIwQYMBaAFNebfNgioBX33a1fzimbWMO8RgC1MA0GCSqGSIb3DQEBBQUAA4IB
+AQAITRBlEo+qXLwCL53Db2BGnhDgnSomjne8aCmU7Yt4Kp91tzJdhNuaC/wwDuzD2dPJqzemae3s
+wKiOXrmDQZDj9NNTdkrXHnCvDR4TpOynWe3zBa0bwKnV2cIRKcv482yV53u0kALyFZbagYPwOOz3
+YJA/2SqdcDn9Ztc/ABQ1SkyXyA5j4LJdf2g7BtYrFxjy0RG6We2iM781WSB/9MCNKyHgiwd3KpLf
+urdSKLzy1elNAyt1P3UHwBIIvZ6sJIr/eeELc54Lxt6PtQCXx8qwxYTYXWPXbLgKBHdebgrmAbPK
+TfD69wysvjk6vwSHjmvaqB4R4WRcgkuT+1gxx+ve
+-----END CERTIFICATE-----
--- a/test/javax/swing/regtesthelpers/Util.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/javax/swing/regtesthelpers/Util.java	Sat Dec 27 13:27:07 2014 -0500
@@ -253,4 +253,18 @@
         }
         return result;
     }
+
+    /**
+     * Gets key codes from system mnemonic key mask
+     * @return key codes list
+     */
+    public static ArrayList<Integer> getSystemMnemonicKeyCodes() {
+        String osName = System.getProperty("os.name");
+        ArrayList<Integer> result = new ArrayList<>();
+        if (osName.contains("OS X")) {
+            result.add(KeyEvent.VK_CONTROL);
+        }
+        result.add(KeyEvent.ALT_MASK);
+        return result;
+    }
 }
--- a/test/sun/awt/dnd/8024061/bug8024061.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/awt/dnd/8024061/bug8024061.java	Sat Dec 27 13:27:07 2014 -0500
@@ -277,9 +277,6 @@
                     try {
                         Transferable t = dtde.getTransferable();
                         Object data = t.getTransferData(DropObjectFlavor);
-                        if (data != null) {
-                            throw new Exception("getTransferData returned non-null");
-                        }
                     } catch (Exception e) {
                         dragEnterException = e;
                         e.printStackTrace();
--- a/test/sun/security/tools/jarsigner/DefaultSigalg.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/jarsigner/DefaultSigalg.java	Sat Dec 27 13:27:07 2014 -0500
@@ -74,7 +74,7 @@
         KeyStore ks = KeyStore.getInstance("JKS");
         try (FileInputStream jks = new FileInputStream("jks");
                 JarFile jf = new JarFile("a.jar")) {
-            ks.load(jks, null);
+            ks.load(jks, "changeit".toCharArray());
             for (int i = 0; i<keyalgs.length; i++) {
                 String keyalg = keyalgs[i];
                 // keytool
--- a/test/sun/security/tools/jarsigner/concise_jarsigner.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/jarsigner/concise_jarsigner.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -47,12 +47,13 @@
 # Choose 1024-bit RSA to make sure it runs fine and fast on all platforms. In
 # fact, every keyalg/keysize combination is OK for this test.
 
-KT="$TESTJAVA${FS}bin${FS}keytool ${TESTTOOLVMOPTS} -storepass changeit -keypass changeit -keystore js.jks -keyalg rsa -keysize 1024"
+KS=js.ks
+KT="$TESTJAVA${FS}bin${FS}keytool ${TESTTOOLVMOPTS} -storepass changeit -keypass changeit -keystore $KS -keyalg rsa -keysize 1024"
 JAR="$TESTJAVA${FS}bin${FS}jar ${TESTTOOLVMOPTS}"
 JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner ${TESTTOOLVMOPTS}"
 JAVAC="$TESTJAVA${FS}bin${FS}javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS}"
 
-rm js.jks
+rm $KS
 
 echo class A1 {} > A1.java
 echo class A2 {} > A2.java
@@ -73,9 +74,9 @@
 
 # a.jar includes 8 unsigned, 2 signed by a1 and a2, 2 signed by a3
 $JAR cvf a.jar A1.class A2.class
-$JARSIGNER -keystore js.jks -storepass changeit a.jar a1
+$JARSIGNER -keystore $KS -storepass changeit a.jar a1
 $JAR uvf a.jar A3.class A4.class
-$JARSIGNER -keystore js.jks -storepass changeit a.jar a2
+$JARSIGNER -keystore $KS -storepass changeit a.jar a2
 $JAR uvf a.jar A5.class A6.class
 
 # Verify OK
@@ -87,15 +88,15 @@
 [ $? = 20 ] || exit $LINENO
 
 # 16(hasUnsignedEntry)
-$JARSIGNER -verify a.jar -strict -keystore js.jks
+$JARSIGNER -verify a.jar -strict -keystore $KS -storepass changeit
 [ $? = 16 ] || exit $LINENO
 
 # 16(hasUnsignedEntry)+32(notSignedByAlias)
-$JARSIGNER -verify a.jar a1 -strict -keystore js.jks
+$JARSIGNER -verify a.jar a1 -strict -keystore $KS -storepass changeit
 [ $? = 48 ] || exit $LINENO
 
 # 16(hasUnsignedEntry)
-$JARSIGNER -verify a.jar a1 a2 -strict -keystore js.jks
+$JARSIGNER -verify a.jar a1 a2 -strict -keystore $KS -storepass changeit
 [ $? = 16 ] || exit $LINENO
 
 # 12 entries all together
@@ -153,25 +154,25 @@
         $KT -importcert -alias badchain
 $KT -delete -alias ca
 
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar expired
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar expired
 [ $? = 4 ] || exit $LINENO
 
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar notyetvalid
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar notyetvalid
 [ $? = 4 ] || exit $LINENO
 
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar badku
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar badku
 [ $? = 8 ] || exit $LINENO
 
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar badeku
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar badeku
 [ $? = 8 ] || exit $LINENO
 
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar goodku
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar goodku
 [ $? = 0 ] || exit $LINENO
 
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar goodeku
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar goodeku
 [ $? = 0 ] || exit $LINENO
 
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar badchain
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar badchain
 [ $? = 4 ] || exit $LINENO
 
 $JARSIGNER -verify a.jar
@@ -189,11 +190,11 @@
 $KT -delete -alias ca2
 
 # Now altchain is still self-signed
-$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar altchain
+$JARSIGNER -strict -keystore $KS -storepass changeit a.jar altchain
 [ $? = 0 ] || exit $LINENO
 
 # If -certchain is used, then it's bad
-$JARSIGNER -strict -keystore js.jks -storepass changeit -certchain certchain a.jar altchain
+$JARSIGNER -strict -keystore $KS -storepass changeit -certchain certchain a.jar altchain
 [ $? = 4 ] || exit $LINENO
 
 $JARSIGNER -verify a.jar
--- a/test/sun/security/tools/jarsigner/emptymanifest.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/jarsigner/emptymanifest.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -44,14 +44,14 @@
     ;;
 esac
 
-KS=emptymanifest.jks
+KS=emptymanifest.ks
 JFILE=em.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool ${TESTTOOLVMOPTS} -storepass changeit -keypass changeit -keystore $KS"
 JAR="$TESTJAVA${FS}bin${FS}jar ${TESTTOOLVMOPTS}"
 JAVA="$TESTJAVA${FS}bin${FS}java ${TESTVMOPTS}"
 JAVAC="$TESTJAVA${FS}bin${FS}javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS}"
-JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner ${TESTTOOLVMOPTS}"
+JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner ${TESTTOOLVMOPTS} -keystore $KS -storepass changeit"
 
 rm $KS $JFILE
 echo A > A
@@ -70,7 +70,7 @@
 
 $KT -alias a -dname CN=a -keyalg rsa -genkey -validity 300
 
-$JARSIGNER -keystore $KS -storepass changeit $JFILE a || exit 1
-$JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 2
+$JARSIGNER $JFILE a || exit 1
+$JARSIGNER -verify -debug -strict $JFILE || exit 2
 
 exit 0
--- a/test/sun/security/tools/jarsigner/nameclash.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/jarsigner/nameclash.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2014 Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -42,12 +42,12 @@
     ;;
 esac
 
-KS=nc.jks
+KS=nc.ks
 JFILE=nc.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool ${TESTTOOLVMOPTS} -storepass changeit -keypass changeit -keystore $KS"
 JAR="$TESTJAVA${FS}bin${FS}jar ${TESTTOOLVMOPTS}"
-JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner ${TESTTOOLVMOPTS}"
+JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner ${TESTTOOLVMOPTS} -keystore $KS -storepass changeit"
 
 rm $KS $JFILE
 
@@ -57,10 +57,10 @@
 echo A > A
 $JAR cvf $JFILE A
 
-$JARSIGNER -keystore $KS -storepass changeit $JFILE a -digestalg SHA1 || exit 1
-$JARSIGNER -keystore $KS -storepass changeit $JFILE b -digestalg SHA-1 || exit 2
+$JARSIGNER $JFILE a -digestalg SHA1 || exit 1
+$JARSIGNER $JFILE b -digestalg SHA-1 || exit 2
 
-$JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 3
+$JARSIGNER -verify -debug -strict $JFILE || exit 3
 
 exit 0
 
--- a/test/sun/security/tools/jarsigner/passtype.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/jarsigner/passtype.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@
     ;;
 esac
 
-KS=pt.jks
+KS=pt.ks
 JFILE=pt.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool ${TESTTOOLVMOPTS} -keystore $KS -validity 300 -keyalg rsa"
@@ -62,11 +62,15 @@
 echo A > A
 $JAR cvf $JFILE A
 
+# Sign
 $JARSIGNER -keystore $KS -storepass test12 $JFILE a || exit 4
 PASSENV=test12 $JARSIGNER -keystore $KS -storepass:env PASSENV $JFILE b || exit 5
 $JARSIGNER -keystore $KS -storepass:file passfile $JFILE b || exit 6
 
-$JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 7
+# Verify
+$JARSIGNER -keystore $KS -storepass test12 -verify -debug -strict $JFILE || exit 7
+PASSENV=test12 $JARSIGNER -keystore $KS -storepass:env PASSENV -verify -debug -strict $JFILE || exit 8
+$JARSIGNER -keystore $KS -storepass:file passfile -verify -debug -strict $JFILE || exit 9
 
 exit 0
 
--- a/test/sun/security/tools/keytool/KeyToolTest.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/keytool/KeyToolTest.java	Sat Dec 27 13:27:07 2014 -0500
@@ -328,15 +328,15 @@
         // name changes: genkeypair, importcert, exportcert
         remove("x.jks");
         remove("x.jks.p1.cert");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -alias p1 -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -exportcert -alias p1 -file x.jks.p1.cert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -alias p1 -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -exportcert -alias p1 -file x.jks.p1.cert");
         ks = loadStore("x.jks", "changeit", "JKS");
         assertTrue(ks.getKey("p1", "changeit".toCharArray()) != null,
             "key not DSA");
         assertTrue(new File("x.jks.p1.cert").exists(), "p1 export err");
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias p1");
-        testOK("y\n", "-keystore x.jks -storepass changeit -importcert -alias c1 -file x.jks.p1.cert");  // importcert, prompt for Yes/No
-        testOK("", "-keystore x.jks -storepass changeit -importcert -alias c2 -file x.jks.p1.cert -noprompt"); // importcert, -noprompt
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias p1");
+        testOK("y\n", "-keystore x.jks -storetype JKS -storepass changeit -importcert -alias c1 -file x.jks.p1.cert");  // importcert, prompt for Yes/No
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -importcert -alias c2 -file x.jks.p1.cert -noprompt"); // importcert, -noprompt
         ks = loadStore("x.jks", "changeit", "JKS");
         assertTrue(ks.getCertificate("c1") != null, "import c1 err");
 
@@ -346,10 +346,10 @@
         assertTrue(certImpl.getVersion() == 3, "Version is not 3");
 
         // changealias and keyclone
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -alias p1 -dname CN=olala");
-        testOK("changeit\n", "-keystore x.jks -changealias -alias p1 -destalias p11");
-        testOK("changeit\n", "-keystore x.jks -changealias -alias c1 -destalias c11");
-        testOK("changeit\n\n", "-keystore x.jks -keyclone -alias p11 -destalias p111"); // press ENTER when prompt for p111's keypass
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -alias p1 -dname CN=olala");
+        testOK("changeit\n", "-keystore x.jks -storetype JKS -changealias -alias p1 -destalias p11");
+        testOK("changeit\n", "-keystore x.jks -storetype JKS -changealias -alias c1 -destalias c11");
+        testOK("changeit\n\n", "-keystore x.jks -storetype JKS -keyclone -alias p11 -destalias p111"); // press ENTER when prompt for p111's keypass
         ks = loadStore("x.jks", "changeit", "JKS");
         assertTrue(!ks.containsAlias("p1"), "there is no p1");
         assertTrue(!ks.containsAlias("c1"), "there is no c1");
@@ -382,7 +382,7 @@
         assertTrue(!ks.containsAlias("s7"), "s7 not created");
 
         // maybe we needn't test this, one day JKS will support SecretKey
-        //testFail("changeit\nchangeit\n", "-keystore x.jks -genseckey -keyalg AES -alias s3 -keysize 128");
+        //testFail("changeit\nchangeit\n", "-keystore x.jks -storetype JKS -genseckey -keyalg AES -alias s3 -keysize 128");
 
         // importKeyStore
         remove("x.jks");
@@ -479,9 +479,9 @@
 
         // pkcs12
         remove("x.jks");
-        testFail("changeit\nchangeit\n", "-keystore x.jks -genkeypair -alias p1 -dname CN=olala"); // JKS prompt for keypass
+        testFail("changeit\nchangeit\n", "-keystore x.jks -storetype JKS -genkeypair -alias p1 -dname CN=olala"); // JKS prompt for keypass
         remove("x.jks");
-        testOK("changeit\nchangeit\n\n", "-keystore x.jks -genkeypair -alias p1 -dname CN=olala"); // just type ENTER means keypass=storepass
+        testOK("changeit\nchangeit\n\n", "-keystore x.jks -storetype JKS -genkeypair -alias p1 -dname CN=olala"); // just type ENTER means keypass=storepass
         remove("x.p12");
         testOK("", "-keystore x.p12 -storetype PKCS12 -storepass changeit -genkeypair -alias p0 -dname CN=olala"); // PKCS12 only need storepass
         testOK("changeit\n", "-keystore x.p12 -storetype PKCS12 -genkeypair -alias p1 -dname CN=olala");
@@ -616,84 +616,84 @@
     void sqeImportTest() throws Exception {
         KeyStore ks;
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -exportcert -file x.jks.p1.cert");
-        /* deleted */ testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
-        /* deleted */ testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("yes\n", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -exportcert -file x.jks.p1.cert");
+        /* deleted */ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
+        /* deleted */ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("yes\n", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert");
         ks = loadStore("x.jks", "changeit", "JKS");
         assertTrue(ks.containsAlias("mykey"), "imported");
-        /* deleted */ testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("\n", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert");
+        /* deleted */ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("\n", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert");
         ks = loadStore("x.jks", "changeit", "JKS");
         assertTrue(!ks.containsAlias("mykey"), "imported");
-        testOK("no\n", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert");
+        testOK("no\n", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert");
         ks = loadStore("x.jks", "changeit", "JKS");
         assertTrue(!ks.containsAlias("mykey"), "imported");
-        testFail("no\n", "-keystore x.jks -storepass changeit -importcert -file nonexist");
-        testFail("no\n", "-keystore x.jks -storepass changeit -importcert -file x.jks");
+        testFail("no\n", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file nonexist");
+        testFail("no\n", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks");
         remove("x.jks");
     }
     // keyclone: exist. nonexist err, cert err, dest exist, misc
     void sqeKeyclonetest() throws Exception {
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -new newpass -keyclone -dest p0"); // new pass
-        testOK("\n", "-keystore x.jks -storepass changeit -keypass changeit -keyclone -dest p1"); // new pass
-        testOK("\n", "-keystore x.jks -storepass changeit -keyclone -dest p2");
-        testFail("\n", "-keystore x.jks -storepass changeit -keyclone -dest p2");
-        testFail("\n", "-keystore x.jks -storepass changeit -keyclone -dest p3 -alias noexist");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -new newpass -keyclone -dest p0"); // new pass
+        testOK("\n", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -keyclone -dest p1"); // new pass
+        testOK("\n", "-keystore x.jks -storetype JKS -storepass changeit -keyclone -dest p2");
+        testFail("\n", "-keystore x.jks -storetype JKS -storepass changeit -keyclone -dest p2");
+        testFail("\n", "-keystore x.jks -storetype JKS -storepass changeit -keyclone -dest p3 -alias noexist");
         // no cert
-        testOK("", "-keystore x.jks -storepass changeit -exportcert -file x.jks.p1.cert");
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -new newpass -keyclone -dest p0"); // new pass
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -exportcert -file x.jks.p1.cert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -new newpass -keyclone -dest p0"); // new pass
         remove("x.jks");
     }
     // keypasswd: exist, short, nonexist err, cert err, misc
     void sqeKeypasswdTest() throws Exception {
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -keypasswd -new newpass");
-        /*change back*/ testOK("", "-keystore x.jks -storepass changeit -keypass newpass -keypasswd -new changeit");
-        testOK("newpass\nnewpass\n", "-keystore x.jks -storepass changeit -keypass changeit -keypasswd");
-        /*change back*/ testOK("", "-keystore x.jks -storepass changeit -keypass newpass -keypasswd -new changeit");
-        testOK("new\nnew\nnewpass\nnewpass\n", "-keystore x.jks -storepass changeit -keypass changeit -keypasswd");
-        /*change back*/ testOK("", "-keystore x.jks -storepass changeit -keypass newpass -keypasswd -new changeit");
-        testOK("", "-keystore x.jks -storepass changeit -keypasswd -new newpass");
-        /*change back*/ testOK("", "-keystore x.jks -storepass changeit -keypass newpass -keypasswd -new changeit");
-        testOK("changeit\n", "-keystore x.jks -keypasswd -new newpass");
-        /*change back*/ testOK("", "-keystore x.jks -storepass changeit -keypass newpass -keypasswd -new changeit");
-        testFail("", "-keystore x.jks -storepass badpass -keypass changeit -keypasswd -new newpass");
-        testFail("", "-keystore x.jks -storepass changeit -keypass bad -keypasswd -new newpass");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -keypasswd -new newpass");
+        /*change back*/ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass newpass -keypasswd -new changeit");
+        testOK("newpass\nnewpass\n", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -keypasswd");
+        /*change back*/ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass newpass -keypasswd -new changeit");
+        testOK("new\nnew\nnewpass\nnewpass\n", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -keypasswd");
+        /*change back*/ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass newpass -keypasswd -new changeit");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypasswd -new newpass");
+        /*change back*/ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass newpass -keypasswd -new changeit");
+        testOK("changeit\n", "-keystore x.jks -storetype JKS -keypasswd -new newpass");
+        /*change back*/ testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass newpass -keypasswd -new changeit");
+        testFail("", "-keystore x.jks -storetype JKS -storepass badpass -keypass changeit -keypasswd -new newpass");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass bad -keypasswd -new newpass");
         // no cert
-        testOK("", "-keystore x.jks -storepass changeit -exportcert -file x.jks.p1.cert");
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -keypasswd -new newpass");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -exportcert -file x.jks.p1.cert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -keypasswd -new newpass");
         // diff pass
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -keypass keypass -genkeypair -dname CN=olala");
-        testFail("", "-keystore x.jks -storepass changeit -keypasswd -new newpass");
-        testOK("keypass\n", "-keystore x.jks -storepass changeit -keypasswd -new newpass");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass keypass -genkeypair -dname CN=olala");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypasswd -new newpass");
+        testOK("keypass\n", "-keystore x.jks -storetype JKS -storepass changeit -keypasswd -new newpass");
         // i hate those misc test
         remove("x.jks");
     }
     // list: -f -alias, exist, nonexist err; otherwise, check all shows, -rfc shows more, and misc
     void sqeListTest() throws Exception {
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -list");
-        testOK("", "-keystore x.jks -storepass changeit -list -alias mykey");
-        testFail("", "-keystore x.jks -storepass changeit -list -alias notexist");
-        testFail("", "-keystore x.jks -storepass badpass -list -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -keypass badpass -list -alias mykey");  // keypass ignore
-        testOK("\n", "-keystore x.jks -list");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -list");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -list -alias mykey");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -list -alias notexist");
+        testFail("", "-keystore x.jks -storetype JKS -storepass badpass -list -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass badpass -list -alias mykey");  // keypass ignore
+        testOK("\n", "-keystore x.jks -storetype JKS -list");
         assertTrue(err.indexOf("WARNING") != -1, "no storepass");
-        testOK("changeit\n", "-keystore x.jks -list");
+        testOK("changeit\n", "-keystore x.jks -storetype JKS -list");
         assertTrue(err.indexOf("WARNING") == -1, "has storepass");
-        testFail("badpass\n", "-keystore x.jks -list");
+        testFail("badpass\n", "-keystore x.jks -storetype JKS -list");
         // misc
         testFail("", "-keystore aa\\bb//cc -storepass changeit -list");
         testFail("", "-keystore nonexisting -storepass changeit -list");
@@ -703,45 +703,45 @@
     // selfcert: exist, non-exist err, cert err, sig..., dname, wrong keypass, misc
     void sqeSelfCertTest() throws Exception {
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -selfcert");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -selfcert");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -selfcert -alias nonexisting"); // not exist
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -selfcert -dname CN=NewName");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -selfcert -sigalg MD5withRSA"); // sig not compatible
-        testFail("", "-keystore x.jks -storepass wrong -keypass changeit -selfcert"); // bad pass
-        testFail("", "-keystore x.jks -storepass changeit -keypass wrong -selfcert"); // bad pass
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -selfcert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -selfcert");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -selfcert -alias nonexisting"); // not exist
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -selfcert -dname CN=NewName");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -selfcert -sigalg MD5withRSA"); // sig not compatible
+        testFail("", "-keystore x.jks -storetype JKS -storepass wrong -keypass changeit -selfcert"); // bad pass
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass wrong -selfcert"); // bad pass
         //misc
         testFail("", "-keystore nonexist -storepass changeit -keypass changeit -selfcert");
         testFail("", "-keystore aa//dd\\gg -storepass changeit -keypass changeit -selfcert");
         // diff pass
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass keypass -genkeypair -dname CN=olala");
-        testFail("", "-keystore x.jks -storepass changeit -selfcert");
-        testOK("keypass\n", "-keystore x.jks -storepass changeit -selfcert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass keypass -genkeypair -dname CN=olala");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -selfcert");
+        testOK("keypass\n", "-keystore x.jks -storetype JKS -storepass changeit -selfcert");
 
-        testOK("", "-keystore x.jks -storepass changeit -exportcert -file x.jks.p1.cert");
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
-        testFail("", "-keystore x.jks -storepass changeit -selfcert");  // certentry cannot do selfcert
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -exportcert -file x.jks.p1.cert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -selfcert");  // certentry cannot do selfcert
         remove("x.jks");
     }
     // storepass: bad old, short new, misc
     void sqeStorepassTest() throws Exception {
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-storepasswd -keystore x.jks -storepass changeit -new newstore"); // all in arg
-        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storepass newstore -new changeit");
-        testOK("changeit\nnewstore\nnewstore\n", "-storepasswd -keystore x.jks"); // all not in arg, new twice
-        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storepass newstore -new changeit");
-        testOK("changeit\n", "-storepasswd -keystore x.jks -new newstore"); // new in arg
-        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storepass newstore -new changeit");
-        testOK("newstore\nnewstore\n", "-storepasswd -keystore x.jks -storepass changeit"); // old in arg
-        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storepass newstore -new changeit");
-        testOK("new\nnew\nnewstore\nnewstore\n", "-storepasswd -keystore x.jks -storepass changeit"); // old in arg
-        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storepass newstore -new changeit");
-        testFail("", "-storepasswd -keystore x.jks -storepass badold -new newstore"); // bad old
-        testFail("", "-storepasswd -keystore x.jks -storepass changeit -new new"); // short new
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-storepasswd -keystore x.jks -storetype JKS -storepass changeit -new newstore"); // all in arg
+        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storetype JKS -storepass newstore -new changeit");
+        testOK("changeit\nnewstore\nnewstore\n", "-storepasswd -keystore x.jks -storetype JKS"); // all not in arg, new twice
+        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storetype JKS -storepass newstore -new changeit");
+        testOK("changeit\n", "-storepasswd -keystore x.jks -storetype JKS -new newstore"); // new in arg
+        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storetype JKS -storepass newstore -new changeit");
+        testOK("newstore\nnewstore\n", "-storepasswd -keystore x.jks -storetype JKS -storepass changeit"); // old in arg
+        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storetype JKS -storepass newstore -new changeit");
+        testOK("new\nnew\nnewstore\nnewstore\n", "-storepasswd -keystore x.jks -storetype JKS -storepass changeit"); // old in arg
+        /* Change back */ testOK("", "-storepasswd -keystore x.jks -storetype JKS -storepass newstore -new changeit");
+        testFail("", "-storepasswd -keystore x.jks -storetype JKS -storepass badold -new newstore"); // bad old
+        testFail("", "-storepasswd -keystore x.jks -storetype JKS -storepass changeit -new new"); // short new
         // misc
         testFail("", "-storepasswd -keystore nonexist -storepass changeit -new newstore"); // non exist
         testFail("", "-storepasswd -keystore badkeystore -storepass changeit -new newstore"); // bad file
@@ -752,40 +752,40 @@
     void sqeGenkeyTest() throws Exception {
 
         remove("x.jks");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -alias newentry");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -alias newentry");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg DSA -alias n1");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -alias n2");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg NoSuchAlg -alias n3");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 56 -alias n4");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 999 -alias n5");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 512 -alias n6");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 1024 -alias n7");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -sigalg NoSuchAlg -alias n8");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -sigalg MD2withRSA -alias n9");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -sigalg MD5withRSA -alias n10");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -sigalg SHA1withRSA -alias n11");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -alias newentry");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -alias newentry");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg DSA -alias n1");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -alias n2");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg NoSuchAlg -alias n3");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 56 -alias n4");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 999 -alias n5");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 512 -alias n6");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 1024 -alias n7");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -sigalg NoSuchAlg -alias n8");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -sigalg MD2withRSA -alias n9");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -sigalg MD5withRSA -alias n10");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -sigalg SHA1withRSA -alias n11");
         testFail("", "-keystore aa\\bb//cc\\dd -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA -sigalg NoSuchAlg -alias n12");
         testFail("", "-keystore badkeystore -storepass changeit -keypass changeit -genkeypair -dname CN=olala -alias n14");
-        testFail("", "-keystore x.jks -storepass badpass -keypass changeit -genkeypair -dname CN=olala -alias n16");
-        testFail("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CNN=olala -alias n17");
+        testFail("", "-keystore x.jks -storetype JKS -storepass badpass -keypass changeit -genkeypair -dname CN=olala -alias n16");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CNN=olala -alias n17");
         remove("x.jks");
     }
 
     void sqeExportTest() throws Exception {
         remove("x.jks");
-        testFail("", "-keystore x.jks -storepass changeit -export -file mykey.cert -alias mykey"); // nonexist
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -export -file mykey.cert -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -import -file mykey.cert -noprompt -alias c1");
-        testOK("", "-keystore x.jks -storepass changeit -export -file mykey.cert2 -alias c1");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -export -file mykey.cert -alias mykey"); // nonexist
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -export -file mykey.cert -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -import -file mykey.cert -noprompt -alias c1");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -export -file mykey.cert2 -alias c1");
         testFail("", "-keystore aa\\bb//cc\\dd -storepass changeit -export -file mykey.cert2 -alias c1");
         testFail("", "-keystore nonexistkeystore -storepass changeit -export -file mykey.cert2 -alias c1");
         testFail("", "-keystore badkeystore -storepass changeit -export -file mykey.cert2 -alias c1");
-        testFail("", "-keystore x.jks -storepass badpass -export -file mykey.cert2 -alias c1");
+        testFail("", "-keystore x.jks -storetype JKS -storepass badpass -export -file mykey.cert2 -alias c1");
         remove("mykey.cert");
         remove("mykey.cert2");
         remove("x.jks");
@@ -793,14 +793,14 @@
 
     void sqeDeleteTest() throws Exception {
         remove("x.jks");
-        testFail("", "-keystore x.jks -storepass changeit -delete -alias mykey"); // nonexist
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey"); // nonexist
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
         testFail("", "-keystore aa\\bb//cc\\dd -storepass changeit -delete -alias mykey"); // keystore name illegal
         testFail("", "-keystore nonexistkeystore -storepass changeit -delete -alias mykey"); // keystore not exist
         testFail("", "-keystore badkeystore -storepass changeit -delete -alias mykey"); // keystore invalid
-        testFail("", "-keystore x.jks -storepass xxxxxxxx -delete -alias mykey"); // wrong pass
+        testFail("", "-keystore x.jks -storetype JKS -storepass xxxxxxxx -delete -alias mykey"); // wrong pass
         remove("x.jks");
     }
 
@@ -809,31 +809,31 @@
         remove("x.jks.p1.cert");
         remove("csr1");
         // PrivateKeyEntry can do certreq
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 1024");
-        testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1 -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1");
-        testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1 -sigalg SHA1withDSA");
-        testFail("", "-keystore x.jks -storepass changeit -certreq -file csr1 -sigalg MD5withRSA"); // unmatched sigalg
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 1024");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1 -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1 -sigalg SHA1withDSA");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1 -sigalg MD5withRSA"); // unmatched sigalg
         // misc test
-        testFail("", "-keystore x.jks -storepass badstorepass -certreq -file csr1"); // bad storepass
-        testOK("changeit\n", "-keystore x.jks -certreq -file csr1"); // storepass from terminal
-        testFail("\n", "-keystore x.jks -certreq -file csr1"); // must provide storepass
-        testFail("", "-keystore x.jks -storepass changeit -keypass badkeypass -certreq -file csr1"); // bad keypass
-        testFail("", "-keystore x.jks -storepass changeit -certreq -file aa\\bb//cc\\dd");  // bad filepath
+        testFail("", "-keystore x.jks -storetype JKS -storepass badstorepass -certreq -file csr1"); // bad storepass
+        testOK("changeit\n", "-keystore x.jks -storetype JKS -certreq -file csr1"); // storepass from terminal
+        testFail("\n", "-keystore x.jks -storetype JKS -certreq -file csr1"); // must provide storepass
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -keypass badkeypass -certreq -file csr1"); // bad keypass
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file aa\\bb//cc\\dd");  // bad filepath
         testFail("", "-keystore noexistks -storepass changeit -certreq -file csr1"); // non-existing keystore
         // Try the RSA private key
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA");
-        testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1 -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1");
-        testFail("", "-keystore x.jks -storepass changeit -certreq -file csr1 -sigalg SHA1withDSA"); // unmatched sigalg
-        testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1 -sigalg MD5withRSA");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keyalg RSA");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1 -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1 -sigalg SHA1withDSA"); // unmatched sigalg
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1 -sigalg MD5withRSA");
         // TrustedCertificateEntry cannot do certreq
-        testOK("", "-keystore x.jks -storepass changeit -exportcert -file x.jks.p1.cert");
-        testOK("", "-keystore x.jks -storepass changeit -delete -alias mykey");
-        testOK("", "-keystore x.jks -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
-        testFail("", "-keystore x.jks -storepass changeit -certreq -file csr1 -alias mykey");
-        testFail("", "-keystore x.jks -storepass changeit -certreq -file csr1");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -exportcert -file x.jks.p1.cert");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -delete -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -importcert -file x.jks.p1.cert -noprompt");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1 -alias mykey");
+        testFail("", "-keystore x.jks -storetype JKS -storepass changeit -certreq -file csr1");
         remove("x.jks");
         remove("x.jks.p1.cert");
         remove("csr1");
@@ -842,8 +842,8 @@
     void sqePrintcertTest() throws Exception {
         remove("x.jks");
         remove("mykey.cert");
-        testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
-        testOK("", "-keystore x.jks -storepass changeit -export -file mykey.cert -alias mykey");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+        testOK("", "-keystore x.jks -storetype JKS -storepass changeit -export -file mykey.cert -alias mykey");
         testFail("", "-printcert -file badkeystore");
         testFail("", "-printcert -file a/b/c/d");
         testOK("", "-printcert -file mykey.cert");
@@ -857,7 +857,7 @@
     void v3extTest(String keyAlg) throws Exception {
         KeyStore ks;
         remove("x.jks");
-        String simple = "-keystore x.jks -storepass changeit -keypass changeit -noprompt -keyalg " + keyAlg + " ";
+        String simple = "-keystore x.jks -storetype JKS -storepass changeit -keypass changeit -noprompt -keyalg " + keyAlg + " ";
         String pre = simple + "-genkeypair -dname CN=Olala -alias ";
 
         // Version and SKID
@@ -1195,39 +1195,39 @@
         testOK("", "-help");
 
         //   2. keytool -genkey -v -keysize 512 Enter "a" for the keystore password. Check error (password too short). Enter "password" for the keystore password. Hit 'return' for "first and last name", "organizational unit", "City", "State", and "Country Code". Type "yes" when they ask you if everything is correct. Type 'return' for new key password.
-        testOK("a\npassword\npassword\nMe\nHere\nNow\nPlace\nPlace\nUS\nyes\n\n", "-genkey -v -keysize 512 -keystore x.jks");
+        testOK("a\npassword\npassword\nMe\nHere\nNow\nPlace\nPlace\nUS\nyes\n\n", "-genkey -v -keysize 512 -keystore x.jks -storetype JKS");
         //   3. keytool -list -v -storepass password
-        testOK("", "-list -v -storepass password -keystore x.jks");
+        testOK("", "-list -v -storepass password -keystore x.jks -storetype JKS");
         //   4. keytool -list -v Type "a" for the keystore password. Check error (wrong keystore password).
-        testFail("a\n", "-list -v -keystore x.jks");
+        testFail("a\n", "-list -v -keystore x.jks -storetype JKS");
         assertTrue(ex.indexOf("password was incorrect") != -1);
         //   5. keytool -genkey -v -keysize 512 Enter "password" as the password. Check error (alias 'mykey' already exists).
-        testFail("password\n", "-genkey -v -keysize 512 -keystore x.jks");
+        testFail("password\n", "-genkey -v -keysize 512 -keystore x.jks -storetype JKS");
         assertTrue(ex.indexOf("alias <mykey> already exists") != -1);
         //   6. keytool -genkey -v -keysize 512 -alias mykey2 -storepass password Hit 'return' for "first and last name", "organizational unit", "City", "State", and "Country Code". Type "yes" when they ask you if everything is correct. Type 'return' for new key password.
-        testOK("\n\n\n\n\n\nyes\n\n", "-genkey -v -keysize 512 -alias mykey2 -storepass password -keystore x.jks");
+        testOK("\n\n\n\n\n\nyes\n\n", "-genkey -v -keysize 512 -alias mykey2 -storepass password -keystore x.jks -storetype JKS");
         //   7. keytool -list -v Type 'password' for the store password.
-        testOK("password\n", "-list -v -keystore x.jks");
+        testOK("password\n", "-list -v -keystore x.jks -storetype JKS");
         //   8. keytool -keypasswd -v -alias mykey2 -storepass password Type "a" for the new key password. Type "aaaaaa" for the new key password. Type "bbbbbb" when re-entering the new key password. Type "a" for the new key password. Check Error (too many failures).
-        testFail("a\naaaaaa\nbbbbbb\na\n", "-keypasswd -v -alias mykey2 -storepass password -keystore x.jks");
+        testFail("a\naaaaaa\nbbbbbb\na\n", "-keypasswd -v -alias mykey2 -storepass password -keystore x.jks -storetype JKS");
         assertTrue(ex.indexOf("Too many failures - try later") != -1);
         //   9. keytool -keypasswd -v -alias mykey2 -storepass password Type "aaaaaa" for the new key password. Type "aaaaaa" when re-entering the new key password.
-        testOK("aaaaaa\naaaaaa\n", "-keypasswd -v -alias mykey2 -storepass password -keystore x.jks");
+        testOK("aaaaaa\naaaaaa\n", "-keypasswd -v -alias mykey2 -storepass password -keystore x.jks -storetype JKS");
         //  10. keytool -selfcert -v -alias mykey -storepass password
-        testOK("", "-selfcert -v -alias mykey -storepass password -keystore x.jks");
+        testOK("", "-selfcert -v -alias mykey -storepass password -keystore x.jks -storetype JKS");
         //  11. keytool -list -v -storepass password
-        testOK("", "-list -v -storepass password -keystore x.jks");
+        testOK("", "-list -v -storepass password -keystore x.jks -storetype JKS");
         //  12. keytool -export -v -alias mykey -file cert -storepass password
         remove("cert");
-        testOK("", "-export -v -alias mykey -file cert -storepass password -keystore x.jks");
+        testOK("", "-export -v -alias mykey -file cert -storepass password -keystore x.jks -storetype JKS");
         //  13. keytool -import -v -file cert -storepass password Check error (Certificate reply and cert are the same)
-        testFail("", "-import -v -file cert -storepass password -keystore x.jks");
+        testFail("", "-import -v -file cert -storepass password -keystore x.jks -storetype JKS");
         assertTrue(ex.indexOf("Certificate reply and certificate in keystore are identical") != -1);
         //  14. keytool -printcert -file cert
-        testOK("", "-printcert -file cert -keystore x.jks");
+        testOK("", "-printcert -file cert -keystore x.jks -storetype JKS");
         remove("cert");
         //  15. keytool -list -storepass password -provider sun.security.provider.Sun
-        testOK("", "-list -storepass password -provider sun.security.provider.Sun -keystore x.jks");
+        testOK("", "-list -storepass password -provider sun.security.provider.Sun -keystore x.jks -storetype JKS");
 
         //Error tests
 
@@ -1245,13 +1245,13 @@
         testFail("", "-keypasswd -storetype PKCS11 -keystore NONE");
         assertTrue(ex.indexOf("UnsupportedOperationException") != -1);
         //   5. keytool -list -protected -storepass password Check error (password can not be specified with -protected)
-        testFail("", "-list -protected -storepass password -keystore x.jks");
+        testFail("", "-list -protected -storepass password -keystore x.jks -storetype JKS");
         assertTrue(ex.indexOf("if -protected is specified, then") != -1);
         //   6. keytool -keypasswd -protected -keypass password Check error (password can not be specified with -protected)
-        testFail("", "-keypasswd -protected -keypass password -keystore x.jks");
+        testFail("", "-keypasswd -protected -keypass password -keystore x.jks -storetype JKS");
         assertTrue(ex.indexOf("if -protected is specified, then") != -1);
         //   7. keytool -keypasswd -protected -new password Check error (password can not be specified with -protected)
-        testFail("", "-keypasswd -protected -new password -keystore x.jks");
+        testFail("", "-keypasswd -protected -new password -keystore x.jks -storetype JKS");
         assertTrue(ex.indexOf("if -protected is specified, then") != -1);
         remove("x.jks");
     }
--- a/test/sun/security/tools/keytool/NewSize7.java	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/keytool/NewSize7.java	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
                 " -keypass changeit -keyalg rsa").split(" "));
         KeyStore ks = KeyStore.getInstance("JKS");
         try (FileInputStream fin = new FileInputStream(FILE)) {
-            ks.load(fin, null);
+            ks.load(fin, "changeit".toCharArray());
         }
         Files.delete(Paths.get(FILE));
         RSAPublicKey r = (RSAPublicKey)ks.getCertificate("a").getPublicKey();
--- a/test/sun/security/tools/keytool/selfissued.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/security/tools/keytool/selfissued.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -44,14 +44,14 @@
     ;;
 esac
 
-KS=selfsigned.jks
+KS=selfsigned.ks
 KT="$TESTJAVA${FS}bin${FS}keytool ${TESTTOOLVMOPTS} -storepass changeit -keypass changeit -keystore $KS -keyalg rsa"
 
 rm $KS
 
 $KT -alias ca -dname CN=CA -genkeypair
-$KT -alias ca1 -dname CN=CA -genkeypair
-$KT -alias ca2 -dname CN=CA -genkeypair
+$KT -alias ca1 -dname CN=CA1 -genkeypair
+$KT -alias ca2 -dname CN=CA2 -genkeypair
 $KT -alias e1 -dname CN=E1 -genkeypair
 
 # ca signs ca1, ca1 signs ca2, all self-issued
--- a/test/sun/tools/native2ascii/Native2AsciiTests.sh	Sat Dec 27 07:09:32 2014 -0800
+++ b/test/sun/tools/native2ascii/Native2AsciiTests.sh	Sat Dec 27 13:27:07 2014 -0500
@@ -24,7 +24,7 @@
 #
 
 # @test
-# @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817 7021987
+# @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817 7021987 8067964
 # @summary Tests miscellaneous native2ascii bugfixes and regressions