Skip to content

Commit

Permalink
HV-1551 Revert fix introduced in 4162ac9
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Jan 9, 2018
1 parent 5c0e0c7 commit d0d0996
Showing 1 changed file with 0 additions and 17 deletions.
Expand Up @@ -113,13 +113,6 @@ public static boolean isAssignable(Type supertype, Type type) {

if ( supertype instanceof ParameterizedType ) {
if ( type instanceof Class<?> ) {
// First let's check if it is the same class and if the supertype's type arguments only are unbound wildcards
// see HV-1551
if ( getErasedReferenceType( supertype ).equals( type ) ) {
return isUnbound( (ParameterizedType) supertype );
}

// Then we end up exploring the superclasses/interfaces
return isSuperAssignable( supertype, type );
}

Expand Down Expand Up @@ -647,16 +640,6 @@ private static <K, V> Map<K, V> normalize(Map<K, V> map) {
return map;
}

private static boolean isUnbound(ParameterizedType parameterizedType) {
for ( Type typeArgument : parameterizedType.getActualTypeArguments() ) {
if ( !isUnboundWildcard( typeArgument ) ) {
return false;
}
}

return true;
}

private static boolean isEmptyBounds(Type[] bounds) {
return bounds == null || bounds.length == 0 || ( bounds.length == 1 && Object.class.equals( bounds[0] ) );
}
Expand Down

0 comments on commit d0d0996

Please sign in to comment.