GNU bug report logs -
#33041
[PATCH] gnu: icedtea-6: Make javadoc reproducible.
Previous Next
Reported by: Gábor Boskovits <boskovits <at> gmail.com>
Date: Sun, 14 Oct 2018 19:08:02 UTC
Severity: normal
Tags: moreinfo, patch
Done: Vagrant Cascadian <vagrant <at> reproducible-builds.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 33041 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Gabor,
On Sun, 14 Oct 2018 21:06:55 +0200
Gábor Boskovits <boskovits <at> gmail.com> wrote:
> +diff -r 06656286f572 -r 6e5f716a6592 src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
> +--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Mon Aug 22 10:53:55 2016 -0700
> ++++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Sat Oct 13 20:54:34 2018 +0200
> +@@ -396,6 +396,13 @@
> + */
> + public String today() {
> + Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
> +- return calendar.getTime().toString();
> ++ Date date=calendar.getTime();
> ++ Map<String,String> env = System.getenv();
> ++ if(env.containsKey("SOURCE_DATE_EPOCH")) {
> ++ String epoch=env.get("SOURCE_DATE_EPOCH");
> ++ long unixtime=Long.parseLong(epoch);
> ++ date=new Date(unixtime*1000L);
> ++ }
> ++ return date.toString();
> + }
> + }
Indentation is off.
Also, why not System.getenv("SOURCE_DATE_EPOCH") and check for null? Not that important, though.
Otherwise LGTM!
[Message part 2 (application/pgp-signature, inline)]
This bug report was last modified 1 year and 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.