String.indexOf() expressions can be replaced with a call to the String.contains() method available in Java 5 and newer.
This commit is contained in:
committed by
Juergen Hoeller
parent
81d77b9872
commit
93189a6733
@@ -132,7 +132,7 @@ public class HotSwappableTargetSourceTests {
|
||||
@Test
|
||||
public void testRejectsSwapToNull() {
|
||||
IllegalArgumentException ex = testRejectsSwapToInvalidValue(null);
|
||||
assertTrue(ex.getMessage().indexOf("null") != -1);
|
||||
assertTrue(ex.getMessage().contains("null"));
|
||||
}
|
||||
|
||||
// TODO test reject swap to wrong interface or class?
|
||||
|
||||
Reference in New Issue
Block a user