| Summary: | [SearchEngine] java.lang.NumberFormatException thrown when searching movie | ||
|---|---|---|---|
| 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:39:46 HKT
Root cause - There are empty data cells in the database, when these data are read as string and being phrased into other type (e.g. integer in SearchEngine.java:31) format exception will be thrown How to fix - Added to check if the read data is empty string before phrasing, pass "" instead if so Expected behavior - No exception or error should be shown, recommendation can be performed and printed successfully Potential affected areas - SearchEngine Affected versions - >=v2 Test cases 1. Edit a test database with four movies in it. Enter movie info to satisfy following (e.g. given search parameter "german"): MovieA: movie_title="1984" title_year="2018" language="english" MovieB: movie_title="Hello world" title_year=""(empty) language="german" 2. Enter "2" to select "Film Recommendation" in [System Home] 3. Enter "1" to select "Start New Recommendation" in [Office Box Prediction] 4. Enter keyword (e.g. "german") to process recommendation Test result - At step (4), no exception or error is shown, recommendation is performed and printed successfully - Movie row in database with empty data can be used to construct a Film class object - Printed output: MovieB |