src/share/classes/sun/rmi/rmic/RMIGenerator.java

Print this page

        

@@ -59,11 +59,11 @@
  *
  * @author      Peter Jones,  Bryan Atsatt
  */
 public class RMIGenerator implements RMIConstants, Generator {
 
-    private static final Hashtable<String, Integer> versionOptions = new Hashtable<>();
+    private static final Hashtable versionOptions = new Hashtable();
     static {
         versionOptions.put("-v1.1", new Integer(STUB_VERSION_1_1));
         versionOptions.put("-vcompat", new Integer(STUB_VERSION_FAT));
         versionOptions.put("-v1.2", new Integer(STUB_VERSION_1_2));
     }

@@ -94,11 +94,11 @@
                         main.error("rmic.cannot.use.both",
                                    explicitVersion, arg);
                         return false;
                     }
                     explicitVersion = arg;
-                    version = versionOptions.get(arg);
+                    version = ((Integer) versionOptions.get(arg)).intValue();
                     argv[i] = null;
                 }
             }
         }
         return true;

@@ -517,11 +517,11 @@
          * here, because javac will flag an error if there are any
          * unreachable catch blocks, i.e. if the catch of an exception class
          * follows a previous catch of it or of one of its superclasses.
          * The following method invocation takes care of these details.
          */
-        Vector<ClassDefinition> catchList = computeUniqueCatchList(exceptions);
+        Vector catchList = computeUniqueCatchList(exceptions);
 
         /*
          * If we need to catch any particular exceptions (i.e. this method
          * does not declare java.lang.Exception), put the entire stub
          * method in a try block.

@@ -613,14 +613,14 @@
          * If we need to catch any particular exceptions, finally write
          * the catch blocks for them, rethrow any other Exceptions with an
          * UnexpectedException, and end the try block.
          */
         if (catchList.size() > 0) {
-            for (Enumeration<ClassDefinition> enumeration = catchList.elements();
+            for (Enumeration enumeration = catchList.elements();
                  enumeration.hasMoreElements();)
             {
-                ClassDefinition def = enumeration.nextElement();
+                ClassDefinition def = (ClassDefinition) enumeration.nextElement();
                 p.pOlnI("} catch (" + def.getName() + " e) {");
                 p.pln("throw e;");
             }
             p.pOlnI("} catch (java.lang.Exception e) {");
             p.pln("throw new " + idUnexpectedException +

@@ -648,12 +648,12 @@
      *
      * The returned Vector will be empty if java.lang.Exception or one
      * of its superclasses is in the throws clause of the method, indicating
      * that no exceptions need to be caught.
      */
-    private Vector<ClassDefinition> computeUniqueCatchList(ClassDeclaration[] exceptions) {
-        Vector<ClassDefinition> uniqueList = new Vector<>();       // unique exceptions to catch
+    private Vector computeUniqueCatchList(ClassDeclaration[] exceptions) {
+        Vector uniqueList = new Vector();       // unique exceptions to catch
 
         uniqueList.addElement(defRuntimeException);
         uniqueList.addElement(defRemoteException);
 
         /* For each exception declared by the stub method's throws clause: */

@@ -680,11 +680,12 @@
                 /*
                  * Compare this exception against the current list of
                  * exceptions that need to be caught:
                  */
                 for (int j = 0; j < uniqueList.size();) {
-                    ClassDefinition def = uniqueList.elementAt(j);
+                    ClassDefinition def =
+                        (ClassDefinition) uniqueList.elementAt(j);
                     if (def.superClassOf(env, decl)) {
                         /*
                          * If a superclass of this exception is already on
                          * the list to catch, then ignore and continue;
                          */