--- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java @@ -103,9 +103,9 @@ return this.def.compareTo(that.def); } - private static final Map, List> canonLists = new HashMap<>(); - private static final Map attributes = new HashMap<>(); - private static final Map standardDefs = new HashMap<>(); + private static final Map, List> canonLists = new HashMap, List>(); + private static final Map attributes = new HashMap(); + private static final Map standardDefs = new HashMap(); // Canonicalized lists of trivial attrs (Deprecated, etc.) // are used by trimToSize, in order to reduce footprint @@ -115,7 +115,7 @@ synchronized (canonLists) { List cl = canonLists.get(al); if (cl == null) { - cl = new ArrayList<>(al.size()); + cl = new ArrayList(al.size()); cl.addAll(al); cl = Collections.unmodifiableList(cl); canonLists.put(al, cl); @@ -336,9 +336,9 @@ public void addAttribute(Attribute a) { if (attributes == null) - attributes = new ArrayList<>(3); + attributes = new ArrayList(3); else if (!(attributes instanceof ArrayList)) - attributes = new ArrayList<>(attributes); // unfreeze it + attributes = new ArrayList(attributes); // unfreeze it attributes.add(a); } @@ -346,7 +346,7 @@ if (attributes == null) return null; if (!attributes.contains(a)) return null; if (!(attributes instanceof ArrayList)) - attributes = new ArrayList<>(attributes); // unfreeze it + attributes = new ArrayList(attributes); // unfreeze it attributes.remove(a); return a; } @@ -838,7 +838,7 @@ */ static //private Layout.Element[] tokenizeLayout(Layout self, int curCble, String layout) { - List col = new ArrayList<>(layout.length()); + List col = new ArrayList(layout.length()); tokenizeLayout(self, curCble, layout, col); Layout.Element[] res = new Layout.Element[col.size()]; col.toArray(res); @@ -903,7 +903,7 @@ case 'T': // union: 'T' any_int union_case* '(' ')' '[' body ']' kind = EK_UN; i = tokenizeSInt(e, layout, i); - List cases = new ArrayList<>(); + List cases = new ArrayList(); for (;;) { // Keep parsing cases until we hit the default case. if (layout.charAt(i++) != '(') @@ -1057,7 +1057,7 @@ } static //private String[] splitBodies(String layout) { - List bodies = new ArrayList<>(); + List bodies = new ArrayList(); // Parse several independent layout bodies: "[foo][bar]...[baz]" for (int i = 0; i < layout.length(); i++) { if (layout.charAt(i++) != '[') --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java @@ -257,7 +257,7 @@ assert(basicCodings[_meta_default] == null); assert(basicCodings[_meta_canon_min] != null); assert(basicCodings[_meta_canon_max] != null); - Map map = new HashMap<>(); + Map map = new HashMap(); for (int i = 0; i < basicCodings.length; i++) { Coding c = basicCodings[i]; if (c == null) continue; @@ -1068,8 +1068,8 @@ // Bootstrap support for CPRefBands. These are needed to record // intended CP indexes, before the CP has been created. - private final List allKQBands = new ArrayList<>(); - private List needPredefIndex = new ArrayList<>(); + private final List allKQBands = new ArrayList(); + private List needPredefIndex = new ArrayList(); int encodeRef(Entry e, Index ix) { @@ -1704,7 +1704,7 @@ protected int attrClassFileVersionMask; // Mapping from Attribute.Layout to Band[] (layout element bands). - protected Map attrBandTable = new HashMap<>(); + protected Map attrBandTable = new HashMap(); // Well-known attributes: protected final Attribute.Layout attrCodeEmpty; @@ -1713,16 +1713,16 @@ protected final Attribute.Layout attrConstantValue; // Mapping from Attribute.Layout to Integer (inverse of attrDefs) - Map attrIndexTable = new HashMap<>(); + Map attrIndexTable = new HashMap(); // Mapping from attribute index (<32 are flag bits) to attributes. protected List> attrDefs = - new FixedList<>(ATTR_CONTEXT_LIMIT); + new FixedList>(ATTR_CONTEXT_LIMIT); { for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) { assert(attrIndexLimit[i] == 0); attrIndexLimit[i] = 32; // just for the sake of predefs. - attrDefs.set(i, new ArrayList<>(Collections.nCopies( + attrDefs.set(i, new ArrayList(Collections.nCopies( attrIndexLimit[i], (Attribute.Layout)null))); } @@ -1912,7 +1912,7 @@ protected List getPredefinedAttrs(int ctype) { assert(attrIndexLimit[ctype] != 0); - List res = new ArrayList<>(attrIndexLimit[ctype]); + List res = new ArrayList(attrIndexLimit[ctype]); // Remove nulls and non-predefs. for (int ai = 0; ai < attrIndexLimit[ctype]; ai++) { if (testBit(attrDefSeen[ctype], 1L<(); + prevForAssertMap = new HashMap(); prevForAssertMap.put(b, p); return true; } --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java @@ -466,7 +466,7 @@ void readInnerClasses(Class cls) throws IOException { int nc = readUnsignedShort(); - ArrayList ics = new ArrayList<>(nc); + ArrayList ics = new ArrayList(nc); for (int i = 0; i < nc; i++) { InnerClass ic = new InnerClass(readClassRef(), --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java @@ -402,7 +402,7 @@ private static Map codeMap; private static synchronized Coding of(int B, int H, int S, int del) { - if (codeMap == null) codeMap = new HashMap<>(); + if (codeMap == null) codeMap = new HashMap(); Coding x0 = new Coding(B, H, S, del); Coding x1 = codeMap.get(x0); if (x1 == null) codeMap.put(x0, x1 = x0); --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java @@ -743,9 +743,9 @@ // Steps 1/2/3 are interdependent, and may be iterated. // Steps 4 and 5 may be decided independently afterward. int[] LValuesCoded = PopulationCoding.LValuesCoded; - List bestFits = new ArrayList<>(); - List fullFits = new ArrayList<>(); - List longFits = new ArrayList<>(); + List bestFits = new ArrayList(); + List fullFits = new ArrayList(); + List longFits = new ArrayList(); final int PACK_TO_MAX_S = 1; if (bestPopFVC <= 255) { bestFits.add(BandStructure.BYTE1); @@ -785,7 +785,7 @@ } } } - List allFits = new ArrayList<>(); + List allFits = new ArrayList(); for (Iterator i = bestFits.iterator(), j = fullFits.iterator(), k = longFits.iterator(); @@ -1230,10 +1230,10 @@ Histogram hist = getValueHistogram(); int fVlen = stressLen(hist.getTotalLength()); if (fVlen == 0) return coding; - List popvals = new ArrayList<>(); + List popvals = new ArrayList(); if (stress.nextBoolean()) { // Build the population from the value list. - Set popset = new HashSet<>(); + Set popset = new HashSet(); for (int i = start; i < end; i++) { if (popset.add(values[i])) popvals.add(values[i]); } --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java @@ -915,7 +915,7 @@ public static Index[] partition(Index ix, int[] keys) { // %%% Should move this into class Index. - List> parts = new ArrayList<>(); + List> parts = new ArrayList>(); Entry[] cpMap = ix.cpMap; assert(keys.length == cpMap.length); for (int i = 0; i < keys.length; i++) { @@ -926,7 +926,7 @@ } List part = parts.get(key); if (part == null) { - parts.set(key, part = new ArrayList<>()); + parts.set(key, part = new ArrayList()); } part.add(cpMap[i]); } @@ -1133,7 +1133,7 @@ void completeReferencesIn(Set cpRefs, boolean flattenSigs) { cpRefs.remove(null); for (ListIterator work = - new ArrayList<>(cpRefs).listIterator(cpRefs.size()); + new ArrayList(cpRefs).listIterator(cpRefs.size()); work.hasPrevious(); ) { Entry e = work.previous(); work.remove(); // pop stack --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java @@ -59,7 +59,7 @@ ResourceBundle.getBundle("com.sun.java.util.jar.pack.DriverResource"); public static void main(String[] ava) throws IOException { - List av = new ArrayList<>(Arrays.asList(ava)); + List av = new ArrayList(Arrays.asList(ava)); boolean doPack = true; boolean doUnpack = false; @@ -82,7 +82,7 @@ } // Collect engine properties here: - Map engProps = new HashMap<>(); + Map engProps = new HashMap(); engProps.put(verboseProp, System.getProperty(verboseProp)); String optionMap; @@ -96,7 +96,7 @@ } // Collect argument properties here: - Map avProps = new HashMap<>(); + Map avProps = new HashMap(); try { for (;;) { String state = parseCommandOptions(av, optionMap, avProps); @@ -530,7 +530,7 @@ String resultString = null; // Convert options string into optLines dictionary. - TreeMap optmap = new TreeMap<>(); + TreeMap optmap = new TreeMap(); loadOptmap: for (String optline : options.split("\n")) { String[] words = optline.split("\\p{Space}+"); --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java @@ -45,7 +45,7 @@ private final ArrayList flist; protected FixedList(int capacity) { - flist = new ArrayList<>(capacity); + flist = new ArrayList(capacity); // initialize the list to null for (int i = 0 ; i < capacity ; i++) { flist.add(null); --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Fixups.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Fixups.java @@ -126,11 +126,11 @@ public void setBytes(byte[] newBytes) { if (bytes == newBytes) return; ArrayList old = null; - assert((old = new ArrayList<>(this)) != null); + assert((old = new ArrayList(this)) != null); if (bytes == null || newBytes == null) { // One or the other representations is deficient. // Construct a checkpoint. - ArrayList save = new ArrayList<>(this); + ArrayList save = new ArrayList(this); clear(); bytes = newBytes; addAll(save); @@ -138,7 +138,7 @@ // assume newBytes is some sort of bitwise copy of the old bytes bytes = newBytes; } - assert(old.equals(new ArrayList<>(this))); + assert(old.equals(new ArrayList(this))); } static final int LOC_SHIFT = 1; --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java @@ -112,7 +112,7 @@ public static final Attribute.Layout attrSourceFileSpecial; public static final Map attrDefs; static { - Map ad = new HashMap<>(3); + Map ad = new HashMap(3); attrCodeEmpty = Attribute.define(ad, ATTR_CONTEXT_METHOD, "Code", "").layout(); attrInnerClassesEmpty = Attribute.define(ad, ATTR_CONTEXT_CLASS, @@ -181,7 +181,7 @@ } } - ArrayList classes = new ArrayList<>(); + ArrayList classes = new ArrayList(); public List getClasses() { return classes; @@ -263,7 +263,7 @@ if (olda == null) return; // no SourceFile attr. String obvious = getObviousSourceFile(); - List ref = new ArrayList<>(1); + List ref = new ArrayList(1); olda.visitRefs(this, VRM_PACKAGE, ref); Utf8Entry sfName = (Utf8Entry) ref.get(0); Attribute a = olda; @@ -291,7 +291,7 @@ if (a != olda) { if (verbose > 2) Utils.log.fine("recoding obvious SourceFile="+obvious); - List newAttrs = new ArrayList<>(getAttributes()); + List newAttrs = new ArrayList(getAttributes()); int where = newAttrs.indexOf(olda); newAttrs.set(where, a); setAttributes(newAttrs); @@ -321,7 +321,7 @@ } public void setInnerClasses(Collection ics) { - innerClasses = (ics == null) ? null : new ArrayList<>(ics); + innerClasses = (ics == null) ? null : new ArrayList(ics); // Edit the attribute list, if necessary. Attribute a = getAttribute(attrInnerClassesEmpty); if (innerClasses != null && a == null) @@ -340,7 +340,7 @@ * with that of Package.this.allInnerClasses. */ public List computeGloballyImpliedICs() { - Set cpRefs = new HashSet<>(); + Set cpRefs = new HashSet(); { // This block temporarily displaces this.innerClasses. ArrayList innerClassesSaved = innerClasses; innerClasses = null; // ignore for the moment @@ -349,7 +349,7 @@ } ConstantPool.completeReferencesIn(cpRefs, true); - Set icRefs = new HashSet<>(); + Set icRefs = new HashSet(); for (Entry e : cpRefs) { // Restrict cpRefs to InnerClasses entries only. if (!(e instanceof ClassEntry)) continue; @@ -365,7 +365,7 @@ // This loop is structured this way so as to accumulate // entries into impliedICs in an order which reflects // the order of allInnerClasses. - ArrayList impliedICs = new ArrayList<>(); + ArrayList impliedICs = new ArrayList(); for (InnerClass ic : allInnerClasses) { // This one is locally relevant if it describes // a member of the current class, or if the current @@ -408,8 +408,8 @@ // Diff is A since I is empty. } // (I*A) is non-trivial - Set center = new HashSet<>(actualICs); - center.retainAll(new HashSet<>(impliedICs)); + Set center = new HashSet(actualICs); + center.retainAll(new HashSet(impliedICs)); impliedICs.addAll(actualICs); impliedICs.removeAll(center); // Diff is now I^A = (I+A)-(I*A). @@ -538,7 +538,7 @@ super(flags, descriptor); assert(!descriptor.isMethod()); if (fields == null) - fields = new ArrayList<>(); + fields = new ArrayList(); boolean added = fields.add(this); assert(added); order = fields.size(); @@ -563,7 +563,7 @@ super(flags, descriptor); assert(descriptor.isMethod()); if (methods == null) - methods = new ArrayList<>(); + methods = new ArrayList(); boolean added = methods.add(this); assert(added); } @@ -728,14 +728,14 @@ } // What non-class files are in this unit? - ArrayList files = new ArrayList<>(); + ArrayList files = new ArrayList(); public List getFiles() { return files; } public List getClassStubs() { - List classStubs = new ArrayList<>(classes.size()); + List classStubs = new ArrayList(classes.size()); for (Class cls : classes) { assert(cls.file.isClassStub()); classStubs.add(cls.file); @@ -749,7 +749,7 @@ int modtime = NO_MODTIME; int options = 0; // random flag bits, such as deflate_hint Class stubClass; // if this is a stub, here's the class - ArrayList prepend = new ArrayList<>(); // list of byte[] + ArrayList prepend = new ArrayList(); // list of byte[] java.io.ByteArrayOutputStream append = new ByteArrayOutputStream(); File(Utf8Entry name) { @@ -852,7 +852,7 @@ public InputStream getInputStream() { InputStream in = new ByteArrayInputStream(append.toByteArray()); if (prepend.isEmpty()) return in; - List isa = new ArrayList<>(prepend.size()+1); + List isa = new ArrayList(prepend.size()+1); for (byte[] bytes : prepend) { isa.add(new ByteArrayInputStream(bytes)); } @@ -888,7 +888,7 @@ } // Is there a globally declared table of inner classes? - List allInnerClasses = new ArrayList<>(); + List allInnerClasses = new ArrayList(); Map allInnerClassesByThis; public @@ -903,7 +903,7 @@ allInnerClasses.addAll(ics); // Make an index: - allInnerClassesByThis = new HashMap<>(allInnerClasses.size()); + allInnerClassesByThis = new HashMap(allInnerClasses.size()); for (InnerClass ic : allInnerClasses) { Object pic = allInnerClassesByThis.put(ic.thisClass, ic); assert(pic == null); // caller must ensure key uniqueness! @@ -1290,7 +1290,7 @@ // Use this before writing the class files. void ensureAllClassFiles() { - Set fileSet = new HashSet<>(files); + Set fileSet = new HashSet(files); for (Class cls : classes) { // Add to the end of ths list: if (!fileSet.contains(cls.file)) --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java @@ -686,7 +686,7 @@ cp_Signature_classes.expectLength(getIntTotal(numSigClasses)); cp_Signature_classes.readFrom(in); cp_Signature_classes.setIndex(getCPIndex(CONSTANT_Class)); - utf8Signatures = new HashMap<>(); + utf8Signatures = new HashMap(); for (int i = 0; i < cpMap.length; i++) { Utf8Entry formRef = (Utf8Entry) cp_Signature_form.getRef(); ClassEntry[] classRefs = new ClassEntry[numSigClasses[i]]; @@ -892,7 +892,7 @@ ic_name.expectLength(longICCount); ic_name.readFrom(in); ic_flags.resetForSecondPass(); - List icList = new ArrayList<>(numInnerClasses); + List icList = new ArrayList(numInnerClasses); for (int i = 0; i < numInnerClasses; i++) { int flags = ic_flags.getInt(); boolean longForm = (flags & ACC_IC_LONG_FORM) != 0; @@ -934,7 +934,7 @@ void readLocalInnerClasses(Class cls) throws IOException { int nc = class_InnerClasses_N.getInt(); - List localICs = new ArrayList<>(nc); + List localICs = new ArrayList(nc); for (int i = 0; i < nc; i++) { ClassEntry thisClass = (ClassEntry) class_InnerClasses_RC.getRef(); int flags = class_InnerClasses_F.getInt(); @@ -1062,7 +1062,7 @@ Entry[] reconstructLocalCPMap(Class cls) { Set ldcRefs = ldcRefMap.get(cls); - Set cpRefs = new HashSet<>(); + Set cpRefs = new HashSet(); // look for constant pool entries: cls.visitRefs(VRM_CLASSIC, cpRefs); @@ -1167,7 +1167,7 @@ method_descr.expectLength(totalNM); if (verbose > 1) Utils.log.fine("expecting #fields="+totalNF+" and #methods="+totalNM+" in #classes="+numClasses); - List fields = new ArrayList<>(totalNF); + List fields = new ArrayList(totalNF); field_descr.readFrom(in); for (int i = 0; i < classes.length; i++) { Class c = classes[i]; @@ -1183,7 +1183,7 @@ countAndReadAttrs(ATTR_CONTEXT_FIELD, fields); fields = null; // release to GC - List methods = new ArrayList<>(totalNM); + List methods = new ArrayList(totalNM); method_descr.readFrom(in); for (int i = 0; i < classes.length; i++) { Class c = classes[i]; @@ -1206,10 +1206,10 @@ Code[] allCodes; List codesWithFlags; - Map> ldcRefMap = new HashMap<>(); + Map> ldcRefMap = new HashMap>(); Code[] buildCodeAttrs(List methods) { - List codes = new ArrayList<>(methods.size()); + List codes = new ArrayList(methods.size()); for (Class.Method m : methods) { if (m.getAttribute(attrCodeEmpty) != null) { m.code = new Code(m); @@ -1233,7 +1233,7 @@ boolean attrsOK = testBit(archiveOptions, AO_HAVE_ALL_CODE_FLAGS); code_headers.expectLength(allCodes.length); code_headers.readFrom(in); - List longCodes = new ArrayList<>(allCodes.length / 10); + List longCodes = new ArrayList(allCodes.length / 10); for (int i = 0; i < allCodes.length; i++) { Code c = allCodes[i]; int sc = code_headers.getByte(); @@ -1472,7 +1472,7 @@ bits -= (1L< ha = new ArrayList<>(nfa + noa); + List ha = new ArrayList(nfa + noa); h.attributes = ha; bits = attrBits; // iterate again for (int ai = 0; bits != 0; ai++) { @@ -1596,7 +1596,7 @@ void readAttrs(int ctype, Collection holders) throws IOException { // Decode band values into attributes. - Set sawDefs = new HashSet<>(); + Set sawDefs = new HashSet(); ByteArrayOutputStream buf = new ByteArrayOutputStream(); for (final Attribute.Holder h : holders) { if (h.attributes == null) continue; @@ -1799,7 +1799,7 @@ // scratch buffer for collecting code:: byte[] buf = new byte[1<<12]; // record of all switch opcodes (these are variable-length) - List allSwitchOps = new ArrayList<>(); + List allSwitchOps = new ArrayList(); for (int k = 0; k < allCodes.length; k++) { Code c = allCodes[k]; scanOneMethod: @@ -1915,7 +1915,7 @@ Set ldcRefSet = ldcRefMap.get(curClass); if (ldcRefSet == null) - ldcRefMap.put(curClass, ldcRefSet = new HashSet<>()); + ldcRefMap.put(curClass, ldcRefSet = new HashSet()); ClassEntry thisClass = curClass.thisClass; ClassEntry superClass = curClass.superClass; --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java @@ -116,7 +116,7 @@ int[][] attrCounts; // count attr. occurences void setup() { - requiredEntries = new HashSet<>(); + requiredEntries = new HashSet(); setArchiveOptions(); trimClassAttributes(); collectAttributeLayouts(); @@ -176,7 +176,7 @@ } } // Decide on default version number (majority rule). - Map verCounts = new HashMap<>(); + Map verCounts = new HashMap(); int bestCount = 0; int bestVersion = -1; for (Class cls : pkg.classes) { @@ -728,7 +728,7 @@ void collectAttributeLayouts() { maxFlags = new int[ATTR_CONTEXT_LIMIT]; - allLayouts = new FixedList<>(ATTR_CONTEXT_LIMIT); + allLayouts = new FixedList>(ATTR_CONTEXT_LIMIT); for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) { allLayouts.set(i, new HashMap()); } @@ -773,7 +773,7 @@ } // Collect counts for both predefs. and custom defs. // Decide on custom, local attribute definitions. - backCountTable = new HashMap<>(); + backCountTable = new HashMap(); attrCounts = new int[ATTR_CONTEXT_LIMIT][]; for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) { // Now the remaining defs in allLayouts[i] need attr. indexes. @@ -888,7 +888,7 @@ Attribute.Layout[] attrDefsWritten; void writeAttrDefs() throws IOException { - List defList = new ArrayList<>(); + List defList = new ArrayList(); for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) { int limit = attrDefs.get(i).size(); for (int j = 0; j < limit; j++) { @@ -1005,7 +1005,7 @@ void collectInnerClasses() { // Capture inner classes, removing them from individual classes. // Irregular inner classes must stay local, though. - Map allICMap = new HashMap<>(); + Map allICMap = new HashMap(); // First, collect a consistent global set. for (Class cls : pkg.classes) { if (!cls.hasInnerClasses()) continue; --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java @@ -181,8 +181,8 @@ final Map attrDefs; final Map attrCommands; { - Map lattrDefs = new HashMap<>(); - Map lattrCommands = new HashMap<>(); + Map lattrDefs = new HashMap(); + Map lattrCommands = new HashMap(); String[] keys = { Pack200.Packer.CLASS_ATTRIBUTE_PFX, Pack200.Packer.FIELD_ATTRIBUTE_PFX, @@ -590,7 +590,7 @@ assert(pkg.files.containsAll(pkg.getClassStubs())); // Order of stubs in file list must agree with classes. List res = pkg.files; - assert((res = new ArrayList<>(pkg.files)) + assert((res = new ArrayList(pkg.files)) .retainAll(pkg.getClassStubs()) || true); assert(res.equals(pkg.getClassStubs())); } @@ -623,7 +623,7 @@ List scanJar(JarFile jf) throws IOException { // Collect jar entries, preserving order. - List inFiles = new ArrayList<>(); + List inFiles = new ArrayList(); try { for (JarEntry je : Collections.list(jf.entries())) { InFile inFile = new InFile(jf, je); --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PopulationCoding.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PopulationCoding.java @@ -309,7 +309,7 @@ // As each new value is added, we assert that the value // was not already in the set. Set uniqueValuesForDebug = null; - assert((uniqueValuesForDebug = new HashSet<>()) != null); + assert((uniqueValuesForDebug = new HashSet()) != null); int fillp = 1; maxForDebug += fillp; int min = Integer.MIN_VALUE; // farthest from the center --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PropMap.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PropMap.java @@ -47,8 +47,8 @@ */ final class PropMap implements SortedMap { - private final TreeMap theMap = new TreeMap<>();; - private final List listenerList = new ArrayList<>(1); + private final TreeMap theMap = new TreeMap();; + private final List listenerList = new ArrayList(1); void addListener(PropertyChangeListener listener) { listenerList.add(listener); @@ -187,7 +187,7 @@ // Get sequence of props for "prefix", and "prefix.*". List getProperties(String prefix) { Collection values = prefixMap(prefix).values(); - List res = new ArrayList<>(values.size()); + List res = new ArrayList(values.size()); res.addAll(values); while (res.remove(null)); return res; --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/TLGlobals.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/TLGlobals.java @@ -58,12 +58,12 @@ private final Map memberEntries; TLGlobals() { - utf8Entries = new HashMap<>(); - classEntries = new HashMap<>(); - literalEntries = new HashMap<>(); - signatureEntries = new HashMap<>(); - descriptorEntries = new HashMap<>(); - memberEntries = new HashMap<>(); + utf8Entries = new HashMap(); + classEntries = new HashMap(); + literalEntries = new HashMap(); + signatureEntries = new HashMap(); + descriptorEntries = new HashMap(); + memberEntries = new HashMap(); props = new PropMap(); } --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java @@ -232,7 +232,7 @@ props.setProperty(java.util.jar.Pack200.Unpacker.PROGRESS,"50"); pkg.ensureAllClassFiles(); // Now write out the files. - Set classesToWrite = new HashSet<>(pkg.getClasses()); + Set classesToWrite = new HashSet(pkg.getClasses()); for (Package.File file : pkg.getFiles()) { String name = file.nameString; JarEntry je = new JarEntry(Utils.getJarEntryName(name)); --- openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Utils.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Utils.java @@ -132,7 +132,7 @@ // Keep a TLS point to the global data and environment. // This makes it simpler to supply environmental options // to the engine code, especially the native code. - static final ThreadLocal currentInstance = new ThreadLocal<>(); + static final ThreadLocal currentInstance = new ThreadLocal(); // convenience methods to access the TL globals static TLGlobals getTLGlobals() { --- openjdk-boot/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java @@ -1284,7 +1284,7 @@ */ public Collection toCollection() throws SQLException { - TreeMap tMap = new TreeMap<>(); + TreeMap tMap = new TreeMap(); for (int i = 0; i toCollection(int column) throws SQLException { int nRows = numRows; - Vector vec = new Vector<>(nRows); + Vector vec = new Vector(nRows); // create a copy CachedRowSetImpl crsTemp; --- openjdk-boot/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java @@ -222,7 +222,7 @@ // either of the setter methods have been set. if(boolColId){ // - ArrayList indices = new ArrayList<>(); + ArrayList indices = new ArrayList(); for(int i=0;i userCertList = new ArrayList<>(); + ArrayList userCertList = new ArrayList(); i = 0; while (i < certs.length) { userCertList.add(certs[i]); --- openjdk-boot/jdk/src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java @@ -99,10 +99,10 @@ throws UnsupportedCallbackException { /* Collect messages to display in the dialog */ - final List messages = new ArrayList<>(3); + final List messages = new ArrayList(3); /* Collection actions to perform if the user clicks OK */ - final List okActions = new ArrayList<>(2); + final List okActions = new ArrayList(2); ConfirmationInfo confirmation = new ConfirmationInfo(); --- openjdk-boot/jdk/src/share/classes/com/sun/security/auth/login/ConfigFile.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/security/auth/login/ConfigFile.java @@ -152,7 +152,7 @@ // new configuration HashMap> newConfig = - new HashMap<>(); + new HashMap>(); if (url != null) { @@ -392,7 +392,7 @@ String moduleClass; String sflag; AppConfigurationEntry.LoginModuleControlFlag controlFlag; - LinkedList configEntries = new LinkedList<>(); + LinkedList configEntries = new LinkedList(); // application name appName = st.sval; @@ -432,7 +432,7 @@ } // get the args - HashMap options = new HashMap<>(); + HashMap options = new HashMap(); String key; String value; while (peek(";") == false) { --- openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java @@ -184,7 +184,7 @@ private UnixNumericUserPrincipal UIDPrincipal; private UnixNumericGroupPrincipal GIDPrincipal; private LinkedList supplementaryGroups = - new LinkedList<>(); + new LinkedList(); // initial state private Subject subject; --- openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java @@ -658,7 +658,7 @@ throw new FailedLoginException( "Unable to find X.509 certificate chain in keystore"); } else { - LinkedList certList = new LinkedList<>(); + LinkedList certList = new LinkedList(); for (int i=0; i < fromKeyStore.length; i++) { certList.add(fromKeyStore[i]); } --- openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java @@ -76,7 +76,7 @@ private SolarisNumericUserPrincipal UIDPrincipal; private SolarisNumericGroupPrincipal GIDPrincipal; private LinkedList supplementaryGroups = - new LinkedList<>(); + new LinkedList(); /** * Initialize this LoginModule. --- openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/UnixLoginModule.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/security/auth/module/UnixLoginModule.java @@ -70,7 +70,7 @@ private UnixNumericUserPrincipal UIDPrincipal; private UnixNumericGroupPrincipal GIDPrincipal; private LinkedList supplementaryGroups = - new LinkedList<>(); + new LinkedList(); /** * Initialize this LoginModule. --- openjdk-boot/jdk/src/share/classes/com/sun/tools/example/trace/EventThread.java.orig +++ openjdk-boot/jdk/src/share/classes/com/sun/tools/example/trace/EventThread.java @@ -59,7 +59,7 @@ // Maps ThreadReference to ThreadTrace instances private Map traceMap = - new HashMap<>(); + new HashMap(); EventThread(VirtualMachine vm, String[] excludes, PrintWriter writer) { super("event-handler"); --- openjdk-boot/jdk/src/share/classes/java/beans/Introspector.java.orig +++ openjdk-boot/jdk/src/share/classes/java/beans/Introspector.java @@ -95,7 +95,7 @@ public final static int IGNORE_ALL_BEANINFO = 3; // Static Caches to speed up introspection. - private static final WeakCache, Method[]> declaredMethodCache = new WeakCache<>(); + private static final WeakCache, Method[]> declaredMethodCache = new WeakCache(); private Class beanClass; private BeanInfo explicitBeanInfo; --- openjdk-boot/jdk/src/share/classes/java/beans/ThreadGroupContext.java.orig +++ openjdk-boot/jdk/src/share/classes/java/beans/ThreadGroupContext.java @@ -42,7 +42,7 @@ */ final class ThreadGroupContext { - private static final Map contexts = new WeakHashMap<>(); + private static final Map contexts = new WeakHashMap(); /** * Returns the appropriate {@code AppContext} for the caller, @@ -99,7 +99,7 @@ BeanInfo putBeanInfo(Class type, BeanInfo info) { if (this.beanInfoCache == null) { - this.beanInfoCache = new WeakHashMap<>(); + this.beanInfoCache = new WeakHashMap(); } return this.beanInfoCache.put(type, info); } --- openjdk-boot/jdk/src/share/classes/java/io/DeleteOnExitHook.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/DeleteOnExitHook.java @@ -34,7 +34,7 @@ */ class DeleteOnExitHook { - private static LinkedHashSet files = new LinkedHashSet<>(); + private static LinkedHashSet files = new LinkedHashSet(); static { // DeleteOnExitHook must be the last shutdown hook to be invoked. // Application shutdown hooks may add the first file to the @@ -71,7 +71,7 @@ files = null; } - ArrayList toBeDeleted = new ArrayList<>(theFiles); + ArrayList toBeDeleted = new ArrayList(theFiles); // reverse the list to maintain previous jdk deletion order. // Last in first deleted. --- openjdk-boot/jdk/src/share/classes/java/io/File.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/File.java @@ -1082,7 +1082,7 @@ if ((names == null) || (filter == null)) { return names; } - List v = new ArrayList<>(); + List v = new ArrayList(); for (int i = 0 ; i < names.length ; i++) { if (filter.accept(this, names[i])) { v.add(names[i]); @@ -1173,7 +1173,7 @@ public File[] listFiles(FilenameFilter filter) { String ss[] = list(); if (ss == null) return null; - ArrayList files = new ArrayList<>(); + ArrayList files = new ArrayList(); for (String s : ss) if ((filter == null) || filter.accept(this, s)) files.add(new File(s, this)); @@ -1211,7 +1211,7 @@ public File[] listFiles(FileFilter filter) { String ss[] = list(); if (ss == null) return null; - ArrayList files = new ArrayList<>(); + ArrayList files = new ArrayList(); for (String s : ss) { File f = new File(s, this); if ((filter == null) || filter.accept(f)) --- openjdk-boot/jdk/src/share/classes/java/io/FileInputStream.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/FileInputStream.java @@ -57,7 +57,7 @@ private volatile boolean closed = false; private static final ThreadLocal runningFinalize = - new ThreadLocal<>(); + new ThreadLocal(); private static boolean isRunningFinalize() { Boolean val; --- openjdk-boot/jdk/src/share/classes/java/io/FileOutputStream.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/FileOutputStream.java @@ -70,7 +70,7 @@ private final Object closeLock = new Object(); private volatile boolean closed = false; private static final ThreadLocal runningFinalize = - new ThreadLocal<>(); + new ThreadLocal(); private static boolean isRunningFinalize() { Boolean val; --- openjdk-boot/jdk/src/share/classes/java/io/FilePermission.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/FilePermission.java @@ -725,7 +725,7 @@ */ public FilePermissionCollection() { - perms = new ArrayList<>(); + perms = new ArrayList(); } /** @@ -830,7 +830,7 @@ // Don't call out.defaultWriteObject() // Write out Vector - Vector permissions = new Vector<>(perms.size()); + Vector permissions = new Vector(perms.size()); synchronized (this) { permissions.addAll(perms); } @@ -853,7 +853,7 @@ // Get the one we want Vector permissions = (Vector)gfields.get("permissions", null); - perms = new ArrayList<>(permissions.size()); + perms = new ArrayList(permissions.size()); perms.addAll(permissions); } } --- openjdk-boot/jdk/src/share/classes/java/io/ObjectInputStream.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/ObjectInputStream.java @@ -213,7 +213,7 @@ /** table mapping primitive type names to corresponding class objects */ private static final HashMap> primClasses - = new HashMap<>(8, 1.0F); + = new HashMap>(8, 1.0F); static { primClasses.put("boolean", boolean.class); primClasses.put("byte", byte.class); @@ -229,11 +229,11 @@ private static class Caches { /** cache of subclass security audit results */ static final ConcurrentMap subclassAudits = - new ConcurrentHashMap<>(); + new ConcurrentHashMap(); /** queue for WeakReferences to audited subclasses */ static final ReferenceQueue> subclassAuditsQueue = - new ReferenceQueue<>(); + new ReferenceQueue>(); } /** filter stream for handling block data conversion */ --- openjdk-boot/jdk/src/share/classes/java/io/ObjectOutputStream.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/ObjectOutputStream.java @@ -165,11 +165,11 @@ private static class Caches { /** cache of subclass security audit results */ static final ConcurrentMap subclassAudits = - new ConcurrentHashMap<>(); + new ConcurrentHashMap(); /** queue for WeakReferences to audited subclasses */ static final ReferenceQueue> subclassAuditsQueue = - new ReferenceQueue<>(); + new ReferenceQueue>(); } /** filter stream for handling block data conversion */ @@ -2413,7 +2413,7 @@ private final List stack; DebugTraceInfoStack() { - stack = new ArrayList<>(); + stack = new ArrayList(); } /** --- openjdk-boot/jdk/src/share/classes/java/io/ObjectStreamClass.java.orig +++ openjdk-boot/jdk/src/share/classes/java/io/ObjectStreamClass.java @@ -84,18 +84,18 @@ private static class Caches { /** cache mapping local classes -> descriptors */ static final ConcurrentMap> localDescs = - new ConcurrentHashMap<>(); + new ConcurrentHashMap>(); /** cache mapping field group/local desc pairs -> field reflectors */ static final ConcurrentMap> reflectors = - new ConcurrentHashMap<>(); + new ConcurrentHashMap>(); /** queue for WeakReferences to local classes */ private static final ReferenceQueue> localDescsQueue = - new ReferenceQueue<>(); + new ReferenceQueue>(); /** queue for WeakReferences to field reflectors keys */ private static final ReferenceQueue> reflectorsQueue = - new ReferenceQueue<>(); + new ReferenceQueue>(); } /** class associated with this descriptor (if any) */ @@ -290,7 +290,7 @@ EntryFuture future = null; if (entry == null) { EntryFuture newEntry = new EntryFuture(); - Reference newRef = new SoftReference<>(newEntry); + Reference newRef = new SoftReference(newEntry); do { if (ref != null) { Caches.localDescs.remove(key, ref); @@ -1130,7 +1130,7 @@ private ClassDataSlot[] getClassDataLayout0() throws InvalidClassException { - ArrayList slots = new ArrayList<>(); + ArrayList slots = new ArrayList(); Class start = cl, end = cl; // locate closest non-serializable superclass @@ -1566,7 +1566,7 @@ ObjectStreamField[] boundFields = new ObjectStreamField[serialPersistentFields.length]; - Set fieldNames = new HashSet<>(serialPersistentFields.length); + Set fieldNames = new HashSet(serialPersistentFields.length); for (int i = 0; i < serialPersistentFields.length; i++) { ObjectStreamField spf = serialPersistentFields[i]; @@ -1604,7 +1604,7 @@ */ private static ObjectStreamField[] getDefaultSerialFields(Class cl) { Field[] clFields = cl.getDeclaredFields(); - ArrayList list = new ArrayList<>(); + ArrayList list = new ArrayList(); int mask = Modifier.STATIC | Modifier.TRANSIENT; for (int i = 0; i < clFields.length; i++) { @@ -1855,8 +1855,8 @@ writeKeys = new long[nfields]; offsets = new int[nfields]; typeCodes = new char[nfields]; - ArrayList> typeList = new ArrayList<>(); - Set usedKeys = new HashSet<>(); + ArrayList> typeList = new ArrayList>(); + Set usedKeys = new HashSet(); for (int i = 0; i < nfields; i++) { @@ -2092,7 +2092,7 @@ EntryFuture future = null; if (entry == null) { EntryFuture newEntry = new EntryFuture(); - Reference newRef = new SoftReference<>(newEntry); + Reference newRef = new SoftReference(newEntry); do { if (ref != null) { Caches.reflectors.remove(key, ref); --- openjdk-boot/jdk/src/share/classes/java/lang/ApplicationShutdownHooks.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/ApplicationShutdownHooks.java @@ -47,7 +47,7 @@ } } ); - hooks = new IdentityHashMap<>(); + hooks = new IdentityHashMap(); } catch (IllegalStateException e) { // application shutdown hooks cannot be added if // shutdown is in progress. --- openjdk-boot/jdk/src/share/classes/java/lang/Character.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/Character.java @@ -646,7 +646,8 @@ */ public static final class UnicodeBlock extends Subset { - private static Map map = new HashMap<>(256); + private static Map map + = new HashMap(256); /** * Creates a UnicodeBlock with the given identifier name. @@ -4175,7 +4176,7 @@ private static HashMap aliases; static { - aliases = new HashMap<>(128); + aliases = new HashMap(128); aliases.put("ARAB", ARABIC); aliases.put("ARMI", IMPERIAL_ARAMAIC); aliases.put("ARMN", ARMENIAN); --- openjdk-boot/jdk/src/share/classes/java/lang/CharacterName.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/CharacterName.java @@ -81,7 +81,7 @@ } while (cpOff < cpEnd); strPool = new byte[total - cpEnd]; dis.readFully(strPool); - refStrPool = new SoftReference<>(strPool); + refStrPool = new SoftReference(strPool); } catch (Exception x) { throw new InternalError(x.getMessage()); } finally { --- openjdk-boot/jdk/src/share/classes/java/lang/Class.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/Class.java @@ -1308,7 +1308,7 @@ return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction[]>() { public Class[] run() { - List> list = new ArrayList<>(); + List> list = new ArrayList>(); Class currentClass = Class.this; while (currentClass != null) { Class[] members = currentClass.getDeclaredClasses(); @@ -2308,9 +2308,9 @@ res = Reflection.filterFields(this, getDeclaredFields0(publicOnly)); if (useCaches) { if (publicOnly) { - declaredPublicFields = new SoftReference<>(res); + declaredPublicFields = new SoftReference(res); } else { - declaredFields = new SoftReference<>(res); + declaredFields = new SoftReference(res); } } return res; @@ -2332,9 +2332,9 @@ // No cached value available; compute value recursively. // Traverse in correct order for getField(). - List fields = new ArrayList<>(); + List fields = new ArrayList(); if (traversedInterfaces == null) { - traversedInterfaces = new HashSet<>(); + traversedInterfaces = new HashSet>(); } // Local fields @@ -2360,7 +2360,7 @@ res = new Field[fields.size()]; fields.toArray(res); if (useCaches) { - publicFields = new SoftReference<>(res); + publicFields = new SoftReference(res); } return res; } @@ -2405,9 +2405,9 @@ } if (useCaches) { if (publicOnly) { - publicConstructors = new SoftReference<>(res); + publicConstructors = new SoftReference[]>(res); } else { - declaredConstructors = new SoftReference<>(res); + declaredConstructors = new SoftReference[]>(res); } } return res; @@ -2442,9 +2442,9 @@ res = Reflection.filterMethods(this, getDeclaredMethods0(publicOnly)); if (useCaches) { if (publicOnly) { - declaredPublicMethods = new SoftReference<>(res); + declaredPublicMethods = new SoftReference(res); } else { - declaredMethods = new SoftReference<>(res); + declaredMethods = new SoftReference(res); } } return res; @@ -2600,7 +2600,7 @@ methods.compactAndTrim(); res = methods.getArray(); if (useCaches) { - publicMethods = new SoftReference<>(res); + publicMethods = new SoftReference(res); } return res; } @@ -2979,7 +2979,7 @@ if (universe == null) throw new IllegalArgumentException( getName() + " is not an enum type"); - Map m = new HashMap<>(2 * universe.length); + Map m = new HashMap(2 * universe.length); for (T constant : universe) m.put(((Enum)constant).name(), constant); enumConstantDirectory = m; @@ -3092,7 +3092,7 @@ if (superClass == null) { annotations = declaredAnnotations; } else { - annotations = new HashMap<>(); + annotations = new HashMap, Annotation>(); superClass.initAnnotationsIfNecessary(); for (Map.Entry, Annotation> e : superClass.annotations.entrySet()) { Class annotationClass = e.getKey(); --- openjdk-boot/jdk/src/share/classes/java/lang/ClassLoader.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/ClassLoader.java @@ -246,7 +246,7 @@ // The classes loaded by this class loader. The only purpose of this table // is to keep the classes from being GC'ed until the loader is GC'ed. - private final Vector> classes = new Vector<>(); + private final Vector> classes = new Vector>(); // The "default" domain. Set as the default ProtectionDomain on newly // created classes. @@ -265,7 +265,8 @@ // The packages defined in this class loader. Each package name is mapped // to its corresponding Package object. // @GuardedBy("itself") - private final HashMap packages = new HashMap<>(); + private final HashMap packages = + new HashMap(); private static Void checkCreateClassLoader() { SecurityManager security = System.getSecurityManager(); @@ -278,16 +279,16 @@ private ClassLoader(Void unused, ClassLoader parent) { this.parent = parent; if (ParallelLoaders.isRegistered(this.getClass())) { - parallelLockMap = new ConcurrentHashMap<>(); - package2certs = new ConcurrentHashMap<>(); + parallelLockMap = new ConcurrentHashMap(); + package2certs = new ConcurrentHashMap(); domains = Collections.synchronizedSet(new HashSet()); assertionLock = new Object(); } else { // no finer-grained lock; lock on the classloader instance parallelLockMap = null; - package2certs = new Hashtable<>(); - domains = new HashSet<>(); + package2certs = new Hashtable(); + domains = new HashSet(); assertionLock = this; } } @@ -1175,7 +1176,7 @@ } tmp[1] = findResources(name); - return new CompoundEnumeration<>(tmp); + return new CompoundEnumeration(tmp); } /** @@ -1657,7 +1658,7 @@ protected Package[] getPackages() { Map map; synchronized (packages) { - map = new HashMap<>(packages); + map = new HashMap(packages); } Package[] pkgs; if (parent != null) { @@ -1764,17 +1765,20 @@ } // All native library names we've loaded. - private static Vector loadedLibraryNames = new Vector<>(); + private static Vector loadedLibraryNames + = new Vector(); // Native libraries belonging to system classes. private static Vector systemNativeLibraries - = new Vector<>(); + = new Vector(); // Native libraries associated with the class loader. - private Vector nativeLibraries = new Vector<>(); + private Vector nativeLibraries + = new Vector(); // native libraries being loaded/unloaded. - private static Stack nativeLibraryContext = new Stack<>(); + private static Stack nativeLibraryContext + = new Stack(); // The paths searched for libraries private static String usr_paths[]; @@ -2097,8 +2101,8 @@ * them to empty maps, effectively ignoring any present settings. */ synchronized (assertionLock) { - classAssertionStatus = new HashMap<>(); - packageAssertionStatus = new HashMap<>(); + classAssertionStatus = new HashMap(); + packageAssertionStatus = new HashMap(); defaultAssertionStatus = false; } } @@ -2160,8 +2164,8 @@ private void initializeJavaAssertionMaps() { // assert Thread.holdsLock(assertionLock); - classAssertionStatus = new HashMap<>(); - packageAssertionStatus = new HashMap<>(); + classAssertionStatus = new HashMap(); + packageAssertionStatus = new HashMap(); AssertionStatusDirectives directives = retrieveDirectives(); for(int i = 0; i < directives.classes.length; i++) --- openjdk-boot/jdk/src/share/classes/java/lang/Package.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/Package.java @@ -596,13 +596,16 @@ } // The map of loaded system packages - private static Map pkgs = new HashMap<>(31); + private static Map pkgs + = new HashMap(31); // Maps each directory or zip file name to its corresponding url - private static Map urls = new HashMap<>(10); + private static Map urls + = new HashMap(10); // Maps each code source url for a jar file to its manifest - private static Map mans = new HashMap<>(10); + private static Map mans + = new HashMap(10); private static native String getSystemPackage0(String name); private static native String[] getSystemPackages0(); --- openjdk-boot/jdk/src/share/classes/java/lang/ProcessBuilder.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/ProcessBuilder.java @@ -214,7 +214,7 @@ * @param command a string array containing the program and its arguments */ public ProcessBuilder(String... command) { - this.command = new ArrayList<>(command.length); + this.command = new ArrayList(command.length); for (String arg : command) this.command.add(arg); } @@ -251,7 +251,7 @@ * @return this process builder */ public ProcessBuilder command(String... command) { - this.command = new ArrayList<>(command.length); + this.command = new ArrayList(command.length); for (String arg : command) this.command.add(arg); return this; --- openjdk-boot/jdk/src/share/classes/java/lang/String.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/String.java @@ -2330,7 +2330,7 @@ int off = 0; int next = 0; boolean limited = limit > 0; - ArrayList list = new ArrayList<>(); + ArrayList list = new ArrayList(); while ((next = indexOf(ch, off)) != -1) { if (!limited || list.size() < limit - 1) { list.add(substring(off, next)); --- openjdk-boot/jdk/src/share/classes/java/lang/StringCoding.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/StringCoding.java @@ -53,9 +53,9 @@ /** The cached coders for each thread */ private final static ThreadLocal> decoder = - new ThreadLocal<>(); + new ThreadLocal>(); private final static ThreadLocal> encoder = - new ThreadLocal<>(); + new ThreadLocal>(); private static boolean warnUnsupportedCharset = true; --- openjdk-boot/jdk/src/share/classes/java/lang/Thread.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/Thread.java @@ -1616,7 +1616,8 @@ // Get a snapshot of the list of all threads Thread[] threads = getThreads(); StackTraceElement[][] traces = dumpThreads(threads); - Map m = new HashMap<>(threads.length); + Map m + = new HashMap(threads.length); for (int i = 0; i < threads.length; i++) { StackTraceElement[] stackTrace = traces[i]; if (stackTrace != null) { @@ -1637,11 +1638,11 @@ private static class Caches { /** cache of subclass security audit results */ static final ConcurrentMap subclassAudits = - new ConcurrentHashMap<>(); + new ConcurrentHashMap(); /** queue for WeakReferences to audited subclasses */ static final ReferenceQueue> subclassAuditsQueue = - new ReferenceQueue<>(); + new ReferenceQueue>(); } /** --- openjdk-boot/jdk/src/share/classes/java/lang/Throwable.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/Throwable.java @@ -917,7 +917,7 @@ // Use the sentinel for a zero-length list suppressed = SUPPRESSED_SENTINEL; } else { // Copy Throwables to new list - suppressed = new ArrayList<>(1); + suppressed = new ArrayList(1); for (Throwable t : suppressedExceptions) { // Enforce constraints on suppressed exceptions in // case of corrupt or malicious stream. @@ -1048,7 +1048,7 @@ return; if (suppressedExceptions == SUPPRESSED_SENTINEL) - suppressedExceptions = new ArrayList<>(1); + suppressedExceptions = new ArrayList(1); suppressedExceptions.add(exception); } --- openjdk-boot/jdk/src/share/classes/java/lang/management/ManagementFactory.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/management/ManagementFactory.java @@ -789,7 +789,7 @@ getPlatformManagementInterfaces() { Set> result = - new TreeSet<>(); + new TreeSet>(); for (PlatformComponent component: PlatformComponent.values()) { result.add(component.getMXBeanInterface()); } --- openjdk-boot/jdk/src/share/classes/java/lang/management/PlatformComponent.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/management/PlatformComponent.java @@ -287,7 +287,7 @@ List getGcMXBeanList(Class gcMXBeanIntf) { List list = ManagementFactoryHelper.getGarbageCollectorMXBeans(); - List result = new ArrayList<>(list.size()); + List result = new ArrayList(list.size()); for (GarbageCollectorMXBean m : list) { if (gcMXBeanIntf.isInstance(m)) { result.add(gcMXBeanIntf.cast(m)); @@ -342,7 +342,7 @@ } private static Set keyProperties(String... keyNames) { - Set set = new HashSet<>(); + Set set = new HashSet(); set.add("type"); for (String s : keyNames) { set.add(s); @@ -407,7 +407,7 @@ List getMXBeans(MBeanServerConnection mbs, Class mxbeanInterface) throws java.io.IOException { - List result = new ArrayList<>(); + List result = new ArrayList(); for (ObjectName on : getObjectNames(mbs)) { result.add(ManagementFactory. newPlatformMXBeanProxy(mbs, @@ -438,7 +438,7 @@ private static Map enumMap; private static synchronized void ensureInitialized() { if (enumMap == null) { - enumMap = new HashMap<>(); + enumMap = new HashMap(); for (PlatformComponent pc: PlatformComponent.values()) { // Use String as the key rather than Class to avoid // causing unnecessary class loading of management interface --- openjdk-boot/jdk/src/share/classes/java/lang/reflect/Constructor.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/reflect/Constructor.java @@ -136,7 +136,7 @@ // which implicitly requires that new java.lang.reflect // objects be fabricated for each reflective call on Class // objects.) - Constructor res = new Constructor<>(clazz, + Constructor res = new Constructor(clazz, parameterTypes, exceptionTypes, modifiers, slot, signature, --- openjdk-boot/jdk/src/share/classes/java/lang/reflect/Proxy.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/reflect/Proxy.java @@ -232,7 +232,7 @@ /** maps a class loader to the proxy class cache for that loader */ private static Map, Object>> loaderToCache - = new WeakHashMap<>(); + = new WeakHashMap, Object>>(); /** marks that a particular proxy class is currently being generated */ private static Object pendingGenerationMarker = new Object(); @@ -356,7 +356,7 @@ String[] interfaceNames = new String[interfaces.length]; // for detecting duplicates - Set> interfaceSet = new HashSet<>(); + Set> interfaceSet = new HashSet>(); for (int i = 0; i < interfaces.length; i++) { /* @@ -413,7 +413,7 @@ synchronized (loaderToCache) { cache = loaderToCache.get(loader); if (cache == null) { - cache = new HashMap<>(); + cache = new HashMap, Object>(); loaderToCache.put(loader, cache); } /* --- openjdk-boot/jdk/src/share/classes/java/lang/reflect/ReflectAccess.java.orig +++ openjdk-boot/jdk/src/share/classes/java/lang/reflect/ReflectAccess.java @@ -84,7 +84,7 @@ byte[] annotations, byte[] parameterAnnotations) { - return new Constructor<>(declaringClass, + return new Constructor(declaringClass, parameterTypes, checkedExceptions, modifiers, --- openjdk-boot/jdk/src/share/classes/java/net/InetAddress.java.orig +++ openjdk-boot/jdk/src/share/classes/java/net/InetAddress.java @@ -677,7 +677,7 @@ static InetAddressImpl impl; - private static final HashMap lookupTable = new HashMap<>(); + private static final HashMap lookupTable = new HashMap(); /** * Represents a cache entry @@ -736,7 +736,7 @@ // As we iterate in insertion order we can // terminate when a non-expired entry is found. - LinkedList expired = new LinkedList<>(); + LinkedList expired = new LinkedList(); long now = System.currentTimeMillis(); for (String key : cache.keySet()) { CacheEntry entry = cache.get(key); --- openjdk-boot/jdk/src/share/classes/java/net/URLClassLoader.java.orig +++ openjdk-boot/jdk/src/share/classes/java/net/URLClassLoader.java @@ -205,7 +205,7 @@ */ private WeakHashMap - closeables = new WeakHashMap<>(); + closeables = new WeakHashMap(); /** * Returns an input stream for reading the specified resource. --- openjdk-boot/jdk/src/share/classes/java/nio/file/Files.java.orig +++ openjdk-boot/jdk/src/share/classes/java/nio/file/Files.java @@ -1487,7 +1487,7 @@ return AccessController .doPrivileged(new PrivilegedAction>() { @Override public List run() { - List list = new ArrayList<>(); + List list = new ArrayList(); ServiceLoader loader = ServiceLoader .load(FileTypeDetector.class, ClassLoader.getSystemClassLoader()); for (FileTypeDetector detector: loader) { @@ -3008,7 +3008,7 @@ BufferedReader reader = null; try { reader = newBufferedReader(path, cs); - List result = new ArrayList<>(); + List result = new ArrayList(); for (;;) { String line = reader.readLine(); if (line == null) --- openjdk-boot/jdk/src/share/classes/java/security/AccessControlContext.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/AccessControlContext.java @@ -124,7 +124,7 @@ this.context = null; } } else { - List v = new ArrayList<>(context.length); + List v = new ArrayList(context.length); for (int i =0; i< context.length; i++) { if ((context[i] != null) && (!v.contains(context[i]))) v.add(context[i]); --- openjdk-boot/jdk/src/share/classes/java/security/BasicPermission.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/BasicPermission.java @@ -515,7 +515,7 @@ // Copy perms into a Hashtable Hashtable permissions = - new Hashtable<>(perms.size()*2); + new Hashtable(perms.size()*2); synchronized (this) { permissions.putAll(perms); --- openjdk-boot/jdk/src/share/classes/java/security/CodeSource.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/CodeSource.java @@ -188,7 +188,7 @@ } else if (signers != null) { // Convert the code signers to certs ArrayList certChains = - new ArrayList<>(); + new ArrayList(); for (int i = 0; i < signers.length; i++) { certChains.addAll( signers[i].getSignerCertPath().getCertificates()); @@ -606,10 +606,10 @@ // Iterate through all the certificates int i = 0; - List signers = new ArrayList<>(); + List signers = new ArrayList(); while (i < certs.length) { List certChain = - new ArrayList<>(); + new ArrayList(); certChain.add(certs[i++]); // first cert is an end-entity cert int j = i; --- openjdk-boot/jdk/src/share/classes/java/security/Permissions.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/Permissions.java @@ -362,7 +362,7 @@ // Copy perms into a Hashtable Hashtable, PermissionCollection> perms = - new Hashtable<>(permsMap.size()*2); // no sync; estimate + new Hashtable, PermissionCollection>(permsMap.size()*2); // no sync; estimate synchronized (this) { perms.putAll(permsMap); } @@ -567,7 +567,7 @@ // Copy perms into a Hashtable Hashtable perms = - new Hashtable<>(permsMap.size()*2); + new Hashtable(permsMap.size()*2); synchronized (this) { perms.putAll(permsMap); } --- openjdk-boot/jdk/src/share/classes/java/security/ProtectionDomain.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/ProtectionDomain.java @@ -368,8 +368,8 @@ int swag = 32; int vcap = 8; Enumeration e; - List pdVector = new ArrayList<>(vcap); - List plVector = new ArrayList<>(swag); + List pdVector = new ArrayList(vcap); + List plVector = new ArrayList(swag); // // Build a vector of domain permissions for subsequent merge --- openjdk-boot/jdk/src/share/classes/java/security/Provider.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/Provider.java @@ -437,7 +437,7 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - Map copy = new HashMap<>(); + Map copy = new HashMap(); for (Map.Entry entry : super.entrySet()) { copy.put(entry.getKey(), entry.getValue()); } @@ -719,7 +719,7 @@ } if (serviceSet == null) { ensureLegacyParsed(); - Set set = new LinkedHashSet<>(); + Set set = new LinkedHashSet(); if (serviceMap != null) { set.addAll(serviceMap.values()); } @@ -1395,7 +1395,7 @@ if (s != null) { String[] classNames = s.split("\\|"); List classList = - new ArrayList<>(classNames.length); + new ArrayList(classNames.length); for (String className : classNames) { Class clazz = getKeyClass(className); if (clazz != null) { --- openjdk-boot/jdk/src/share/classes/java/security/SecureClassLoader.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/SecureClassLoader.java @@ -50,7 +50,7 @@ // HashMap that maps CodeSource to ProtectionDomain // @GuardedBy("pdcache") private final HashMap pdcache = - new HashMap<>(11); + new HashMap(11); private static final Debug debug = Debug.getInstance("scl"); --- openjdk-boot/jdk/src/share/classes/java/security/Security.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/Security.java @@ -546,7 +546,7 @@ value = filter.substring(index + 1); } - Hashtable hashtableFilter = new Hashtable<>(1); + Hashtable hashtableFilter = new Hashtable(1); hashtableFilter.put(key, value); return (getProviders(hashtableFilter)); @@ -606,7 +606,7 @@ // Then only return those providers who satisfy the selection criteria. Provider[] allProviders = Security.getProviders(); Set keySet = filter.keySet(); - LinkedHashSet candidates = new LinkedHashSet<>(5); + LinkedHashSet candidates = new LinkedHashSet(5); // Returns all installed providers // if the selection criteria is null. @@ -660,7 +660,7 @@ } // Map containing cached Spi Class objects of the specified type - private static final Map spiMap = new ConcurrentHashMap<>(); + private static final Map spiMap = new ConcurrentHashMap(); /** * Return the Class object for the given engine type @@ -884,7 +884,7 @@ String attrName, String filterValue, Provider[] allProviders) { - LinkedHashSet candidates = new LinkedHashSet<>(5); + LinkedHashSet candidates = new LinkedHashSet(5); for (int i = 0; i < allProviders.length; i++) { if (isCriterionSatisfied(allProviders[i], serviceName, algName, @@ -1081,7 +1081,7 @@ return Collections.EMPTY_SET; } - HashSet result = new HashSet<>(); + HashSet result = new HashSet(); Provider[] providers = Security.getProviders(); for (int i = 0; i < providers.length; i++) { --- openjdk-boot/jdk/src/share/classes/java/security/UnresolvedPermission.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/UnresolvedPermission.java @@ -198,7 +198,7 @@ if (this.certs == null) { // extract the signer certs ArrayList signerCerts = - new ArrayList<>(); + new ArrayList(); i = 0; while (i < certs.length) { signerCerts.add(certs[i]); --- openjdk-boot/jdk/src/share/classes/java/security/UnresolvedPermissionCollection.java.orig +++ openjdk-boot/jdk/src/share/classes/java/security/UnresolvedPermissionCollection.java @@ -119,7 +119,7 @@ public Enumeration elements() { List results = - new ArrayList<>(); // where results are stored + new ArrayList(); // where results are stored // Get iterator of Map values (which are lists of permissions) synchronized (this) { @@ -161,7 +161,7 @@ // Copy perms into a Hashtable Hashtable> permissions = - new Hashtable<>(perms.size()*2); + new Hashtable>(perms.size()*2); // Convert each entry (List) into a Vector synchronized (this) { @@ -169,7 +169,7 @@ for (Map.Entry> e : set) { // Convert list into Vector List list = e.getValue(); - Vector vec = new Vector<>(list.size()); + Vector vec = new Vector(list.size()); synchronized (list) { vec.addAll(list); } @@ -206,7 +206,7 @@ for (Map.Entry> e : set) { // Convert Vector into ArrayList Vector vec = e.getValue(); - List list = new ArrayList<>(vec.size()); + List list = new ArrayList(vec.size()); list.addAll(vec); // Add to Hashtable being serialized --- openjdk-boot/jdk/src/share/classes/java/util/AbstractList.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/AbstractList.java @@ -482,8 +482,8 @@ */ public List subList(int fromIndex, int toIndex) { return (this instanceof RandomAccess ? - new RandomAccessSubList<>(this, fromIndex, toIndex) : - new SubList<>(this, fromIndex, toIndex)); + new RandomAccessSubList(this, fromIndex, toIndex) : + new SubList(this, fromIndex, toIndex)); } // Comparison and hashing @@ -747,7 +747,7 @@ } public List subList(int fromIndex, int toIndex) { - return new SubList<>(this, fromIndex, toIndex); + return new SubList(this, fromIndex, toIndex); } private void rangeCheck(int index) { @@ -776,6 +776,6 @@ } public List subList(int fromIndex, int toIndex) { - return new RandomAccessSubList<>(this, fromIndex, toIndex); + return new RandomAccessSubList(this, fromIndex, toIndex); } } --- openjdk-boot/jdk/src/share/classes/java/util/Arrays.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Arrays.java @@ -2825,7 +2825,7 @@ */ @SafeVarargs public static List asList(T... a) { - return new ArrayList<>(a); + return new ArrayList(a); } /** --- openjdk-boot/jdk/src/share/classes/java/util/Collections.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Collections.java @@ -1035,7 +1035,7 @@ * @return an unmodifiable view of the specified collection. */ public static Collection unmodifiableCollection(Collection c) { - return new UnmodifiableCollection<>(c); + return new UnmodifiableCollection(c); } /** @@ -1109,7 +1109,7 @@ * @return an unmodifiable view of the specified set. */ public static Set unmodifiableSet(Set s) { - return new UnmodifiableSet<>(s); + return new UnmodifiableSet(s); } /** @@ -1141,7 +1141,7 @@ * @return an unmodifiable view of the specified sorted set. */ public static SortedSet unmodifiableSortedSet(SortedSet s) { - return new UnmodifiableSortedSet<>(s); + return new UnmodifiableSortedSet(s); } /** @@ -1158,13 +1158,13 @@ public Comparator comparator() {return ss.comparator();} public SortedSet subSet(E fromElement, E toElement) { - return new UnmodifiableSortedSet<>(ss.subSet(fromElement,toElement)); + return new UnmodifiableSortedSet(ss.subSet(fromElement,toElement)); } public SortedSet headSet(E toElement) { - return new UnmodifiableSortedSet<>(ss.headSet(toElement)); + return new UnmodifiableSortedSet(ss.headSet(toElement)); } public SortedSet tailSet(E fromElement) { - return new UnmodifiableSortedSet<>(ss.tailSet(fromElement)); + return new UnmodifiableSortedSet(ss.tailSet(fromElement)); } public E first() {return ss.first();} @@ -1188,8 +1188,8 @@ */ public static List unmodifiableList(List list) { return (list instanceof RandomAccess ? - new UnmodifiableRandomAccessList<>(list) : - new UnmodifiableList<>(list)); + new UnmodifiableRandomAccessList(list) : + new UnmodifiableList(list)); } /** @@ -1250,7 +1250,7 @@ } public List subList(int fromIndex, int toIndex) { - return new UnmodifiableList<>(list.subList(fromIndex, toIndex)); + return new UnmodifiableList(list.subList(fromIndex, toIndex)); } /** @@ -1267,7 +1267,7 @@ */ private Object readResolve() { return (list instanceof RandomAccess - ? new UnmodifiableRandomAccessList<>(list) + ? new UnmodifiableRandomAccessList(list) : this); } } @@ -1283,7 +1283,7 @@ } public List subList(int fromIndex, int toIndex) { - return new UnmodifiableRandomAccessList<>( + return new UnmodifiableRandomAccessList( list.subList(fromIndex, toIndex)); } @@ -1296,7 +1296,7 @@ * deserialization. */ private Object writeReplace() { - return new UnmodifiableList<>(list); + return new UnmodifiableList(list); } } @@ -1315,7 +1315,7 @@ * @return an unmodifiable view of the specified map. */ public static Map unmodifiableMap(Map m) { - return new UnmodifiableMap<>(m); + return new UnmodifiableMap(m); } /** @@ -1363,7 +1363,7 @@ public Set> entrySet() { if (entrySet==null) - entrySet = new UnmodifiableEntrySet<>(m.entrySet()); + entrySet = new UnmodifiableEntrySet(m.entrySet()); return entrySet; } @@ -1400,7 +1400,7 @@ return i.hasNext(); } public Map.Entry next() { - return new UnmodifiableEntry<>(i.next()); + return new UnmodifiableEntry(i.next()); } public void remove() { throw new UnsupportedOperationException(); @@ -1411,7 +1411,7 @@ public Object[] toArray() { Object[] a = c.toArray(); for (int i=0; i((Map.Entry)a[i]); + a[i] = new UnmodifiableEntry((Map.Entry)a[i]); return a; } @@ -1422,7 +1422,7 @@ Object[] arr = c.toArray(a.length==0 ? a : Arrays.copyOf(a, 0)); for (int i=0; i((Map.Entry)arr[i]); + arr[i] = new UnmodifiableEntry((Map.Entry)arr[i]); if (arr.length > a.length) return (T[])arr; @@ -1443,7 +1443,7 @@ if (!(o instanceof Map.Entry)) return false; return c.contains( - new UnmodifiableEntry<>((Map.Entry) o)); + new UnmodifiableEntry((Map.Entry) o)); } /** @@ -1517,7 +1517,7 @@ * @return an unmodifiable view of the specified sorted map. */ public static SortedMap unmodifiableSortedMap(SortedMap m) { - return new UnmodifiableSortedMap<>(m); + return new UnmodifiableSortedMap(m); } /** @@ -1535,13 +1535,13 @@ public Comparator comparator() {return sm.comparator();} public SortedMap subMap(K fromKey, K toKey) { - return new UnmodifiableSortedMap<>(sm.subMap(fromKey, toKey)); + return new UnmodifiableSortedMap(sm.subMap(fromKey, toKey)); } public SortedMap headMap(K toKey) { - return new UnmodifiableSortedMap<>(sm.headMap(toKey)); + return new UnmodifiableSortedMap(sm.headMap(toKey)); } public SortedMap tailMap(K fromKey) { - return new UnmodifiableSortedMap<>(sm.tailMap(fromKey)); + return new UnmodifiableSortedMap(sm.tailMap(fromKey)); } public K firstKey() {return sm.firstKey();} @@ -1583,11 +1583,11 @@ * @return a synchronized view of the specified collection. */ public static Collection synchronizedCollection(Collection c) { - return new SynchronizedCollection<>(c); + return new SynchronizedCollection(c); } static Collection synchronizedCollection(Collection c, Object mutex) { - return new SynchronizedCollection<>(c, mutex); + return new SynchronizedCollection(c, mutex); } /** @@ -1686,11 +1686,11 @@ * @return a synchronized view of the specified set. */ public static Set synchronizedSet(Set s) { - return new SynchronizedSet<>(s); + return new SynchronizedSet(s); } static Set synchronizedSet(Set s, Object mutex) { - return new SynchronizedSet<>(s, mutex); + return new SynchronizedSet(s, mutex); } /** @@ -1754,7 +1754,7 @@ * @return a synchronized view of the specified sorted set. */ public static SortedSet synchronizedSortedSet(SortedSet s) { - return new SynchronizedSortedSet<>(s); + return new SynchronizedSortedSet(s); } /** @@ -1783,18 +1783,18 @@ public SortedSet subSet(E fromElement, E toElement) { synchronized (mutex) { - return new SynchronizedSortedSet<>( + return new SynchronizedSortedSet( ss.subSet(fromElement, toElement), mutex); } } public SortedSet headSet(E toElement) { synchronized (mutex) { - return new SynchronizedSortedSet<>(ss.headSet(toElement), mutex); + return new SynchronizedSortedSet(ss.headSet(toElement), mutex); } } public SortedSet tailSet(E fromElement) { synchronized (mutex) { - return new SynchronizedSortedSet<>(ss.tailSet(fromElement),mutex); + return new SynchronizedSortedSet(ss.tailSet(fromElement),mutex); } } @@ -1833,14 +1833,14 @@ */ public static List synchronizedList(List list) { return (list instanceof RandomAccess ? - new SynchronizedRandomAccessList<>(list) : - new SynchronizedList<>(list)); + new SynchronizedRandomAccessList(list) : + new SynchronizedList(list)); } static List synchronizedList(List list, Object mutex) { return (list instanceof RandomAccess ? - new SynchronizedRandomAccessList<>(list, mutex) : - new SynchronizedList<>(list, mutex)); + new SynchronizedRandomAccessList(list, mutex) : + new SynchronizedList(list, mutex)); } /** @@ -1903,7 +1903,7 @@ public List subList(int fromIndex, int toIndex) { synchronized (mutex) { - return new SynchronizedList<>(list.subList(fromIndex, toIndex), + return new SynchronizedList(list.subList(fromIndex, toIndex), mutex); } } @@ -1922,7 +1922,7 @@ */ private Object readResolve() { return (list instanceof RandomAccess - ? new SynchronizedRandomAccessList<>(list) + ? new SynchronizedRandomAccessList(list) : this); } } @@ -1944,7 +1944,7 @@ public List subList(int fromIndex, int toIndex) { synchronized (mutex) { - return new SynchronizedRandomAccessList<>( + return new SynchronizedRandomAccessList( list.subList(fromIndex, toIndex), mutex); } } @@ -1958,7 +1958,7 @@ * deserialization. */ private Object writeReplace() { - return new SynchronizedList<>(list); + return new SynchronizedList(list); } } @@ -1990,7 +1990,7 @@ * @return a synchronized view of the specified map. */ public static Map synchronizedMap(Map m) { - return new SynchronizedMap<>(m); + return new SynchronizedMap(m); } /** @@ -2051,7 +2051,7 @@ public Set keySet() { synchronized (mutex) { if (keySet==null) - keySet = new SynchronizedSet<>(m.keySet(), mutex); + keySet = new SynchronizedSet(m.keySet(), mutex); return keySet; } } @@ -2059,7 +2059,7 @@ public Set> entrySet() { synchronized (mutex) { if (entrySet==null) - entrySet = new SynchronizedSet<>(m.entrySet(), mutex); + entrySet = new SynchronizedSet>(m.entrySet(), mutex); return entrySet; } } @@ -2067,7 +2067,7 @@ public Collection values() { synchronized (mutex) { if (values==null) - values = new SynchronizedCollection<>(m.values(), mutex); + values = new SynchronizedCollection(m.values(), mutex); return values; } } @@ -2129,7 +2129,7 @@ * @return a synchronized view of the specified sorted map. */ public static SortedMap synchronizedSortedMap(SortedMap m) { - return new SynchronizedSortedMap<>(m); + return new SynchronizedSortedMap(m); } @@ -2159,18 +2159,18 @@ public SortedMap subMap(K fromKey, K toKey) { synchronized (mutex) { - return new SynchronizedSortedMap<>( + return new SynchronizedSortedMap( sm.subMap(fromKey, toKey), mutex); } } public SortedMap headMap(K toKey) { synchronized (mutex) { - return new SynchronizedSortedMap<>(sm.headMap(toKey), mutex); + return new SynchronizedSortedMap(sm.headMap(toKey), mutex); } } public SortedMap tailMap(K fromKey) { synchronized (mutex) { - return new SynchronizedSortedMap<>(sm.tailMap(fromKey),mutex); + return new SynchronizedSortedMap(sm.tailMap(fromKey),mutex); } } @@ -2246,7 +2246,7 @@ */ public static Collection checkedCollection(Collection c, Class type) { - return new CheckedCollection<>(c, type); + return new CheckedCollection(c, type); } @SuppressWarnings("unchecked") @@ -2378,7 +2378,7 @@ * @since 1.5 */ public static Set checkedSet(Set s, Class type) { - return new CheckedSet<>(s, type); + return new CheckedSet(s, type); } /** @@ -2424,7 +2424,7 @@ */ public static SortedSet checkedSortedSet(SortedSet s, Class type) { - return new CheckedSortedSet<>(s, type); + return new CheckedSortedSet(s, type); } /** @@ -2484,8 +2484,8 @@ */ public static List checkedList(List list, Class type) { return (list instanceof RandomAccess ? - new CheckedRandomAccessList<>(list, type) : - new CheckedList<>(list, type)); + new CheckedRandomAccessList(list, type) : + new CheckedList(list, type)); } /** @@ -2550,7 +2550,7 @@ } public List subList(int fromIndex, int toIndex) { - return new CheckedList<>(list.subList(fromIndex, toIndex), type); + return new CheckedList(list.subList(fromIndex, toIndex), type); } } @@ -2567,7 +2567,7 @@ } public List subList(int fromIndex, int toIndex) { - return new CheckedRandomAccessList<>( + return new CheckedRandomAccessList( list.subList(fromIndex, toIndex), type); } } @@ -2609,7 +2609,7 @@ public static Map checkedMap(Map m, Class keyType, Class valueType) { - return new CheckedMap<>(m, keyType, valueType); + return new CheckedMap(m, keyType, valueType); } @@ -2677,14 +2677,15 @@ // - protection from malicious t // - correct behavior if t is a concurrent map Object[] entries = t.entrySet().toArray(); - List> checked = new ArrayList<>(entries.length); + List> checked = + new ArrayList>(entries.length); for (Object o : entries) { Map.Entry e = (Map.Entry) o; Object k = e.getKey(); Object v = e.getValue(); typeCheck(k, v); checked.add( - new AbstractMap.SimpleImmutableEntry<>((K) k, (V) v)); + new AbstractMap.SimpleImmutableEntry((K) k, (V) v)); } for (Map.Entry e : checked) m.put(e.getKey(), e.getValue()); @@ -2694,7 +2695,7 @@ public Set> entrySet() { if (entrySet==null) - entrySet = new CheckedEntrySet<>(m.entrySet(), valueType); + entrySet = new CheckedEntrySet(m.entrySet(), valueType); return entrySet; } @@ -2809,7 +2810,7 @@ if (!(o instanceof Map.Entry)) return false; return s.remove(new AbstractMap.SimpleImmutableEntry - <>((Map.Entry)o)); + ((Map.Entry)o)); } public boolean removeAll(Collection c) { @@ -2842,7 +2843,7 @@ static CheckedEntry checkedEntry(Map.Entry e, Class valueType) { - return new CheckedEntry<>(e, valueType); + return new CheckedEntry(e, valueType); } /** @@ -2883,7 +2884,7 @@ if (!(o instanceof Map.Entry)) return false; return e.equals(new AbstractMap.SimpleImmutableEntry - <>((Map.Entry)o)); + ((Map.Entry)o)); } } } @@ -2926,7 +2927,7 @@ public static SortedMap checkedSortedMap(SortedMap m, Class keyType, Class valueType) { - return new CheckedSortedMap<>(m, keyType, valueType); + return new CheckedSortedMap(m, keyType, valueType); } /** @@ -2992,7 +2993,7 @@ private static class EmptyIterator implements Iterator { static final EmptyIterator EMPTY_ITERATOR - = new EmptyIterator<>(); + = new EmptyIterator(); public boolean hasNext() { return false; } public E next() { throw new NoSuchElementException(); } @@ -3041,7 +3042,7 @@ implements ListIterator { static final EmptyListIterator EMPTY_ITERATOR - = new EmptyListIterator<>(); + = new EmptyListIterator(); public boolean hasPrevious() { return false; } public E previous() { throw new NoSuchElementException(); } @@ -3077,7 +3078,7 @@ private static class EmptyEnumeration implements Enumeration { static final EmptyEnumeration EMPTY_ENUMERATION - = new EmptyEnumeration<>(); + = new EmptyEnumeration(); public boolean hasMoreElements() { return false; } public E nextElement() { throw new NoSuchElementException(); } @@ -3089,7 +3090,7 @@ * @see #emptySet() */ @SuppressWarnings("unchecked") - public static final Set EMPTY_SET = new EmptySet<>(); + public static final Set EMPTY_SET = new EmptySet(); /** * Returns the empty set (immutable). This set is serializable. @@ -3149,7 +3150,7 @@ * @see #emptyList() */ @SuppressWarnings("unchecked") - public static final List EMPTY_LIST = new EmptyList<>(); + public static final List EMPTY_LIST = new EmptyList(); /** * Returns the empty list (immutable). This list is serializable. @@ -3223,7 +3224,7 @@ * @since 1.3 */ @SuppressWarnings("unchecked") - public static final Map EMPTY_MAP = new EmptyMap<>(); + public static final Map EMPTY_MAP = new EmptyMap(); /** * Returns the empty map (immutable). This map is serializable. @@ -3285,7 +3286,7 @@ * @return an immutable set containing only the specified object. */ public static Set singleton(T o) { - return new SingletonSet<>(o); + return new SingletonSet(o); } static Iterator singletonIterator(final E e) { @@ -3338,7 +3339,7 @@ * @since 1.3 */ public static List singletonList(T o) { - return new SingletonList<>(o); + return new SingletonList(o); } /** @@ -3380,7 +3381,7 @@ * @since 1.3 */ public static Map singletonMap(K key, V value) { - return new SingletonMap<>(key, value); + return new SingletonMap(key, value); } /** @@ -3422,7 +3423,7 @@ public Set> entrySet() { if (entrySet==null) entrySet = Collections.>singleton( - new SimpleImmutableEntry<>(k, v)); + new SimpleImmutableEntry(k, v)); return entrySet; } @@ -3454,7 +3455,7 @@ public static List nCopies(int n, T o) { if (n < 0) throw new IllegalArgumentException("List length = " + n); - return new CopiesList<>(n, o); + return new CopiesList(n, o); } /** @@ -3528,7 +3529,7 @@ if (fromIndex > toIndex) throw new IllegalArgumentException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")"); - return new CopiesList<>(toIndex - fromIndex, element); + return new CopiesList(toIndex - fromIndex, element); } } @@ -3596,7 +3597,7 @@ if (cmp instanceof ReverseComparator2) return ((ReverseComparator2)cmp).cmp; - return new ReverseComparator2<>(cmp); + return new ReverseComparator2(cmp); } /** @@ -3675,7 +3676,7 @@ * @see ArrayList */ public static ArrayList list(Enumeration e) { - ArrayList l = new ArrayList<>(); + ArrayList l = new ArrayList(); while (e.hasMoreElements()) l.add(e.nextElement()); return l; @@ -3868,7 +3869,7 @@ * @since 1.6 */ public static Set newSetFromMap(Map map) { - return new SetFromMap<>(map); + return new SetFromMap(map); } /** @@ -3932,7 +3933,7 @@ * @since 1.6 */ public static Queue asLifoQueue(Deque deque) { - return new AsLIFOQueue<>(deque); + return new AsLIFOQueue(deque); } /** --- openjdk-boot/jdk/src/share/classes/java/util/EnumMap.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/EnumMap.java @@ -500,7 +500,7 @@ int j = 0; for (int i = 0; i < vals.length; i++) if (vals[i] != null) - a[j++] = new AbstractMap.SimpleEntry<>( + a[j++] = new AbstractMap.SimpleEntry( keyUniverse[i], unmaskNull(vals[i])); return a; } --- openjdk-boot/jdk/src/share/classes/java/util/EnumSet.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/EnumSet.java @@ -110,9 +110,9 @@ throw new ClassCastException(elementType + " not an enum"); if (universe.length <= 64) - return new RegularEnumSet<>(elementType, universe); + return new RegularEnumSet(elementType, universe); else - return new JumboEnumSet<>(elementType, universe); + return new JumboEnumSet(elementType, universe); } /** @@ -431,7 +431,7 @@ } Object writeReplace() { - return new SerializationProxy<>(this); + return new SerializationProxy(this); } // readObject method for the serialization proxy pattern --- openjdk-boot/jdk/src/share/classes/java/util/Formatter.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Formatter.java @@ -2514,7 +2514,7 @@ * Finds format specifiers in the format string. */ private FormatString[] parse(String s) { - ArrayList al = new ArrayList<>(); + ArrayList al = new ArrayList(); Matcher m = fsPattern.matcher(s); for (int i = 0, len = s.length(); i < len; ) { if (m.find(i)) { --- openjdk-boot/jdk/src/share/classes/java/util/HashMap.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/HashMap.java @@ -763,7 +763,7 @@ */ void addEntry(int hash, K key, V value, int bucketIndex) { Entry e = table[bucketIndex]; - table[bucketIndex] = new Entry<>(hash, key, value, e); + table[bucketIndex] = new Entry(hash, key, value, e); if (size++ >= threshold) resize(2 * table.length); } @@ -778,7 +778,7 @@ */ void createEntry(int hash, K key, V value, int bucketIndex) { Entry e = table[bucketIndex]; - table[bucketIndex] = new Entry<>(hash, key, value, e); + table[bucketIndex] = new Entry(hash, key, value, e); size++; } --- openjdk-boot/jdk/src/share/classes/java/util/HashSet.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/HashSet.java @@ -100,7 +100,7 @@ * default initial capacity (16) and load factor (0.75). */ public HashSet() { - map = new HashMap<>(); + map = new HashMap(); } /** @@ -113,7 +113,7 @@ * @throws NullPointerException if the specified collection is null */ public HashSet(Collection c) { - map = new HashMap<>(Math.max((int) (c.size()/.75f) + 1, 16)); + map = new HashMap(Math.max((int) (c.size()/.75f) + 1, 16)); addAll(c); } @@ -127,7 +127,7 @@ * than zero, or if the load factor is nonpositive */ public HashSet(int initialCapacity, float loadFactor) { - map = new HashMap<>(initialCapacity, loadFactor); + map = new HashMap(initialCapacity, loadFactor); } /** @@ -139,7 +139,7 @@ * than zero */ public HashSet(int initialCapacity) { - map = new HashMap<>(initialCapacity); + map = new HashMap(initialCapacity); } /** @@ -156,7 +156,7 @@ * than zero, or if the load factor is nonpositive */ HashSet(int initialCapacity, float loadFactor, boolean dummy) { - map = new LinkedHashMap<>(initialCapacity, loadFactor); + map = new LinkedHashMap(initialCapacity, loadFactor); } /** --- openjdk-boot/jdk/src/share/classes/java/util/Hashtable.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Hashtable.java @@ -455,7 +455,7 @@ // Creates the new entry. Entry e = tab[index]; - tab[index] = new Entry<>(hash, key, value, e); + tab[index] = new Entry(hash, key, value, e); count++; return null; } @@ -579,7 +579,7 @@ if (count == 0) { return Collections.emptyEnumeration(); } else { - return new Enumerator<>(type, false); + return new Enumerator(type, false); } } @@ -587,7 +587,7 @@ if (count == 0) { return Collections.emptyIterator(); } else { - return new Enumerator<>(type, true); + return new Enumerator(type, true); } } @@ -863,7 +863,7 @@ while (entry != null) { entryStack = - new Entry<>(0, entry.key, entry.value, entryStack); + new Entry(0, entry.key, entry.value, entryStack); entry = entry.next; } } @@ -941,7 +941,7 @@ } // Creates the new entry. Entry e = tab[index]; - tab[index] = new Entry<>(hash, key, value, e); + tab[index] = new Entry(hash, key, value, e); count++; } @@ -962,7 +962,7 @@ } protected Object clone() { - return new Entry<>(hash, key, value, + return new Entry(hash, key, value, (next==null ? null : (Entry) next.clone())); } --- openjdk-boot/jdk/src/share/classes/java/util/IdentityHashMap.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/IdentityHashMap.java @@ -1145,7 +1145,7 @@ Object[] result = new Object[size]; Iterator> it = iterator(); for (int i = 0; i < size; i++) - result[i] = new AbstractMap.SimpleEntry<>(it.next()); + result[i] = new AbstractMap.SimpleEntry(it.next()); return result; } @@ -1157,7 +1157,7 @@ .newInstance(a.getClass().getComponentType(), size); Iterator> it = iterator(); for (int i = 0; i < size; i++) - a[i] = (T) new AbstractMap.SimpleEntry<>(it.next()); + a[i] = (T) new AbstractMap.SimpleEntry(it.next()); if (a.length > size) a[size] = null; return a; --- openjdk-boot/jdk/src/share/classes/java/util/JumboEnumSet.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/JumboEnumSet.java @@ -91,7 +91,7 @@ * @return an iterator over the elements contained in this set */ public Iterator iterator() { - return new EnumSetIterator<>(); + return new EnumSetIterator(); } private class EnumSetIterator> implements Iterator { --- openjdk-boot/jdk/src/share/classes/java/util/LinkedHashMap.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/LinkedHashMap.java @@ -237,7 +237,7 @@ * the chain. */ void init() { - header = new Entry<>(-1, null, null, null); + header = new Entry(-1, null, null, null); header.before = header.after = header; } @@ -438,7 +438,7 @@ */ void createEntry(int hash, K key, V value, int bucketIndex) { HashMap.Entry old = table[bucketIndex]; - Entry e = new Entry<>(hash, key, value, old); + Entry e = new Entry(hash, key, value, old); table[bucketIndex] = e; e.addBefore(header); size++; --- openjdk-boot/jdk/src/share/classes/java/util/LinkedList.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/LinkedList.java @@ -122,7 +122,7 @@ */ private void linkFirst(E e) { final Node f = first; - final Node newNode = new Node<>(null, e, f); + final Node newNode = new Node(null, e, f); first = newNode; if (f == null) last = newNode; @@ -137,7 +137,7 @@ */ void linkLast(E e) { final Node l = last; - final Node newNode = new Node<>(l, e, null); + final Node newNode = new Node(l, e, null); last = newNode; if (l == null) first = newNode; @@ -153,7 +153,7 @@ void linkBefore(E e, Node succ) { // assert succ != null; final Node pred = succ.prev; - final Node newNode = new Node<>(pred, e, succ); + final Node newNode = new Node(pred, e, succ); succ.prev = newNode; if (pred == null) first = newNode; @@ -419,7 +419,7 @@ for (Object o : a) { @SuppressWarnings("unchecked") E e = (E) o; - Node newNode = new Node<>(pred, e, null); + Node newNode = new Node(pred, e, null); if (pred == null) first = newNode; else --- openjdk-boot/jdk/src/share/classes/java/util/ListResourceBundle.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/ListResourceBundle.java @@ -187,7 +187,7 @@ return; Object[][] contents = getContents(); - HashMap temp = new HashMap<>(contents.length); + HashMap temp = new HashMap(contents.length); for (int i = 0; i < contents.length; ++i) { // key must be non-null String, value must be non-null String key = (String) contents[i][0]; --- openjdk-boot/jdk/src/share/classes/java/util/Locale.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Locale.java @@ -1793,7 +1793,7 @@ return formatList(variantNames, listPattern, listCompositionPattern); } } - ArrayList names = new ArrayList<>(4); + ArrayList names = new ArrayList(4); if (languageName.length() != 0) { names.add(languageName); } --- openjdk-boot/jdk/src/share/classes/java/util/PriorityQueue.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/PriorityQueue.java @@ -538,7 +538,7 @@ cursor--; else { if (forgetMeNot == null) - forgetMeNot = new ArrayDeque<>(); + forgetMeNot = new ArrayDeque(); forgetMeNot.add(moved); } } else if (lastRetElt != null) { --- openjdk-boot/jdk/src/share/classes/java/util/Properties.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/Properties.java @@ -1010,7 +1010,7 @@ * @since 1.6 */ public Set stringPropertyNames() { - Hashtable h = new Hashtable<>(); + Hashtable h = new Hashtable(); enumerateStringProperties(h); return h.keySet(); } --- openjdk-boot/jdk/src/share/classes/java/util/RegularEnumSet.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/RegularEnumSet.java @@ -72,7 +72,7 @@ * @return an iterator over the elements contained in this set */ public Iterator iterator() { - return new EnumSetIterator<>(); + return new EnumSetIterator(); } private class EnumSetIterator> implements Iterator { --- openjdk-boot/jdk/src/share/classes/java/util/ResourceBundle.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/ResourceBundle.java @@ -289,7 +289,7 @@ * name for compatibility with some workarounds for bug 4212439. */ private static final ConcurrentMap cacheList - = new ConcurrentHashMap<>(INITIAL_CACHE_SIZE); + = new ConcurrentHashMap(INITIAL_CACHE_SIZE); /** * Queue for reference objects referring to class loaders or bundles. @@ -1754,7 +1754,7 @@ * @since 1.6 */ public Set keySet() { - Set keys = new HashSet<>(); + Set keys = new HashSet(); for (ResourceBundle rb = this; rb != null; rb = rb.parent) { keys.addAll(rb.handleKeySet()); } @@ -1782,7 +1782,7 @@ if (keySet == null) { synchronized (this) { if (keySet == null) { - Set keys = new HashSet<>(); + Set keys = new HashSet(); Enumeration enumKeys = getKeys(); while (enumKeys.hasMoreElements()) { String key = enumKeys.nextElement(); @@ -2300,7 +2300,7 @@ if (baseName == null) { throw new NullPointerException(); } - return new ArrayList<>(CANDIDATES_CACHE.get(locale.getBaseLocale())); + return new ArrayList(CANDIDATES_CACHE.get(locale.getBaseLocale())); } private static final CandidateListCache CANDIDATES_CACHE = new CandidateListCache(); @@ -2326,7 +2326,7 @@ if (language.equals("nb") || isNorwegianBokmal) { List tmpList = getDefaultList("nb", script, region, variant); // Insert a locale replacing "nb" with "no" for every list entry - List bokmalList = new LinkedList<>(); + List bokmalList = new LinkedList(); for (Locale l : tmpList) { bokmalList.add(l); if (l.getLanguage().length() == 0) { @@ -2373,7 +2373,7 @@ List variants = null; if (variant.length() > 0) { - variants = new LinkedList<>(); + variants = new LinkedList(); int idx = variant.length(); while (idx != -1) { variants.add(variant.substring(0, idx)); @@ -2381,7 +2381,7 @@ } } - List list = new LinkedList<>(); + List list = new LinkedList(); if (variants != null) { for (String v : variants) { --- openjdk-boot/jdk/src/share/classes/java/util/ServiceLoader.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/ServiceLoader.java @@ -191,7 +191,7 @@ private ClassLoader loader; // Cached providers, in instantiation order - private LinkedHashMap providers = new LinkedHashMap<>(); + private LinkedHashMap providers = new LinkedHashMap(); // The current lazy-lookup iterator private LazyIterator lookupIterator; @@ -291,7 +291,7 @@ { InputStream in = null; BufferedReader r = null; - ArrayList names = new ArrayList<>(); + ArrayList names = new ArrayList(); try { in = u.openStream(); r = new BufferedReader(new InputStreamReader(in, "utf-8")); @@ -463,7 +463,7 @@ public static ServiceLoader load(Class service, ClassLoader loader) { - return new ServiceLoader<>(service, loader); + return new ServiceLoader(service, loader); } /** --- openjdk-boot/jdk/src/share/classes/java/util/TimSort.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/TimSort.java @@ -196,7 +196,7 @@ * extending short natural runs to minRun elements, and merging runs * to maintain stack invariant. */ - TimSort ts = new TimSort<>(a, c); + TimSort ts = new TimSort(a, c); int minRun = minRunLength(nRemaining); do { // Identify next run --- openjdk-boot/jdk/src/share/classes/java/util/TreeMap.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/TreeMap.java @@ -530,7 +530,7 @@ if (t == null) { compare(key, key); // type (and possibly null) check - root = new Entry<>(key, value, null); + root = new Entry(key, value, null); size = 1; modCount++; return null; @@ -566,7 +566,7 @@ return t.setValue(value); } while (t != null); } - Entry e = new Entry<>(key, value, parent); + Entry e = new Entry(key, value, parent); if (cmp < 0) parent.left = e; else @@ -1066,14 +1066,14 @@ } public NavigableSet subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) { - return new KeySet<>(m.subMap(fromElement, fromInclusive, + return new KeySet(m.subMap(fromElement, fromInclusive, toElement, toInclusive)); } public NavigableSet headSet(E toElement, boolean inclusive) { - return new KeySet<>(m.headMap(toElement, inclusive)); + return new KeySet(m.headMap(toElement, inclusive)); } public NavigableSet tailSet(E fromElement, boolean inclusive) { - return new KeySet<>(m.tailMap(fromElement, inclusive)); + return new KeySet(m.tailMap(fromElement, inclusive)); } public SortedSet subSet(E fromElement, E toElement) { return subSet(fromElement, true, toElement, false); @@ -1202,7 +1202,7 @@ */ static Map.Entry exportEntry(TreeMap.Entry e) { return (e == null) ? null : - new AbstractMap.SimpleImmutableEntry<>(e); + new AbstractMap.SimpleImmutableEntry(e); } /** @@ -2403,7 +2403,7 @@ value = (defaultVal != null ? defaultVal : (V) str.readObject()); } - Entry middle = new Entry<>(key, value, null); + Entry middle = new Entry(key, value, null); // color nodes in non-full bottommost level red if (level == redLevel) --- openjdk-boot/jdk/src/share/classes/java/util/TreeSet.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/TreeSet.java @@ -138,7 +138,7 @@ * ordering} of the elements will be used. */ public TreeSet(Comparator comparator) { - this(new TreeMap<>(comparator)); + this(new TreeMap(comparator)); } /** @@ -195,7 +195,7 @@ * @since 1.6 */ public NavigableSet descendingSet() { - return new TreeSet<>(m.descendingMap()); + return new TreeSet(m.descendingMap()); } /** @@ -322,7 +322,7 @@ */ public NavigableSet subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) { - return new TreeSet<>(m.subMap(fromElement, fromInclusive, + return new TreeSet(m.subMap(fromElement, fromInclusive, toElement, toInclusive)); } @@ -335,7 +335,7 @@ * @since 1.6 */ public NavigableSet headSet(E toElement, boolean inclusive) { - return new TreeSet<>(m.headMap(toElement, inclusive)); + return new TreeSet(m.headMap(toElement, inclusive)); } /** @@ -347,7 +347,7 @@ * @since 1.6 */ public NavigableSet tailSet(E fromElement, boolean inclusive) { - return new TreeSet<>(m.tailMap(fromElement, inclusive)); + return new TreeSet(m.tailMap(fromElement, inclusive)); } /** @@ -477,7 +477,7 @@ throw new InternalError(); } - clone.m = new TreeMap<>(m); + clone.m = new TreeMap(m); return clone; } @@ -524,9 +524,9 @@ // Create backing TreeMap TreeMap tm; if (c==null) - tm = new TreeMap<>(); + tm = new TreeMap(); else - tm = new TreeMap<>(c); + tm = new TreeMap(c); m = tm; // Read in size --- openjdk-boot/jdk/src/share/classes/java/util/WeakHashMap.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/WeakHashMap.java @@ -171,7 +171,7 @@ /** * Reference queue for cleared WeakEntries */ - private final ReferenceQueue queue = new ReferenceQueue<>(); + private final ReferenceQueue queue = new ReferenceQueue(); /** * The number of times this WeakHashMap has been structurally modified. @@ -439,7 +439,7 @@ modCount++; Entry e = tab[i]; - tab[i] = new Entry<>(k, value, queue, h, e); + tab[i] = new Entry(k, value, queue, h, e); if (++size >= threshold) resize(tab.length * 2); return null; @@ -955,9 +955,10 @@ } private List> deepCopy() { - List> list = new ArrayList<>(size()); + List> list = + new ArrayList>(size()); for (Map.Entry e : this) - list.add(new AbstractMap.SimpleEntry<>(e)); + list.add(new AbstractMap.SimpleEntry(e)); return list; } --- openjdk-boot/jdk/src/share/classes/java/util/logging/FileHandler.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/logging/FileHandler.java @@ -127,7 +127,7 @@ private FileOutputStream lockStream; private File files[]; private static final int MAX_LOCKS = 100; - private static java.util.HashMap locks = new java.util.HashMap<>(); + private static java.util.HashMap locks = new java.util.HashMap(); // A metered stream is a subclass of OutputStream that // (a) forwards all its output to a target stream --- openjdk-boot/jdk/src/share/classes/java/util/logging/Level.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/logging/Level.java @@ -59,7 +59,7 @@ */ public class Level implements java.io.Serializable { - private static java.util.ArrayList known = new java.util.ArrayList<>(); + private static java.util.ArrayList known = new java.util.ArrayList(); private static String defaultBundle = "sun.util.logging.resources.logging"; /** --- openjdk-boot/jdk/src/share/classes/java/util/logging/LogManager.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/logging/LogManager.java @@ -156,7 +156,8 @@ private final static Level defaultLevel = Level.INFO; // Table of named Loggers that maps names to Loggers. - private Hashtable namedLoggers = new Hashtable<>(); + private Hashtable namedLoggers = + new Hashtable(); // Tree of named Loggers private LogNode root = new LogNode(null); private Logger rootLogger; @@ -444,7 +445,7 @@ // loggerRefQueue holds LoggerWeakRef objects for Logger objects // that have been GC'ed. private final ReferenceQueue loggerRefQueue - = new ReferenceQueue<>(); + = new ReferenceQueue(); // Package-level inner class. // Helper class for managing WeakReferences to Logger objects. @@ -694,7 +695,7 @@ name = ""; } if (node.children == null) { - node.children = new HashMap<>(); + node.children = new HashMap(); } LogNode child = node.children.get(head); if (child == null) { @@ -878,7 +879,7 @@ } hands = hands.trim(); int ix = 0; - Vector result = new Vector<>(); + Vector result = new Vector(); while (ix < hands.length()) { int end = ix; while (end < hands.length()) { --- openjdk-boot/jdk/src/share/classes/java/util/logging/LogRecord.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/logging/LogRecord.java @@ -85,7 +85,8 @@ private static final AtomicInteger nextThreadId = new AtomicInteger(MIN_SEQUENTIAL_THREAD_ID); - private static final ThreadLocal threadIds = new ThreadLocal<>(); + private static final ThreadLocal threadIds + = new ThreadLocal(); /** * @serial Logging message level --- openjdk-boot/jdk/src/share/classes/java/util/logging/Logger.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/logging/Logger.java @@ -170,7 +170,7 @@ private LogManager manager; private String name; private final CopyOnWriteArrayList handlers = - new CopyOnWriteArrayList<>(); + new CopyOnWriteArrayList(); private String resourceBundleName; private volatile boolean useParentHandlers = true; private volatile Filter filter; @@ -1439,7 +1439,7 @@ // Set our new parent. parent = newParent; if (parent.kids == null) { - parent.kids = new ArrayList<>(2); + parent.kids = new ArrayList(2); } if (ref == null) { // we didn't have a previous parent --- openjdk-boot/jdk/src/share/classes/java/util/logging/Logging.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/logging/Logging.java @@ -56,7 +56,7 @@ public List getLoggerNames() { Enumeration loggers = logManager.getLoggerNames(); - ArrayList array = new ArrayList<>(); + ArrayList array = new ArrayList(); for (; loggers.hasMoreElements();) { array.add((String) loggers.nextElement()); --- openjdk-boot/jdk/src/share/classes/java/util/prefs/AbstractPreferences.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/prefs/AbstractPreferences.java @@ -155,7 +155,8 @@ * All known unremoved children of this node. (This "cache" is consulted * prior to calling childSpi() or getChild(). */ - private Map kidCache = new HashMap<>(); + private Map kidCache + = new HashMap(); /** * This field is used to keep track of whether or not this node has @@ -712,7 +713,7 @@ if (removed) throw new IllegalStateException("Node has been removed."); - Set s = new TreeSet<>(kidCache.keySet()); + Set s = new TreeSet(kidCache.keySet()); for (String kid : childrenNamesSpi()) s.add(kid); return s.toArray(EMPTY_STRING_ARRAY); @@ -1441,7 +1442,8 @@ * event delivery from preference activity, greatly simplifying * locking and reducing opportunity for deadlock. */ - private static final List eventQueue = new LinkedList<>(); + private static final List eventQueue + = new LinkedList(); /** * These two classes are used to distinguish NodeChangeEvents on --- openjdk-boot/jdk/src/share/classes/java/util/regex/Pattern.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/regex/Pattern.java @@ -321,7 +321,7 @@ * Nothing, but quotes all characters until \E * \E * Nothing, but ends quoting started by \Q - * + * * *   * Special constructs (named-capturing and non-capturing) @@ -1193,7 +1193,7 @@ public String[] split(CharSequence input, int limit) { int index = 0; boolean matchLimited = limit > 0; - ArrayList matchList = new ArrayList<>(); + ArrayList matchList = new ArrayList(); Matcher m = matcher(input); // Add segments before each match found @@ -1695,7 +1695,7 @@ Map namedGroups() { if (namedGroups == null) - namedGroups = new HashMap<>(2); + namedGroups = new HashMap(2); return namedGroups; } @@ -5495,7 +5495,7 @@ } private static final HashMap map - = new HashMap<>(); + = new HashMap(); static { // Unicode character property aliases, defined in --- openjdk-boot/jdk/src/share/classes/java/util/regex/UnicodeProp.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/regex/UnicodeProp.java @@ -193,8 +193,8 @@ } }; - private final static HashMap posix = new HashMap<>(); - private final static HashMap aliases = new HashMap<>(); + private final static HashMap posix = new HashMap(); + private final static HashMap aliases = new HashMap(); static { posix.put("ALPHA", "ALPHABETIC"); posix.put("LOWER", "LOWERCASE"); --- openjdk-boot/jdk/src/share/classes/java/util/zip/ZipFile.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/zip/ZipFile.java @@ -319,7 +319,7 @@ // the outstanding inputstreams that need to be closed, // mapped to the inflater objects they use. - private final Map streams = new WeakHashMap<>(); + private final Map streams = new WeakHashMap(); /** * Returns an input stream for reading the contents of the specified @@ -461,7 +461,7 @@ } // List of available Inflater objects for decompression - private Deque inflaterCache = new ArrayDeque<>(); + private Deque inflaterCache = new ArrayDeque(); /** * Returns the path name of the ZIP file. @@ -577,7 +577,7 @@ // Close streams, release their inflaters synchronized (streams) { if (false == streams.isEmpty()) { - Map copy = new HashMap<>(streams); + Map copy = new HashMap(streams); streams.clear(); for (Map.Entry e : copy.entrySet()) { e.getKey().close(); --- openjdk-boot/jdk/src/share/classes/java/util/zip/ZipOutputStream.java.orig +++ openjdk-boot/jdk/src/share/classes/java/util/zip/ZipOutputStream.java @@ -53,8 +53,8 @@ } private XEntry current; - private Vector xentries = new Vector<>(); - private HashSet names = new HashSet<>(); + private Vector xentries = new Vector(); + private HashSet names = new HashSet(); private CRC32 crc = new CRC32(); private long written = 0; private long locoff = 0; --- openjdk-boot/jdk/src/share/classes/javax/security/auth/PrivateCredentialPermission.java.orig +++ openjdk-boot/jdk/src/share/classes/javax/security/auth/PrivateCredentialPermission.java @@ -329,7 +329,7 @@ throw new IllegalArgumentException("invalid empty name"); } - ArrayList pList = new ArrayList<>(); + ArrayList pList = new ArrayList(); StringTokenizer tokenizer = new StringTokenizer(name, " ", true); String principalClass = null; String principalName = null; --- openjdk-boot/jdk/src/share/classes/javax/security/auth/SubjectDomainCombiner.java.orig +++ openjdk-boot/jdk/src/share/classes/javax/security/auth/SubjectDomainCombiner.java @@ -48,7 +48,7 @@ private Subject subject; private WeakKeyValueMap cachedPDs = - new WeakKeyValueMap<>(); + new WeakKeyValueMap(); private Set principalSet; private Principal[] principals; --- openjdk-boot/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java.orig +++ openjdk-boot/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java @@ -361,7 +361,7 @@ // Don't call out.defaultWriteObject() // Write out Vector - Vector permissions = new Vector<>(perms.size()); + Vector permissions = new Vector(perms.size()); synchronized (this) { permissions.addAll(perms); --- openjdk-boot/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java.orig +++ openjdk-boot/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java @@ -569,7 +569,7 @@ // Don't call out.defaultWriteObject() // Write out Vector - Vector permissions = new Vector<>(perms.size()); + Vector permissions = new Vector(perms.size()); synchronized (this) { permissions.addAll(perms); --- openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java @@ -59,7 +59,7 @@ EnumMap[] caches = (EnumMap[]) new EnumMap[n]; // unchecked warning expected here for (int i = 0; i < n; i++) - caches[i] = new EnumMap<>(Wrapper.class); + caches[i] = new EnumMap(Wrapper.class); return caches; } @@ -1013,7 +1013,7 @@ Object a8, Object a9) { return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); } private static MethodHandle[] makeArrays() { - ArrayList mhs = new ArrayList<>(); + ArrayList mhs = new ArrayList(); for (;;) { MethodHandle mh = findCollector("array", mhs.size(), Object[].class); if (mh == null) break; @@ -1059,7 +1059,7 @@ Object a8, Object a9) { fillWithArguments(a, pos, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); return a; } private static MethodHandle[] makeFillArrays() { - ArrayList mhs = new ArrayList<>(); + ArrayList mhs = new ArrayList(); mhs.add(null); // there is no empty fill; at least a0 is required for (;;) { MethodHandle mh = findCollector("fillArray", mhs.size(), Object[].class, Object[].class, Integer.class); @@ -1214,7 +1214,7 @@ Object a8, Object a9) { return makeList(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); } private static MethodHandle[] makeLists() { - ArrayList mhs = new ArrayList<>(); + ArrayList mhs = new ArrayList(); for (;;) { MethodHandle mh = findCollector("list", mhs.size(), List.class); if (mh == null) break; --- openjdk-boot/jdk/src/share/classes/sun/io/CharacterEncoding.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/io/CharacterEncoding.java @@ -54,7 +54,7 @@ private static volatile boolean installedAll; static { - aliasTable = new HashMap<>(460, 1.0f); /* MDA */ + aliasTable = new HashMap(460, 1.0f); /* MDA */ aliasTable.put("us-ascii", "ASCII"); aliasTable.put("ascii", "ASCII"); --- openjdk-boot/jdk/src/share/classes/sun/io/Converters.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/io/Converters.java @@ -120,7 +120,7 @@ private static Class cache(int type, Object encoding, Class c) { SoftReference[] srs = classCache[type]; - srs[CACHE_SIZE - 1] = new SoftReference<>(new Object[] { c, encoding }); + srs[CACHE_SIZE - 1] = new SoftReference(new Object[] { c, encoding }); moveToFront(srs, CACHE_SIZE - 1); return c; } --- openjdk-boot/jdk/src/share/classes/sun/launcher/LauncherHelper.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/launcher/LauncherHelper.java @@ -169,7 +169,7 @@ private static void printProperties(PrintStream ostream) { Properties p = System.getProperties(); ostream.println(PROP_SETTINGS); - List sortedPropertyKeys = new ArrayList<>(); + List sortedPropertyKeys = new ArrayList(); sortedPropertyKeys.addAll(p.stringPropertyNames()); Collections.sort(sortedPropertyKeys); for (String x : sortedPropertyKeys) { @@ -244,7 +244,7 @@ } // Locale does not implement Comparable so we convert it to String // and sort it for pretty printing. - Set sortedSet = new TreeSet<>(); + Set sortedSet = new TreeSet(); for (Locale l : tlocales) { sortedSet.add(l.toString()); } --- openjdk-boot/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java @@ -205,7 +205,7 @@ private static List bufferPools = null; public static synchronized List getBufferPoolMXBeans() { if (bufferPools == null) { - bufferPools = new ArrayList<>(2); + bufferPools = new ArrayList(2); bufferPools.add(createBufferPoolMXBean(sun.misc.SharedSecrets.getJavaNioAccess() .getDirectBufferPool())); bufferPools.add(createBufferPoolMXBean(sun.nio.ch.FileChannelImpl --- openjdk-boot/jdk/src/share/classes/sun/net/spi/nameservice/dns/DNSNameService.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/net/spi/nameservice/dns/DNSNameService.java @@ -52,7 +52,7 @@ // Per-thread soft cache of the last temporary context private static ThreadLocal> contextRef = - new ThreadLocal<>(); + new ThreadLocal>(); // Simple class to encapsulate the temporary context private static class ThreadContext { @@ -99,7 +99,7 @@ // new thread context needs to be created if (thrCtxt == null) { - final Hashtable env = new Hashtable<>(); + final Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory"); @@ -165,7 +165,7 @@ final String[] ids, int depth) throws UnknownHostException { - ArrayList results = new ArrayList<>(); + ArrayList results = new ArrayList(); Attributes attrs; // do the query --- openjdk-boot/jdk/src/share/classes/sun/net/www/URLConnection.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/net/www/URLConnection.java @@ -239,7 +239,7 @@ url = null; } - private static HashMap proxiedHosts = new HashMap<>(); + private static HashMap proxiedHosts = new HashMap(); public synchronized static void setProxiedHost(String host) { proxiedHosts.put(host.toLowerCase(), null); --- openjdk-boot/jdk/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java @@ -111,7 +111,7 @@ * at the same time, then all but the first will block until * the first completes its authentication. */ - static private HashMap requests = new HashMap<>(); + static private HashMap requests = new HashMap(); /* check if a request for this destination is in progress * return false immediately if not. Otherwise block until --- openjdk-boot/jdk/src/share/classes/sun/nio/cs/AbstractCharsetProvider.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/nio/cs/AbstractCharsetProvider.java @@ -49,22 +49,22 @@ /* Maps canonical names to class names */ private Map classMap - = new TreeMap<>(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); + = new TreeMap(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); /* Maps alias names to canonical names */ private Map aliasMap - = new TreeMap<>(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); + = new TreeMap(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); /* Maps canonical names to alias-name arrays */ private Map aliasNameMap - = new TreeMap<>(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); + = new TreeMap(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); /* Maps canonical names to soft references that hold cached instances */ private Map> cache - = new TreeMap<>(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); + = new TreeMap>(ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); private String packagePrefix; @@ -167,7 +167,7 @@ final ArrayList ks; synchronized (this) { init(); - ks = new ArrayList<>(classMap.keySet()); + ks = new ArrayList(classMap.keySet()); } return new Iterator() { --- openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java @@ -84,7 +84,7 @@ throw new IllegalArgumentException("'" + name() + ":" + attribute + "' not recognized"); } - Map result = new HashMap<>(2); + Map result = new HashMap(2); if (acl) result.put(ACL_NAME, getAcl()); if (owner) --- openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java @@ -89,8 +89,8 @@ * Used to build a map of attribute name/values. */ static class AttributesBuilder { - private Set names = new HashSet<>(); - private Map map = new HashMap<>(); + private Set names = new HashSet(); + private Map map = new HashMap(); private boolean copyAll; private AttributesBuilder(Set allowed, String[] requested) { --- openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractPoller.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractPoller.java @@ -102,7 +102,7 @@ throw new NullPointerException(); if (events.length == 0) throw new IllegalArgumentException("No events to register"); - Set> eventSet = new HashSet<>(events.length); + Set> eventSet = new HashSet>(events.length); for (WatchEvent.Kind event: events) { // standard events if (event == StandardWatchEventKinds.ENTRY_CREATE || --- openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractUserDefinedFileAttributeView.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/nio/fs/AbstractUserDefinedFileAttributeView.java @@ -77,7 +77,7 @@ throws IOException { // names of attributes to return - List names = new ArrayList<>(); + List names = new ArrayList(); for (String name: attributes) { if (name.equals("*")) { names = list(); @@ -90,7 +90,7 @@ } // read each value and return in map - Map result = new HashMap<>(); + Map result = new HashMap(); for (String name: names) { int size = size(name); byte[] buf = new byte[size]; --- openjdk-boot/jdk/src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java @@ -71,7 +71,7 @@ @Override public Map readAttributes(String[] attributes) throws IOException { - Map result = new HashMap<>(); + Map result = new HashMap(); for (String attribute: attributes) { if (attribute.equals("*") || attribute.equals(OWNER_NAME)) { result.put(OWNER_NAME, getOwner()); --- openjdk-boot/jdk/src/share/classes/sun/nio/fs/Util.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/nio/fs/Util.java @@ -63,7 +63,7 @@ * Returns a Set containing the given elements. */ static Set newSet(E... elements) { - HashSet set = new HashSet<>(); + HashSet set = new HashSet(); for (E e: elements) { set.add(e); } @@ -75,7 +75,7 @@ * the given elements. */ static Set newSet(Set other, E... elements) { - HashSet set = new HashSet<>(other); + HashSet set = new HashSet(other); for (E e: elements) { set.add(e); } --- openjdk-boot/jdk/src/share/classes/sun/reflect/generics/parser/SignatureParser.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/reflect/generics/parser/SignatureParser.java @@ -229,7 +229,7 @@ * "<" FormalTypeParameter+ ">" */ private FormalTypeParameter[] parseFormalTypeParameters(){ - List ftps = new ArrayList<>(3); + List ftps = new ArrayList(3); assert(current() == '<'); // should not have been called at all if (current() != '<') { throw error("expected '<'");} advance(); @@ -308,7 +308,7 @@ assert(current() == 'L'); if (current() != 'L') { throw error("expected a class type");} advance(); - List scts = new ArrayList<>(5); + List scts = new ArrayList(5); scts.add(parsePackageNameAndSimpleClassTypeSignature()); parseClassTypeSignatureSuffix(scts); @@ -391,7 +391,7 @@ * "<" TypeArgument+ ">" */ private TypeArgument[] parseTypeArguments() { - List tas = new ArrayList<>(3); + List tas = new ArrayList(3); assert(current() == '<'); if (current() != '<') { throw error("expected '<'");} advance(); @@ -529,7 +529,7 @@ * ":" FieldTypeSignature */ private FieldTypeSignature[] parseBounds() { - List fts = new ArrayList<>(3); + List fts = new ArrayList(3); if (current() == ':') { advance(); @@ -557,7 +557,7 @@ * ClassTypeSignature */ private ClassTypeSignature[] parseSuperInterfaces() { - List cts = new ArrayList<>(5); + List cts = new ArrayList(5); while(current() == 'L') { cts.add(parseClassTypeSignature()); } @@ -592,7 +592,7 @@ // TypeSignature* private TypeSignature[] parseZeroOrMoreTypeSignatures() { - List ts = new ArrayList<>(); + List ts = new ArrayList(); boolean stop = false; while (!stop) { switch(current()) { @@ -631,7 +631,7 @@ // ThrowSignature* private FieldTypeSignature[] parseZeroOrMoreThrowsSignatures(){ - List ets = new ArrayList<>(3); + List ets = new ArrayList(3); while( current() == '^') { ets.add(parseThrowsSignature()); } --- openjdk-boot/jdk/src/share/classes/sun/rmi/server/Activation.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/rmi/server/Activation.java @@ -149,10 +149,10 @@ /** maps activation id to its respective group id */ private Map idTable = - new ConcurrentHashMap<>(); + new ConcurrentHashMap(); /** maps group id to its GroupEntry groups */ private Map groupTable = - new ConcurrentHashMap<>(); + new ConcurrentHashMap(); private byte majorVersion = MAJOR_VERSION; private byte minorVersion = MINOR_VERSION; @@ -288,10 +288,10 @@ { ois.defaultReadObject(); if (! (groupTable instanceof ConcurrentHashMap)) { - groupTable = new ConcurrentHashMap<>(groupTable); + groupTable = new ConcurrentHashMap(groupTable); } if (! (idTable instanceof ConcurrentHashMap)) { - idTable = new ConcurrentHashMap<>(idTable); + idTable = new ConcurrentHashMap(idTable); } } --- openjdk-boot/jdk/src/share/classes/sun/security/acl/AclEntryImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/acl/AclEntryImpl.java @@ -37,7 +37,7 @@ */ public class AclEntryImpl implements AclEntry { private Principal user = null; - private Vector permissionSet = new Vector<>(10, 10); + private Vector permissionSet = new Vector(10, 10); private boolean negative = false; /** --- openjdk-boot/jdk/src/share/classes/sun/security/acl/AclImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/acl/AclImpl.java @@ -41,15 +41,15 @@ // or principal. // private Hashtable allowedUsersTable = - new Hashtable<>(23); + new Hashtable(23); private Hashtable allowedGroupsTable = - new Hashtable<>(23); + new Hashtable(23); private Hashtable deniedUsersTable = - new Hashtable<>(23); + new Hashtable(23); private Hashtable deniedGroupsTable = - new Hashtable<>(23); + new Hashtable(23); private String aclName = null; - private Vector zeroSet = new Vector<>(1,1); + private Vector zeroSet = new Vector(1,1); /** @@ -294,7 +294,7 @@ // private static Enumeration union(Enumeration e1, Enumeration e2) { - Vector v = new Vector<>(20, 20); + Vector v = new Vector(20, 20); while (e1.hasMoreElements()) v.addElement(e1.nextElement()); @@ -313,7 +313,7 @@ // private Enumeration subtract(Enumeration e1, Enumeration e2) { - Vector v = new Vector<>(20, 20); + Vector v = new Vector(20, 20); while (e1.hasMoreElements()) v.addElement(e1.nextElement()); --- openjdk-boot/jdk/src/share/classes/sun/security/acl/GroupImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/acl/GroupImpl.java @@ -34,7 +34,7 @@ * @author Satish Dharmaraj */ public class GroupImpl implements Group { - private Vector groupMembers = new Vector<>(50, 100); + private Vector groupMembers = new Vector(50, 100); private String group; /** @@ -131,7 +131,7 @@ if (groupMembers.contains(member)) { return true; } else { - Vector alreadySeen = new Vector<>(10); + Vector alreadySeen = new Vector(10); return isMemberRecurse(member, alreadySeen); } } --- openjdk-boot/jdk/src/share/classes/sun/security/jca/ProviderList.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/jca/ProviderList.java @@ -96,7 +96,7 @@ if (providerList.getProvider(p.getName()) != null) { return providerList; } - List list = new ArrayList<> + List list = new ArrayList (Arrays.asList(providerList.configs)); int n = list.size(); if ((position < 0) || (position > n)) { @@ -160,7 +160,7 @@ * Return a new ProviderList parsed from the java.security Properties. */ private ProviderList() { - List configList = new ArrayList<>(); + List configList = new ArrayList(); for (int i = 1; true; i++) { String entry = Security.getProperty("security.provider." + i); if (entry == null) { @@ -200,7 +200,7 @@ * possible recursion and deadlock during verification. */ ProviderList getJarList(String[] jarClassNames) { - List newConfigs = new ArrayList<>(); + List newConfigs = new ArrayList(); for (String className : jarClassNames) { ProviderConfig newConfig = new ProviderConfig(className); for (ProviderConfig config : configs) { @@ -356,7 +356,7 @@ */ @Deprecated public List getServices(String type, List algorithms) { - List ids = new ArrayList<>(); + List ids = new ArrayList(); for (String alg : algorithms) { ids.add(new ServiceId(type, alg)); } --- openjdk-boot/jdk/src/share/classes/sun/security/jca/Providers.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/jca/Providers.java @@ -40,7 +40,7 @@ public class Providers { private static final ThreadLocal threadLists = - new InheritableThreadLocal<>(); + new InheritableThreadLocal(); // number of threads currently using thread-local provider lists // tracked to allow an optimization if == 0 --- openjdk-boot/jdk/src/share/classes/sun/security/jgss/krb5/Krb5Util.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/jgss/krb5/Krb5Util.java @@ -267,7 +267,7 @@ if (ktabs.isEmpty()) { return kk.toArray(new KerberosKey[kk.size()]); } else { - List keys = new ArrayList<>(); + List keys = new ArrayList(); for (KeyTab ktab: ktabs) { for (KerberosKey k: ktab.getKeys(kp)) { keys.add(k); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/Config.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/Config.java @@ -527,7 +527,7 @@ } }))); String Line; - Vector v = new Vector<>(); + Vector v = new Vector(); String previous = null; while ((Line = br.readLine()) != null) { // ignore comments and blank line in the configuration file. @@ -588,7 +588,7 @@ throw new KrbException("I/O error while reading" + " configuration file."); } - Hashtable table = new Hashtable<>(); + Hashtable table = new Hashtable(); for (int i = 0; i < v.size(); i++) { String line = v.elementAt(i).trim(); if (line.equalsIgnoreCase("[realms]")) { @@ -597,7 +597,7 @@ if ((count == v.size()) || (v.elementAt(count).startsWith("["))) { Hashtable>> temp = - new Hashtable<>(); + new Hashtable>>(); temp = parseRealmField(v, i + 1, count); table.put("realms", temp); i = count - 1; @@ -610,7 +610,7 @@ if ((count == v.size()) || (v.elementAt(count).startsWith("["))) { Hashtable>> temp = - new Hashtable<>(); + new Hashtable>>(); temp = parseRealmField(v, i + 1, count); table.put("capaths", temp); i = count - 1; @@ -728,7 +728,7 @@ * Parses key-value pairs under a stanza name. */ private Hashtable parseField(Vector v, int start, int end) { - Hashtable table = new Hashtable<>(); + Hashtable table = new Hashtable(); String line; for (int i = start; i < end; i++) { line = v.elementAt(i); @@ -750,7 +750,7 @@ * information for the realm given within a pair of braces. */ private Hashtable>> parseRealmField(Vector v, int start, int end) { - Hashtable>> table = new Hashtable<>(); + Hashtable>> table = new Hashtable>>(); String line; for (int i = start; i < end; i++) { line = v.elementAt(i).trim(); @@ -790,9 +790,9 @@ * Parses key-value pairs within each braces under [realms]. */ private Hashtable> parseRealmFieldEx(Vector v, int start, int end) { - Hashtable> table = new Hashtable<>(); - Vector keyVector = new Vector<>(); - Vector nameVector = new Vector<>(); + Hashtable> table = new Hashtable>(); + Vector keyVector = new Vector(); + Vector nameVector = new Vector(); String line = ""; String key; for (int i = start; i < end; i++) { @@ -897,7 +897,7 @@ } st = new StringTokenizer(default_enctypes, delim); int len = st.countTokens(); - ArrayList ls = new ArrayList<>(len); + ArrayList ls = new ArrayList(len); int type; for (int i = 0; i < len; i++) { type = getType(st.nextToken()); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/KdcComm.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/KdcComm.java @@ -462,7 +462,7 @@ */ static class KdcAccessibility { // Known bad KDCs - private static Set bads = new HashSet<>(); + private static Set bads = new HashSet(); private static synchronized void addBad(String kdc) { if (DEBUG) { @@ -492,9 +492,9 @@ // Returns a preferred KDC list by putting the bad ones at the end private static synchronized String[] list(String kdcList) { StringTokenizer st = new StringTokenizer(kdcList); - List list = new ArrayList<>(); + List list = new ArrayList(); if (badPolicy == BpType.TRY_LAST) { - List badkdcs = new ArrayList<>(); + List badkdcs = new ArrayList(); while (st.hasMoreTokens()) { String t = st.nextToken(); if (bads.contains(t)) badkdcs.add(t); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/PrincipalName.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/PrincipalName.java @@ -238,7 +238,7 @@ if (subDer.getTag() != DerValue.tag_SequenceOf) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } - Vector v = new Vector<>(); + Vector v = new Vector(); DerValue subSubDer; while(subDer.getData().available() > 0) { subSubDer = subDer.getData().getDerValue(); @@ -293,7 +293,7 @@ // Code repetition, realm parsed again by class Realm protected static String[] parseName(String name) { - Vector tempStrings = new Vector<>(); + Vector tempStrings = new Vector(); String temp = name; int i = 0; int componentStart = 0; --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/Realm.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/Realm.java @@ -359,14 +359,14 @@ } String tempTarget = null, tempRealm = null; - Stack iStack = new Stack<>(); + Stack iStack = new Stack(); /* * The half-established reversed-path, starting from the final target * (sRealm), each item can be connected to by the next one. * Might contains wrong item, if found, a bad track is performed */ - Vector tempList = new Vector<>(8, 8); + Vector tempList = new Vector(8, 8); tempList.add(sRealm); int count = 0; // For debug only --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/Authenticator.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/Authenticator.java @@ -176,7 +176,7 @@ * @exception IOException if an I/O error occurs while reading encoded data. */ public byte[] asn1Encode() throws Asn1Exception, IOException { - Vector v = new Vector<>(); + Vector v = new Vector(); DerOutputStream temp = new DerOutputStream(); temp.putInteger(BigInteger.valueOf(authenticator_vno)); v.addElement(new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte) 0x00), temp.toByteArray())); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/AuthorizationData.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/AuthorizationData.java @@ -99,7 +99,7 @@ * @exception IOException if an I/O error occurs while reading encoded data. */ public AuthorizationData(DerValue der) throws Asn1Exception, IOException { - Vector v = new Vector<>(); + Vector v = new Vector(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/EncAPRepPart.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/EncAPRepPart.java @@ -133,7 +133,7 @@ * @exception IOException if an I/O error occurs while reading encoded data. */ public byte[] asn1Encode() throws Asn1Exception, IOException { - Vector v = new Vector<>(); + Vector v = new Vector(); DerOutputStream temp = new DerOutputStream(); v.addElement(new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte) 0x00), ctime.asn1Encode())); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/HostAddresses.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/HostAddresses.java @@ -179,7 +179,7 @@ */ public HostAddresses(DerValue encoding) throws Asn1Exception, IOException { - Vector tempAddresses = new Vector<>(); + Vector tempAddresses = new Vector(); DerValue der = null; while (encoding.getData().available() > 0) { der = encoding.getData().getDerValue(); @@ -265,7 +265,7 @@ if (addresses == null || addresses.length == 0) return null; - ArrayList ipAddrs = new ArrayList<>(addresses.length); + ArrayList ipAddrs = new ArrayList(addresses.length); for (int i = 0; i < addresses.length; i++) { try { --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KDCReq.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KDCReq.java @@ -150,7 +150,7 @@ if (subsubDer.getTag() != DerValue.tag_SequenceOf) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } - Vector v = new Vector<>(); + Vector v = new Vector(); while (subsubDer.getData().available() > 0) { v.addElement(new PAData(subsubDer.getData().getDerValue())); } --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KDCReqBody.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KDCReqBody.java @@ -158,7 +158,7 @@ throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); - Vector v = new Vector<>(); + Vector v = new Vector(); if ((der.getTag() & (byte)0x1F) == (byte)0x08) { subDer = der.getData().getDerValue(); @@ -183,7 +183,7 @@ encAuthorizationData = EncryptedData.parse(encoding.getData(), (byte)0x0A, true); } if (encoding.getData().available() > 0) { - Vector tempTickets = new Vector<>(); + Vector tempTickets = new Vector(); der = encoding.getData().getDerValue(); if ((der.getTag() & (byte)0x1F) == (byte)0x0B) { subDer = der.getData().getDerValue(); @@ -216,7 +216,7 @@ * */ public byte[] asn1Encode(int msgType) throws Asn1Exception, IOException { - Vector v = new Vector<>(); + Vector v = new Vector(); v.addElement(new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x00), kdcOptions.asn1Encode())); if (msgType == Krb5.KRB_AS_REQ) { if (cname != null) { --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KRBCred.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KRBCred.java @@ -134,7 +134,7 @@ if (subsubDer.getTag() != DerValue.tag_SequenceOf) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } - Vector v = new Vector<>(); + Vector v = new Vector(); while (subsubDer.getData().available() > 0) { v.addElement(new Ticket(subsubDer.getData().getDerValue())); } --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KRBError.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KRBError.java @@ -259,7 +259,7 @@ private void parsePAData(byte[] data) throws IOException, Asn1Exception { DerValue derPA = new DerValue(data); - List paList = new ArrayList<>(); + List paList = new ArrayList(); while (derPA.data.available() > 0) { // read the PA-DATA DerValue tmp = derPA.data.getDerValue(); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java @@ -157,7 +157,7 @@ * @exception IOException if an I/O error occurs while reading encoded data. */ public byte[] asn1Encode() throws Asn1Exception, IOException { - Vector v = new Vector<>(); + Vector v = new Vector(); v.addElement(new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x00), key.asn1Encode())); if (prealm != null) v.addElement(new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x01), prealm.asn1Encode())); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/LastReq.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/LastReq.java @@ -77,7 +77,7 @@ */ public LastReq(DerValue encoding) throws Asn1Exception, IOException { - Vector v= new Vector<>(); + Vector v= new Vector(); if (encoding.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java @@ -490,7 +490,7 @@ private static String exec(String c) { StringTokenizer st = new StringTokenizer(c); - Vector v = new Vector<>(); + Vector v = new Vector(); while (st.hasMoreTokens()) { v.addElement(st.nextToken()); } --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/crypto/EType.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/crypto/EType.java @@ -257,7 +257,7 @@ + configName); } - List list = new ArrayList<>(answer.length); + List list = new ArrayList(answer.length); for (int i = 0; i < answer.length; i++) { if (EncryptionKey.findKey(answer[i], keys) != null) { list.add(answer[i]); --- openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java @@ -67,7 +67,7 @@ // Attention: Currently there is no way to remove a keytab from this map, // this might lead to a memory leak. - private static Map map = new HashMap<>(); + private static Map map = new HashMap(); // KeyTab file does not exist. Note: a missing keytab is still valid private boolean isMissing = false; @@ -79,7 +79,7 @@ private long lastModified; private int kt_vno; - private Vector entries = new Vector<>(); + private Vector entries = new Vector(); /** * Constructs a KeyTab object. @@ -280,7 +280,7 @@ KeyTabEntry entry; EncryptionKey key; int size = entries.size(); - ArrayList keys = new ArrayList<>(size); + ArrayList keys = new ArrayList(size); for (int i = size-1; i >= 0; i--) { entry = entries.elementAt(i); if (entry.service.match(service)) { @@ -482,7 +482,7 @@ int count = 0; // Remember the highest KVNO for each etype. Used for kvno == -2 - Map highest = new HashMap<>(); + Map highest = new HashMap(); for (int i = entries.size()-1; i >= 0; i--) { KeyTabEntry e = entries.get(i); --- openjdk-boot/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java @@ -683,7 +683,7 @@ // Read the certificate chain int numOfCerts = dis.readInt(); if (numOfCerts > 0) { - List certs = new ArrayList<>( + List certs = new ArrayList( numOfCerts > 10 ? 10 : numOfCerts); for (int j = 0; j < numOfCerts; j++) { if (xVersion == 2) { --- openjdk-boot/jdk/src/share/classes/sun/security/provider/PolicyFile.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/provider/PolicyFile.java @@ -299,7 +299,7 @@ private static final int DEFAULT_CACHE_SIZE = 1; // contains the policy grant entries, PD cache, and alias mapping - private AtomicReference policyInfo = new AtomicReference<>(); + private AtomicReference policyInfo = new AtomicReference(); private boolean constructed = false; private boolean expandProperties = true; @@ -1333,7 +1333,7 @@ List entryPs = entry.getPrincipals(); if (debug != null) { - ArrayList accPs = new ArrayList<>(); + ArrayList accPs = new ArrayList(); if (principals != null) { for (int i = 0; i < principals.length; i++) { accPs.add(new PolicyParser.PrincipalEntry @@ -1414,7 +1414,7 @@ // check if the PrincipalComparator // implies the current thread's principals - Set pSet = new HashSet<>(principals.length); + Set pSet = new HashSet(principals.length); for (int j = 0; j < principals.length; j++) { pSet.add(principals[j]); } @@ -1697,7 +1697,7 @@ // build an info array for every principal // in the current domain which has a principal class // that is equal to policy entry principal class name - List plist = new ArrayList<>(); + List plist = new ArrayList(); for (int i = 0; i < pdp.length; i++) { if(pe.principalClass.equals(pdp[i].getClass().getName())) plist.add(pdp[i]); @@ -1767,7 +1767,7 @@ // Done return certs; - ArrayList userCertList = new ArrayList<>(); + ArrayList userCertList = new ArrayList(); i = 0; while (i < certs.length) { userCertList.add(certs[i]); @@ -2246,7 +2246,7 @@ if (this.certs == null) { // extract the signer certs ArrayList signerCerts = - new ArrayList<>(); + new ArrayList(); i = 0; while (i < certs.length) { signerCerts.add(certs[i]); --- openjdk-boot/jdk/src/share/classes/sun/security/provider/Sun.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/provider/Sun.java @@ -55,7 +55,7 @@ SunEntries.putEntries(this); } else { // use LinkedHashMap to preserve the order of the PRNGs - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap(); SunEntries.putEntries(map); AccessController.doPrivileged(new PutAllAction(this, map)); } --- openjdk-boot/jdk/src/share/classes/sun/security/provider/VerificationProvider.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/provider/VerificationProvider.java @@ -76,7 +76,7 @@ SunRsaSignEntries.putEntries(this); } else { // use LinkedHashMap to preserve the order of the PRNGs - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap(); SunEntries.putEntries(map); SunRsaSignEntries.putEntries(map); AccessController.doPrivileged(new PutAllAction(this, map)); --- openjdk-boot/jdk/src/share/classes/sun/security/provider/X509Factory.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/provider/X509Factory.java @@ -409,10 +409,10 @@ parseX509orPKCS7Cert(InputStream is) throws CertificateException, IOException { - Collection coll = new ArrayList<>(); + Collection coll = new ArrayList(); byte[] data = readOneBlock(is); if (data == null) { - return new ArrayList<>(0); + return new ArrayList(0); } try { PKCS7 pkcs7 = new PKCS7(data); @@ -422,7 +422,7 @@ return Arrays.asList(certs); } else { // no crls provided - return new ArrayList<>(0); + return new ArrayList(0); } } catch (ParsingException e) { while (data != null) { @@ -442,10 +442,10 @@ parseX509orPKCS7CRL(InputStream is) throws CRLException, IOException { - Collection coll = new ArrayList<>(); + Collection coll = new ArrayList(); byte[] data = readOneBlock(is); if (data == null) { - return new ArrayList<>(0); + return new ArrayList(0); } try { PKCS7 pkcs7 = new PKCS7(data); @@ -455,7 +455,7 @@ return Arrays.asList(crls); } else { // no crls provided - return new ArrayList<>(0); + return new ArrayList(0); } } catch (ParsingException e) { while (data != null) { --- openjdk-boot/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java @@ -590,7 +590,7 @@ // Except the performance improvement, another benefit is to break // the dead loop while looking for the issuer back and forth // between the delegated self-issued certificate and its issuer. - Set newTrustAnchors = new HashSet<>(trustAnchors); + Set newTrustAnchors = new HashSet(trustAnchors); if (prevKey != null) { // Add the previous certificate as a trust anchor. --- openjdk-boot/jdk/src/share/classes/sun/security/rsa/RSACore.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/rsa/RSACore.java @@ -219,7 +219,7 @@ // use a weak hashmap so that cached values are automatically cleared // when the modulus is GC'ed private final static Map blindingCache = - new WeakHashMap<>(); + new WeakHashMap(); /** * Set of blinding parameters for a given RSA key. --- openjdk-boot/jdk/src/share/classes/sun/security/rsa/SunRsaSign.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/rsa/SunRsaSign.java @@ -52,7 +52,7 @@ SunRsaSignEntries.putEntries(this); } else { // use LinkedHashMap to preserve the order of the PRNGs - Map map = new HashMap<>(); + Map map = new HashMap(); SunRsaSignEntries.putEntries(map); AccessController.doPrivileged(new PutAllAction(this, map)); } --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/CipherSuite.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/CipherSuite.java @@ -393,7 +393,7 @@ // Map BulkCipher -> Boolean(available) private final static Map availableCache = - new HashMap<>(8); + new HashMap(8); // descriptive name including key size, e.g. AES/128 final String description; --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java @@ -656,7 +656,7 @@ if (certRequest != null) { X509ExtendedKeyManager km = sslContext.getX509KeyManager(); - ArrayList keytypesTmp = new ArrayList<>(4); + ArrayList keytypesTmp = new ArrayList(4); for (int i = 0; i < certRequest.types.length; i++) { String typeName; @@ -1175,7 +1175,7 @@ "Can't reuse existing SSL client session"); } - Collection cipherList = new ArrayList<>(2); + Collection cipherList = new ArrayList(2); cipherList.add(sessionSuite); if (!secureRenegotiation && cipherSuites.contains(CipherSuite.C_SCSV)) { @@ -1193,7 +1193,7 @@ // exclude SCSV for secure renegotiation if (secureRenegotiation && cipherSuites.contains(CipherSuite.C_SCSV)) { Collection cipherList = - new ArrayList<>(cipherSuites.size() - 1); + new ArrayList(cipherSuites.size() - 1); for (CipherSuite suite : cipherSuites.collection()) { if (suite != CipherSuite.C_SCSV) { cipherList.add(suite); --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java @@ -258,7 +258,7 @@ // add server_name extension void addServerNameIndicationExtension(String hostname) { // We would have checked that the hostname ia a FQDN. - ArrayList hostnames = new ArrayList<>(1); + ArrayList hostnames = new ArrayList(1); hostnames.add(hostname); try { @@ -434,7 +434,7 @@ CertificateMsg(HandshakeInStream input) throws IOException { int chainLen = input.getInt24(); - List v = new ArrayList<>(4); + List v = new ArrayList(4); CertificateFactory cf = null; while (chainLen > 0) { @@ -1334,7 +1334,7 @@ // read the certificate_authorities int len = input.getInt16(); - ArrayList v = new ArrayList<>(); + ArrayList v = new ArrayList(); while (len >= 3) { DistinguishedName dn = new DistinguishedName(input); v.add(dn); @@ -1725,7 +1725,7 @@ // Note that this will prevent the Spi classes from being GC'd. We assume // that is not a problem. private final static Map methodCache = - new ConcurrentHashMap<>(); + new ConcurrentHashMap(); private static void digestKey(MessageDigest md, SecretKey key) { try { --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/Handshaker.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/Handshaker.java @@ -569,7 +569,7 @@ activeProtocols = getActiveProtocols(); } - ArrayList suites = new ArrayList<>(); + ArrayList suites = new ArrayList(); if (!(activeProtocols.collection().isEmpty()) && activeProtocols.min.v != ProtocolVersion.NONE.v) { for (CipherSuite suite : enabledCipherSuites.collection()) { @@ -614,7 +614,7 @@ */ ProtocolList getActiveProtocols() { if (activeProtocols == null) { - ArrayList protocols = new ArrayList<>(4); + ArrayList protocols = new ArrayList(4); for (ProtocolVersion protocol : enabledProtocols.collection()) { boolean found = false; for (CipherSuite suite : enabledCipherSuites.collection()) { --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/HelloExtensions.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/HelloExtensions.java @@ -169,7 +169,7 @@ return name; } - static List knownExtensions = new ArrayList<>(9); + static List knownExtensions = new ArrayList(9); static ExtensionType get(int id) { for (ExtensionType ext : knownExtensions) { @@ -673,7 +673,7 @@ } public String toString() { - List list = new ArrayList<>(); + List list = new ArrayList(); for (byte format : formats) { list.add(toString(format)); } --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/ProtocolList.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/ProtocolList.java @@ -79,7 +79,7 @@ throw new IllegalArgumentException("Protocols may not be null"); } - ArrayList versions = new ArrayList<>(3); + ArrayList versions = new ArrayList(3); for (int i = 0; i < names.length; i++ ) { ProtocolVersion version = ProtocolVersion.valueOf(names[i]); if (versions.contains(version) == false) { --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java @@ -261,7 +261,7 @@ protected Set decomposes(KeyExchange keyExchange, boolean forCertPathOnly) { - Set components = new HashSet<>(); + Set components = new HashSet(); switch (keyExchange) { case K_NULL: if (!forCertPathOnly) { @@ -356,7 +356,7 @@ } protected Set decomposes(BulkCipher bulkCipher) { - Set components = new HashSet<>(); + Set components = new HashSet(); if (bulkCipher.transformation != null) { components.addAll(super.decomposes(bulkCipher.transformation)); @@ -366,7 +366,7 @@ } protected Set decomposes(MacAlg macAlg) { - Set components = new HashSet<>(); + Set components = new HashSet(); if (macAlg == CipherSuite.M_MD5) { components.add("MD5"); @@ -407,7 +407,7 @@ } if (cipherSuite != null) { - Set components = new HashSet<>(); + Set components = new HashSet(); if(cipherSuite.keyExchange != null) { components.addAll( @@ -448,7 +448,7 @@ } if (cipherSuite != null) { - Set components = new HashSet<>(); + Set components = new HashSet(); if(cipherSuite.keyExchange != null) { components.addAll( --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLContextImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLContextImpl.java @@ -325,7 +325,7 @@ Collection allowedCipherSuites = CipherSuite.allowedCipherSuites(); - ArrayList suites = new ArrayList<>(); + ArrayList suites = new ArrayList(); if (!(protocols.collection().isEmpty()) && protocols.min.v != ProtocolVersion.NONE.v) { for (CipherSuite suite : allowedCipherSuites) { @@ -532,7 +532,7 @@ return defaultKeyManagers; } - final Map props = new HashMap<>(); + final Map props = new HashMap(); AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws Exception { --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLSessionImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLSessionImpl.java @@ -618,7 +618,7 @@ * key and the calling security context. This is important since * sessions can be shared across different protection domains. */ - private Hashtable table = new Hashtable<>(); + private Hashtable table = new Hashtable(); /** * Assigns a session value. Session change events are given if @@ -686,7 +686,7 @@ */ public String[] getValueNames() { Enumeration e; - Vector v = new Vector<>(); + Vector v = new Vector(); SecureKey key; Object securityCtx = SecureKey.getCurrentSecurityContext(); --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java @@ -2478,7 +2478,7 @@ entrySet, HandshakeCompletedEvent e) { super("HandshakeCompletedNotify-Thread"); - targets = new HashSet<>(entrySet); // clone the entry set + targets = new HashSet(entrySet); // clone the entry set event = e; } --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java @@ -153,7 +153,7 @@ static Collection getSupportedAlgorithms(AlgorithmConstraints constraints) { - Collection supported = new ArrayList<>(); + Collection supported = new ArrayList(); synchronized (priorityMap) { for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) { if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM && @@ -170,7 +170,7 @@ // Get supported algorithm collection from an untrusted collection static Collection getSupportedAlgorithms( Collection algorithms ) { - Collection supported = new ArrayList<>(); + Collection supported = new ArrayList(); for (SignatureAndHashAlgorithm sigAlg : algorithms) { if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM) { supported.add(sigAlg); @@ -182,7 +182,7 @@ static String[] getAlgorithmNames( Collection algorithms) { - ArrayList algorithmNames = new ArrayList<>(); + ArrayList algorithmNames = new ArrayList(); if (algorithms != null) { for (SignatureAndHashAlgorithm sigAlg : algorithms) { algorithmNames.add(sigAlg.algorithm); @@ -195,7 +195,7 @@ static Set getHashAlgorithmNames( Collection algorithms) { - Set algorithmNames = new HashSet<>(); + Set algorithmNames = new HashSet(); if (algorithms != null) { for (SignatureAndHashAlgorithm sigAlg : algorithms) { if (sigAlg.hash.value > 0) { --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java @@ -337,7 +337,7 @@ X500Principal[] x500Issuers = (X500Principal[])issuers; // the algorithm below does not produce duplicates, so avoid Set - List aliases = new ArrayList<>(); + List aliases = new ArrayList(); for (Map.Entry entry : credentialsMap.entrySet()) { @@ -397,7 +397,7 @@ * possible. Principals that cannot be converted are ignored. */ private static X500Principal[] convertPrincipals(Principal[] principals) { - List list = new ArrayList<>(principals.length); + List list = new ArrayList(principals.length); for (int i = 0; i < principals.length; i++) { Principal p = principals[i]; if (p instanceof X500Principal) { --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java @@ -134,7 +134,7 @@ FileInputStream fis = null; String defaultTrustStoreType; String defaultTrustStoreProvider; - final HashMap props = new HashMap<>(); + final HashMap props = new HashMap(); final String sep = File.separator; KeyStore ks = null; --- openjdk-boot/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java @@ -307,7 +307,7 @@ (keyTypes.length == 0) || (keyTypes[0] == null)) { return null; } - List list = new ArrayList<>(keyTypes.length); + List list = new ArrayList(keyTypes.length); for (String keyType : keyTypes) { list.add(new KeyType(keyType)); } @@ -429,7 +429,7 @@ // make a Set out of the array private Set getIssuerSet(Principal[] issuers) { if ((issuers != null) && (issuers.length != 0)) { - return new HashSet<>(Arrays.asList(issuers)); + return new HashSet(Arrays.asList(issuers)); } else { return null; } --- openjdk-boot/jdk/src/share/classes/sun/security/tools/JarSigner.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/tools/JarSigner.java @@ -123,14 +123,14 @@ boolean token = false; // token-based keystore String jarfile; // jar files to sign or verify String alias; // alias to sign jar with - List ckaliases = new ArrayList<>(); // aliases in -verify + List ckaliases = new ArrayList(); // aliases in -verify char[] storepass; // keystore password boolean protectedPath; // protected authentication path String storetype; // keystore type String providerName; // provider name Vector providers = null; // list of providers // arguments for provider constructors - HashMap providerArgs = new HashMap<>(); + HashMap providerArgs = new HashMap(); char[] keypass; // private key password String sigfile; // name of .SF file String sigalg; // name of signature algorithm @@ -567,7 +567,7 @@ try { jf = new JarFile(jarName, true); - Vector entriesVec = new Vector<>(); + Vector entriesVec = new Vector(); byte[] buffer = new byte[8192]; Enumeration entries = jf.entries(); @@ -594,7 +594,7 @@ // The map to record display info, only used when -verbose provided // key: signer info string // value: the list of files with common key - Map> output = new LinkedHashMap<>(); + Map> output = new LinkedHashMap>(); if (man != null) { if (verbose != null) System.out.println(); @@ -946,7 +946,7 @@ .append(signTimeForm.format(source)).append("]").toString(); } - private Map cacheForInKS = new IdentityHashMap<>(); + private Map cacheForInKS = new IdentityHashMap(); private int inKeyStoreForOneSigner(CodeSigner signer) { if (cacheForInKS.containsKey(signer)) { @@ -989,7 +989,7 @@ return result; } - Hashtable storeHash = new Hashtable<>(); + Hashtable storeHash = new Hashtable(); int inKeyStore(CodeSigner[] signers) { @@ -1119,7 +1119,7 @@ * generated one. (This may invalidate existing signatures!) */ BASE64Encoder encoder = new JarBASE64Encoder(); - Vector mfFiles = new Vector<>(); + Vector mfFiles = new Vector(); boolean wasSigned = false; @@ -1476,7 +1476,7 @@ return false; } - Map cacheForSignerInfo = new IdentityHashMap<>(); + Map cacheForSignerInfo = new IdentityHashMap(); /** * Returns a string of singer info, with a newline at the end @@ -1600,7 +1600,7 @@ } } } - Set tas = new HashSet<>(); + Set tas = new HashSet(); try { KeyStore caks = KeyTool.getCacertsKeyStore(); if (caks != null) { --- openjdk-boot/jdk/src/share/classes/sun/security/tools/KeyTool.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/tools/KeyTool.java @@ -152,11 +152,11 @@ private KeyStore caks = null; // "cacerts" keystore private char[] srcstorePass = null; private String srcstoretype = null; - private Set passwords = new HashSet<>(); + private Set passwords = new HashSet(); private String startDate = null; - private List ids = new ArrayList<>(); // used in GENCRL - private List v3ext = new ArrayList<>(); + private List ids = new ArrayList(); // used in GENCRL + private List v3ext = new ArrayList(); enum Command { CERTREQ("Generates.a.certificate.request", @@ -2089,7 +2089,7 @@ */ public static List readCRLsFromCert(X509Certificate cert) throws Exception { - List crls = new ArrayList<>(); + List crls = new ArrayList(); CRLDistributionPointsExtension ext = X509CertImpl.toImpl(cert).getCRLDistributionPointsExtension(); if (ext == null) return crls; @@ -2256,7 +2256,7 @@ if (jarfile != null) { JarFile jf = new JarFile(jarfile, true); Enumeration entries = jf.entries(); - Set ss = new HashSet<>(); + Set ss = new HashSet(); byte[] buffer = new byte[8192]; int pos = 0; while (entries.hasMoreElements()) { @@ -3331,7 +3331,7 @@ } // start building chain - Vector chain = new Vector<>(2); + Vector chain = new Vector(2); if (buildChain((X509Certificate)certToVerify, chain, certs)) { Certificate[] newChain = new Certificate[chain.size()]; // buildChain() returns chain with self-signed root-cert first and @@ -3857,7 +3857,7 @@ break; case 2: // EKU if(value != null) { - Vector v = new Vector<>(); + Vector v = new Vector(); for (String s: value.split(",")) { int p = oneOf(s, "anyExtendedKeyUsage", @@ -3927,7 +3927,7 @@ } if(value != null) { List accessDescriptions = - new ArrayList<>(); + new ArrayList(); String[] ps = value.split(","); for(String item: ps) { colonpos = item.indexOf(':'); @@ -4211,7 +4211,7 @@ } public static Pair of(A a, B b) { - return new Pair<>(a,b); + return new Pair(a,b); } } --- openjdk-boot/jdk/src/share/classes/sun/security/tools/policytool/PolicyTool.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/tools/policytool/PolicyTool.java @@ -643,7 +643,7 @@ Class pc = Class.forName(type, true, Thread.currentThread().getContextClassLoader()); Constructor c = null; - Vector objects = new Vector<>(2); + Vector objects = new Vector(2); if (name != null) objects.add(name); if (actions != null) objects.add(actions); switch (objects.size()) { @@ -1722,7 +1722,7 @@ new PolicyParser.GrantEntry(signedby, codebase); // get the new Principals - LinkedList prins = new LinkedList<>(); + LinkedList prins = new LinkedList(); TaggedList prinList = (TaggedList)getComponent(PE_PRIN_LIST); for (int i = 0; i < prinList.getItemCount(); i++) { prins.add((PolicyParser.PrincipalEntry)prinList.getObject(i)); @@ -1730,7 +1730,7 @@ ge.principals = prins; // get the new Permissions - Vector perms = new Vector<>(); + Vector perms = new Vector(); TaggedList permList = (TaggedList)getComponent(PE_PERM_LIST); for (int i = 0; i < permList.getItemCount(); i++) { perms.addElement((PolicyParser.PermissionEntry)permList.getObject(i)); @@ -3647,7 +3647,7 @@ * This is a java.awt.List that bind an Object to each String it holds. */ class TaggedList extends List { - private java.util.List data = new LinkedList<>(); + private java.util.List data = new LinkedList(); public TaggedList(int i, boolean b) { super(i, b); } --- openjdk-boot/jdk/src/share/classes/sun/tools/native2ascii/Main.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/tools/native2ascii/Main.java @@ -94,7 +94,7 @@ * Run the converter */ public synchronized boolean convert(String argv[]){ - List v = new ArrayList<>(2); + List v = new ArrayList(2); File outputFile = null; boolean createOutputFile = false; --- openjdk-boot/jdk/src/share/classes/sun/util/locale/InternalLocaleBuilder.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/util/locale/InternalLocaleBuilder.java @@ -113,7 +113,7 @@ } // Use case insensitive string to prevent duplication if (uattributes == null) { - uattributes = new HashSet<>(4); + uattributes = new HashSet(4); } uattributes.add(new CaseInsensitiveString(attribute)); return this; @@ -157,7 +157,7 @@ } } if (ukeywords == null) { - ukeywords = new HashMap<>(4); + ukeywords = new HashMap(4); } ukeywords.put(cikey, type); } @@ -211,7 +211,7 @@ setUnicodeLocaleExtension(val); } else { if (extensions == null) { - extensions = new HashMap<>(4); + extensions = new HashMap(4); } extensions.put(key, val); } @@ -262,7 +262,7 @@ } if (extensions == null) { - extensions = new ArrayList<>(4); + extensions = new ArrayList(4); } extensions.add(sb.toString()); } else { @@ -313,7 +313,7 @@ clearExtensions(); if (!LocaleUtils.isEmpty(bcpExtensions)) { - Set done = new HashSet<>(bcpExtensions.size()); + Set done = new HashSet(bcpExtensions.size()); for (String bcpExt : bcpExtensions) { CaseInsensitiveChar key = new CaseInsensitiveChar(bcpExt); // ignore duplicates @@ -323,7 +323,7 @@ setUnicodeLocaleExtension(bcpExt.substring(2)); } else { if (extensions == null) { - extensions = new HashMap<>(4); + extensions = new HashMap(4); } extensions.put(key, bcpExt.substring(2)); } @@ -334,7 +334,7 @@ if (privateuse != null && privateuse.length() > 0) { // privateuse string contains prefix, e.g. "x-abc-def" if (extensions == null) { - extensions = new HashMap<>(1); + extensions = new HashMap(1); } extensions.put(new CaseInsensitiveChar(privateuse), privateuse.substring(2)); } @@ -442,19 +442,19 @@ UnicodeLocaleExtension ue = (UnicodeLocaleExtension)e; for (String uatr : ue.getUnicodeLocaleAttributes()) { if (uattributes == null) { - uattributes = new HashSet<>(4); + uattributes = new HashSet(4); } uattributes.add(new CaseInsensitiveString(uatr)); } for (String ukey : ue.getUnicodeLocaleKeys()) { if (ukeywords == null) { - ukeywords = new HashMap<>(4); + ukeywords = new HashMap(4); } ukeywords.put(new CaseInsensitiveString(ukey), ue.getUnicodeLocaleType(ukey)); } } else { if (extensions == null) { - extensions = new HashMap<>(4); + extensions = new HashMap(4); } extensions.put(new CaseInsensitiveChar(key), e.getValue()); } @@ -604,7 +604,7 @@ break; } if (uattributes == null) { - uattributes = new HashSet<>(4); + uattributes = new HashSet(4); } uattributes.add(new CaseInsensitiveString(itr.current())); itr.next(); @@ -622,7 +622,7 @@ assert(typeStart == -1 || typeEnd != -1); type = (typeStart == -1) ? "" : subtags.substring(typeStart, typeEnd); if (ukeywords == null) { - ukeywords = new HashMap<>(4); + ukeywords = new HashMap(4); } ukeywords.put(key, type); @@ -652,7 +652,7 @@ assert(typeStart == -1 || typeEnd != -1); type = (typeStart == -1) ? "" : subtags.substring(typeStart, typeEnd); if (ukeywords == null) { - ukeywords = new HashMap<>(4); + ukeywords = new HashMap(4); } ukeywords.put(key, type); } --- openjdk-boot/jdk/src/share/classes/sun/util/locale/LanguageTag.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/util/locale/LanguageTag.java @@ -62,7 +62,7 @@ // Map contains grandfathered tags and its preferred mappings from // http://www.ietf.org/rfc/rfc5646.txt // Keys are lower-case strings. - private static final Map GRANDFATHERED = new HashMap<>(); + private static final Map GRANDFATHERED = new HashMap(); static { // grandfathered = irregular ; non-redundant tags registered @@ -257,7 +257,7 @@ } found = true; if (extlangs.isEmpty()) { - extlangs = new ArrayList<>(3); + extlangs = new ArrayList(3); } extlangs.add(s); sts.parseLength = itr.currentEnd(); @@ -322,7 +322,7 @@ } found = true; if (variants.isEmpty()) { - variants = new ArrayList<>(3); + variants = new ArrayList(3); } variants.add(s); sts.parseLength = itr.currentEnd(); @@ -365,7 +365,7 @@ } if (extensions.isEmpty()) { - extensions = new ArrayList<>(4); + extensions = new ArrayList(4); } extensions.add(sb.toString()); found = true; @@ -462,7 +462,7 @@ break; } if (variants == null) { - variants = new ArrayList<>(); + variants = new ArrayList(); } variants.add(var); // Do not canonicalize! varitr.next(); @@ -503,7 +503,7 @@ privateuse = ext.getValue(); } else { if (extensions == null) { - extensions = new ArrayList<>(); + extensions = new ArrayList(); } extensions.add(locextKey.toString() + SEP + ext.getValue()); } --- openjdk-boot/jdk/src/share/classes/sun/util/locale/LocaleExtensions.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/util/locale/LocaleExtensions.java @@ -81,7 +81,7 @@ } // Build extension map - SortedMap map = new TreeMap<>(); + SortedMap map = new TreeMap(); if (hasExtension) { for (Entry ext : extensions.entrySet()) { char key = LocaleUtils.toLower(ext.getKey().value()); @@ -104,14 +104,14 @@ SortedMap ukmap = null; if (hasUAttributes) { - uaset = new TreeSet<>(); + uaset = new TreeSet(); for (CaseInsensitiveString cis : uattributes) { uaset.add(LocaleUtils.toLowerString(cis.value())); } } if (hasUKeywords) { - ukmap = new TreeMap<>(); + ukmap = new TreeMap(); for (Entry kwd : ukeywords.entrySet()) { String key = LocaleUtils.toLowerString(kwd.getKey().value()); String type = LocaleUtils.toLowerString(kwd.getValue()); --- openjdk-boot/jdk/src/share/classes/sun/util/locale/LocaleObjectCache.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/util/locale/LocaleObjectCache.java @@ -38,14 +38,14 @@ public abstract class LocaleObjectCache { private ConcurrentMap> map; - private ReferenceQueue queue = new ReferenceQueue<>(); + private ReferenceQueue queue = new ReferenceQueue(); public LocaleObjectCache() { this(16, 0.75f, 16); } public LocaleObjectCache(int initialCapacity, float loadFactor, int concurrencyLevel) { - map = new ConcurrentHashMap<>(initialCapacity, loadFactor, concurrencyLevel); + map = new ConcurrentHashMap>(initialCapacity, loadFactor, concurrencyLevel); } public V get(K key) { @@ -64,7 +64,7 @@ return null; } - CacheEntry newEntry = new CacheEntry<>(key, newVal, queue); + CacheEntry newEntry = new CacheEntry(key, newVal, queue); while (value == null) { cleanStaleEntries(); @@ -81,7 +81,7 @@ } protected V put(K key, V value) { - CacheEntry entry = new CacheEntry<>(key, value, queue); + CacheEntry entry = new CacheEntry(key, value, queue); CacheEntry oldEntry = map.put(key, entry); return (oldEntry == null) ? null : oldEntry.get(); } --- openjdk-boot/jdk/src/share/classes/sun/util/logging/PlatformLogger.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/util/logging/PlatformLogger.java @@ -113,7 +113,7 @@ // Table of known loggers. Maps names to PlatformLoggers. private static Map> loggers = - new HashMap<>(); + new HashMap>(); /** * Returns a PlatformLogger of a given name. @@ -126,7 +126,7 @@ } if (log == null) { log = new PlatformLogger(name); - loggers.put(name, new WeakReference<>(log)); + loggers.put(name, new WeakReference(log)); } return log; } @@ -469,7 +469,7 @@ */ static class JavaLogger extends LoggerProxy { private static final Map levelObjects = - new HashMap<>(); + new HashMap(); static { if (LoggingSupport.isAvailable()) { --- openjdk-boot/jdk/src/share/demo/nio/zipfs/Demo.java.orig +++ openjdk-boot/jdk/src/share/demo/nio/zipfs/Demo.java @@ -160,7 +160,7 @@ } Action action = Action.valueOf(args[0]); - Map env = env = new HashMap<>(); + Map env = env = new HashMap(); if (action == Action.create) env.put("create", "true"); try (FileSystem fs = provider.newFileSystem(Paths.get(args[1]), env)) { @@ -656,9 +656,9 @@ private static void fchCopy(Path src, Path dst) throws IOException { - Set read = new HashSet<>(); + Set read = new HashSet(); read.add(READ); - Set openwrite = new HashSet<>(); + Set openwrite = new HashSet(); openwrite.add(CREATE_NEW); openwrite.add(WRITE); @@ -676,9 +676,9 @@ private static void chCopy(Path src, Path dst) throws IOException { - Set read = new HashSet<>(); + Set read = new HashSet(); read.add(READ); - Set openwrite = new HashSet<>(); + Set openwrite = new HashSet(); openwrite.add(CREATE_NEW); openwrite.add(WRITE); --- openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipCoder.java.orig +++ openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipCoder.java @@ -142,8 +142,8 @@ return new ZipCoder(Charset.defaultCharset()); } - private final ThreadLocal decTL = new ThreadLocal<>(); - private final ThreadLocal encTL = new ThreadLocal<>(); + private final ThreadLocal decTL = new ThreadLocal(); + private final ThreadLocal encTL = new ThreadLocal();r private CharsetDecoder decoder() { CharsetDecoder dec = decTL.get(); --- openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileAttributeView.java.orig +++ openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileAttributeView.java @@ -134,7 +134,7 @@ throws IOException { ZipFileAttributes zfas = readAttributes(); - LinkedHashMap map = new LinkedHashMap<>(); + LinkedHashMap map = new LinkedHashMap(); if ("*".equals(attributes)) { for (AttrID id : AttrID.values()) { try { --- openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java.orig +++ openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java @@ -157,7 +157,7 @@ @Override public Iterable getRootDirectories() { - ArrayList pathArr = new ArrayList<>(); + ArrayList pathArr = new ArrayList(); pathArr.add(new ZipPath(this, new byte[]{'/'})); return pathArr; } @@ -202,7 +202,7 @@ @Override public Iterable getFileStores() { - ArrayList list = new ArrayList<>(1); + ArrayList list = new ArrayList(1); list.add(new ZipFileStore(new ZipPath(this, new byte[]{'/'}))); return list; } @@ -268,7 +268,7 @@ endWrite(); } if (!streams.isEmpty()) { // unlock and close all remaining streams - Set copy = new HashSet<>(streams); + Set copy = new HashSet(streams); for (InputStream is: copy) is.close(); } @@ -396,7 +396,7 @@ IndexNode inode = getInode(path); if (inode == null) throw new NotDirectoryException(getString(path)); - List list = new ArrayList<>(); + List list = new ArrayList(); IndexNode child = inode.child; while (child != null) { ZipPath zp = toZipPath(child.name); @@ -825,7 +825,7 @@ // the ex-channel and ex-path that need to close when their outstanding // input streams are all closed by the obtainers. - private Set exChClosers = new HashSet<>(); + private Set exChClosers = new HashSet(); private Set tmppaths = Collections.synchronizedSet(new HashSet()); private Path getTempPathForEntry(byte[] path) throws IOException { @@ -1022,7 +1022,7 @@ private byte[] initCEN() throws IOException { end = findEND(); if (end.endpos == 0) { - inodes = new LinkedHashMap<>(10); + inodes = new LinkedHashMap(10); locpos = 0; buildNodeTree(); return null; // only END header present @@ -1043,7 +1043,7 @@ zerror("read CEN tables failed"); } // Iterate through the entries in the central directory - inodes = new LinkedHashMap<>(end.centot + 1); + inodes = new LinkedHashMap(end.centot + 1); int pos = 0; int limit = cen.length - ENDHDR; while (pos < limit) { @@ -1190,7 +1190,7 @@ Path tmpFile = createTempFileInSameDirectoryAs(zfpath); try (OutputStream os = new BufferedOutputStream(Files.newOutputStream(tmpFile, WRITE))) { - ArrayList elist = new ArrayList<>(inodes.size()); + ArrayList elist = new ArrayList(inodes.size()); long written = 0; byte[] buf = new byte[8192]; Entry e = null; @@ -1601,7 +1601,7 @@ // Maxmum number of de/inflater we cache private final int MAX_FLATER = 20; // List of available Inflater objects for decompression - private final List inflaters = new ArrayList<>(); + private final List inflaters = new ArrayList(); // Gets an inflater from the list of available inflaters or allocates // a new one. @@ -1630,7 +1630,7 @@ } // List of available Deflater objects for compression - private final List deflaters = new ArrayList<>(); + private final List deflaters = new ArrayList(); // Gets an deflater from the list of available deflaters or allocates // a new one. @@ -2340,7 +2340,7 @@ private void buildNodeTree() throws IOException { beginWrite(); try { - HashSet dirs = new HashSet<>(); + HashSet dirs = new HashSet(); IndexNode root = new IndexNode(ROOTPATH, -1); inodes.put(root, root); dirs.add(root); --- openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java.orig +++ openjdk-boot/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java @@ -62,7 +62,7 @@ public class ZipFileSystemProvider extends FileSystemProvider { - private final Map filesystems = new HashMap<>(); + private final Map filesystems = new HashMap(); public ZipFileSystemProvider() {} --- openjdk-boot/jdk/src/solaris/classes/java/lang/ProcessEnvironment.java.orig +++ openjdk-boot/jdk/src/solaris/classes/java/lang/ProcessEnvironment.java @@ -68,7 +68,7 @@ // We cache the C environment. This means that subsequent calls // to putenv/setenv from C will not be visible from Java code. byte[][] environ = environ(); - theEnvironment = new HashMap<>(environ.length/2 + 3); + theEnvironment = new HashMap(environ.length/2 + 3); // Read environment variables back to front, // so that earlier variables override later ones. for (int i = environ.length-1; i > 0; i-=2) --- openjdk-boot/jdk/src/solaris/classes/java/util/prefs/FileSystemPreferences.java.orig +++ openjdk-boot/jdk/src/solaris/classes/java/util/prefs/FileSystemPreferences.java @@ -354,7 +354,7 @@ * log against that map. The resulting map is then written back * to the disk. */ - final List changeLog = new ArrayList<>(); + final List changeLog = new ArrayList(); /** * Represents a change to a preference. @@ -507,7 +507,7 @@ }); if (newNode) { // These 2 things guarantee node will get wrtten at next flush/sync - prefsCache = new TreeMap<>(); + prefsCache = new TreeMap(); nodeCreate = new NodeCreate(); changeLog.add(nodeCreate); } @@ -550,7 +550,7 @@ loadCache(); } catch(Exception e) { // assert lastSyncTime == 0; - prefsCache = new TreeMap<>(); + prefsCache = new TreeMap(); } } @@ -567,7 +567,7 @@ AccessController.doPrivileged( new PrivilegedExceptionAction() { public Void run() throws BackingStoreException { - Map m = new TreeMap<>(); + Map m = new TreeMap(); long newLastSyncTime = 0; FileInputStream fis = null; try { @@ -581,7 +581,7 @@ prefsFile.renameTo( new File( prefsFile.getParentFile(), "IncorrectFormatPrefs.xml")); - m = new TreeMap<>(); + m = new TreeMap(); } else if (e instanceof FileNotFoundException) { getLogger().warning("Prefs file removed in background " + prefsFile.getPath()); @@ -662,7 +662,7 @@ return AccessController.doPrivileged( new PrivilegedAction() { public String[] run() { - List result = new ArrayList<>(); + List result = new ArrayList(); File[] dirContents = dir.listFiles(); if (dirContents != null) { for (int i = 0; i < dirContents.length; i++) @@ -810,7 +810,7 @@ } else if (lastSyncTime != 0 && !dir.exists()) { // This node was removed in the background. Playback any changes // against a virgin (empty) Map. - prefsCache = new TreeMap<>(); + prefsCache = new TreeMap(); replayChanges(); } if (!changeLog.isEmpty()) { --- openjdk-boot/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java.orig +++ openjdk-boot/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java @@ -60,7 +60,7 @@ int maxperkeyword, int maxkeywords) { - LinkedList ll = new LinkedList<>(); + LinkedList ll = new LinkedList(); try { BufferedReader in = @@ -200,7 +200,7 @@ // no local domain so try fallback (RPC) domain or // hostname - sl = new LinkedList<>(); + sl = new LinkedList(); String domain = fallbackDomain0(); if (domain != null && domain.length() > 0) { sl.add(domain); --- openjdk-boot/jdk/src/solaris/classes/sun/nio/cs/ext/CompoundTextSupport.java.orig +++ openjdk-boot/jdk/src/solaris/classes/sun/nio/cs/ext/CompoundTextSupport.java @@ -153,12 +153,12 @@ static { HashMap tSequenceToEncodingMap = - new HashMap<>(33, 1.0f); + new HashMap(33, 1.0f); HashMap tHighBitsMap = - new HashMap<>(31, 1.0f); + new HashMap(31, 1.0f); HashMap tEncodingToSequenceMap = - new HashMap<>(21, 1.0f); - ArrayList tEncodings = new ArrayList<>(21); + new HashMap(21, 1.0f); + ArrayList tEncodings = new ArrayList(21); if (!(isEncodingSupported("US-ASCII") && isEncodingSupported("ISO-8859-1"))) --- openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java.orig +++ openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java @@ -53,7 +53,7 @@ static final Set supportedFileAttributeViews = supportedFileAttributeViews(); private static Set supportedFileAttributeViews() { - Set result = new HashSet<>(); + Set result = new HashSet(); result.addAll(standardFileAttributeViews()); // additional Linux-specific views result.add("dos"); @@ -76,7 +76,7 @@ * Returns object to iterate over the mount entries in the given fstab file. */ Iterable getMountEntries(String fstab) { - ArrayList entries = new ArrayList<>(); + ArrayList entries = new ArrayList(); try { long fp = setmntent(fstab.getBytes(), "r".getBytes()); try { --- openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java.orig +++ openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java @@ -63,7 +63,7 @@ // Parses buffer as array of NULL-terminated C strings. private List asList(long address, int size) { - List list = new ArrayList<>(); + List list = new ArrayList(); int start = 0; int pos = 0; while (pos < size) { --- openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java.orig +++ openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java @@ -198,7 +198,7 @@ * Decode the buffer, returning an ACL */ private static List decode(long address, int n) { - ArrayList acl = new ArrayList<>(n); + ArrayList acl = new ArrayList(n); for (int i=0; i supportedFileAttributeViews = supportedFileAttributeViews(); private static Set supportedFileAttributeViews() { - Set result = new HashSet<>(); + Set result = new HashSet(); result.addAll(standardFileAttributeViews()); // additional Solaris-specific views result.add("acl"); @@ -101,7 +101,7 @@ */ @Override Iterable getMountEntries() { - ArrayList entries = new ArrayList<>(); + ArrayList entries = new ArrayList(); try { UnixPath mnttab = new UnixPath(this, "/etc/mnttab"); long fp = fopen(mnttab, "r"); --- openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java.orig +++ openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java @@ -83,7 +83,7 @@ } // read list of extended attributes - List list = new ArrayList<>(); + List list = new ArrayList(); try { byte[] name; while ((name = readdir(dp)) != null) { --- openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java.orig +++ openjdk-boot/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java @@ -194,7 +194,7 @@ @Override public Set permissions() { int bits = (st_mode & UnixConstants.S_IAMB); - HashSet perms = new HashSet<>(); + HashSet perms = new HashSet(); if ((bits & UnixConstants.S_IRUSR) > 0) perms.add(PosixFilePermission.OWNER_READ); --- openjdk-boot/jdk/src/windows/classes/java/lang/ProcessEnvironment.java.orig +++ openjdk-boot/jdk/src/windows/classes/java/lang/ProcessEnvironment.java @@ -250,7 +250,8 @@ envblock.substring(eql+1,end)); } - theCaseInsensitiveEnvironment = new TreeMap<>(nameComparator); + theCaseInsensitiveEnvironment + = new TreeMap(nameComparator); theCaseInsensitiveEnvironment.putAll(theEnvironment); } @@ -295,7 +296,8 @@ // Only for use by ProcessImpl.start() String toEnvironmentBlock() { // Sort Unicode-case-insensitively by name - List> list = new ArrayList<>(entrySet()); + List> list + = new ArrayList>(entrySet()); Collections.sort(list, entryComparator); StringBuilder sb = new StringBuilder(size()*30); --- openjdk-boot/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java.orig +++ openjdk-boot/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java @@ -63,7 +63,7 @@ // Parse string that consists of token delimited by space or commas // and return LinkedHashMap private LinkedList stringToList(String str) { - LinkedList ll = new LinkedList<>(); + LinkedList ll = new LinkedList(); // comma and space are valid delimites StringTokenizer st = new StringTokenizer(str, ", "); --- openjdk-boot/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java.orig +++ openjdk-boot/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java @@ -128,7 +128,7 @@ } // iterate over roots, ignoring those that the security manager denies - ArrayList result = new ArrayList<>(); + ArrayList result = new ArrayList(); SecurityManager sm = System.getSecurityManager(); for (int i = 0; i <= 25; i++) { // 0->A, 1->B, 2->C... if ((drives & (1 << i)) != 0) { --- openjdk-boot/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java.orig +++ openjdk-boot/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java @@ -575,7 +575,7 @@ // generate offset array private void initOffsets() { if (offsets == null) { - ArrayList list = new ArrayList<>(); + ArrayList list = new ArrayList(); if (isEmpty()) { // empty path considered to have one name element list.add(0); --- openjdk-boot/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java.orig +++ openjdk-boot/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java @@ -378,7 +378,7 @@ AclInformation aclInfo = GetAclInformation(aclAddress); aceCount = aclInfo.aceCount(); } - ArrayList result = new ArrayList<>(aceCount); + ArrayList result = new ArrayList(aceCount); // decode each of the ACEs to AclEntry objects for (int i=0; i listUsingStreamEnumeration() throws IOException { - List list = new ArrayList<>(); + List list = new ArrayList(); try { FirstStream first = FindFirstStream(file.getPathForWin32Calls()); if (first != null) { @@ -114,7 +114,7 @@ NativeBuffer buffer = null; // result with names of alternative data streams - final List list = new ArrayList<>(); + final List list = new ArrayList(); try { buffer = NativeBuffers.getNativeBuffer(BUFFER_SIZE); @@ -216,7 +216,7 @@ // wrap with channel FileChannel fc = null; try { - Set opts = new HashSet<>(); + Set opts = new HashSet(); opts.add(READ); if (!followLinks) opts.add(WindowsChannelFactory.OPEN_REPARSE_POINT); @@ -243,7 +243,7 @@ // wrap with channel FileChannel fc = null; try { - Set opts = new HashSet<>(); + Set opts = new HashSet(); opts.add(READ); if (!followLinks) opts.add(WindowsChannelFactory.OPEN_REPARSE_POINT); @@ -298,7 +298,7 @@ x.rethrowAsIOException(file); } try { - Set opts = new HashSet<>(); + Set opts = new HashSet(); if (!followLinks) opts.add(WindowsChannelFactory.OPEN_REPARSE_POINT); opts.add(CREATE); --- openjdk-boot/jdk/test/java/io/Serializable/NPEProvoker/NPEProvoker.java.orig +++ openjdk-boot/jdk/test/java/io/Serializable/NPEProvoker/NPEProvoker.java @@ -56,7 +56,7 @@ public static void main(String[] args) { System.err.println("\n Regression test for bug 6541870\n"); try { - ArrayList list = new ArrayList<>(); + ArrayList list = new ArrayList(); list.add(new NPEProvoker()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); --- openjdk-boot/jdk/test/java/lang/instrument/ilib/Inject.java.orig +++ openjdk-boot/jdk/test/java/lang/instrument/ilib/Inject.java @@ -107,7 +107,7 @@ class IndexedInjector implements TrackerInjector { int counter = 0; int tracker; - List infoList = new ArrayList<>(); + List infoList = new ArrayList(); public int stackSize(int currentSize) { return currentSize + 1; --- openjdk-boot/jdk/test/java/lang/instrument/ilib/InjectBytecodes.java.orig +++ openjdk-boot/jdk/test/java/lang/instrument/ilib/InjectBytecodes.java @@ -50,7 +50,7 @@ private final Injector[] after = new Injector[256]; private final String className; private final String methodName; - private final Map snippets = new HashMap<>(); + private final Map snippets = new HashMap(); private int pos; private int newPos; --- openjdk-boot/jdk/test/java/lang/reflect/Generics/TestPlainArrayNotGeneric.java.orig +++ openjdk-boot/jdk/test/java/lang/reflect/Generics/TestPlainArrayNotGeneric.java @@ -103,7 +103,7 @@ } } - private static final Set checking = new HashSet<>(); + private static final Set checking = new HashSet(); private static void check(Type t, String what) { if (t == null || !checking.add(t)) --- openjdk-boot/jdk/test/java/util/Random/DistinctSeeds.java.orig +++ openjdk-boot/jdk/test/java/util/Random/DistinctSeeds.java @@ -59,7 +59,7 @@ } } final int threadCount = 2; - List collectors = new ArrayList<>(); + List collectors = new ArrayList(); List threads = new ArrayList(); for (int i = 0; i < threadCount; i++) { RandomCollector r = new RandomCollector(); --- openjdk-boot/jdk/test/java/util/logging/ClassLoaderLeakTest.java.orig +++ openjdk-boot/jdk/test/java/util/logging/ClassLoaderLeakTest.java @@ -89,7 +89,7 @@ MyClassLoader appClassLoader = new MyClassLoader(urls, "test0"); WeakReference ref = - new WeakReference<>(appClassLoader); + new WeakReference(appClassLoader); Thread appThread = new Thread(appsThreadGroup, launcher, "AppThread-0");