mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-75997 - SIOOBE: StackTraceLine.getLineNumber
This commit is contained in:
@@ -64,7 +64,7 @@ public class StackTraceLine {
|
||||
public int getLineNumber() throws NumberFormatException {
|
||||
final int close = getCloseBracket();
|
||||
final int lineNumberStart = myLine.lastIndexOf(':') + 1;
|
||||
if (close < 0 || lineNumberStart < 1) throw new NumberFormatException(myLine);
|
||||
if (close < 0 || lineNumberStart < 1 || lineNumberStart >= close) throw new NumberFormatException(myLine);
|
||||
return Integer.parseInt(myLine.substring(lineNumberStart, close)) - 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user