Fixes HeroBuilder NullPointerException #35.
This commit is contained in:
parent
dd855a376b
commit
62b871774a
@ -94,7 +94,7 @@ public class Hero {
|
||||
|
||||
public HeroBuilder(Profession profession, String name) {
|
||||
if (profession == null || name == null) {
|
||||
throw new NullPointerException(
|
||||
throw new IllegalArgumentException(
|
||||
"profession and name can not be null");
|
||||
}
|
||||
this.profession = profession;
|
||||
|
Loading…
x
Reference in New Issue
Block a user