Skip to content
Snippets Groups Projects
Commit d62ef708 authored by Ján Dovjak's avatar Ján Dovjak
Browse files

fix: Null check when null is added to team

parent 7bbcfb5b
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,9 @@ public class TeamServiceImpl implements TeamService {
@Override
public void addPlayerToTeam(Team team, Player player) {
if (player == null){
throw new NullPointerException("Player is null");
}
team.addPlayer(player);
teamDao.update(team);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment