| Summary: | Unable to search for the Specific Processed Result | ||
|---|---|---|---|
| Product: | 2021 CS3343 Hall Admission System | Reporter: | amble3232 |
| Component: | System Section | Assignee: | Azim <mohamazim2> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | chpang22-c |
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | PC | ||
| OS: | Windows | ||
|
Description
amble3232
2021-12-04 16:23:13 HKT
I just tried this test case, there is a null problem. I suspect the code of application searching or application storage has some problems. I will pass it to the developer to solve this error. The system was able the find the Application, but once the application was found, it got replaced to null due to the next application the system searched not fulfilling the search condition. As in the program loop, it keep updating the outData value via this code “outData = processResult.findInAdmit(target);”.
To solve the keep updating problem, a break condition is added.
Solution:
===============
public String findResultStatus(Application target) {
for (ProcessResult processResult : allResults) {
outData = processResult.findInAdmit(target);
if(outData!=null) break;
}
if(outData == null) {
outData = ProcessResult.findInWaiting(target);
}
if(outData == null) {
outData = ProcessResult.findInReject(target);
}
return outData;
}
}
|