зеркало из https://github.com/microsoft/gctoolkit.git
fix potential substring(0,0)
This commit is contained in:
Родитель
8a7e61961c
Коммит
0e8f2c83cf
|
@ -199,7 +199,8 @@ public class UnifiedG1GCParser extends UnifiedGCLogParser implements UnifiedG1GC
|
|||
.findAny()
|
||||
.ifPresentOrElse(
|
||||
tuple -> {
|
||||
setForwardReference(gcid, line.substring(0, end));
|
||||
// Typically, "end" will be greater than zero, but not always.
|
||||
setForwardReference(gcid, end > 0 ? line.substring(0, end) : line);
|
||||
applyRule(tuple.getKey(), tuple.getValue(), line);
|
||||
},
|
||||
() -> log(line)
|
||||
|
|
Загрузка…
Ссылка в новой задаче