diff --git a/core/src/main/java/com/pholser/junit/quickcheck/internal/Reflection.java b/core/src/main/java/com/pholser/junit/quickcheck/internal/Reflection.java index e0453932e..3228b66ec 100644 --- a/core/src/main/java/com/pholser/junit/quickcheck/internal/Reflection.java +++ b/core/src/main/java/com/pholser/junit/quickcheck/internal/Reflection.java @@ -48,7 +48,7 @@ a copy of this software and associated documentation files (the import java.util.Arrays; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -135,7 +135,7 @@ public static T instantiate(Constructor ctor, Object... args) { } public static Set> supertypes(Type bottom) { - Set> supertypes = new HashSet<>(); + Set> supertypes = new LinkedHashSet<>(); supertypes.add(bottom); supertypes.addAll(bottom.getAllTypesAssignableFromThis()); return supertypes;