| Summary: | Null pointer exception when try to read a json file | ||
|---|---|---|---|
| Product: | River-Crossing-Puzzle-Solver | Reporter: | tsunychau2-c |
| Component: | Solver Mode | Assignee: | tsunychau2-c |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | ||
| Priority: | High | ||
| Version: | v1.0.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS | ||
|
Description
tsunychau2-c
2022-11-05 20:44:51 HKT
Bug is confirmed The problem has been solved.
Inside the Puzzle.java, the Puzzle constructor miss this line of code
(this.puzzleJSON = puzzleJSON;)
Modified code:
public Puzzle(String name, String description, ArrayList<String> roleList, HashSet<String> travelables, PuzzleState initialState, PuzzleState targetState, JSONObject puzzleJSON)
{
this.name = name;
this.description = description;
this.roleList = roleList;
this.travelables = travelables;
this.initialState = initialState;
this.targetState = targetState;
this.puzzleJSON = puzzleJSON;
}
|