Skip to content

Commit 8237052

Browse files
committed
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.
1 parent 162c261 commit 8237052

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/ExtractorAsserts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static void assertNotEmpty(String stringToCheck) {
5656
}
5757

5858
public static void assertNotEmpty(@Nullable String message, String stringToCheck) {
59-
assertNotNull(message, stringToCheck);
59+
assertNotNull(stringToCheck, message);
6060
assertFalse(stringToCheck.isEmpty(), message);
6161
}
6262

0 commit comments

Comments
 (0)