diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:11:12 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:11:12 +0200 |
commit | c1c373f4278426308689db61f7758185e8f0401b (patch) | |
tree | 9e03af2feb69782c50464fc1e1e2ce0d6b6bb8c5 /tests/src/test/java/org/aspectj/systemtest/ajc150 | |
parent | a508fd5315c6330f2057c219aebc35b15d0ea497 (diff) | |
download | aspectj-c1c373f4278426308689db61f7758185e8f0401b.tar.gz aspectj-c1c373f4278426308689db61f7758185e8f0401b.zip |
'String.indexOf()' expression is replaceable with 'contains()'
Reports any String.indexOf() expressions which can be replaced with a call to the String.contains() method available in Java 5 and newer.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc150')
-rw-r--r-- | tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java index c105e881d..8dcb8c34d 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -412,7 +412,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { AsmManager.dumptree(pw, AsmManager.lastActiveStructureModel.getHierarchy().getRoot(), 0); pw.flush(); String tree = baos.toString(); - assertTrue("Expected 'Red [enumvalue]' somewhere in here:" + tree, tree.indexOf("Red [enumvalue]") != -1); + assertTrue("Expected 'Red [enumvalue]' somewhere in here:" + tree, tree.contains("Red [enumvalue]")); } } |