8025967: addition of -Werror broke the old build
authorvaleriep
Tue, 08 Oct 2013 14:41:46 -0700
changeset 20754 3d7b2fafc34b
parent 20753 95a52f518b5a
child 20755 e3f8b7f63dc7
8025967: addition of -Werror broke the old build Summary: Fixed and suppressed compiler warnings on rawtypes Reviewed-by: vinnie
jdk/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java
jdk/src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java
jdk/src/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java
jdk/src/share/classes/java/lang/instrument/Instrumentation.java
jdk/src/share/classes/java/net/ContentHandler.java
jdk/src/share/classes/javax/crypto/JceSecurityManager.java
jdk/src/share/classes/sun/instrument/InstrumentationImpl.java
jdk/src/share/classes/sun/net/www/content/image/gif.java
jdk/src/share/classes/sun/net/www/content/image/jpeg.java
jdk/src/share/classes/sun/net/www/content/image/png.java
jdk/src/share/classes/sun/net/www/content/image/x_xbitmap.java
jdk/src/share/classes/sun/net/www/content/image/x_xpixmap.java
jdk/src/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java
jdk/src/share/classes/sun/reflect/misc/MethodUtil.java
jdk/src/share/classes/sun/security/provider/AuthPolicyFile.java
jdk/src/share/classes/sun/security/provider/SubjectCodeSource.java
jdk/src/share/classes/sun/security/tools/jarsigner/Main.java
jdk/src/share/classes/sun/security/tools/keytool/Main.java
jdk/src/share/classes/sun/security/tools/policytool/PolicyTool.java
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java	Tue Oct 08 14:41:46 2013 -0700
@@ -237,7 +237,7 @@
     private static String[] getTypeNames(Class<?> currentClass, Vector<String> v) {
 
         getClassesAux(currentClass, v);
-        Class[] members = currentClass.getInterfaces();
+        Class<?>[] members = currentClass.getInterfaces();
         for (int i = 0; i < members.length; i++) {
             getClassesAux(members[i], v);
         }
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java	Tue Oct 08 14:41:46 2013 -0700
@@ -237,7 +237,7 @@
              !socketFactory.equals(LdapCtx.DEFAULT_SSL_FACTORY)) {
             try {
                 Class<?> socketFactoryClass = Obj.helper.loadClass(socketFactory);
-                Class[] interfaces = socketFactoryClass.getInterfaces();
+                Class<?>[] interfaces = socketFactoryClass.getInterfaces();
                 for (int i = 0; i < interfaces.length; i++) {
                     if (interfaces[i].getCanonicalName().equals(COMPARATOR)) {
                         foundSockCmp = true;
--- a/jdk/src/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java	Tue Oct 08 14:41:46 2013 -0700
@@ -404,6 +404,7 @@
         return delegate.getContent();
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(Class[] classes) throws IOException {
         return delegate.getContent(classes);
     }
--- a/jdk/src/share/classes/java/lang/instrument/Instrumentation.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/java/lang/instrument/Instrumentation.java	Tue Oct 08 14:41:46 2013 -0700
@@ -381,6 +381,7 @@
      *
      * @return an array containing all the classes loaded by the JVM, zero-length if there are none
      */
+    @SuppressWarnings("rawtypes")
     Class[]
     getAllLoadedClasses();
 
@@ -393,6 +394,7 @@
      * @return an array containing all the classes for which loader is an initiating loader,
      *          zero-length if there are none
      */
+    @SuppressWarnings("rawtypes")
     Class[]
     getInitiatedClasses(ClassLoader loader);
 
--- a/jdk/src/share/classes/java/net/ContentHandler.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/java/net/ContentHandler.java	Tue Oct 08 14:41:46 2013 -0700
@@ -96,6 +96,7 @@
      * @exception  IOException  if an I/O error occurs while reading the object.
      * @since 1.3
      */
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Object obj = getContent(urlc);
 
--- a/jdk/src/share/classes/javax/crypto/JceSecurityManager.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/javax/crypto/JceSecurityManager.java	Tue Oct 08 14:41:46 2013 -0700
@@ -230,7 +230,7 @@
     // See  bug 4341369 & 4334690 for more info.
     boolean isCallerTrusted() {
         // Get the caller and its codebase.
-        Class[] context = getClassContext();
+        Class<?>[] context = getClassContext();
         URL callerCodeBase = null;
         int i;
         for (i=0; i<context.length; i++) {
--- a/jdk/src/share/classes/sun/instrument/InstrumentationImpl.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/instrument/InstrumentationImpl.java	Tue Oct 08 14:41:46 2013 -0700
@@ -170,11 +170,13 @@
         redefineClasses0(mNativeAgent, definitions);
     }
 
+    @SuppressWarnings("rawtypes")
     public Class[]
     getAllLoadedClasses() {
         return getAllLoadedClasses0(mNativeAgent);
     }
 
+    @SuppressWarnings("rawtypes")
     public Class[]
     getInitiatedClasses(ClassLoader loader) {
         return getInitiatedClasses0(mNativeAgent, loader);
@@ -255,9 +257,11 @@
     redefineClasses0(long nativeAgent, ClassDefinition[]  definitions)
         throws  ClassNotFoundException;
 
+    @SuppressWarnings("rawtypes")
     private native Class[]
     getAllLoadedClasses0(long nativeAgent);
 
+    @SuppressWarnings("rawtypes")
     private native Class[]
     getInitiatedClasses0(long nativeAgent, ClassLoader loader);
 
--- a/jdk/src/share/classes/sun/net/www/content/image/gif.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/net/www/content/image/gif.java	Tue Oct 08 14:41:46 2013 -0700
@@ -37,6 +37,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/jdk/src/share/classes/sun/net/www/content/image/jpeg.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/net/www/content/image/jpeg.java	Tue Oct 08 14:41:46 2013 -0700
@@ -36,6 +36,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/jdk/src/share/classes/sun/net/www/content/image/png.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/net/www/content/image/png.java	Tue Oct 08 14:41:46 2013 -0700
@@ -36,6 +36,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/jdk/src/share/classes/sun/net/www/content/image/x_xbitmap.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/net/www/content/image/x_xbitmap.java	Tue Oct 08 14:41:46 2013 -0700
@@ -35,6 +35,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/jdk/src/share/classes/sun/net/www/content/image/x_xpixmap.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/net/www/content/image/x_xpixmap.java	Tue Oct 08 14:41:46 2013 -0700
@@ -35,6 +35,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/jdk/src/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java	Tue Oct 08 14:41:46 2013 -0700
@@ -434,6 +434,7 @@
         return delegate.getContent();
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(Class[] classes) throws IOException {
         return delegate.getContent(classes);
     }
--- a/jdk/src/share/classes/sun/reflect/misc/MethodUtil.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/reflect/misc/MethodUtil.java	Tue Oct 08 14:41:46 2013 -0700
@@ -217,7 +217,7 @@
      */
     private static class Signature {
         private String methodName;
-        private Class[] argClasses;
+        private Class<?>[] argClasses;
 
         private volatile int hashCode = 0;
 
@@ -299,7 +299,7 @@
                 new PrivilegedExceptionAction<Method>() {
                     public Method run() throws Exception {
                         Class<?> t = getTrampolineClass();
-                        Class[] types = {
+                        Class<?>[] types = {
                             Method.class, Object.class, Object[].class
                         };
                         Method b = t.getDeclaredMethod("invoke", types);
--- a/jdk/src/share/classes/sun/security/provider/AuthPolicyFile.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/security/provider/AuthPolicyFile.java	Tue Oct 08 14:41:46 2013 -0700
@@ -91,7 +91,7 @@
     private boolean ignoreIdentityScope = true;
 
     // for use with the reflection API
-    private static final Class[] PARAMS = { String.class, String.class};
+    private static final Class<?>[] PARAMS = { String.class, String.class};
 
     /**
      * Initializes the Policy object and reads the default policy
--- a/jdk/src/share/classes/sun/security/provider/SubjectCodeSource.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/security/provider/SubjectCodeSource.java	Tue Oct 08 14:41:46 2013 -0700
@@ -58,7 +58,7 @@
 
     private Subject subject;
     private LinkedList<PrincipalEntry> principals;
-    private static final Class[] PARAMS = { String.class };
+    private static final Class<?>[] PARAMS = { String.class };
     private static final sun.security.util.Debug debug =
         sun.security.util.Debug.getInstance("auth", "\t[Auth Access]");
     private ClassLoader sysClassLoader;
--- a/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java	Tue Oct 08 14:41:46 2013 -0700
@@ -93,7 +93,7 @@
     // prefix for new signature-related files in META-INF directory
     private static final String SIG_PREFIX = META_INF + "SIG-";
 
-    private static final Class[] PARAM_STRING = { String.class };
+    private static final Class<?>[] PARAM_STRING = { String.class };
 
     private static final String NONE = "NONE";
     private static final String P11KEYSTORE = "PKCS11";
--- a/jdk/src/share/classes/sun/security/tools/keytool/Main.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/security/tools/keytool/Main.java	Tue Oct 08 14:41:46 2013 -0700
@@ -309,7 +309,7 @@
         }
     };
 
-    private static final Class[] PARAM_STRING = { String.class };
+    private static final Class<?>[] PARAM_STRING = { String.class };
 
     private static final String NONE = "NONE";
     private static final String P11KEYSTORE = "PKCS11";
--- a/jdk/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Tue Oct 08 11:35:29 2013 -0700
+++ b/jdk/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Tue Oct 08 14:41:46 2013 -0700
@@ -77,9 +77,9 @@
     boolean modified = false;
 
     private static final boolean testing = false;
-    private static final Class[] TWOPARAMS = { String.class, String.class };
-    private static final Class[] ONEPARAMS = { String.class };
-    private static final Class[] NOPARAMS  = {};
+    private static final Class<?>[] TWOPARAMS = { String.class, String.class };
+    private static final Class<?>[] ONEPARAMS = { String.class };
+    private static final Class<?>[] NOPARAMS  = {};
     /*
      * All of the policy entries are read in from the
      * policy file and stored here.  Updates to the policy entries