提交 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
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);
}
......
......@@ -237,7 +237,7 @@ public final class LdapPoolManager {
!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;
......
......@@ -404,6 +404,7 @@ public class HttpsURLConnectionOldImpl
return delegate.getContent();
}
@SuppressWarnings("rawtypes")
public Object getContent(Class[] classes) throws IOException {
return delegate.getContent(classes);
}
......
......@@ -381,6 +381,7 @@ public interface Instrumentation {
*
* @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 @@ public interface Instrumentation {
* @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);
......
......@@ -96,6 +96,7 @@ abstract public class ContentHandler {
* @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);
......
......@@ -230,7 +230,7 @@ final class JceSecurityManager extends SecurityManager {
// 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++) {
......
......@@ -170,11 +170,13 @@ public class InstrumentationImpl implements Instrumentation {
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 @@ public class InstrumentationImpl implements Instrumentation {
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);
......
......@@ -37,6 +37,7 @@ public class gif extends ContentHandler {
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++) {
......
......@@ -36,6 +36,7 @@ public class jpeg extends ContentHandler {
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++) {
......
......@@ -36,6 +36,7 @@ public class png extends ContentHandler {
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++) {
......
......@@ -35,6 +35,7 @@ public class x_xbitmap extends ContentHandler {
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++) {
......
......@@ -35,6 +35,7 @@ public class x_xpixmap extends ContentHandler {
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++) {
......
......@@ -434,6 +434,7 @@ public class HttpsURLConnectionImpl
return delegate.getContent();
}
@SuppressWarnings("rawtypes")
public Object getContent(Class[] classes) throws IOException {
return delegate.getContent(classes);
}
......
......@@ -217,7 +217,7 @@ public final class MethodUtil extends SecureClassLoader {
*/
private static class Signature {
private String methodName;
private Class[] argClasses;
private Class<?>[] argClasses;
private volatile int hashCode = 0;
......@@ -299,7 +299,7 @@ public final class MethodUtil extends SecureClassLoader {
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);
......
......@@ -91,7 +91,7 @@ public class AuthPolicyFile extends javax.security.auth.Policy {
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
......
......@@ -58,7 +58,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
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;
......
......@@ -93,7 +93,7 @@ public class Main {
// 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";
......
......@@ -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 P11KEYSTORE = "PKCS11";
......
......@@ -77,9 +77,9 @@ public class PolicyTool {
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册