# HG changeset patch # User jjg # Date 1311636039 25200 # Node ID 8186b34994055919f6812052bcb55f2bbcdfe7d4 # Parent c59ce1c5c167650809c05a71731d017eb6ec4ba4 7069870: Parts of the JDK erroneously rely on generic array initializers with diamond Reviewed-by: ksrini, mcimadamore Contributed-by: alexandre.boulgakov@oracle.com diff -r c59ce1c5c167 -r 8186b3499405 jdk/make/tools/src/build/tools/jarsplit/JarSplit.java --- a/jdk/make/tools/src/build/tools/jarsplit/JarSplit.java Mon Jul 25 14:35:13 2011 -0700 +++ b/jdk/make/tools/src/build/tools/jarsplit/JarSplit.java Mon Jul 25 16:20:39 2011 -0700 @@ -43,8 +43,8 @@ /* classlist[0] contains class file list * classlist[1] contains non-class file list */ - @SuppressWarnings("unchecked") - private static Vector[] classlist = new Vector<>[2]; + @SuppressWarnings({ "unchecked", "rawtypes" }) + private static Vector[] classlist = new Vector[2]; /* The 2 class list name passed as arguments. */ private static String[] fileNamelist = new String[2]; diff -r c59ce1c5c167 -r 8186b3499405 jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java --- a/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java Mon Jul 25 14:35:13 2011 -0700 +++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java Mon Jul 25 16:20:39 2011 -0700 @@ -780,9 +780,9 @@ avHiBits &= (1L< defMap = allLayouts.get(i); - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "rawtypes" }) Map.Entry[] layoutsAndCounts = - new Map.Entry<>[defMap.size()]; + new Map.Entry[defMap.size()]; defMap.entrySet().toArray(layoutsAndCounts); // Sort by count, most frequent first. // Predefs. participate in this sort, though it does not matter.