On Thu, 9 Apr 2026 18:26:19 GMT, Alan Bateman <[email protected]> wrote:
>> test/jdk/java/util/ServiceLoader/linkageerrors/test1/Provider1.java line 1: >> >>> 1: /* >> >> These files introduce a lot of license headers - I wonder if it would be >> better for `LinkageErrorsTest` to compile these source code as text blocks >> using `InMemoryJavaCompiler` (`@library /test/lib`) and dump all classes >> except the ones you want to remove into the `test.classes` directory. > > Each source file is required to have a copyright header. I agree it is a bit > tedious when there are a lot of tiny source files. So moving the into text > blocks might be better, or at least make it more maintenance if we add more > tests for these error cases. Another advantage with no extra source files is that they allow tests, say `LinkageErrorsTest.java`, to live in `ServiceLoader` instead of a dedicated `linkageerrors` subdirectory - this is also more friendly to IDE-based directory browsing. Ultimately it's up to you to decide; if we do decide that we want more simple declarations for such multi-package or multi-module tests, there are many tests that we can go through in the codebase in a later effort. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30405#discussion_r3060384869
