Skip to content

Commit

Permalink
Issue #293 Do not loose generic parameters of nested collections and …
Browse files Browse the repository at this point in the history
…maps
  • Loading branch information
daivanov committed Dec 19, 2021
1 parent b9a1de9 commit e7dd0fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/uk/co/jemos/podam/api/PodamFactoryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -826,11 +826,11 @@ private <T> boolean populateReadWriteField(T pojo, ClassAttribute attribute,
typeArguments = PodamConstants.NO_TYPES;
}

for (int i = 0; i < typeArguments.length; i++) {
if (typeArguments[i] instanceof TypeVariable) {
Class<?> resolvedType = TypeManufacturerUtil.resolveGenericParameter(typeArguments[i],
typeArgsMap, typeGenericTypeArgs);
if (!Collection.class.isAssignableFrom(resolvedType) && !Map.class.isAssignableFrom(resolvedType)) {
if (!Collection.class.isAssignableFrom(attributeType) && !Map.class.isAssignableFrom(attributeType)) {
for (int i = 0; i < typeArguments.length; i++) {
if (typeArguments[i] instanceof TypeVariable) {
Class<?> resolvedType = TypeManufacturerUtil.resolveGenericParameter(typeArguments[i],
typeArgsMap, typeGenericTypeArgs);
typeArguments[i] = resolvedType;
}
}
Expand Down

0 comments on commit e7dd0fb

Please sign in to comment.