Skip to content

Commit

Permalink
Threat with NullPointerException empty categories
Browse files Browse the repository at this point in the history
  • Loading branch information
pwener committed Mar 15, 2017
1 parent fd03627 commit 90c6950
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void validate(String category) {

@Override
public Validator add(String message) {
if(category.equals(null)) {
if(category == null) {
throw new NullPointerException("One category needs to "
+ "be informed before you pass any error");
}
Expand Down

0 comments on commit 90c6950

Please sign in to comment.