aboutsummaryrefslogtreecommitdiffstats
path: root/asm/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 /asm/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 'asm/src')
-rw-r--r--asm/src/main/java/org/aspectj/asm/AsmManager.java2
-rw-r--r--asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java12
-rw-r--r--asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java2
3 files changed, 8 insertions, 8 deletions
diff --git a/asm/src/main/java/org/aspectj/asm/AsmManager.java b/asm/src/main/java/org/aspectj/asm/AsmManager.java
index d1b7ed3f2..b8a8989cb 100644
--- a/asm/src/main/java/org/aspectj/asm/AsmManager.java
+++ b/asm/src/main/java/org/aspectj/asm/AsmManager.java
@@ -1191,7 +1191,7 @@ public class AsmManager implements IStructureModel {
if (ctr == null) {
nodeTypeCount.put(node, 1);
} else {
- ctr = ctr.intValue() + 1;
+ ctr = ctr + 1;
nodeTypeCount.put(node, ctr);
}
}
diff --git a/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java
index 5e518c51f..53818534a 100644
--- a/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java
+++ b/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java
@@ -172,7 +172,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String existingHandle = object.getHandleIdentifier();
int suffixPosition = existingHandle.indexOf('!');
if (suffixPosition != -1) {
- count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+ count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -228,7 +228,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String existingHandle = object.getHandleIdentifier();
int suffixPosition = existingHandle.indexOf('!');
if (suffixPosition != -1) {
- count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+ count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -280,7 +280,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String existingHandle = object.getHandleIdentifier();
int suffixPosition = existingHandle.indexOf('!');
if (suffixPosition != -1) {
- count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+ count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -315,7 +315,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
int suffixPosition = existingHandle.lastIndexOf('!');
int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384
- count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+ count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -335,7 +335,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
int suffixPosition = existingHandle.lastIndexOf('!');
int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384
- count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+ count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -384,7 +384,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String existingHandle = object.getHandleIdentifier();
int suffixPosition = existingHandle.indexOf('!');
if (suffixPosition != -1) {
- count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+ count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
diff --git a/asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java b/asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java
index 77fe7a66b..9842830cb 100644
--- a/asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java
+++ b/asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java
@@ -364,7 +364,7 @@ public class ProgramElement implements IProgramElement {
if (b == null) {
return false;
}
- return b.booleanValue();
+ return b;
}
public String[] getRemovedAnnotationTypes() {