< prev index next >

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

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

@@ -190,12 +190,12 @@
             add(uif.createScrollPane(list), c);
 
             // Ensure any existing entries in the pool are displayed
             // Note there is a slight synchronization window between the call of
             // elements and that of addObserver.
-            for (Enumeration e = activeAgentPool.elements(); e.hasMoreElements(); ) {
-                Connection conn = (Connection)(e.nextElement());
+            for (Enumeration<Connection> e = activeAgentPool.elements(); e.hasMoreElements(); ) {
+                Connection conn = e.nextElement();
                 listData.addElement(conn.getName());
             }
 
             activeAgentPool.addObserver(this);
             enableFields();

@@ -355,11 +355,11 @@
             listData = new DefaultListModel<>();
             list = uif.createList("tool.list.curr", listData);
             list.setVisibleRowCount(5);
 
             list.setCellRenderer(new DefaultListCellRenderer() {
-                public Component getListCellRendererComponent(JList list, Object o, int index, boolean isSelected, boolean cellHasFocus) {
+                public Component getListCellRendererComponent(JList<?> list, Object o, int index, boolean isSelected, boolean cellHasFocus) {
                     String name = o.toString();
                     return super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus);
                 }
             });
 
< prev index next >