aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndrey Turbanov <turbanoff@gmail.com>2022-04-13 13:51:39 +0300
committerAlexander Kriegisch <Alexander@Kriegisch.name>2022-04-15 11:00:33 +0700
commit2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d (patch)
tree4afc936dbc982b72b5dadddafc8360f6c4436be0 /build
parent047a93c24f4eef3b2ebf254be9332d4340adbd04 (diff)
downloadaspectj-2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d.tar.gz
aspectj-2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d.zip
Reduce 'Object' class usage
Diffstat (limited to 'build')
-rw-r--r--build/src/main/java/$installer$/org/aspectj/Main.java2
-rw-r--r--build/src/main/java/org/aspectj/internal/tools/build/Builder.java7
-rw-r--r--build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java5
3 files changed, 6 insertions, 8 deletions
diff --git a/build/src/main/java/$installer$/org/aspectj/Main.java b/build/src/main/java/$installer$/org/aspectj/Main.java
index fa98b8ed0..cf408425b 100644
--- a/build/src/main/java/$installer$/org/aspectj/Main.java
+++ b/build/src/main/java/$installer$/org/aspectj/Main.java
@@ -839,7 +839,7 @@ abstract class WizardPane {
buf.append(text.substring(lastIndex, startIndex));
String key = text.substring(startIndex + 2, endIndex);
lastIndex = endIndex + 1;
- Object replaceText = (map == null ? null : map.get(key));
+ String replaceText = (map == null ? null : map.get(key));
//System.out.println("key: " + key + " -> " + replaceText);
if (replaceText == null) {
replaceText = "NOT_FOUND";
diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Builder.java b/build/src/main/java/org/aspectj/internal/tools/build/Builder.java
index 71cb3bac2..d13c4de95 100644
--- a/build/src/main/java/org/aspectj/internal/tools/build/Builder.java
+++ b/build/src/main/java/org/aspectj/internal/tools/build/Builder.java
@@ -180,7 +180,7 @@ public abstract class Builder {
private final File tempDir;
- private final List tempFiles;
+ private final List<File> tempFiles;
private final boolean useEclipseCompiles;
@@ -190,7 +190,7 @@ public abstract class Builder {
Util.iaxIfNull(handler, "handler");
this.useEclipseCompiles = useEclipseCompiles;
this.handler = handler;
- this.tempFiles = new ArrayList();
+ this.tempFiles = new ArrayList<>();
if ((null == tempDir) || !tempDir.canWrite() || !tempDir.isDirectory()) {
this.tempDir = Util.makeTempDir("Builder");
} else {
@@ -293,8 +293,7 @@ public abstract class Builder {
*/
public boolean cleanup() {
boolean noErr = true;
- for (Object tempFile : tempFiles) {
- File file = (File) tempFile;
+ for (File file : tempFiles) {
if (!Util.deleteContents(file) || !file.delete()) {
if (noErr) {
noErr = false;
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 29468af65..08b363f0a 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
@@ -804,10 +804,9 @@ class SampleUtil {
public static final String SAMPLE_BASE_DIR_NAME = "sandbox";
public static void simpleRender(Samples result, StringBuffer sink) {
- List sortedSamples = result.getSortedSamples();
+ List<Sample> sortedSamples = result.getSortedSamples();
int i = 0;
- for (Object sortedSample : sortedSamples) {
- Sample sample = (Sample) sortedSample;
+ for (Sample sample : sortedSamples) {
sink.append(i++ + ": " + sample);
}
}