Skip to content

Commit

Permalink
Guard against NullPointerException when getting Credentials from Json (
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehobbsdev authored May 7, 2024
2 parents 48d9364 + 4f5c885 commit 038f66a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public T read(JsonReader in) throws IOException {

Field[] fields = pojo.getClass().getDeclaredFields();
for (Field f : fields) {
if (f.getAnnotation(JsonRequired.class) != null) {
if (f != null && f.getAnnotation(JsonRequired.class) != null) {
try {
f.setAccessible(true);
if (f.get(pojo) == null) {
Expand Down

0 comments on commit 038f66a

Please sign in to comment.