File tree 1 file changed +8
-7
lines changed
android-record/src/main/java/com/fasterxml/jackson/module/androidrecord
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -154,20 +154,21 @@ static Class<?> arrayTypeCompat(Class<?> componentType) {
154
154
155
155
static Type fixAndroidGenericType (Type type ) {
156
156
if (type instanceof GenericArrayType ) {
157
- //recurse into component type
158
157
Type componentType = fixAndroidGenericType (((GenericArrayType ) type ).getGenericComponentType ());
159
- if (componentType instanceof Class <?>) { //if it isn't generic, return the raw array type
158
+ if (componentType instanceof Class <?>) {
160
159
return arrayTypeCompat ((Class <?>) componentType );
161
160
}
162
161
}
163
162
else if (type instanceof ParameterizedType ) {
164
163
//if the parameterized type is not actually parameterized, deduce the raw type
165
164
ParameterizedType parameterizedType = (ParameterizedType ) type ;
166
- Type rawType = parameterizedType .getRawType ();
167
- if (rawType instanceof Class <?>) {
168
- Class <?> rawComponentClass = (Class <?>) rawType ;
169
- if (rawComponentClass .getTypeParameters ().length == 0 ) {
170
- return rawComponentClass ;
165
+ if (parameterizedType .getOwnerType () == null ) {
166
+ Type rawType = parameterizedType .getRawType ();
167
+ if (rawType instanceof Class <?>) {
168
+ Class <?> rawComponentClass = (Class <?>) rawType ;
169
+ if (rawComponentClass .getTypeParameters ().length == 0 ) {
170
+ return rawComponentClass ;
171
+ }
171
172
}
172
173
}
173
174
}
You can’t perform that action at this time.
0 commit comments