Skip to content

Commit

Permalink
Fix config tool dump
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienlauer committed Dec 13, 2017
1 parent 0fb8820 commit a94f431
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,16 @@ private Map<String, PropertyInfo> buildPropertyInfo(Class<?> configClass, String
}

Class<?> rawClass = Types.rawClassOf(genericType);
Type itemType;
Type itemType = null;
if (Collection.class.isAssignableFrom(rawClass) && genericType instanceof ParameterizedType) {
itemType = Types.rawClassOf(((ParameterizedType) genericType).getActualTypeArguments()[0]);
} else if (Map.class.isAssignableFrom(rawClass) && genericType instanceof ParameterizedType) {
itemType = Types.rawClassOf(((ParameterizedType) genericType).getActualTypeArguments()[1]);
} else if (genericType instanceof Class<?> && ((Class<?>) genericType).isArray()) {
itemType = ((Class<?>) genericType).getComponentType();
} else {
itemType = genericType;
}
if (!coffig.getMapper().canHandle(itemType)) {

if (itemType != null && !coffig.getMapper().canHandle(itemType)) {
propertyInfo.addInnerPropertyInfo(
buildPropertyInfo(
Types.rawClassOf(itemType),
Expand Down

0 comments on commit a94f431

Please sign in to comment.