From: Andy Clement Date: Fri, 20 Oct 2017 19:34:15 +0000 (-0700) Subject: Fix use of diamond and update versions to 1.9 X-Git-Tag: V1_9_0_RC3~2^2~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c28e943df7c1d1de9300a0209ec3cd2245a951e7;p=aspectj.git Fix use of diamond and update versions to 1.9 --- diff --git a/build/src/$installer$/org/aspectj/Main.java b/build/src/$installer$/org/aspectj/Main.java index b5da78d49..748b035ae 100644 --- a/build/src/$installer$/org/aspectj/Main.java +++ b/build/src/$installer$/org/aspectj/Main.java @@ -997,10 +997,9 @@ class LocationPane extends WizardPane implements ActionListener { //XXX would like to find the place they last chose... public String getDefaultLocation() { if (context.onWindows()) { - //XXX hard-coded majorminor version needs to be fixed by 1.1 release - return "c:\\aspectj1.8"; + return "c:\\aspectj1.9"; } else { - return new File(System.getProperty("user.home"), "aspectj1.8").getAbsolutePath(); + return new File(System.getProperty("user.home"), "aspectj1.9").getAbsolutePath(); } } diff --git a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java index aeb9b11b7..24a31f492 100644 --- a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java +++ b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java @@ -413,7 +413,7 @@ public class AntBuilder extends Builder { * @see org.aspectj.internal.tools.build.Builder#buildAntecedants(Module) */ protected Result[] getAntecedantResults(Result moduleResult) { - Hashtable targets = new Hashtable<>(); + Hashtable targets = new Hashtable(); makeTargetsForResult(moduleResult, targets); String targetName = resultToTargetName(moduleResult); // bug: doc says topoSort returns String, but returns Target @@ -423,7 +423,7 @@ public class AntBuilder extends Builder { if (0 == result.size()) { return new Result[0]; } - ArrayList toReturn = new ArrayList<>(); + ArrayList toReturn = new ArrayList(); for (Iterator iter = result.iterator(); iter.hasNext();) { Target target = (Target) iter.next(); String name = target.getName(); diff --git a/build/src/org/aspectj/internal/tools/ant/taskdefs/Checklics.java b/build/src/org/aspectj/internal/tools/ant/taskdefs/Checklics.java index c05ee23ba..295a1faea 100644 --- a/build/src/org/aspectj/internal/tools/ant/taskdefs/Checklics.java +++ b/build/src/org/aspectj/internal/tools/ant/taskdefs/Checklics.java @@ -82,7 +82,7 @@ public class Checklics extends MatchingTask { License MPL_ONLY = new License(MPL_ONLY_TAG, LIC_MPL); License MPL_PARC = new License(MPL_PARC_TAG, LIC_MPL, PARC); License PARC_COPYRIGHT = new License(PARC_COPYRIGHT_TAG, null, PARC); - LICENSES = new Hashtable<>(); + LICENSES = new Hashtable(); LICENSES.put(APL.tag, APL); LICENSES.put(MPL.tag, MPL); LICENSES.put(MPL_PARC.tag, MPL_PARC); @@ -463,7 +463,7 @@ class HeaderInfo { this.lastLine = lastLine; this.file = file; this.hasLicense = hasLicense; - List newYears = new ArrayList<>(); + List newYears = new ArrayList(); newYears.addAll(years); Collections.sort(newYears); this.years = Collections.unmodifiableList(newYears); @@ -611,7 +611,7 @@ class Header { } public static HeaderInfo checkFile(final File file) { - ArrayList years = new ArrayList<>(); + ArrayList years = new ArrayList(); int endLine = 0; BufferedReader input = null; int lineNum = 0; diff --git a/build/src/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java b/build/src/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java index 7a9092352..fdff0d7c1 100644 --- a/build/src/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java +++ b/build/src/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java @@ -168,7 +168,7 @@ public abstract class ConditionalTask extends Task { protected List getFalses() { Iterator iter = ifs().iterator(); - List result = new Vector<>(); + List result = new Vector(); while (iter.hasNext()) { If next = (If) iter.next(); String name = next.getName(); diff --git a/build/src/org/aspectj/internal/tools/build/Builder.java b/build/src/org/aspectj/internal/tools/build/Builder.java index 4fe47ced4..72f53e901 100644 --- a/build/src/org/aspectj/internal/tools/build/Builder.java +++ b/build/src/org/aspectj/internal/tools/build/Builder.java @@ -149,7 +149,7 @@ public abstract class Builder { if ((null == text) || (0 == text.length())) { return Collections.EMPTY_LIST; } - List strings = new ArrayList<>(); + List strings = new ArrayList(); StringTokenizer tok = new StringTokenizer(text, ","); while (tok.hasMoreTokens()) { String token = tok.nextToken().trim(); @@ -275,7 +275,7 @@ public abstract class Builder { return buildProduct(buildSpec); } Result result = specifyResultFor(buildSpec); - ArrayList errors = new ArrayList<>(); + ArrayList errors = new ArrayList(); try { return buildAll(result, errors); } finally { @@ -340,7 +340,7 @@ public abstract class Builder { */ protected final boolean buildAll(Result result, List errors) { Result[] buildList = skipUptodate(getAntecedantResults(result)); - ArrayList doneList = new ArrayList<>(); + ArrayList doneList = new ArrayList(); if ((null != buildList) && (0 < buildList.length)) { if (isLogging()) { handler.log("modules to build: " + Arrays.asList(buildList)); @@ -545,7 +545,7 @@ public abstract class Builder { * deliverables. */ protected ProductModule[] discoverModules(File productDir, Modules modules) { - final ArrayList found = new ArrayList<>(); + final ArrayList found = new ArrayList(); FileFilter filter = new FileFilter() {// empty jar files public boolean accept(File file) { if ((null != file) && file.canRead() @@ -557,7 +557,7 @@ public abstract class Builder { } }; Util.visitFiles(productDir, filter); - ArrayList results = new ArrayList<>(); + ArrayList results = new ArrayList(); for (File file: found) { String jarName = moduleAliasFor(file.getName().toLowerCase()); if (jarName.endsWith(".jar") || jarName.endsWith(".zip")) { // XXXFileLiteral diff --git a/build/src/org/aspectj/internal/tools/build/Module.java b/build/src/org/aspectj/internal/tools/build/Module.java index 8df660e2a..3f0afbfd9 100644 --- a/build/src/org/aspectj/internal/tools/build/Module.java +++ b/build/src/org/aspectj/internal/tools/build/Module.java @@ -69,7 +69,7 @@ public class Module { /** @return all source files under srcDir */ private static Iterator sourceFiles(File srcDir) { - ArrayList result = new ArrayList<>(); + ArrayList result = new ArrayList(); sourceFiles(srcDir, result); return result.iterator(); } @@ -199,11 +199,11 @@ public class Module { Util.iaxIfNull(name, "name"); Util.iaxIfNull(modules, "modules"); this.moduleDir = moduleDir; - this.libJars = new ArrayList<>(); - this.exportedLibJars = new ArrayList<>(); - this.requiredModules = new ArrayList<>(); - this.srcDirs = new ArrayList<>(); - this.classpathVariables = new ArrayList<>(); + this.libJars = new ArrayList(); + this.exportedLibJars = new ArrayList(); + this.requiredModules = new ArrayList(); + this.srcDirs = new ArrayList(); + this.classpathVariables = new ArrayList(); this.properties = new Properties(); this.name = name; this.modules = modules; @@ -613,7 +613,7 @@ public class Module { String[] tokenize(String line) { final String DELIM = " \n\t\\<>\"="; StringTokenizer st = new StringTokenizer(line, DELIM, true); - ArrayList result = new ArrayList<>(); + ArrayList result = new ArrayList(); StringBuffer quote = new StringBuffer(); boolean inQuote = false; while (st.hasMoreTokens()) { diff --git a/build/src/org/aspectj/internal/tools/build/Modules.java b/build/src/org/aspectj/internal/tools/build/Modules.java index ca2b50aac..83686820e 100644 --- a/build/src/org/aspectj/internal/tools/build/Modules.java +++ b/build/src/org/aspectj/internal/tools/build/Modules.java @@ -24,7 +24,7 @@ import java.util.Hashtable; */ public class Modules { - private final Hashtable modules = new Hashtable<>(); + private final Hashtable modules = new Hashtable(); public final File baseDir; public final File jarDir; private final Messager handler; diff --git a/build/src/org/aspectj/internal/tools/build/Result.java b/build/src/org/aspectj/internal/tools/build/Result.java index 3b5a4e141..e12ba4e29 100644 --- a/build/src/org/aspectj/internal/tools/build/Result.java +++ b/build/src/org/aspectj/internal/tools/build/Result.java @@ -40,7 +40,7 @@ public class Result { private static final Kind[] KINDS = { RELEASE, TEST, RELEASE_ALL, TEST_ALL }; - private static final HashMap nameToResult = new HashMap<>(); + private static final HashMap nameToResult = new HashMap(); public static boolean isTestingJar(String name) { name = name.toLowerCase(); @@ -179,11 +179,11 @@ public class Result { Result(Kind kind, Module module, File jarDir) { this.kind = kind; this.module = module; - this.libJars = new ArrayList<>(); - this.exportedLibJars = new ArrayList<>(); - this.srcDirs = new ArrayList<>(); - this.classpathVariables = new ArrayList<>(); - this.requiredResults = new ArrayList<>(); + this.libJars = new ArrayList(); + this.exportedLibJars = new ArrayList(); + this.srcDirs = new ArrayList(); + this.classpathVariables = new ArrayList(); + this.requiredResults = new ArrayList(); String name = module.name; if (!kind.normal) { name += "-test"; @@ -219,7 +219,7 @@ public class Result { /** @return List (File) of jar's required */ public List findJarRequirements() { - ArrayList result = new ArrayList<>(); + ArrayList result = new ArrayList(); Module.doFindJarRequirements(this, result); return result; } diff --git a/build/src/org/aspectj/internal/tools/build/SampleGatherer.java b/build/src/org/aspectj/internal/tools/build/SampleGatherer.java index a9d29af6b..0b023e6c5 100644 --- a/build/src/org/aspectj/internal/tools/build/SampleGatherer.java +++ b/build/src/org/aspectj/internal/tools/build/SampleGatherer.java @@ -391,7 +391,7 @@ class Sample { * type-safe Collection of samples. */ class Samples { - private ArrayList samples = new ArrayList<>(); + private ArrayList samples = new ArrayList(); int size() { return samples.size(); } @@ -406,7 +406,7 @@ class Samples { } List getSortedSamples(Comparator comparer) { - ArrayList result = new ArrayList<>(); + ArrayList result = new ArrayList(); result.addAll(samples); Collections.sort(result, comparer); return result; @@ -957,7 +957,7 @@ class SampleUtil { } public static String[] splitAnchorName(String anchorName) { - ArrayList result = new ArrayList<>(); + ArrayList result = new ArrayList(); int start = 0; int loc = anchorName.indexOf("-", start); String next;