Fix broken removeGenre to correct logic for the null-pointer exception

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda 2025-12-08 00:37:05 -03:00
parent 09d20efba6
commit 8119530bef
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ public class Album {
}
public void removeGenre(Genre genre) {
if (genre != null) {
if (genre == null) {
return;
}
albumGenres.removeIf(ag ->