//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();
}
}
* @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
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();
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);
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);
}
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;
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();
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();
return buildProduct(buildSpec);
}
Result result = specifyResultFor(buildSpec);
- ArrayList<String> errors = new ArrayList<>();
+ ArrayList<String> errors = new ArrayList<String>();
try {
return buildAll(result, errors);
} finally {
*/
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));
* 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()
}
};
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
/** @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();
}
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;
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()) {
*/
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;
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();
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";
/** @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;
}
* 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();
}
}
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;
}
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;