On Wed, 17 Nov 2021 21:45:45 GMT, Mandy Chung <mch...@openjdk.org> wrote:
>> Both jar and jmod utilise java.io file operations whose methods define no >> ordering of the return file lists, and in fact rely on OS query file >> ordering, which can differ by underlying OS architecture. >> This PR adds sort processing to the creation of such jar's and jmod's to >> enable a deterministic content ordering. >> >> Signed-off-by: Andrew Leonard <anleo...@redhat.com> > > src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java line 803: > >> 801: out.writeEntry(in, section, name); >> 802: } >> 803: } > > jmod change is okay. thanks > test/jdk/tools/jar/ContentOrder.java line 79: > >> 77: @Test >> 78: public void test1() throws IOException { >> 79: mkdir("testjar/Ctest1 testjar/Btest2/subdir1 testjar/Atest3"); > > I suggest to make `mkdir` and `touch` to take a vararg of String or Path and > the method body concatenates the input strings to build the command line. I copied this from another test, but your suggestion makes sense ------------- PR: https://git.openjdk.java.net/jdk/pull/6395