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