| Summary: | Search for Tuen Mun station return null | ||
|---|---|---|---|
| Product: | Group 9: Route Planning | Reporter: | CherineLee <shiyingli7-c> |
| Component: | Network | Assignee: | qiyuliang2-c |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | blocker | ||
| Priority: | Highest | ||
| Version: | 1.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS | ||
Step to reproduce: 1. To set up, run network = Network.getInstance(); network.initializationStations(); network.initializationLines(); 2. To get the Tuen Mun station, run: Station tuenmun = network.searchStationByName("Tuen Mun"); 3. To get the name of the searched station, run: String result = tuenmun.getName(); Expected result: Tuen Mun Actual result: NullPointerException From the NullPointerException, I made a safe assumption that the search returned null. I have made some experiments to search other station names and yet none of them seemed to have this problem. Please check what is causing this problem.