提交 e751f230 编写于 作者: J jjg

7069870: Parts of the JDK erroneously rely on generic array initializers with diamond

Reviewed-by: ksrini, mcimadamore
Contributed-by: alexandre.boulgakov@oracle.com
上级 2e2c3183
...@@ -43,8 +43,8 @@ public class JarSplit { ...@@ -43,8 +43,8 @@ public class JarSplit {
/* classlist[0] contains class file list /* classlist[0] contains class file list
* classlist[1] contains non-class file list * classlist[1] contains non-class file list
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings({ "unchecked", "rawtypes" })
private static Vector<String>[] classlist = new Vector<>[2]; private static Vector<String>[] classlist = new Vector[2];
/* The 2 class list name passed as arguments. */ /* The 2 class list name passed as arguments. */
private static String[] fileNamelist = new String[2]; private static String[] fileNamelist = new String[2];
......
...@@ -780,9 +780,9 @@ class PackageWriter extends BandStructure { ...@@ -780,9 +780,9 @@ class PackageWriter extends BandStructure {
avHiBits &= (1L<<attrIndexLimit[i])-1; avHiBits &= (1L<<attrIndexLimit[i])-1;
int nextLoBit = 0; int nextLoBit = 0;
Map<Attribute.Layout, int[]> defMap = allLayouts.get(i); Map<Attribute.Layout, int[]> defMap = allLayouts.get(i);
@SuppressWarnings("unchecked") @SuppressWarnings({ "unchecked", "rawtypes" })
Map.Entry<Attribute.Layout, int[]>[] layoutsAndCounts = Map.Entry<Attribute.Layout, int[]>[] layoutsAndCounts =
new Map.Entry<>[defMap.size()]; new Map.Entry[defMap.size()];
defMap.entrySet().toArray(layoutsAndCounts); defMap.entrySet().toArray(layoutsAndCounts);
// Sort by count, most frequent first. // Sort by count, most frequent first.
// Predefs. participate in this sort, though it does not matter. // Predefs. participate in this sort, though it does not matter.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册