File tree Expand file tree Collapse file tree
src/main/java/org/scijava/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1302,12 +1302,12 @@ private static class TypeVarInfo {
13021302
13031303 private final TypeVariable <?> var ;
13041304 private final Type [] upperBounds ;
1305- private List <Type > types ;
1305+ private Set <Type > types ;
13061306
13071307 public TypeVarInfo (final TypeVariable <?> var ) {
13081308 this .var = var ;
13091309 this .upperBounds = var .getBounds ();
1310- this .types = new ArrayList <>();
1310+ this .types = new HashSet <>();
13111311 }
13121312
13131313 /**
@@ -1351,13 +1351,12 @@ public boolean fixBounds(final Type bound) {
13511351
13521352 // make sure that all of the types that already fit in this variable
13531353 // before the variable was fixed still are allowed by the type variable.
1354- final List <Type > temp = types ;
1354+ final Set <Type > temp = types ;
13551355 temp .add (bound );
1356- types = new ArrayList <>();
1356+ types = new HashSet <>();
13571357 for (final Type type : temp ) {
13581358 if (!allowType (type )) return false ;
13591359 }
1360-
13611360 return true ;
13621361 }
13631362
You can’t perform that action at this time.
0 commit comments