[PATCH] JDK-8233680: JavacFileManager.close() doesn't clear some cache instance variables
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Jan 15 22:20:26 UTC 2020
Daniel,
I've pushed your proposed fix for JavacFileManager.java, but without the
test, which still has enough issues that fixing them outweighs the
benefit. For this case, I have labeled the bug 'noreg-trivial' and
'noreg-perf' on the grounds that the fix is trivial and (at least in
part) is just a memory usage issue.
I see the test had a binary blob in it. As a general rule, we don't put
binary blobs in our source repos, and certainly not for a jar file.
Also, tests for javac functionality do not belong in the javadoc
directory. Your comment about not being able to reuse the filemanager
needs more investigation, but that could be done separately.
-- Jon
On 12/20/2019 01:01 AM, Daniel Le Duc Khoi Nguyen wrote:
> Hi Jon,
>
> I've converted the test to Java and moved it under the javadoc package to avoid
> any confusion of it being a compiler test. I've also simplified and add comments
> to it. Please refer to JDK-8233680-1.patch.
>
> In order to trigger the bug, one must reuse the JavacFileManager object that is
> created automatically by the compiler tools (when no fileManager argument is
> passed to getTask) after it's been automatically closed.
>
> This is only possible with JavaDoc and not javac. JavacTaskImpl.cleanup and
> JavacTaskImpl.prepareCompiler together make reusing the JavacFileManager object
> impossible.
>
> If you'd like to remove JavaDoc from the test dependency, please refer to
> JDK-8233680-javac-test-not-working-wip.patch and see if you could take it
> further. Thank you.
More information about the compiler-dev
mailing list