[JDK] Code Review 7090499: missing rawtypes warnings in anonymous inner class

Chris Hegarty chris.hegarty at oracle.com
Thu Sep 15 11:46:08 UTC 2011


This review is for the JDK part of CR 7090499: "missing rawtypes 
warnings in anonymous inner class".

Recently, Sasha removed all warnings from some areas of the jdk and 
enabled -Werror. Once 7090499 is fixed in javac then the JDK build would 
fail if using raw types in any inner classes. SunPKCS11 is the only 
place in the jdk that uses a raw type and is built with -Xlint and -Werror.

This is a trivial change to use the generified type.

  hg diff src/share/classes/sun/security/pkcs11/SunPKCS11.java
diff -r 5e403e9fa34a src/share/classes/sun/security/pkcs11/SunPKCS11.java
--- a/src/share/classes/sun/security/pkcs11/SunPKCS11.java      Thu Sep 
15 15:02:05 2011 +0900
+++ b/src/share/classes/sun/security/pkcs11/SunPKCS11.java      Thu Sep 
15 12:32:03 2011 +0100
@@ -1335,10 +1335,10 @@ public final class SunPKCS11 extends Aut
                              return null;
                          }

-                        Class c = Class.forName
-                                (defaultHandler,
-                                true,
- 
Thread.currentThread().getContextClassLoader());
+                        Class<?> c = Class.forName
+                                   (defaultHandler,
+                                   true,
+ 
Thread.currentThread().getContextClassLoader());
                          return (CallbackHandler)c.newInstance();
                      }
                  });

Thanks,
-Chris.



More information about the core-libs-dev mailing list