< 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,201 **** 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()); listData.addElement(conn.getName()); } activeAgentPool.addObserver(this); enableFields(); --- 190,201 ---- 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<Connection> e = activeAgentPool.elements(); e.hasMoreElements(); ) { ! Connection conn = e.nextElement(); listData.addElement(conn.getName()); } activeAgentPool.addObserver(this); enableFields();
*** 355,365 **** 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) { String name = o.toString(); return super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus); } }); --- 355,365 ---- 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) { String name = o.toString(); return super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus); } });
< prev index next >