diff options
author | Andy Clement <aclement@pivotal.io> | 2019-11-28 21:22:23 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-11-28 21:22:23 -0800 |
commit | cc88d52fb6c60fbc79a59dec61365b7864baa942 (patch) | |
tree | 2589b7d603cf5b52e7c619144343ab046e8e6c24 /build | |
parent | a3e5e4104ff31c9f06d90bd0f6876bef305831dc (diff) | |
download | aspectj-cc88d52fb6c60fbc79a59dec61365b7864baa942.tar.gz aspectj-cc88d52fb6c60fbc79a59dec61365b7864baa942.zip |
polish
Diffstat (limited to 'build')
4 files changed, 20 insertions, 22 deletions
diff --git a/build/src/main/java/$installer$/org/aspectj/Main.java b/build/src/main/java/$installer$/org/aspectj/Main.java index 9e7518038..6ecebae63 100644 --- a/build/src/main/java/$installer$/org/aspectj/Main.java +++ b/build/src/main/java/$installer$/org/aspectj/Main.java @@ -822,7 +822,7 @@ abstract class WizardPane { * + "}</head>\n"; */ - public static String applyProperties(String text, Map map) { + public static String applyProperties(String text, Map<String,String> map) { // ${name} -> map.get(name).toString() int lastIndex = 0; StringBuffer buf = new StringBuffer(); diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Module.java b/build/src/main/java/org/aspectj/internal/tools/build/Module.java index cbbbc308b..58789424f 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Module.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Module.java @@ -257,8 +257,8 @@ public class Module { } } // libraries - for (Iterator iter = result.getLibJars().iterator(); iter.hasNext();) { - file = (File) iter.next(); + for (Iterator<File> iter = result.getLibJars().iterator(); iter.hasNext();) { + file = iter.next(); if (outOfDate(time, file)) { return true; } diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Result.java b/build/src/main/java/org/aspectj/internal/tools/build/Result.java index e12ba4e29..b17ac656e 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Result.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Result.java @@ -1,15 +1,14 @@ /* ******************************************************************* * Copyright (c) 2005 Contributors. - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://eclipse.org/legal/epl-v10.html - * - * Contributors: - * Wes Isberg initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wes Isberg initial implementation * ******************************************************************/ - package org.aspectj.internal.tools.build; import java.io.File; @@ -17,7 +16,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.ListIterator; @@ -62,7 +60,7 @@ public class Result { if (null == name) { throw new IllegalArgumentException("null name"); } - return (Result) nameToResult.get(name); + return nameToResult.get(name); } public static Result[] getResults(String[] names) { @@ -293,7 +291,7 @@ public class Result { if (null == list) { return new Result[0]; } - return (Result[]) list.toArray(new Result[0]); + return list.toArray(new Result[0]); } private void initSrcDirs() { diff --git a/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java b/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java index bb1ed8555..4e9f59011 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java @@ -172,7 +172,7 @@ public class SampleGatherer { StringBuffer sampleCode = new StringBuffer(); String anchorName = null; String anchorTitle = null; - ArrayList flags = new ArrayList(); + ArrayList<String> flags = new ArrayList<>(); int startLine = -1; // seeking int endLine = Integer.MAX_VALUE; // not seeking reader = new FileReader(source); @@ -221,7 +221,7 @@ public class SampleGatherer { source, startLine, endLine, - (String[]) flags.toArray(new String[flags.size()])); + flags.toArray(new String[flags.size()])); sink.addSample(sample); // back to seeking start @@ -331,7 +331,7 @@ class Sample { final int endLine; final Kind kind; /** List of String flags found in the sample */ - final List flags; + final List<String> flags; public Sample( String anchorName, String anchorTitle, @@ -351,7 +351,7 @@ class Sample { this.kind = Kind.getKind(sourcePath); // List theFlags; if ((null == flags) || (0 == flags.length)) { - this.flags = Collections.EMPTY_LIST; + this.flags = Collections.emptyList(); } else { this.flags = Collections.unmodifiableList(Arrays.asList(flags)); } @@ -777,10 +777,10 @@ class HTMLSamplesRenderer extends SamplesRenderer { protected void renderAuthorIndex(Samples samples, StringBuffer sink) { sink.append("<h2><a name=\"authorIndex\"></a>Author Index</h2>"); - List list = samples.getSortedSamples(Sample.AUTHOR_NAME_SOURCE_COMPARER); + List<Sample> list = samples.getSortedSamples(Sample.AUTHOR_NAME_SOURCE_COMPARER); String lastAuthor = null; - for (ListIterator iter = list.listIterator(); iter.hasNext();) { - Sample sample = (Sample)iter.next(); + for (ListIterator<Sample> iter = list.listIterator(); iter.hasNext();) { + Sample sample = iter.next(); String author = sample.author; if (!author.equals(lastAuthor)) { if (null != lastAuthor) { |