Compare commits

..
@@ -98,9 +98,14 @@ public class Album {
} }
public void removeGenre(Genre genre) { public void removeGenre(Genre genre) {
ag.getGenre() != null && if (genre == null) {
ag.getGenre().getId() != null && return;
ag.getGenre().getId().equals(genre.getId()) }
albumGenres.removeIf(ag ->
ag.getGenre() != null &&
ag.getGenre().getId() != null &&
ag.getGenre().getId().equals(genre.getId())
);
} }
// Método conveniente para pegar só os gêneros // Método conveniente para pegar só os gêneros