Skip to content

Commit

Permalink
Print correct boolean expression in assert fail
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Apr 13, 2020
1 parent 03ca57d commit 3b521d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ public static <T> T assertNotHoldsLock(@NotNull T monitor) {
*/
@SuppressWarnings("ConstantConditions")
public static boolean assertTrue(boolean expr) {
assert expr : Messages.log.expectedBoolean(expr);
assert expr : Messages.log.expectedBoolean(true);
return expr;
}

Expand All @@ -552,7 +552,7 @@ public static boolean assertTrue(boolean expr) {
*/
@SuppressWarnings("ConstantConditions")
public static boolean assertFalse(boolean expr) {
assert !expr : Messages.log.expectedBoolean(expr);
assert !expr : Messages.log.expectedBoolean(false);
return expr;
}

Expand Down

0 comments on commit 3b521d9

Please sign in to comment.