Skip to content

Commit

Permalink
Add back exception. Pass correct owner type.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson Osacky committed Jul 5, 2019
1 parent bb2c018 commit 52cb004
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions reflect/src/main/java/dagger/reflect/TypeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ static final class ParameterizedTypeImpl implements ParameterizedType {
"unexpected owner type for " + rawType + ": " + ownerType);
}
} else if (enclosingClass != null) {
// TODO ?
// throw new IllegalArgumentException("unexpected owner type for " + rawType + ":
// null");
throw new IllegalArgumentException("unexpected owner type for " + rawType + ": null");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private static boolean hasParameterizedTypeVariable(Type parameterType) {
private TypeUtil.ParameterizedTypeImpl findKeyForParameterizedType(
ParameterizedType parameterType) {
Type[] matchingTypes = matchingParameterizedType(parameterType.getActualTypeArguments());
return new TypeUtil.ParameterizedTypeImpl(null, parameterType.getRawType(), matchingTypes);
return new TypeUtil.ParameterizedTypeImpl(parameterType.getOwnerType(), parameterType.getRawType(), matchingTypes);
}

/**
Expand Down

0 comments on commit 52cb004

Please sign in to comment.