Bug 317 - Creating user with empty name should throw an error
Summary: Creating user with empty name should throw an error
Status: CONFIRMED
Alias: None
Product: Group20
Classification: Unclassified
Component: User (show other bugs)
Version: 1.0
Hardware: PC Linux
: --- enhancement
Assignee: awkakavou2-c
URL:
Depends on:
Blocks:
 
Reported: 2019-11-26 13:09 HKT by Anders
Modified: 2019-11-26 13:09 HKT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anders 2019-11-26 13:09:39 HKT
Hi!

At the current moment it is possible to create a user with an empty name (string is empty). I imagine a check should be made in code below from the User.java class:

public User(String s, double d, int i) throws IllegalArgumentException {
	this.name = s;
	this.balance = d;
	this.id = i;
}