Skip to content

Commit

Permalink
Fix null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
vaslabs committed Mar 26, 2017
1 parent 9f6205c commit bcf64b8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ private static int sizeOfArrayType(Field field, Object obj) throws IllegalAccess
continue;
}
Class type = object.getClass();
final boolean isEnum = type.getEnclosingClass().isEnum();
Class enclosingClass = type.getEnclosingClass();
final boolean isEnum = enclosingClass != null && enclosingClass.isEnum();
if (isEnum)
sizeSum += 1;
else
Expand Down

0 comments on commit bcf64b8

Please sign in to comment.