http://bugzilla.opensuse.org/show_bug.cgi?id=1120493 Bug ID: 1120493 Summary: hamcrest does not build reproducibly ; affects junit Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: openSUSE Factory Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: tchvatal@suse.com Reporter: bwiedemann@suse.com QA Contact: qa-bugs@suse.de CC: fstrba@suse.com Found By: Development Blocker: --- While working on reproducible builds for openSUSE, I found that the hamcrest binary package varied for every build even when trying to make the build as similar as possible. /usr/share/java/hamcrest/org/hamcrest/CoreMatchers.class differs /usr/share/java/hamcrest/org/hamcrest/Matchers.class differs along with their related .html docs. Both seem to come from ordering issues in a generated CoreMatchers.java file. That seems to be different from the CoreMatchers.java contained in hamcrest-all-1.3-sources.jar and hamcrest-core-1.3-sources.jar Additionally, this variation causes junit noarch packages to vary between architectures, because it includes the hamcrest/CoreMatchers.class file. +++ new//usr/share/javadoc/hamcrest/org/hamcrest/CoreMatchers.html 2019-01-02 12:40:03.011812250 +0000 @@ -570,20 +570,25 @@ <!-- --> </a> <h3>Method Detail</h3> -<a id="allOf(org.hamcrest.Matcher...)"> +<a id="allOf(org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher)"> -<a id="allOf(org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher)"> +<a id="allOf(org.hamcrest.Matcher,org.hamcrest.Matcher,org.hamcrest.Matcher)"> -<a id="either(org.hamcrest.Matcher)"> +<a id="both(org.hamcrest.Matcher)"> -<a id="hasItems(org.hamcrest.Matcher...)"> +<a id="hasItems(java.lang.Object[])"> +<!-- --> +</a><a id="hasItems(T...)"> For example: - <pre>assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))</pre></div> + <pre>assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))</pre></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>itemMatchers</code> - the matchers to apply to items provided by the examined <code>Iterable</code></dd> +<dd><code>items</code> - the items to compare against the items provided by the examined <code>Iterable</code></dd> Looking at the doc diff, it could even be a bug in the generator. The other likely cause would be some hash or set-of-items with unordered elements used in the java generator code. Then adding a sort in its output-iterator would suffice. -- You are receiving this mail because: You are on the CC list for the bug.