Bug 750 - when running queryOrderByUsername() and addOrder() in order.java, if the rs=null, it falls.
Summary: when running queryOrderByUsername() and addOrder() in order.java, if the rs=n...
Status: CONFIRMED
Alias: None
Product: Group 05(2022)
Classification: Unclassified
Component: normal class section (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- trivial
Assignee: yiweizhao4
URL:
Depends on:
Blocks:
 
Reported: 2022-11-30 19:49 HKT by yiweizhao4
Modified: 2022-11-30 19:55 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yiweizhao4 2022-11-30 19:49:40 HKT
Steps to Reproduce:
In Order.java, run the function queryOrderByUsername() and addOrder(), we can see the return results of executions.

Expected output:
When executing the queryOrderByUsername() and addOrder(), when the result is not null, we will see rsToAl(rs), otherwise it will return null.

Actual output:
We can only get the rsToAl(rs) and when the rs==null, it fails.
Comment 1 yiweizhao4 2022-11-30 19:55:03 HKT
Resolution:	
We should add if conditional sentences if(rs==null) in queryOrderByUsername() and addOrder() to judge whether the result is null.