Fix wrong assertion in assertNotEmpty

The non-null assertion was made on the exception message instead of the string
to check, causing a NullPointerException if the string to check was null.
This commit is contained in:
AudricV 2023-08-07 19:12:17 +02:00
parent 162c261577
commit 8237052ef5
No known key found for this signature in database
GPG Key ID: DA92EC7905614198
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ public class ExtractorAsserts {
} }
public static void assertNotEmpty(@Nullable String message, String stringToCheck) { public static void assertNotEmpty(@Nullable String message, String stringToCheck) {
assertNotNull(message, stringToCheck); assertNotNull(stringToCheck, message);
assertFalse(stringToCheck.isEmpty(), message); assertFalse(stringToCheck.isEmpty(), message);
} }