aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs/src
diff options
context:
space:
mode:
authorLars Grefer <eclipse@larsgrefer.de>2020-08-08 03:16:40 +0200
committerLars Grefer <eclipse@larsgrefer.de>2020-08-08 03:16:40 +0200
commit93ce335dc0dad2f420d1b7b1d426ad7bfa3574ad (patch)
treee37a88693a2de065eb8c6c56f35b053bcf951c4a /taskdefs/src
parentf33600d4d5507f3aa02d7cacfc34fe910d6b858f (diff)
downloadaspectj-93ce335dc0dad2f420d1b7b1d426ad7bfa3574ad.tar.gz
aspectj-93ce335dc0dad2f420d1b7b1d426ad7bfa3574ad.zip
Unnecessary unboxing
Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values. Unboxing is unnecessary under Java 5 and newer, and can be safely removed. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'taskdefs/src')
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java2
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java10
2 files changed, 6 insertions, 6 deletions
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java
index a64c5131e..d74fa5134 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java
@@ -79,7 +79,7 @@ public class Ajc11CompilerAdapter implements CompilerAdapter {
if (null == javac) {
throw new IllegalStateException("null javac");
}
- if (!((Boolean) inSelfCall.get()).booleanValue()
+ if (!(Boolean) inSelfCall.get()
&& afterCleaningDirs()) {
// if we are not re-calling ourself and we cleaned dirs,
// then re-call javac to get the list of all source files.
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
index 0242b4d58..2516a2ac5 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
@@ -91,11 +91,11 @@ public class Ajc extends DefaultCompilerAdapter {
Project.MSG_WARN));
System.setOut(logstr);
System.setErr(logstr);
- return ((Integer)main.getMethod
- ("compile", new Class[]{String[].class}).invoke
- (main.newInstance(), new Object[]{
- removeUnsupported(cline, logstr)
- })).intValue() == AJC_COMPILER_SUCCESS;
+ return (Integer) main.getMethod
+ ("compile", new Class[]{String[].class}).invoke
+ (main.newInstance(), new Object[]{
+ removeUnsupported(cline, logstr)
+ }) == AJC_COMPILER_SUCCESS;
} catch (Exception e) {
if (e instanceof BuildException) {
throw (BuildException)e;