Skip to content

Commit 038f66a

Browse files
Guard against NullPointerException when getting Credentials from Json (#701)
2 parents 48d9364 + 4f5c885 commit 038f66a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

auth0/src/main/java/com/auth0/android/request/internal/JsonRequiredTypeAdapterFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public T read(JsonReader in) throws IOException {
3232

3333
Field[] fields = pojo.getClass().getDeclaredFields();
3434
for (Field f : fields) {
35-
if (f.getAnnotation(JsonRequired.class) != null) {
35+
if (f != null && f.getAnnotation(JsonRequired.class) != null) {
3636
try {
3737
f.setAccessible(true);
3838
if (f.get(pojo) == null) {

0 commit comments

Comments
 (0)