< prev index next >

src/com/sun/javatest/agent/SerialPortModeOptions.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

@@ -44,11 +44,11 @@
 class SerialPortModeOptions extends ModeOptions {
     SerialPortModeOptions() {
         super("serial port");
 
         try {
-            Class c = Class.forName(Proxy.class.getName() + "Impl");
+            Class<?> c = Class.forName(Proxy.class.getName() + "Impl");
             proxy = (Proxy)(c.newInstance());
         }
         catch (Throwable ignore) {
             // leave proxy unset if we can't load the class, and cope with it later
         }

@@ -110,11 +110,11 @@
 
 class ProxyImpl implements Proxy {
     public String[] getPortNames() {
         try {
             Vector<String> v = new Vector<>();
-            for (Enumeration e = CommPortIdentifier.getPortIdentifiers(); e.hasMoreElements(); ) {
+            for (Enumeration<?> e = CommPortIdentifier.getPortIdentifiers(); e.hasMoreElements(); ) {
                 CommPortIdentifier p = (CommPortIdentifier)(e.nextElement());
                 if (p.getPortType() == CommPortIdentifier.PORT_SERIAL)
                     v.addElement(p.getName());
             }
             String[] a = new String[v.size()];
< prev index next >