--- old/src/demo/share/jfc/SwingSet2/ExampleFileView.java 2020-02-22 01:42:48.000000000 -0800 +++ new/src/demo/share/jfc/SwingSet2/ExampleFileView.java 2020-02-22 01:42:47.000000000 -0800 @@ -59,9 +59,9 @@ * @author Jeff Dinkins */ public class ExampleFileView extends FileView { - private Hashtable icons = new Hashtable(5); - private Hashtable fileDescriptions = new Hashtable(5); - private Hashtable typeDescriptions = new Hashtable(5); + private Hashtable icons = new Hashtable<>(5); + private Hashtable fileDescriptions = new Hashtable<>(5); + private Hashtable typeDescriptions = new Hashtable<>(5); /** * The name of the file. Do nothing special here. Let @@ -85,7 +85,7 @@ * @see FileView#getDescription */ public String getDescription(File f) { - return (String) fileDescriptions.get(f); + return fileDescriptions.get(f); }; /** @@ -111,7 +111,7 @@ * @see FileView#getTypeDescription */ public String getTypeDescription(File f) { - return (String) typeDescriptions.get(getExtension(f)); + return typeDescriptions.get(getExtension(f)); } /** @@ -149,7 +149,7 @@ Icon icon = null; String extension = getExtension(f); if(extension != null) { - icon = (Icon) icons.get(extension); + icon = icons.get(extension); } return icon; }