diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2021-11-20 20:37:02 +0300 |
---|---|---|
committer | Andrey Turbanov <turbanoff@gmail.com> | 2021-11-20 20:37:02 +0300 |
commit | bfd6fee99d2685751a6d49eb29a0173c3f825c09 (patch) | |
tree | 33383e16d3008206284965d88254f648d4f5668c /asm/src | |
parent | 0f85ca109b9e6ab849e201e76f62d5023cbfcb98 (diff) | |
download | aspectj-bfd6fee99d2685751a6d49eb29a0173c3f825c09.tar.gz aspectj-bfd6fee99d2685751a6d49eb29a0173c3f825c09.zip |
Cleanup redundant boxing.
Methods Integer.parseInt/Boolean.parseBoolean should be preferred over Integer.valueOf/Boolean.valueOf/ if final result is primitive.
They are generally faster and generate less garbage.
Diffstat (limited to 'asm/src')
-rw-r--r-- | asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java | 10 |
1 files changed, 5 insertions, 5 deletions
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 0c8271441..215a00f3b 100644 --- a/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java +++ b/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java @@ -227,7 +227,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { String existingHandle = object.getHandleIdentifier(); int suffixPosition = existingHandle.indexOf('!'); if (suffixPosition != -1) { - count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1; + count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1; } else { if (count == 1) { count = 2; @@ -279,7 +279,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { String existingHandle = object.getHandleIdentifier(); int suffixPosition = existingHandle.indexOf('!'); if (suffixPosition != -1) { - count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1; + count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1; } else { if (count == 1) { count = 2; @@ -314,7 +314,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { int suffixPosition = existingHandle.lastIndexOf('!'); int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384 - count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1; + count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1; } else { if (count == 1) { count = 2; @@ -334,7 +334,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { int suffixPosition = existingHandle.lastIndexOf('!'); int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384 - count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1; + count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1; } else { if (count == 1) { count = 2; @@ -383,7 +383,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { String existingHandle = object.getHandleIdentifier(); int suffixPosition = existingHandle.indexOf('!'); if (suffixPosition != -1) { - count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1; + count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1; } else { if (count == 1) { count = 2; |