提交 a6653458 编写于 作者: V valeriep

8025967: addition of -Werror broke the old build

Summary: Fixed and suppressed compiler warnings on rawtypes
Reviewed-by: vinnie
上级 3f8c1660
...@@ -237,7 +237,7 @@ final public class LdapCtxFactory implements ObjectFactory, InitialContextFactor ...@@ -237,7 +237,7 @@ final public class LdapCtxFactory implements ObjectFactory, InitialContextFactor
private static String[] getTypeNames(Class<?> currentClass, Vector<String> v) { private static String[] getTypeNames(Class<?> currentClass, Vector<String> v) {
getClassesAux(currentClass, v); getClassesAux(currentClass, v);
Class[] members = currentClass.getInterfaces(); Class<?>[] members = currentClass.getInterfaces();
for (int i = 0; i < members.length; i++) { for (int i = 0; i < members.length; i++) {
getClassesAux(members[i], v); getClassesAux(members[i], v);
} }
......
...@@ -237,7 +237,7 @@ public final class LdapPoolManager { ...@@ -237,7 +237,7 @@ public final class LdapPoolManager {
!socketFactory.equals(LdapCtx.DEFAULT_SSL_FACTORY)) { !socketFactory.equals(LdapCtx.DEFAULT_SSL_FACTORY)) {
try { try {
Class<?> socketFactoryClass = Obj.helper.loadClass(socketFactory); Class<?> socketFactoryClass = Obj.helper.loadClass(socketFactory);
Class[] interfaces = socketFactoryClass.getInterfaces(); Class<?>[] interfaces = socketFactoryClass.getInterfaces();
for (int i = 0; i < interfaces.length; i++) { for (int i = 0; i < interfaces.length; i++) {
if (interfaces[i].getCanonicalName().equals(COMPARATOR)) { if (interfaces[i].getCanonicalName().equals(COMPARATOR)) {
foundSockCmp = true; foundSockCmp = true;
......
...@@ -404,6 +404,7 @@ public class HttpsURLConnectionOldImpl ...@@ -404,6 +404,7 @@ public class HttpsURLConnectionOldImpl
return delegate.getContent(); return delegate.getContent();
} }
@SuppressWarnings("rawtypes")
public Object getContent(Class[] classes) throws IOException { public Object getContent(Class[] classes) throws IOException {
return delegate.getContent(classes); return delegate.getContent(classes);
} }
......
...@@ -381,6 +381,7 @@ public interface Instrumentation { ...@@ -381,6 +381,7 @@ public interface Instrumentation {
* *
* @return an array containing all the classes loaded by the JVM, zero-length if there are none * @return an array containing all the classes loaded by the JVM, zero-length if there are none
*/ */
@SuppressWarnings("rawtypes")
Class[] Class[]
getAllLoadedClasses(); getAllLoadedClasses();
...@@ -393,6 +394,7 @@ public interface Instrumentation { ...@@ -393,6 +394,7 @@ public interface Instrumentation {
* @return an array containing all the classes for which loader is an initiating loader, * @return an array containing all the classes for which loader is an initiating loader,
* zero-length if there are none * zero-length if there are none
*/ */
@SuppressWarnings("rawtypes")
Class[] Class[]
getInitiatedClasses(ClassLoader loader); getInitiatedClasses(ClassLoader loader);
......
...@@ -96,6 +96,7 @@ abstract public class ContentHandler { ...@@ -96,6 +96,7 @@ abstract public class ContentHandler {
* @exception IOException if an I/O error occurs while reading the object. * @exception IOException if an I/O error occurs while reading the object.
* @since 1.3 * @since 1.3
*/ */
@SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws IOException { public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
Object obj = getContent(urlc); Object obj = getContent(urlc);
......
...@@ -230,7 +230,7 @@ final class JceSecurityManager extends SecurityManager { ...@@ -230,7 +230,7 @@ final class JceSecurityManager extends SecurityManager {
// See bug 4341369 & 4334690 for more info. // See bug 4341369 & 4334690 for more info.
boolean isCallerTrusted() { boolean isCallerTrusted() {
// Get the caller and its codebase. // Get the caller and its codebase.
Class[] context = getClassContext(); Class<?>[] context = getClassContext();
URL callerCodeBase = null; URL callerCodeBase = null;
int i; int i;
for (i=0; i<context.length; i++) { for (i=0; i<context.length; i++) {
......
...@@ -170,11 +170,13 @@ public class InstrumentationImpl implements Instrumentation { ...@@ -170,11 +170,13 @@ public class InstrumentationImpl implements Instrumentation {
redefineClasses0(mNativeAgent, definitions); redefineClasses0(mNativeAgent, definitions);
} }
@SuppressWarnings("rawtypes")
public Class[] public Class[]
getAllLoadedClasses() { getAllLoadedClasses() {
return getAllLoadedClasses0(mNativeAgent); return getAllLoadedClasses0(mNativeAgent);
} }
@SuppressWarnings("rawtypes")
public Class[] public Class[]
getInitiatedClasses(ClassLoader loader) { getInitiatedClasses(ClassLoader loader) {
return getInitiatedClasses0(mNativeAgent, loader); return getInitiatedClasses0(mNativeAgent, loader);
...@@ -255,9 +257,11 @@ public class InstrumentationImpl implements Instrumentation { ...@@ -255,9 +257,11 @@ public class InstrumentationImpl implements Instrumentation {
redefineClasses0(long nativeAgent, ClassDefinition[] definitions) redefineClasses0(long nativeAgent, ClassDefinition[] definitions)
throws ClassNotFoundException; throws ClassNotFoundException;
@SuppressWarnings("rawtypes")
private native Class[] private native Class[]
getAllLoadedClasses0(long nativeAgent); getAllLoadedClasses0(long nativeAgent);
@SuppressWarnings("rawtypes")
private native Class[] private native Class[]
getInitiatedClasses0(long nativeAgent, ClassLoader loader); getInitiatedClasses0(long nativeAgent, ClassLoader loader);
......
...@@ -37,6 +37,7 @@ public class gif extends ContentHandler { ...@@ -37,6 +37,7 @@ public class gif extends ContentHandler {
return new URLImageSource(urlc); return new URLImageSource(urlc);
} }
@SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws IOException { public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
Class<?>[] cls = classes; Class<?>[] cls = classes;
for (int i = 0; i < cls.length; i++) { for (int i = 0; i < cls.length; i++) {
......
...@@ -36,6 +36,7 @@ public class jpeg extends ContentHandler { ...@@ -36,6 +36,7 @@ public class jpeg extends ContentHandler {
return new URLImageSource(urlc); return new URLImageSource(urlc);
} }
@SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws IOException { public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
Class<?>[] cls = classes; Class<?>[] cls = classes;
for (int i = 0; i < cls.length; i++) { for (int i = 0; i < cls.length; i++) {
......
...@@ -36,6 +36,7 @@ public class png extends ContentHandler { ...@@ -36,6 +36,7 @@ public class png extends ContentHandler {
return new URLImageSource(urlc); return new URLImageSource(urlc);
} }
@SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws IOException { public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
Class<?>[] cls = classes; Class<?>[] cls = classes;
for (int i = 0; i < cls.length; i++) { for (int i = 0; i < cls.length; i++) {
......
...@@ -35,6 +35,7 @@ public class x_xbitmap extends ContentHandler { ...@@ -35,6 +35,7 @@ public class x_xbitmap extends ContentHandler {
return new URLImageSource(urlc); return new URLImageSource(urlc);
} }
@SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException {
Class<?>[] cls = classes; Class<?>[] cls = classes;
for (int i = 0; i < cls.length; i++) { for (int i = 0; i < cls.length; i++) {
......
...@@ -35,6 +35,7 @@ public class x_xpixmap extends ContentHandler { ...@@ -35,6 +35,7 @@ public class x_xpixmap extends ContentHandler {
return new URLImageSource(urlc); return new URLImageSource(urlc);
} }
@SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException { public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException {
Class<?>[] cls = classes; Class<?>[] cls = classes;
for (int i = 0; i < cls.length; i++) { for (int i = 0; i < cls.length; i++) {
......
...@@ -434,6 +434,7 @@ public class HttpsURLConnectionImpl ...@@ -434,6 +434,7 @@ public class HttpsURLConnectionImpl
return delegate.getContent(); return delegate.getContent();
} }
@SuppressWarnings("rawtypes")
public Object getContent(Class[] classes) throws IOException { public Object getContent(Class[] classes) throws IOException {
return delegate.getContent(classes); return delegate.getContent(classes);
} }
......
...@@ -217,7 +217,7 @@ public final class MethodUtil extends SecureClassLoader { ...@@ -217,7 +217,7 @@ public final class MethodUtil extends SecureClassLoader {
*/ */
private static class Signature { private static class Signature {
private String methodName; private String methodName;
private Class[] argClasses; private Class<?>[] argClasses;
private volatile int hashCode = 0; private volatile int hashCode = 0;
...@@ -299,7 +299,7 @@ public final class MethodUtil extends SecureClassLoader { ...@@ -299,7 +299,7 @@ public final class MethodUtil extends SecureClassLoader {
new PrivilegedExceptionAction<Method>() { new PrivilegedExceptionAction<Method>() {
public Method run() throws Exception { public Method run() throws Exception {
Class<?> t = getTrampolineClass(); Class<?> t = getTrampolineClass();
Class[] types = { Class<?>[] types = {
Method.class, Object.class, Object[].class Method.class, Object.class, Object[].class
}; };
Method b = t.getDeclaredMethod("invoke", types); Method b = t.getDeclaredMethod("invoke", types);
......
...@@ -91,7 +91,7 @@ public class AuthPolicyFile extends javax.security.auth.Policy { ...@@ -91,7 +91,7 @@ public class AuthPolicyFile extends javax.security.auth.Policy {
private boolean ignoreIdentityScope = true; private boolean ignoreIdentityScope = true;
// for use with the reflection API // 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 * Initializes the Policy object and reads the default policy
......
...@@ -58,7 +58,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable { ...@@ -58,7 +58,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
private Subject subject; private Subject subject;
private LinkedList<PrincipalEntry> principals; 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 = private static final sun.security.util.Debug debug =
sun.security.util.Debug.getInstance("auth", "\t[Auth Access]"); sun.security.util.Debug.getInstance("auth", "\t[Auth Access]");
private ClassLoader sysClassLoader; private ClassLoader sysClassLoader;
......
...@@ -93,7 +93,7 @@ public class Main { ...@@ -93,7 +93,7 @@ public class Main {
// prefix for new signature-related files in META-INF directory // prefix for new signature-related files in META-INF directory
private static final String SIG_PREFIX = META_INF + "SIG-"; 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 NONE = "NONE";
private static final String P11KEYSTORE = "PKCS11"; private static final String P11KEYSTORE = "PKCS11";
......
...@@ -309,7 +309,7 @@ public final class Main { ...@@ -309,7 +309,7 @@ public final class Main {
} }
}; };
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 NONE = "NONE";
private static final String P11KEYSTORE = "PKCS11"; private static final String P11KEYSTORE = "PKCS11";
......
...@@ -77,9 +77,9 @@ public class PolicyTool { ...@@ -77,9 +77,9 @@ public class PolicyTool {
boolean modified = false; boolean modified = false;
private static final boolean testing = false; private static final boolean testing = false;
private static final Class[] TWOPARAMS = { String.class, String.class }; private static final Class<?>[] TWOPARAMS = { String.class, String.class };
private static final Class[] ONEPARAMS = { String.class }; private static final Class<?>[] ONEPARAMS = { String.class };
private static final Class[] NOPARAMS = {}; private static final Class<?>[] NOPARAMS = {};
/* /*
* All of the policy entries are read in from the * All of the policy entries are read in from the
* policy file and stored here. Updates to the policy entries * policy file and stored here. Updates to the policy entries
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册