Help with JDK-8211057
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon Sep 24 09:29:40 UTC 2018
Hi compiler folks!
Could anyone possibly help me with having a look at
https://bugs.openjdk.java.net/browse/JDK-8211057? The CompileProperties
build tool helper is not generating reproducible output, that is, if you
run it multiple times one after another, with no source code changes, it
will (sometimes) not generate identical output. This breaks our build
tests for reproducibility. :-(
I've fixed a handful of similar build tool issues the last year, and
almost all of the cases ended up with someone iterating over a HashMap
and just outputting elements in the order they happened to get them.
However, this case seem different. I see no HashMap, and there is code
that clearly intends to sort the output.
My best guess here is that Properties.keySet() is backed by a HashMap,
and that Collections.sort(sortedKeys) does not do what the author of the
code intended, but that's just my guess.
Since this is hard to reproduce (it's an highly intermittent failure,
typically appearing mostly on Windows machines) I'd really appreciate
some help by reasoning about the code.
/Magnus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180924/9bc9c39e/attachment.html>
More information about the compiler-dev
mailing list