From dc5ed2e3f1394742d54d2ad48aaa1cd6082b5c06 Mon Sep 17 00:00:00 2001 From: Bob Carroll Date: Mon, 30 May 2016 15:16:28 -0700 Subject: [PATCH] fixed NPE when only id,key fields are requested on search #140 --- src/main/java/net/rcarz/jiraclient/Issue.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/rcarz/jiraclient/Issue.java b/src/main/java/net/rcarz/jiraclient/Issue.java index 8d195d4..d5154a5 100644 --- a/src/main/java/net/rcarz/jiraclient/Issue.java +++ b/src/main/java/net/rcarz/jiraclient/Issue.java @@ -812,6 +812,8 @@ public class Issue extends Resource { key = Field.getString(map.get("key")); fields = (Map)map.get("fields"); + if (fields == null) + return; assignee = Field.getResource(User.class, fields.get(Field.ASSIGNEE), restclient); attachments = Field.getResourceArray(Attachment.class, fields.get(Field.ATTACHMENT), restclient);