RFR: 8276766: Enable jar and jmod to produce deterministic timestamped content [v17]

Andrew Leonard aleonard at openjdk.java.net
Mon Dec 6 12:08:57 UTC 2021


On Mon, 6 Dec 2021 00:15:13 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> Andrew Leonard has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits:
>> 
>>  - Merge jdk:master
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into jarjmodtimestamps
>>  - 8276766: Enable jar and jmod to produce deterministic timestamped content
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>>  - Merge branch 'jarjmodtimestamps' of github.com:andrew-m-leonard/jdk into jarjmodtimestamps
>>  - Update src/jdk.jlink/share/classes/jdk/tools/jmod/JmodOutputStream.java
>>    
>>    Co-authored-by: Magnus Ihse Bursie <mag at icus.se>
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into jarjmodtimestamps
>>  - 8276766: Enable jar and jmod to produce deterministic timestamped content
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>>  - 8276766: Enable jar and jmod to produce deterministic timestamped content
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>>  - 8276766: Enable jar and jmod to produce deterministic timestamped content
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>>  - 8276766: Enable jar and jmod to produce deterministic timestamped content
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>>  - ... and 15 more: https://git.openjdk.java.net/jdk/compare/45da3aea...06863697
>
> src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties line 86:
> 
>> 84:         unexpected versioned entry {0} for release {1}
>> 85: error.date.notvalid=\
>> 86:         date {0} is not a valid ISO 8601 date and time
> 
> Please rephrase to use wording similar to what is in the Javadoc date-time with offset and zone

reworded

> src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties line 88:
> 
>> 86:         date {0} is not a valid ISO 8601 date and time
>> 87: error.date.out.of.range=\
>> 88:         date {0} is not within the valid range
> 
> Please  include the range in the message

added range

> src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties line 298:
> 
>> 296: \  -0, --no-compress          Store only; use no ZIP compression
>> 297: main.help.opt.create.update.index.date=\
>> 298: \      --date=TIMESTAMP       The timestamp in ISO 8601 format to use\n\
> 
> Same comment as above perhaps show the syntax

done

> src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod.properties line 111:
> 
>> 109: err.no.moduleToHash=No hashes recorded: no module matching {0} found to record hashes
>> 110: err.invalid.date=--date {0} is not a valid ISO 8601 date and time: {1} 
>> 111: err.date.out.of.range=--date {0} is out of the valid range
> 
> Same comments as above

done

> test/jdk/tools/jar/JarEntryTime.java line 191:
> 
>> 189:                                 "2038-11-26T06:06:06+00:00",
>> 190:                                 "2098-02-18T00:00:00-08:00",
>> 191:                                 "2099-12-31T23:59:59+00:00"};
> 
> I believe the parsing format you are using supports formats such as '2011-12-03T10:15:30', '2011-12-03T10:15:30+01:00' and'2011-12-03T10:15:30+01:00[Europe/Paris]'.
> 
> please add a few extra values to the above

added more tests
note '2011-12-03T10:15:30' is not valid as it needs a offset or Z, so it represents a reproducible "instant"

-------------

PR: https://git.openjdk.java.net/jdk/pull/6481


More information about the compiler-dev mailing list