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
@@ -125,10 +125,10 @@ public class PropertiesPersisterTests {
|
||||
propCopy = new String(propOut.toByteArray());
|
||||
}
|
||||
if (header != null) {
|
||||
assertTrue(propCopy.indexOf(header) != -1);
|
||||
assertTrue(propCopy.contains(header));
|
||||
}
|
||||
assertTrue(propCopy.indexOf("\ncode1=message1") != -1);
|
||||
assertTrue(propCopy.indexOf("\ncode2=message2") != -1);
|
||||
assertTrue(propCopy.contains("\ncode1=message1"));
|
||||
assertTrue(propCopy.contains("\ncode2=message2"));
|
||||
return propCopy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user