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

fix: equals of Optional and Non-Optional

parent c422ac6a
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ public class PlayerServiceImpl implements PlayerService {
@Override
public void removeTeamFromPlayer(Player player, Team team) {
if(!player.getTeam().equals(team)){
if(player.getTeam().isEmpty() || !player.getTeam().get().equals(team)){
throw new PlayerNotInTeamException("Player not in this team");
}
player.setTeam(null);
......
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