File hamcrest-reproducible-builds.patch of Package hamcrest.17769

Index: hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java
===================================================================
--- hamcrest-1.3.orig/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java
+++ hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java
@@ -43,6 +43,13 @@ public class ReflectiveFactoryReader imp
 
             private int currentMethod = -1;
             private Method[] allMethods = cls.getMethods();
+            {
+                java.util.Arrays.sort(allMethods, new java.util.Comparator<Method>() {
+                    public int compare(Method m1, Method m2) {
+                        return m1.toGenericString().compareTo(m2.toGenericString());
+                    }
+                });
+            }
 
             @Override
             public boolean hasNext() {
@@ -171,4 +178,4 @@ public class ReflectiveFactoryReader imp
       return name.replace('$', '.');
     }
 
-}
\ No newline at end of file
+}
openSUSE Build Service is sponsored by