1
0

Replace comparisons String.indexOf() with String.contains() method. (#85)

This commit is contained in:
Arturo Bernal
2022-04-23 16:10:22 +02:00
committed by GitHub
parent b04cdc7e16
commit 475b8323e5

View File

@@ -103,10 +103,10 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
new StringTokenizer( traceString, "\n" );
tokenizer.nextToken();
String line = tokenizer.nextToken();
while ( line.indexOf( this.getClass().getName() ) == -1 ) {
while (!line.contains(this.getClass().getName())) {
line = tokenizer.nextToken();
}
while ( line.indexOf( this.getClass().getName() ) >= 0 ) {
while (line.contains(this.getClass().getName())) {
line = tokenizer.nextToken();
}
final int start = line.indexOf( "at " ) + 3;