On Tue, 16 Feb 2021 11:33:08 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> Evan Whelan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8252883: Doc cleanup, code formatting and throwing exceptions instead of >> catching > > test/jdk/java/util/logging/FileHandlerAccessTest.java line 75: > >> 73: handler.close(); >> 74: } catch (Exception e) { >> 75: throw new RuntimeException(e); > > Will throwing an exception in a thread (if happening in the Thread created at > line 60) cause jtreg to fail? Or will the exception simply be discarded? The exception will in fact make the jtreg test fail. I verified this by creating a dummy test case and throwing an exception within a thread as you suggested. > test/jdk/java/util/logging/FileHandlerAccessTest.java line 98: > >> 96: childProcess.waitFor(); >> 97: } catch (Exception e) { >> 98: throw new RuntimeException(e); > > Same holds there as well. Maybe you could make an experiment with a dummy > test to see whether the exception will make the test fail. Please see above comment. Verified that an exception thrown within a thread causes test to fail ------------- PR: https://git.openjdk.java.net/jdk/pull/2572