[jdk18] RFR: 8278930: javac tries to compile a file twice via PackageElement.getEnclosedElements [v3]
Jan Lahoda
jlahoda at openjdk.java.net
Fri Jan 7 12:47:05 UTC 2022
On Thu, 6 Jan 2022 23:58:29 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updating year.
>
> test/langtools/tools/javac/processing/model/element/TestListPackageFromAPI.java line 70:
>
>> 68: Files.newOutputStream(classes.resolve("Test.class")).close();
>> 69:
>> 70: Thread.sleep(2000);
>
> Mild ugh. What condition are you waiting for? Are you waiting for file timestamps to be newer, or something like that? Can you "poll" looking for the desired change instead?
Thanks for the comment!
It was waiting to reliably make the timestamps different, but I've cleaned up the test here to avoid that:
https://github.com/openjdk/jdk18/pull/85/commits/6bef38f54e791092eb88843c766d8f5d064ac9c5
-------------
PR: https://git.openjdk.java.net/jdk18/pull/85
More information about the compiler-dev
mailing list