On Fri, 26 Nov 2021 12:23:41 GMT, Sean Coffey <coff...@openjdk.org> wrote:
>> src/jdk.jartool/share/classes/sun/tools/jar/Main.java line 2290: >> >>> 2288: private void setSourceDate(ZipEntry e, long origTime) { >>> 2289: if (sourceDate != -1) { >>> 2290: e.setTimeLocal(LocalDateTime.ofEpochSecond(sourceDate, 0, >>> ZoneOffset.UTC)); >> >> The above could potentially throw a DateTimeException which may be OK but I >> would sanity check there are no issues > > For files with large number of entries, alot of LocalDateTime Objects are > being created here. Would there be an efficiency gain by converting > sourceDate variable to be of type LocalDateTime and simply pass it to the > s.setTimeLocal call here. The LocalDateTime Object could be constructed at > init time (may be null) and can be static etc. > > Same for jmod code ? > I think that is a reasonable suggestion ------------- PR: https://git.openjdk.java.net/jdk/pull/6481