Bug 749 - the login() and changePwd() function in user.java can only return constructor.
Summary: the login() and changePwd() function in user.java can only return constructor.
Status: CONFIRMED
Alias: None
Product: Group 05(2022)
Classification: Unclassified
Component: normal class section (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Assignee: yiweizhao4
URL:
Depends on:
Blocks:
 
Reported: 2022-11-30 19:45 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:45:59 HKT
Steps to Reproduce:
In User.java, run the function login() and changePwd(), we can see the return results of if conditional sentences.

Expected output:
When method iUserDAO.queryUser() or iUserDAO.changePwd() is true, it will return a new constructor, otherwise it will return null.

Actual output:
It only can return new constructor when if conditional sentences are true.
Comment 1 yiweizhao4 2022-11-30 19:55:36 HKT
Resolution:	
We should add a branch to return null in the Login() and changePwd() in the if conditional sentences.