aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/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 /org.aspectj.ajdt.core/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 'org.aspectj.ajdt.core/src')
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjState.java4
-rw-r--r--org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java2
-rw-r--r--org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjState.java
index 4c38f125c..f4518ead3 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjState.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjState.java
@@ -820,7 +820,7 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
Long l = structuralChangesSinceLastFullBuild.get(file.getAbsolutePath());
long strucModTime = -1;
if (l != null) {
- strucModTime = l.longValue();
+ strucModTime = l;
} else {
strucModTime = this.lastSuccessfulFullBuildTime;
}
@@ -837,7 +837,7 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
for (Map.Entry<String, Long> entry : entries) {
Long l = entry.getValue();
if (l != null) {
- long lvalue = l.longValue();
+ long lvalue = l;
if (lvalue > lastSuccessfulBuildTime) {
if (listenerDefined()) {
getListener().recordDecision(
diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java
index 82682bb29..9f1162c9f 100644
--- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java
+++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java
@@ -312,7 +312,7 @@ public class IncrementalCase { // XXX NOT bound to junit - bridge tests?
if (-1 != loc)
s = s.substring(loc + 1);
try {
- exp[i] = Integer.valueOf(s).intValue();
+ exp[i] = Integer.valueOf(s);
sb.append(exp[i] + ((i < (exp.length - 1)) ? ", " : ""));
} catch (NumberFormatException e) {
info(handler, "bad " + label + ":" + expected[i]);
diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
index 7aa97ad1e..6bbc076b4 100644
--- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
+++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
@@ -1050,7 +1050,7 @@ public abstract class AjcTestCase extends TestCase {
private static boolean getBoolean(String name, boolean def) {
String defaultValue = String.valueOf(def);
String value = System.getProperty(name, defaultValue);
- return Boolean.valueOf(value).booleanValue();
+ return Boolean.valueOf(value);
}
/*