| Summary: | [PredictSys] java.lang.ArrayIndexOutOfBoundsException thrown when starting New Prediction | ||
|---|---|---|---|
| Product: | MovieXXX | Reporter: | tomfong521 |
| Component: | MovieAnalysisEngine | Assignee: | clwong274-c |
| Status: | RESOLVED FIXED | ||
| Severity: | blocker | ||
| Priority: | High | ||
| Version: | 1.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Deadline: | 2018-11-17 | ||
|
Description
tomfong521
2018-11-29 22:09:23 HKT
Root cause
- Scanner.nextInt method(PredictSys.java:62) does not read the newline character ("\n") entered by hitting "Enter", so after that the call to Scanner.nextLine(PredictSys.java:18) returns after reading that "\n" but before reading parameter for prediction
How to fix
- Added to consume the newline character before calling Scanner.nextLine to read parameter input
Expected behavior
- No exception or error should be shown and parameters for prediction can be input to process prediction
Potential affected areas
- PredictSys
Affected versions
- >=v2
Test cases
1. Enter "1" to select "Office Box Prediction" in [System Home]
2. Enter "1" to select "Start New Prediction" in [Office Box Prediction]
Test result
- At step (2), no exception or error is shown and parameters for prediction can be input to process prediction
|