diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2022-02-26 14:17:56 +0300 |
---|---|---|
committer | Andrey Turbanov <turbanoff@gmail.com> | 2022-02-26 14:17:56 +0300 |
commit | 2301b3677678e86673ebd0cbe7bb9740ebfba84a (patch) | |
tree | f5ce0e965cfd718811a8f4e4d54b622a566233ba /taskdefs | |
parent | 102e0617a4bbcf0bd232b4f64995161db8681099 (diff) | |
download | aspectj-2301b3677678e86673ebd0cbe7bb9740ebfba84a.tar.gz aspectj-2301b3677678e86673ebd0cbe7bb9740ebfba84a.zip |
Cleanup redundant type casts, due to too weak variable type declaration
Diffstat (limited to 'taskdefs')
-rw-r--r-- | taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc2.java | 8 | ||||
-rw-r--r-- | taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc2.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc2.java index 87f2f4423..9215efb23 100644 --- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc2.java +++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc2.java @@ -414,8 +414,8 @@ public class Ajc2 extends Javac { List<File> newIncludes = new ArrayList<>(); List<String> newArguments = new ArrayList<>(); if (argfiles != null) { - for (Object o : argfiles) { - File argfile = ((Argfile) o).getFile(); + for (Argfile o : argfiles) { + File argfile = o.getFile(); expandArgfile(argfile, newIncludes, newArguments); } } @@ -442,8 +442,8 @@ public class Ajc2 extends Javac { } // Add the new included files - for (Object newInclude : newIncludes) { - newFiles.add((File) newInclude); + for (File newInclude : newIncludes) { + newFiles.add(newInclude); } // This is the same behavior found in Javac diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java index aa9bd33a4..e49580dbe 100644 --- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java +++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java @@ -1570,8 +1570,7 @@ public class AjcTask extends MatchingTask { } } if (0 < adapterFiles.size()) { - for (Object adapterFile : adapterFiles) { - File file = (File) adapterFile; + for (File file : adapterFiles) { if (file.canRead() && FileUtil.hasSourceSuffix(file)) { list.add(file.getAbsolutePath()); } |