Merge branch 'stable-3.3' into stable-3.4 * stable-3.3: Fix issue with importing PR without description Change-Id: Ice12368d642e4c42a9e4d42457ff1285d3b22eb1
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java index f536c70..e47f161 100644 --- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java +++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
@@ -102,8 +102,8 @@ for (GHPullRequest pr : repoEntry.getValue()) { JsonObject prObj = new JsonObject(); prObj.add("id", new JsonPrimitive(new Integer(pr.getNumber()))); - prObj.add("title", new JsonPrimitive(pr.getTitle())); - prObj.add("body", new JsonPrimitive(pr.getBody())); + prObj.add("title", new JsonPrimitive(Strings.nullToEmpty(pr.getTitle()))); + prObj.add("body", new JsonPrimitive(Strings.nullToEmpty(pr.getBody()))); prObj.add( "author", new JsonPrimitive(pr.getUser() == null ? "" : pr.getUser().getLogin())); prObj.add("status", new JsonPrimitive(pr.getState().name()));