7090499: missing rawtypes warnings in anonymous inner class
Summary: Fix anonymous inner classes with raw types currently being built in the jdk with -Werror
Reviewed-by: mcimadamore, alanb
--- a/jdk/src/share/classes/java/net/DatagramSocket.java Wed Oct 05 15:13:40 2011 +0900
+++ b/jdk/src/share/classes/java/net/DatagramSocket.java Thu Oct 06 12:15:07 2011 +0100
@@ -287,7 +287,7 @@
AccessController.doPrivileged(
new PrivilegedExceptionAction<Void>() {
public Void run() throws NoSuchMethodException {
- Class[] cl = new Class[1];
+ Class<?>[] cl = new Class<?>[1];
cl[0] = DatagramPacket.class;
impl.getClass().getDeclaredMethod("peekData", cl);
return null;
--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Wed Oct 05 15:13:40 2011 +0900
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Oct 06 12:15:07 2011 +0100
@@ -1661,7 +1661,7 @@
public IOException run() throws Exception {
return (IOException)
rememberedException.getClass()
- .getConstructor(new Class[] { String.class })
+ .getConstructor(new Class<?>[] { String.class })
.newInstance(args);
}
});
--- a/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java Wed Oct 05 15:13:40 2011 +0900
+++ b/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java Thu Oct 06 12:15:07 2011 +0100
@@ -1335,10 +1335,10 @@
return null;
}
- Class c = Class.forName
- (defaultHandler,
- true,
- Thread.currentThread().getContextClassLoader());
+ Class<?> c = Class.forName
+ (defaultHandler,
+ true,
+ Thread.currentThread().getContextClassLoader());
return (CallbackHandler)c.newInstance();
}
});