--- a/jdk/src/share/classes/sun/rmi/server/Util.java Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/src/share/classes/sun/rmi/server/Util.java Fri Mar 02 13:48:43 2012 -0800
@@ -119,12 +119,12 @@
* @throws StubNotFoundException if problem locating/creating stub or
* creating the dynamic proxy instance
**/
- public static Remote createProxy(Class implClass,
+ public static Remote createProxy(Class<?> implClass,
RemoteRef clientRef,
boolean forceStubUse)
throws StubNotFoundException
{
- Class remoteClass;
+ Class<?> remoteClass;
try {
remoteClass = getRemoteClass(implClass);
@@ -162,7 +162,7 @@
*
* @param remoteClass the class to obtain remote interfaces from
*/
- private static boolean stubClassExists(Class remoteClass) {
+ private static boolean stubClassExists(Class<?> remoteClass) {
if (!withoutStubs.containsKey(remoteClass)) {
try {
Class.forName(remoteClass.getName() + "_Stub",
@@ -182,11 +182,11 @@
* @throws ClassNotFoundException if no class is found to have a
* remote interface
*/
- private static Class getRemoteClass(Class cl)
+ private static Class<?> getRemoteClass(Class<?> cl)
throws ClassNotFoundException
{
while (cl != null) {
- Class[] interfaces = cl.getInterfaces();
+ Class<?>[] interfaces = cl.getInterfaces();
for (int i = interfaces.length -1; i >= 0; i--) {
if (Remote.class.isAssignableFrom(interfaces[i]))
return cl; // this class implements remote object
@@ -206,8 +206,8 @@
* any illegal remote interfaces
* @throws NullPointerException if remoteClass is null
*/
- private static Class[] getRemoteInterfaces(Class remoteClass) {
- ArrayList<Class<?>> list = new ArrayList<Class<?>>();
+ private static Class<?>[] getRemoteInterfaces(Class<?> remoteClass) {
+ ArrayList<Class<?>> list = new ArrayList<>();
getRemoteInterfaces(list, remoteClass);
return list.toArray(new Class<?>[list.size()]);
}
@@ -220,15 +220,15 @@
* any illegal remote interfaces
* @throws NullPointerException if the specified class or list is null
*/
- private static void getRemoteInterfaces(ArrayList<Class<?>> list, Class cl) {
- Class superclass = cl.getSuperclass();
+ private static void getRemoteInterfaces(ArrayList<Class<?>> list, Class<?> cl) {
+ Class<?> superclass = cl.getSuperclass();
if (superclass != null) {
getRemoteInterfaces(list, superclass);
}
- Class[] interfaces = cl.getInterfaces();
+ Class<?>[] interfaces = cl.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
- Class intf = interfaces[i];
+ Class<?> intf = interfaces[i];
/*
* If it is a remote interface (if it extends from
* java.rmi.Remote) and is not already in the list,
@@ -272,7 +272,7 @@
* the stub class is initiated from class loader of the specified class
* (which may be the bootstrap class loader).
**/
- private static RemoteStub createStub(Class remoteClass, RemoteRef ref)
+ private static RemoteStub createStub(Class<?> remoteClass, RemoteRef ref)
throws StubNotFoundException
{
String stubname = remoteClass.getName() + "_Stub";
@@ -285,7 +285,7 @@
try {
Class<?> stubcl =
Class.forName(stubname, false, remoteClass.getClassLoader());
- Constructor cons = stubcl.getConstructor(stubConsParamTypes);
+ Constructor<?> cons = stubcl.getConstructor(stubConsParamTypes);
return (RemoteStub) cons.newInstance(new Object[] { ref });
} catch (ClassNotFoundException e) {
@@ -315,7 +315,7 @@
static Skeleton createSkeleton(Remote object)
throws SkeletonNotFoundException
{
- Class cl;
+ Class<?> cl;
try {
cl = getRemoteClass(object.getClass());
} catch (ClassNotFoundException ex ) {
@@ -327,7 +327,7 @@
// now try to load the skeleton based ont he name of the class
String skelname = cl.getName() + "_Skel";
try {
- Class skelcl = Class.forName(skelname, false, cl.getClassLoader());
+ Class<?> skelcl = Class.forName(skelname, false, cl.getClassLoader());
return (Skeleton)skelcl.newInstance();
} catch (ClassNotFoundException ex) {
@@ -391,12 +391,12 @@
private static String getMethodNameAndDescriptor(Method m) {
StringBuffer desc = new StringBuffer(m.getName());
desc.append('(');
- Class[] paramTypes = m.getParameterTypes();
+ Class<?>[] paramTypes = m.getParameterTypes();
for (int i = 0; i < paramTypes.length; i++) {
desc.append(getTypeDescriptor(paramTypes[i]));
}
desc.append(')');
- Class returnType = m.getReturnType();
+ Class<?> returnType = m.getReturnType();
if (returnType == void.class) { // optimization: handle void here
desc.append('V');
} else {
@@ -409,7 +409,7 @@
* Get the descriptor of a particular type, as appropriate for either
* a parameter or return type in a method descriptor.
*/
- private static String getTypeDescriptor(Class type) {
+ private static String getTypeDescriptor(Class<?> type) {
if (type.isPrimitive()) {
if (type == int.class) {
return "I";
@@ -454,7 +454,7 @@
* top-level type (and perhaps other enclosing types), the
* separator will be '$', etc.
**/
- public static String getUnqualifiedName(Class c) {
+ public static String getUnqualifiedName(Class<?> c) {
String binaryName = c.getName();
return binaryName.substring(binaryName.lastIndexOf('.') + 1);
}