RFR: JDK-8276892: Provide a way to emulate exceptional situations in FileManager when using JavadocTester [v3]
Jonathan Gibbons
jjg at openjdk.java.net
Mon Dec 13 22:50:17 UTC 2021
On Mon, 13 Dec 2021 16:46:34 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update to handle methods on JavaFileManager, such as getFileForInput
>>
>> Overall, to better handle the ability to throw checked exceptions,
>> the functionality of the builder is changed and now limited to providing
>> functions that can throw user-provided exceptions, instead of fully
>> replacing the underlying delegate method.
>
> test/langtools/jdk/javadoc/lib/javadoc/tester/TestJavaFileManagerBuilder.java line 100:
>
>> 98: }
>> 99:
>> 100: var prev = fileManagerHandlers.put(method, handler);
>
> Use putIfAbsent instead of put; otherwise this whole "handle" method is not "failure-atomic".
Done.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6404
More information about the javadoc-dev
mailing list