garydgregory commented on a change in pull request #733:
URL: https://github.com/apache/commons-lang/pull/733#discussion_r642522472
##########
File path:
src/test/java/org/apache/commons/lang3/exception/ContextedExceptionTest.java
##########
@@ -48,6 +48,11 @@ public void testContextedException() {
assertTrue(StringUtils.isEmpty(message));
}
+ @Test
+ public void testNullException() {
+ assertTrue(StringUtils.isEmpty(ExceptionUtils.getStackTrace(null)));
Review comment:
>
>
> HI @garydgregory
> SomeThins like --> `assertNotNull(ExceptionUtils.getStackTrace(null));` ??
> TY
Hello @arturobernalg
No, assert what you expect to happen on null input. Your suggestion above
would accept a return value of "foo". Is that OK? I think not.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]