[GitHub] [commons-lang] garydgregory commented on a diff in pull request #1069: LANG-1647

2023-07-02 Thread via GitHub


garydgregory commented on code in PR #1069:
URL: https://github.com/apache/commons-lang/pull/1069#discussion_r1249622583


##
src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java:
##
@@ -850,4 +850,40 @@ public void testWrapAndUnwrapThrowable() {
 final Throwable t = assertThrows(Throwable.class, () -> 
ExceptionUtils.wrapAndThrow(new TestThrowable()));
 assertTrue(ExceptionUtils.hasCause(t, TestThrowable.class));
 }
+
+@Test
+public void testIsChecked_unchecked() {
+final boolean result = ExceptionUtils.isChecked(new 
IllegalArgumentException());

Review Comment:
   Not quite, see 
https://github.com/apache/commons-lang/pull/1069#issuecomment-1616686083



-- 
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: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on a diff in pull request #1069: LANG-1647

2023-07-02 Thread via GitHub


garydgregory commented on code in PR #1069:
URL: https://github.com/apache/commons-lang/pull/1069#discussion_r1249606014


##
src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java:
##
@@ -850,4 +850,40 @@ public void testWrapAndUnwrapThrowable() {
 final Throwable t = assertThrows(Throwable.class, () -> 
ExceptionUtils.wrapAndThrow(new TestThrowable()));
 assertTrue(ExceptionUtils.hasCause(t, TestThrowable.class));
 }
+
+@Test
+public void testIsChecked_unchecked() {
+final boolean result = ExceptionUtils.isChecked(new 
IllegalArgumentException());

Review Comment:
   👍😉



-- 
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: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on a diff in pull request #1069: LANG-1647

2023-07-02 Thread via GitHub


garydgregory commented on code in PR #1069:
URL: https://github.com/apache/commons-lang/pull/1069#discussion_r1249604113


##
src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java:
##
@@ -850,4 +850,40 @@ public void testWrapAndUnwrapThrowable() {
 final Throwable t = assertThrows(Throwable.class, () -> 
ExceptionUtils.wrapAndThrow(new TestThrowable()));
 assertTrue(ExceptionUtils.hasCause(t, TestThrowable.class));
 }
+
+@Test
+public void testIsChecked_unchecked() {
+final boolean result = ExceptionUtils.isChecked(new 
IllegalArgumentException());

Review Comment:
   > @garydgregory so, should I create new local variables for each case?
   
   You've got it backward.



-- 
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: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on a diff in pull request #1069: LANG-1647

2023-07-02 Thread via GitHub


garydgregory commented on code in PR #1069:
URL: https://github.com/apache/commons-lang/pull/1069#discussion_r1249556051


##
src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java:
##
@@ -850,4 +850,40 @@ public void testWrapAndUnwrapThrowable() {
 final Throwable t = assertThrows(Throwable.class, () -> 
ExceptionUtils.wrapAndThrow(new TestThrowable()));
 assertTrue(ExceptionUtils.hasCause(t, TestThrowable.class));
 }
+
+@Test
+public void testIsChecked_unchecked() {
+final boolean result = ExceptionUtils.isChecked(new 
IllegalArgumentException());

Review Comment:
   @orionlibs 
   There is no need for a single-use local variable here and in other new tests.
   



-- 
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: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org