RFR: 8276766: Enable jar and jmod to produce deterministic timestamped content [v23]
Lance Andersen
lancea at openjdk.java.net
Fri Dec 10 11:56:21 UTC 2021
On Fri, 10 Dec 2021 10:54:06 GMT, Andrew Leonard <aleonard at openjdk.org> wrote:
>> Add a new --source-date <TIMESTAMP> (epoch seconds) option to jar and jmod to allow specification of time to use for created/updated jar/jmod entries. This then allows the ability to make the content deterministic.
>>
>> Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>
> Andrew Leonard has updated the pull request incrementally with one additional commit since the last revision:
>
> 8276766: Enable jar and jmod to produce deterministic timestamped content
>
> Signed-off-by: Andrew Leonard <anleonar at redhat.com>
Hi Andrew,
Thank you for the changes. This looks much much better. Please see additional simplification comment below.
I kicked off a Mach5 run in the meantime
test/jdk/tools/jar/SourceDateDataProvider.java line 54:
> 52: };
> 53:
> 54: @DataProvider(name = "SourceDateData.valid")
This class file is really not needed as you can just add the DataProvider to ReproducableJar example:
```
@DataProvider
private Object[][] invalidSourceDates() {
return new Object[][] {
{"1976-06-24T01:02:03+00:00"},
{"1980-01-01T00:00:01+00:00"},
{"2100-01-01T00:00:00+00:00"},
{"2138-02-18T00:00:00-11:00"},
{"2006-04-06T12:38:00"},
{"2012-08-24T16"}
};
}
And the Test will just use
`@Test(dataProvider= "invalidStourceDates")`
-------------
PR: https://git.openjdk.java.net/jdk/pull/6481
More information about the core-libs-dev
mailing list