Fix the bug of ArrayIndexOutOfBoundsException.
This commit is contained in:
@@ -231,6 +231,9 @@ public class Miner {
|
|||||||
String lineNum = line.substring(4);
|
String lineNum = line.substring(4);
|
||||||
lineNum = lineNum.substring(0, lineNum.indexOf(" "));
|
lineNum = lineNum.substring(0, lineNum.indexOf(" "));
|
||||||
String[] nums = lineNum.split(",");
|
String[] nums = lineNum.split(",");
|
||||||
|
if (nums.length != 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
startLine = Integer.parseInt(nums[0].trim());
|
startLine = Integer.parseInt(nums[0].trim());
|
||||||
range = Integer.parseInt(nums[1].trim());
|
range = Integer.parseInt(nums[1].trim());
|
||||||
if (startLine > startLineNum) {
|
if (startLine > startLineNum) {
|
||||||
|
|||||||
Reference in New Issue
Block a user