--- old/src/com/sun/javatest/tool/UIFactory.java 2018-06-19 01:10:17.000000000 +0100 +++ new/src/com/sun/javatest/tool/UIFactory.java 2018-06-19 01:10:17.000000000 +0100 @@ -1258,7 +1258,7 @@ * @see #createChoice(String) * @see javax.swing.JLabel#setLabelFor */ - public JComboBox createChoice(String uiKey, JLabel label) { + public JComboBox createChoice(String uiKey, JLabel label) { return createChoice(uiKey, false, label); } @@ -1275,7 +1275,7 @@ * @see #createChoice(String) * @see javax.swing.JLabel#setLabelFor */ - public JComboBox createChoice(String uiKey, boolean editable, JLabel label) { + public JComboBox createChoice(String uiKey, boolean editable, JLabel label) { JComboBox choice = new JComboBox(); choice.setName(uiKey); setToolTip(choice, uiKey); @@ -1319,8 +1319,8 @@ * @return the choice item that was created * @see #createChoice */ - public JComboBox createLiteralChoice(String uiKey, Object[] choices) { - JComboBox choice = new JComboBox(choices); + public JComboBox createLiteralChoice(String uiKey, E[] choices) { + JComboBox choice = new JComboBox<>(choices); choice.setName(uiKey); setToolTip(choice, uiKey); return choice; @@ -1458,8 +1458,8 @@ * @param uiKey the base name of the resource to be used (currently ignored) * @return the list that was created */ - public JList createList(String uiKey) { - JList list = new JList(); + public JList createList(String uiKey) { + JList list = new JList<>(); list.setName(uiKey); setAccessibleInfo(list, uiKey); return list; @@ -1478,8 +1478,8 @@ * @param model the data model for this list * @return the list that was created */ - public JList createList(String uiKey, ListModel model) { - JList list = new JList(model); + public JList createList(String uiKey, ListModel model) { + JList list = new JList<>(model); list.setName(uiKey); setAccessibleInfo(list, uiKey); return list;