--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java 2015-04-22 17:43:38.371422443 -0700 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java 2015-04-22 17:43:38.199422439 -0700 @@ -829,7 +829,7 @@ maxFlags = new int[ATTR_CONTEXT_LIMIT]; allLayouts = new FixedList<>(ATTR_CONTEXT_LIMIT); for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) { - allLayouts.set(i, new HashMap()); + allLayouts.set(i, new HashMap<>()); } // Collect maxFlags and allLayouts. for (Class cls : pkg.classes) { @@ -892,7 +892,7 @@ // Sort by count, most frequent first. // Predefs. participate in this sort, though it does not matter. Arrays.sort(layoutsAndCounts, - new Comparator>() { + new Comparator<>() { public int compare(Map.Entry e0, Map.Entry e1) { // Primary sort key is count, reversed. @@ -1010,7 +1010,7 @@ int numAttrDefs = defList.size(); Object[][] defs = new Object[numAttrDefs][]; defList.toArray(defs); - Arrays.sort(defs, new Comparator() { + Arrays.sort(defs, new Comparator<>() { public int compare(Object[] a0, Object[] a1) { // Primary sort key is attr def header. @SuppressWarnings("unchecked")