JDK 9 RFR: JDK-8030082 Fix raw types lint warnings, etc. in various sun.security libraries

Joe Darcy joe.darcy at oracle.com
Fri Dec 13 06:02:00 UTC 2013


Hello,

Please review the below straightforward fix for

     JDK-8030082 Fix raw types lint warnings, etc. in various 
sun.security libraries
     https://bugs.openjdk.java.net/browse/JDK-8030082

Webrev also visible at

     http://cr.openjdk.java.net/~darcy/8030082.0/

The fix is intended for the JDK 9, once the forests are available.

Thanks,

-Joe

--- old/src/share/classes/sun/security/jca/ProviderConfig.java 
2013-12-12 21:58:13.000000000 -0800
+++ new/src/share/classes/sun/security/jca/ProviderConfig.java 
2013-12-12 21:58:13.000000000 -0800
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -58,7 +58,7 @@

      // parameters for the Provider(String) constructor,
      // use by doLoadProvider()
-    private final static Class[] CL_STRING = { String.class };
+    private final static Class<?>[] CL_STRING = { String.class };

      // name of the provider class
      private final String className;
--- old/src/share/classes/sun/security/provider/PolicyFile.java 
2013-12-12 21:58:14.000000000 -0800
+++ new/src/share/classes/sun/security/provider/PolicyFile.java 
2013-12-12 21:58:13.000000000 -0800
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -285,9 +285,9 @@

      // for use with the reflection API

-    private static final Class[] PARAMS0 = { };
-    private static final Class[] PARAMS1 = { String.class };
-    private static final Class[] PARAMS2 = { String.class, String.class };
+    private static final Class<?>[] PARAMS0 = { };
+    private static final Class<?>[] PARAMS1 = { String.class };
+    private static final Class<?>[] PARAMS2 = { String.class, 
String.class };

      /**
       * Initializes the Policy object and reads the default policy
--- old/src/share/classes/sun/security/x509/CRLExtensions.java 
2013-12-12 21:58:14.000000000 -0800
+++ new/src/share/classes/sun/security/x509/CRLExtensions.java 
2013-12-12 21:58:14.000000000 -0800
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -106,7 +106,7 @@
          }
      }

-    private static final Class[] PARAMS = {Boolean.class, Object.class};
+    private static final Class<?>[] PARAMS = {Boolean.class, Object.class};

      // Parse the encoded extension
      private void parseExtension(Extension ext) throws CRLException {
--- old/src/share/classes/sun/security/x509/CertificateExtensions.java 
2013-12-12 21:58:15.000000000 -0800
+++ new/src/share/classes/sun/security/x509/CertificateExtensions.java 
2013-12-12 21:58:15.000000000 -0800
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -89,7 +89,7 @@
          }
      }

-    private static Class[] PARAMS = {Boolean.class, Object.class};
+    private static Class<?>[] PARAMS = {Boolean.class, Object.class};

      // Parse the encoded extension
      private void parseExtension(Extension ext) throws IOException {
--- old/src/share/classes/sun/security/x509/X509CertImpl.java 2013-12-12 
21:58:15.000000000 -0800
+++ new/src/share/classes/sun/security/x509/X509CertImpl.java 2013-12-12 
21:58:15.000000000 -0800
@@ -1115,8 +1115,7 @@
          SubjectKeyIdentifierExtension ski = 
getSubjectKeyIdentifierExtension();
          if (ski != null) {
              try {
-                return (KeyIdentifier)ski.get(
-                    SubjectKeyIdentifierExtension.KEY_ID);
+                return ski.get(SubjectKeyIdentifierExtension.KEY_ID);
              } catch (IOException ioe) {} // not possible
          }
          return null;




More information about the security-dev mailing list