Skip to content

Commit

Permalink
HV-1245 Fix the ValueExtractor determination logic
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet authored and gunnarmorling committed Mar 10, 2017
1 parent a640751 commit baba923
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -142,7 +143,7 @@ public ValueExtractorDescriptor getValueExtractor(Class<?> valueType, TypeVariab
typeParameterBoundToExtractorType = typeParameter;
}

if ( typeParameterBoundToExtractorType.equals( extractorDescriptor.getExtractedTypeParameter() ) ) {
if ( Objects.equals( extractorDescriptor.getExtractedTypeParameter(), typeParameterBoundToExtractorType ) ) {
typeParameterCompatibleExtractors.add( extractorDescriptor );
}
}
Expand Down Expand Up @@ -188,13 +189,7 @@ public boolean equals(Object obj) {
}

private TypeVariable<?> bind(TypeVariable<?> typeParameter, Map<TypeVariable<?>, TypeVariable<?>> bindings) {
TypeVariable<?> bound = null;

if ( bindings != null ) {
bound = bindings.get( typeParameter );
}

return bound != null ? bound : typeParameter == AnnotatedObject.INSTANCE ? AnnotatedObject.INSTANCE : ArrayElement.INSTANCE;
return bindings != null ? bindings.get( typeParameter ) : null;
}

private static boolean isJavaFxInClasspath() {
Expand Down

0 comments on commit baba923

Please sign in to comment.