Skip to content

Commit ea6ea79

Browse files
committed
Eliminate "? extends Class<?>" bounds
The Class class is final, so "? extends Class<?>" will always be just "Class<?>". How silly of me.
1 parent 4135609 commit ea6ea79

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

src/main/java/net/imagej/ops/DefaultOpMatchingService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,7 @@ private boolean valid(final OpCandidate candidate) {
450450
* </p>
451451
*/
452452
private boolean outputsMatch(final OpCandidate candidate) {
453-
final Collection<? extends Class<?>> outTypes = candidate.getRef()
454-
.getOutTypes();
453+
final Collection<Class<?>> outTypes = candidate.getRef().getOutTypes();
455454
if (outTypes == null) return true; // no constraints on output types
456455

457456
final Iterator<ModuleItem<?>> outItems = candidate.cInfo().outputs()

src/main/java/net/imagej/ops/OpRef.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public class OpRef {
5353
private final String name;
5454

5555
/** Types which the op must match. */
56-
private final Collection<? extends Class<?>> types;
56+
private final Collection<Class<?>> types;
5757

5858
/** The op's output parameter types, or null for no constraints. */
59-
private final Collection<? extends Class<?>> outTypes;
59+
private final Collection<Class<?>> outTypes;
6060

6161
/** Arguments to be passed to the op. */
6262
private final Object[] args;
@@ -103,7 +103,7 @@ public static OpRef createTypes(final Class<?> type1, final Class<?> type2,
103103
* @param types type constraints of op, or null for any type.
104104
* @param args arguments to the op.
105105
*/
106-
public static OpRef createTypes(final Collection<? extends Class<?>> types,
106+
public static OpRef createTypes(final Collection<Class<?>> types,
107107
final Object... args)
108108
{
109109
return new OpRef(null, types, null, args);
@@ -119,8 +119,8 @@ public static OpRef createTypes(final Collection<? extends Class<?>> types,
119119
* @param outTypes the op's required output types.
120120
* @param args arguments to the op.
121121
*/
122-
public OpRef(final String name, final Collection<? extends Class<?>> types,
123-
final Collection<? extends Class<?>> outTypes, final Object... args)
122+
public OpRef(final String name, final Collection<Class<?>> types,
123+
final Collection<Class<?>> outTypes, final Object... args)
124124
{
125125
this.name = name;
126126
this.types = types;
@@ -136,12 +136,12 @@ public String getName() {
136136
}
137137

138138
/** Gets the types which the op must match. */
139-
public Collection<? extends Class<?>> getTypes() {
139+
public Collection<Class<?>> getTypes() {
140140
return types;
141141
}
142142

143143
/** Gets the op's output types, or null for no constraints. */
144-
public Collection<? extends Class<?>> getOutTypes() {
144+
public Collection<Class<?>> getOutTypes() {
145145
return outTypes;
146146
}
147147

src/main/java/net/imagej/ops/OpUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static Op unwrap(final Module module, final OpRef ref) {
108108
* types.
109109
*/
110110
public static Op unwrap(final Module module,
111-
final Collection<? extends Class<?>> types)
111+
final Collection<Class<?>> types)
112112
{
113113
if (module == null) return null;
114114
final Object delegate = module.getDelegateObject();

0 commit comments

Comments
 (0)