Skip to content

Commit

Permalink
fix: null point execption isAnyRubrique
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolife999 committed Nov 20, 2023
1 parent b1772ff commit 4513bf3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void addRegleNormage(RegleNormage regleNormage) {
*/
public boolean isAnyRubrique(String rubriqueToTest)
{
return this.reglesNormage.stream().anyMatch(t -> t.getRubrique().contains(rubriqueToTest));
return this.reglesNormage.stream().anyMatch(t -> t.getRubrique()!=null && t.getRubrique().contains(rubriqueToTest));
}

/**
Expand All @@ -52,7 +52,7 @@ public boolean isAnyRubrique(String rubriqueToTest)
*/
public boolean isAnyRubriqueNmcl(String rubriqueToTest)
{
return this.reglesNormage.stream().anyMatch(t -> t.getRubriqueNmcl().contains(rubriqueToTest));
return this.reglesNormage.stream().anyMatch(t -> t.getRubriqueNmcl()!=null && t.getRubriqueNmcl().contains(rubriqueToTest));
}

}

0 comments on commit 4513bf3

Please sign in to comment.