stawirej commented on code in PR #953:
URL: https://github.com/apache/commons-lang/pull/953#discussion_r976396311
##########
src/main/java/org/apache/commons/lang3/Validate.java:
##########
@@ -156,6 +156,30 @@ public static void isTrue(final boolean expression, final
String message, final
}
}
+ /**
+ * Validate that the argument condition is {@code true}; otherwise
+ * throwing an exception. This method is useful when validating according
+ * to an arbitrary boolean expression, such as validating a
+ * primitive number or using your own custom validation expression.
+ *
+ * <pre>
+ * Validate.isTrue(i > 0, "The value must be greater than 0");
+ * Validate.isTrue(myObject.isOk(), "The object is not okay");</pre>
+ *
+ * <p>The exception message will be converted to a string using
String.valueOf(Object).</p>
+ *
+ * @param expression the boolean expression to check
Review Comment:
Done.
##########
src/main/java/org/apache/commons/lang3/Validate.java:
##########
@@ -156,6 +156,30 @@ public static void isTrue(final boolean expression, final
String message, final
}
}
+ /**
+ * Validate that the argument condition is {@code true}; otherwise
+ * throwing an exception. This method is useful when validating according
+ * to an arbitrary boolean expression, such as validating a
+ * primitive number or using your own custom validation expression.
+ *
+ * <pre>
+ * Validate.isTrue(i > 0, "The value must be greater than 0");
+ * Validate.isTrue(myObject.isOk(), "The object is not okay");</pre>
+ *
+ * <p>The exception message will be converted to a string using
String.valueOf(Object).</p>
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]