RFR: 7902847: Class directory of a test case should be always used to compile a library

Jonathan Gibbons jjg3 at pobox.com
Tue Apr 1 19:13:58 UTC 2025


It would be a worthwhile audit to examine test class directories after a 
test run to see whether any library clases have leaked into those 
directories.

A different approach would be to compile test classes with 
`-implicit:none` to ensure library classes do not leak into test class 
directories.
See 
https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-implicit

-- Jon


On 4/1/25 12:04 PM, Jonathan Gibbons wrote:
>
>
>> Class directory of a test case should be always used to compile a 
>> library
> That would be an anti-pattern to be discouraged. Libraries are 
> supposed to be shared between tests and as such, should not be 
> beholden to any individual test class directory.
>
> -- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jtreg-dev/attachments/20250401/0c9fea5d/attachment.htm>


More information about the jtreg-dev mailing list