< prev index next >

src/share/classes/sun/rmi/rmic/newrmic/jrmp/RemoteClass.java

Print this page
rev 1388 : 6600143: Remove another 450 unnecessary casts
Reviewed-by: alanb, iris, lmalvent, bristor, peterjones, darcy, wetmore

@@ -119,11 +119,11 @@
      * The order of the array returned is arbitrary, and some elements
      * may be superfluous (i.e., superinterfaces of other interfaces
      * in the array).
      **/
     ClassDoc[] remoteInterfaces() {
-        return (ClassDoc[]) remoteInterfaces.clone();
+        return remoteInterfaces.clone();
     }
 
     /**
      * Returns an array of RemoteClass.Method objects representing all
      * of the remote methods of this remote implementation class (all

@@ -134,11 +134,11 @@
      * descriptor, so each method's index in the array corresponds to
      * its "operation number" in the JDK 1.1 version of the JRMP
      * stub/skeleton protocol.
      **/
     Method[] remoteMethods() {
-        return (Method[]) remoteMethods.clone();
+        return remoteMethods.clone();
     }
 
     /**
      * Returns the "interface hash" used to match a stub/skeleton pair
      * for this remote implementation class in the JDK 1.1 version of

@@ -557,11 +557,11 @@
          * from multiple remote interfaces, the array will contain the
          * set of exceptions declared in all of the interfaces'
          * methods that can be legally thrown by all of them.
          **/
         ClassDoc[] exceptionTypes() {
-            return (ClassDoc[]) exceptionTypes.clone();
+            return exceptionTypes.clone();
         }
 
         /**
          * Returns the JRMP "method hash" used to identify this remote
          * method in the JDK 1.2 version of the stub protocol.
< prev index next >