aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java8
-rw-r--r--asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java2
2 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 15eb990ee..5e518c51f 100644
--- a/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java
+++ b/asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java
@@ -73,7 +73,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
if (folder.endsWith("/")) {
folder = folder.substring(0, folder.length() - 1);
}
- if (folder.indexOf("/") != -1) {
+ if (folder.contains("/")) {
folder = folder.replace("/", "\\/");
}
sb.append(folder);
@@ -211,7 +211,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
// this code needs a speed overhaul... and some proper tests
// Two static parts because one may be enclosing jpsp (269522)
if (sig1 != null) {
- if (sig1.indexOf("Lorg/aspectj/lang") != -1) {
+ if (sig1.contains("Lorg/aspectj/lang")) {
if (sig1.endsWith("Lorg/aspectj/lang/JoinPoint$StaticPart;")) {
sig1 = sig1.substring(0, sig1.lastIndexOf("Lorg/aspectj/lang/JoinPoint$StaticPart;"));
}
@@ -263,7 +263,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
// this code needs a speed overhaul... and some proper tests
// Two static parts because one may be enclosing jpsp (269522)
if (sig1 != null) {
- if (sig1.indexOf("Lorg/aspectj/lang") != -1) {
+ if (sig1.contains("Lorg/aspectj/lang")) {
if (sig1.endsWith("Lorg/aspectj/lang/JoinPoint$StaticPart;")) {
sig1 = sig1.substring(0, sig1.lastIndexOf("Lorg/aspectj/lang/JoinPoint$StaticPart;"));
}
@@ -358,7 +358,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
ipeSig = ipeSig.substring(0, idx);
}
if (ipeSig != null) {
- if (ipeSig.indexOf("Lorg/aspectj/lang") != -1) {
+ if (ipeSig.contains("Lorg/aspectj/lang")) {
if (ipeSig.endsWith("Lorg/aspectj/lang/JoinPoint$StaticPart;")) {
ipeSig = ipeSig.substring(0, ipeSig.lastIndexOf("Lorg/aspectj/lang/JoinPoint$StaticPart;"));
}
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 c1479f70f..77fe7a66b 100644
--- a/asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java
+++ b/asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java
@@ -432,7 +432,7 @@ public class ProgramElement implements IProgramElement {
// check if someone is calling us with something that is a signature already
assert name.charAt(0) != '[';
- if (name.indexOf("<") == -1) {
+ if (!name.contains("<")) {
// not parameterized
return new StringBuilder("L").append(name.replace('.', '/')).append(';').toString();
} else {