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

Reply via email to