diff options
author | Andy Clement <aclement@pivotal.io> | 2017-10-20 12:34:15 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2017-10-20 12:34:15 -0700 |
commit | c28e943df7c1d1de9300a0209ec3cd2245a951e7 (patch) | |
tree | 82cb892319d16265c7b4db73f3ba9864b45ef706 /build/src | |
parent | 5e86980fa0248cd94012416eda7fee581245f52a (diff) | |
download | aspectj-c28e943df7c1d1de9300a0209ec3cd2245a951e7.tar.gz aspectj-c28e943df7c1d1de9300a0209ec3cd2245a951e7.zip |
Fix use of diamond and update versions to 1.9
Diffstat (limited to 'build/src')
9 files changed, 31 insertions, 32 deletions
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<String,Target> targets = new Hashtable<>(); + Hashtable<String,Target> targets = new Hashtable<String, Target>(); 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<String> toReturn = new ArrayList<>(); + ArrayList<String> toReturn = new ArrayList<String>(); for (Iterator<Target> 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<String,License>(); 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<String> newYears = new ArrayList<>(); + List<String> newYears = new ArrayList<String>(); 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<String> years = new ArrayList<>(); + ArrayList<String> years = new ArrayList<String>(); 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<String> getFalses() { Iterator<If> iter = ifs().iterator(); - List<String> result = new Vector<>(); + List<String> result = new Vector<String>(); 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<String> strings = new ArrayList<>(); + List<String> strings = new ArrayList<String>(); 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<String> errors = new ArrayList<>(); + ArrayList<String> errors = new ArrayList<String>(); 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<String> doneList = new ArrayList<>(); + ArrayList<String> doneList = new ArrayList<String>(); 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<File> found = new ArrayList<>(); + final ArrayList<File> found = new ArrayList<File>(); 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<ProductModule> results = new ArrayList<>(); + ArrayList<ProductModule> results = new ArrayList<ProductModule>(); 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<File> sourceFiles(File srcDir) { - ArrayList<File> result = new ArrayList<>(); + ArrayList<File> result = new ArrayList<File>(); 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<File>(); + this.exportedLibJars = new ArrayList<File>(); + this.requiredModules = new ArrayList<Module>(); + this.srcDirs = new ArrayList<File>(); + this.classpathVariables = new ArrayList<String>(); 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<String> result = new ArrayList<>(); + ArrayList<String> result = new ArrayList<String>(); 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<String,Module> modules = new Hashtable<>(); + private final Hashtable<String,Module> modules = new Hashtable<String,Module>(); 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<String,Result> nameToResult = new HashMap<>(); + private static final HashMap<String,Result> nameToResult = new HashMap<String, Result>(); 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<File>(); + this.exportedLibJars = new ArrayList<File>(); + this.srcDirs = new ArrayList<File>(); + this.classpathVariables = new ArrayList<String>(); + this.requiredResults = new ArrayList<Result>(); 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<File> findJarRequirements() { - ArrayList<File> result = new ArrayList<>(); + ArrayList<File> result = new ArrayList<File>(); 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<Sample> samples = new ArrayList<>(); + private ArrayList<Sample> samples = new ArrayList<Sample>(); int size() { return samples.size(); } @@ -406,7 +406,7 @@ class Samples { } List<Sample> getSortedSamples(Comparator<Sample> comparer) { - ArrayList<Sample> result = new ArrayList<>(); + ArrayList<Sample> result = new ArrayList<Sample>(); result.addAll(samples); Collections.sort(result, comparer); return result; @@ -957,7 +957,7 @@ class SampleUtil { } public static String[] splitAnchorName(String anchorName) { - ArrayList<String> result = new ArrayList<>(); + ArrayList<String> result = new ArrayList<String>(); int start = 0; int loc = anchorName.indexOf("-", start); String next; |