diff --git a/plugins/github/src/org/jetbrains/plugins/github/api/GithubGist.java b/plugins/github/src/org/jetbrains/plugins/github/api/GithubGist.java index d58eaed9bf8e..5ff4d354abc2 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/api/GithubGist.java +++ b/plugins/github/src/org/jetbrains/plugins/github/api/GithubGist.java @@ -15,6 +15,7 @@ */ package org.jetbrains.plugins.github.api; +import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -74,13 +75,13 @@ public class GithubGist { } public GithubGist(@NotNull String id, - @NotNull String description, + @Nullable String description, boolean isPublic, @NotNull String htmlUrl, @NotNull List files, @Nullable GithubUser user) { myId = id; - myDescription = description; + myDescription = StringUtil.notNullize(description); myIsPublic = isPublic; myHtmlUrl = htmlUrl; myFiles = files; diff --git a/plugins/github/src/org/jetbrains/plugins/github/api/GithubIssue.java b/plugins/github/src/org/jetbrains/plugins/github/api/GithubIssue.java index 2b82255ddf53..771dc5cae7db 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/api/GithubIssue.java +++ b/plugins/github/src/org/jetbrains/plugins/github/api/GithubIssue.java @@ -15,6 +15,7 @@ */ package org.jetbrains.plugins.github.api; +import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -41,7 +42,7 @@ public class GithubIssue { long number, @NotNull String state, @NotNull String title, - @NotNull String body, + @Nullable String body, @NotNull GithubUser user, @Nullable GithubUser assignee, @Nullable Date closedAt, @@ -51,7 +52,7 @@ public class GithubIssue { myNumber = number; myState = state; myTitle = title; - myBody = body; + myBody = StringUtil.notNullize(body); myUser = user; myAssignee = assignee; myClosedAt = closedAt; diff --git a/plugins/github/src/org/jetbrains/plugins/github/api/GithubPullRequest.java b/plugins/github/src/org/jetbrains/plugins/github/api/GithubPullRequest.java index 0b2329498c4f..7abcb10eaab3 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/api/GithubPullRequest.java +++ b/plugins/github/src/org/jetbrains/plugins/github/api/GithubPullRequest.java @@ -15,6 +15,7 @@ */ package org.jetbrains.plugins.github.api; +import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -90,7 +91,7 @@ public class GithubPullRequest { public GithubPullRequest(long number, @NotNull String state, @NotNull String title, - @NotNull String body, + @Nullable String body, @NotNull String htmlUrl, @NotNull String diffUrl, @NotNull String patchUrl, @@ -105,7 +106,7 @@ public class GithubPullRequest { myNumber = number; myState = state; myTitle = title; - myBody = body; + myBody = StringUtil.notNullize(body); myHtmlUrl = htmlUrl; myDiffUrl = diffUrl; myPatchUrl = patchUrl; diff --git a/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepo.java b/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepo.java index dc1ec5f34834..047562d0534e 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepo.java +++ b/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepo.java @@ -15,6 +15,7 @@ */ package org.jetbrains.plugins.github.api; +import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -36,7 +37,7 @@ public class GithubRepo { @NotNull private GithubUser myOwner; public GithubRepo(@NotNull String name, - @NotNull String description, + @Nullable String description, boolean isPrivate, boolean isFork, @NotNull String htmlUrl, @@ -44,7 +45,7 @@ public class GithubRepo { @Nullable String defaultBranch, @NotNull GithubUser owner) { myName = name; - myDescription = description; + myDescription = StringUtil.notNullize(description); myIsPrivate = isPrivate; myIsFork = isFork; myHtmlUrl = htmlUrl; diff --git a/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepoDetailed.java b/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepoDetailed.java index 6da635f93f98..a9e1a69e4b42 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepoDetailed.java +++ b/plugins/github/src/org/jetbrains/plugins/github/api/GithubRepoDetailed.java @@ -26,7 +26,7 @@ public class GithubRepoDetailed extends GithubRepo { @Nullable private GithubRepo mySource; public GithubRepoDetailed(@NotNull String name, - @NotNull String description, + @Nullable String description, boolean isPrivate, boolean isFork, @NotNull String htmlUrl,