diff --git a/org/mozilla/jss/asn1/ASN1Header.java b/org/mozilla/jss/asn1/ASN1Header.java
index 3af2bf18..db5fba86 100644
--- a/org/mozilla/jss/asn1/ASN1Header.java
+++ b/org/mozilla/jss/asn1/ASN1Header.java
@@ -150,7 +150,7 @@ public class ASN1Header {
                 }
                 encoding.write(inInt);
                 next = (byte) inInt;
-                bV.addElement( new Byte(next) );
+                bV.addElement( Byte.valueOf(next) );
             } while( (next & 0x80) == 0x80 );
             Assert._assert( bV.size() > 0 );
 
diff --git a/org/mozilla/jss/asn1/OBJECT_IDENTIFIER.java b/org/mozilla/jss/asn1/OBJECT_IDENTIFIER.java
index ffe07127..1cc2d1af 100644
--- a/org/mozilla/jss/asn1/OBJECT_IDENTIFIER.java
+++ b/org/mozilla/jss/asn1/OBJECT_IDENTIFIER.java
@@ -489,8 +489,8 @@ public static class Template implements ASN1Template {
         byte b = readByte(istream);
         remainingContent--;
         long num = b % 40;
-        numberV.addElement( new Long( b % 40 ) ); // second number
-        numberV.insertElementAt( new Long( b / 40 ), 0); // first number
+        numberV.addElement( Long.valueOf(b % 40) ); // second number
+        numberV.insertElementAt( Long.valueOf(b / 40), 0); // first number
 
         // handle the rest of the numbers
         while( remainingContent > 0 ) {
@@ -510,7 +510,7 @@ public static class Template implements ASN1Template {
                 num |= (b & 0x7f);
             } while( (b & 0x80) != 0 );
 
-            numberV.addElement( new Long( num ) );
+            numberV.addElement( Long.valueOf(num) );
         }
 
         // convert Vector to array
diff --git a/org/mozilla/jss/asn1/SET.java b/org/mozilla/jss/asn1/SET.java
index f44cc17a..1ccdbe63 100644
--- a/org/mozilla/jss/asn1/SET.java
+++ b/org/mozilla/jss/asn1/SET.java
@@ -281,7 +281,7 @@ public class SET implements ASN1Value {
 
         // insert ourself before this item
         encs.insertElementAt(enc, i);
-        tags.insertElementAt(new Integer(i), i );
+        tags.insertElementAt(Integer.valueOf(i), i );
     }
 
 
diff --git a/org/mozilla/jss/netscape/security/pkcs/PKCS8Key.java b/org/mozilla/jss/netscape/security/pkcs/PKCS8Key.java
index ec46df84..f886d17b 100644
--- a/org/mozilla/jss/netscape/security/pkcs/PKCS8Key.java
+++ b/org/mozilla/jss/netscape/security/pkcs/PKCS8Key.java
@@ -31,6 +31,7 @@ import java.security.Provider;
 import java.security.Security;
 import java.security.spec.InvalidKeySpecException;
 import java.security.spec.PKCS8EncodedKeySpec;
+import java.lang.reflect.InvocationTargetException;
 
 import org.mozilla.jss.netscape.security.util.BigInt;
 import org.mozilla.jss.netscape.security.util.DerOutputStream;
@@ -185,7 +186,7 @@ public class PKCS8Key implements PrivateKey {
             Object inst;
             PKCS8Key result;
 
-            inst = keyClass.newInstance();
+            inst = keyClass.getConstructor().newInstance();
             if (inst instanceof PKCS8Key) {
                 result = (PKCS8Key) inst;
                 result.algid = algid;
@@ -196,6 +197,8 @@ public class PKCS8Key implements PrivateKey {
         } catch (ClassNotFoundException e) {
         } catch (InstantiationException e) {
         } catch (IllegalAccessException e) {
+        } catch (NoSuchMethodException e) {
+        } catch (InvocationTargetException e) {
             // this should not happen.
             throw new IOException(classname + " [internal error]");
         }
diff --git a/org/mozilla/jss/netscape/security/util/ObjectIdentifier.java b/org/mozilla/jss/netscape/security/util/ObjectIdentifier.java
index 9b34f8b6..998e25d1 100644
--- a/org/mozilla/jss/netscape/security/util/ObjectIdentifier.java
+++ b/org/mozilla/jss/netscape/security/util/ObjectIdentifier.java
@@ -449,10 +449,10 @@ final public class ObjectIdentifier implements Serializable {
             return thisOID;
 
         StringTokenizer token = new StringTokenizer(oid, ".");
-        value = new Integer(token.nextToken()).intValue();
+        value = Integer.valueOf(token.nextToken());
         /* First token should be 0, 1, 2 */
         if (value >= 0 && value <= 2) {
-            value = new Integer(token.nextToken()).intValue();
+            value = Integer.valueOf(token.nextToken());
             /* Second token should be 0 <= && >= 39 */
             if (value >= 0 && value <= 39) {
                 thisOID = new ObjectIdentifier(oid);
diff --git a/org/mozilla/jss/netscape/security/x509/IPAddressName.java b/org/mozilla/jss/netscape/security/x509/IPAddressName.java
index efc14fa3..39391b56 100644
--- a/org/mozilla/jss/netscape/security/x509/IPAddressName.java
+++ b/org/mozilla/jss/netscape/security/x509/IPAddressName.java
@@ -184,7 +184,7 @@ class IPv4Addr implements IPAddr {
         try {
             int end = start + nt;
             for (int i = start; i < end; i++) {
-                Integer j = new Integer(st.nextToken());
+                Integer j = new Integer(Integer.valueOf(st.nextToken()));
                 address[i] = (byte) j.intValue();
             }
         } catch (NumberFormatException e) {
diff --git a/org/mozilla/jss/netscape/security/x509/X509Key.java b/org/mozilla/jss/netscape/security/x509/X509Key.java
index bd630ce2..6887992d 100644
--- a/org/mozilla/jss/netscape/security/x509/X509Key.java
+++ b/org/mozilla/jss/netscape/security/x509/X509Key.java
@@ -21,6 +21,8 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.ObjectInputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.security.InvalidKeyException;
 import java.security.Key;
 import java.security.KeyFactory;
@@ -199,7 +201,8 @@ public class X509Key implements PublicKey {
             Object inst;
             X509Key result;
 
-            inst = keyClass.newInstance();
+            inst = keyClass.getConstructor().newInstance(
+                    sunProvider.getProperty("PublicKey.X.509." + algid.getName()));
             if (inst instanceof X509Key) {
                 result = (X509Key) inst;
                 result.algid = algid;
@@ -210,6 +213,8 @@ public class X509Key implements PublicKey {
         } catch (ClassNotFoundException e) {
         } catch (InstantiationException e) {
         } catch (IllegalAccessException e) {
+        } catch (NoSuchMethodException e) {
+        } catch (InvocationTargetException e) {
             // this should not happen.
             throw new IOException(classname + " [internal error]");
         }
diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java
index b4ab9142..e73a373d 100644
--- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java
+++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java
@@ -405,6 +405,12 @@ public class EncryptedPrivateKeyInfo implements ASN1Value {
         // compute algorithm parameters
         EncryptionAlgorithm encAlg = ((PBEAlgorithm)kgAlg).getEncryptionAlg();
         AlgorithmParameterSpec algParams;
+        /* TODO: switch to a different method
+           getParameterClass() is deprecated 
+           call getParameterClasses() instead.
+           Class<?>[] paramClasses = encAlg.getParameterClasses();
+           the rest is TBD
+         */
         if( encAlg.getParameterClass().equals( IVParameterSpec.class ) ) {
             algParams = new IVParameterSpec( kg.generatePBE_IV() );
         } else {
diff --git a/org/mozilla/jss/ssl/SSLClient.java b/org/mozilla/jss/ssl/SSLClient.java
index 37cc00f8..a1adc134 100644
--- a/org/mozilla/jss/ssl/SSLClient.java
+++ b/org/mozilla/jss/ssl/SSLClient.java
@@ -110,7 +110,7 @@ public class SSLClient
   }
 
   private String cmp(String s1, int s2) {
-    return cmp(s1, new Integer(s2).toString());
+    return cmp(s1, Integer.valueOf(s2).toString());
   }
 
 
diff --git a/org/mozilla/jss/ssl/SSLServer.java b/org/mozilla/jss/ssl/SSLServer.java
index 6c8580be..9d93d822 100644
--- a/org/mozilla/jss/ssl/SSLServer.java
+++ b/org/mozilla/jss/ssl/SSLServer.java
@@ -252,7 +252,7 @@ public class SSLServer
     }
 
     static final int cipherSuites[] = {
-    	SSLSocket.SSL3_RSA_WITH_RC4_128_MD5,
+    SSLSocket.SSL3_RSA_WITH_RC4_128_MD5,
 	SSLSocket.SSL3_RSA_WITH_3DES_EDE_CBC_SHA,
 	SSLSocket.SSL3_RSA_WITH_DES_CBC_SHA,
 	SSLSocket.SSL3_RSA_EXPORT_WITH_RC4_40_MD5,
diff --git a/org/mozilla/jss/ssl/SSLTest.java b/org/mozilla/jss/ssl/SSLTest.java
index 8b70f992..c5e69a50 100644
--- a/org/mozilla/jss/ssl/SSLTest.java
+++ b/org/mozilla/jss/ssl/SSLTest.java
@@ -56,7 +56,7 @@ public class SSLTest {
         dumpParams();
         CryptoManager.initialize(".");
 
-        int port = (new Integer( params.get("port") )).intValue();
+        int port = (Integer.valueOf(params.get("port")));
 
         Socket s = new Socket(params.get("host"), port);
 
diff --git a/org/mozilla/jss/ssl/SSLVersionRange.java b/org/mozilla/jss/ssl/SSLVersionRange.java
index 188887c5..8823f451 100644
--- a/org/mozilla/jss/ssl/SSLVersionRange.java
+++ b/org/mozilla/jss/ssl/SSLVersionRange.java
@@ -56,6 +56,7 @@ public class SSLVersionRange {
      * @param max_enum
      * @throws IllegalArgumentException
      */
+    @Deprecated
     public SSLVersionRange(int min_enum, int max_enum) throws IllegalArgumentException {
         this(SSLVersion.valueOf(min_enum), SSLVersion.valueOf(max_enum));
     }
diff --git a/org/mozilla/jss/tests/Constants.java b/org/mozilla/jss/tests/Constants.java
index 52085713..c558859e 100755
--- a/org/mozilla/jss/tests/Constants.java
+++ b/org/mozilla/jss/tests/Constants.java
@@ -68,12 +68,16 @@ public interface Constants {
      * SSL3_RSA_WITH_DES_CBC_SHA
      * SSL3_RSA_WITH_NULL_SHA
      * SSL3_RSA_WITH_NULL_MD5
-     * SSL3_RSA_WITH_RC4_128_MD5
      * SSL3_RSA_WITH_3DES_EDE_CBC_SHA
      * SSL3_RSA_WITH_DES_CBC_SHA
      * SSL3_RSA_WITH_NULL_MD5
      */
 
+    /**
+     * Not possible to add @Deprecated annotation to entries
+     * in the jssCipherSuites array below.
+     */
+
     /* cipherSuites Supported by JSS */
     public static final cipher jssCipherSuites[] = {
 /*0 */  new cipher(SSLSocket.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"),
diff --git a/org/mozilla/jss/tests/JSSE_SSLClient.java b/org/mozilla/jss/tests/JSSE_SSLClient.java
index 037279c8..a6d3a5db 100755
--- a/org/mozilla/jss/tests/JSSE_SSLClient.java
+++ b/org/mozilla/jss/tests/JSSE_SSLClient.java
@@ -18,6 +18,7 @@ import java.security.KeyStoreException;
 import java.security.NoSuchProviderException;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.lang.reflect.InvocationTargetException;
 
 import javax.net.ssl.HandshakeCompletedEvent;
 import javax.net.ssl.HandshakeCompletedListener;
@@ -274,13 +275,13 @@ public class JSSE_SSLClient {
                 System.setProperty("java.protocol.handler.pkgs",
                         "com.ibm.net.ssl.www.protocol.Handler");
                 java.security.Security.addProvider((java.security.Provider)
-                Class.forName("com.ibm.jsse2.IBMJSSEProvider2").newInstance());
+                Class.forName("com.ibm.jsse2.IBMJSSEProvider2").getConstructor().newInstance());
                 provider = "IBMJCE";
             } else {
                 System.setProperty("java.protocol.handler.pkgs",
                         "com.sun.net.ssl.internal.www.protocol");
                 java.security.Security.addProvider((java.security.Provider)
-                Class.forName("com.sun.crypto.provider.SunJCE").newInstance());
+                Class.forName("com.sun.crypto.provider.SunJCE").getConstructor().newInstance());
             }
 
             // Load the keystore that contains the certificate
@@ -343,6 +344,10 @@ public class JSSE_SSLClient {
             ex.printStackTrace();
         } catch (InstantiationException ex) {
             ex.printStackTrace();
+        } catch (NoSuchMethodException ex) {
+            ex.printStackTrace();
+        } catch (InvocationTargetException ex) {
+            ex.printStackTrace();
         } catch (Exception ex) {
             ex.printStackTrace();
         }
diff --git a/org/mozilla/jss/tests/JSS_SelfServServer.java b/org/mozilla/jss/tests/JSS_SelfServServer.java
index 4ddea6ac..5973db7a 100755
--- a/org/mozilla/jss/tests/JSS_SelfServServer.java
+++ b/org/mozilla/jss/tests/JSS_SelfServServer.java
@@ -15,6 +15,7 @@ import java.io.PrintWriter;
 import java.net.InetAddress;
 import java.net.SocketTimeoutException;
 import java.util.Vector;
+import java.lang.NumberFormatException;
 
 import org.mozilla.jss.CryptoManager;
 import org.mozilla.jss.crypto.CryptoToken;
@@ -112,13 +113,14 @@ public class JSS_SelfServServer  {
             if (args[3].equalsIgnoreCase("true") == true)
                 TestInetAddress = true;
             if (args.length >= 5)
-                port = new Integer(args[4]).intValue();
+                port = new Integer(Integer.valueOf(args[4]));
             if (args.length >=6 && args[5].equalsIgnoreCase("verbose")) {
                 bVerbose = true;
             }
             if (args.length >=7 && !args[6].equalsIgnoreCase("default")) {
                 fServerCertNick = args[6];
             }
+        } catch (NumberFormatException e) {
         } catch (Exception e) {
             System.out.println("Error parsing command line " + e.getMessage());
             System.out.println(usage);
diff --git a/org/mozilla/jss/util/NativeErrcodes.java b/org/mozilla/jss/util/NativeErrcodes.java
index 36e3bf03..ef6fe32e 100644
--- a/org/mozilla/jss/util/NativeErrcodes.java
+++ b/org/mozilla/jss/util/NativeErrcodes.java
@@ -252,13 +252,21 @@ public class NativeErrcodes {
      * XP_SEC_FORTEZZA_BAD_PIN and XP_SEC_FORTEZZA_PERSON_ERROR are 
      * placeholder for backward compatibility.
      */
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_BAD_CARD = 229;
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_NO_CARD = 230;
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_NONE_SELECTED = 231;
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_MORE_INFO = 232;
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_PERSON_NOT_FOUND = 233;
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_NO_MORE_INFO = 234;
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_BAD_PIN = 235;
+    @Deprecated
     public static final int XP_SEC_FORTEZZA_PERSON_ERROR = 236;
     public static final int SEC_ERROR_NO_KRL = 237;
     public static final int SEC_ERROR_KRL_EXPIRED = 238;
diff --git a/org/mozilla/jss/util/NativeProxy.java b/org/mozilla/jss/util/NativeProxy.java
index fdd9451e..9da7eac9 100644
--- a/org/mozilla/jss/util/NativeProxy.java
+++ b/org/mozilla/jss/util/NativeProxy.java
@@ -132,7 +132,7 @@ public abstract class NativeProxy
 
         // Get a unique index
         do {
-            index = new Long(indexGenerator.nextLong());
+            index = Long.valueOf(indexGenerator.nextLong());
         } while( registry.containsKey(index) );
         registry.put(index, index);
 
@@ -146,7 +146,7 @@ public abstract class NativeProxy
      * from the previous call to register().
      */
     private synchronized static void unregister(long index) {
-        Long Lindex = new Long(index);
+        Long Lindex = Long.valueOf(index);
         Long element;
 
         element = registry.remove(Lindex);
