Skip to content

Commit

Permalink
Fix an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaosongzs committed Jul 5, 2024
1 parent 9156d8b commit 4df832a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private Set<PullRequestState> deserializePrState(String current) {
null : new Hash(obj.get("commit").asString());
var state = obj.get("state").isNull() ?
null : org.openjdk.skara.issuetracker.Issue.State.valueOf(obj.get("state").asString());
var targetBranch = obj.get("targetBranch").isNull() ?
var targetBranch = obj.get("targetBranch") == null ?
null : obj.get("targetBranch").asString();

return new PullRequestState(id, issues, commit, new Hash(obj.get("head").asString()), state, targetBranch);
Expand Down Expand Up @@ -135,7 +135,9 @@ private String serializePrState(Collection<PullRequestState> added, Set<PullRequ
} else {
ret.putNull("state");
}
ret.put("targetBranch", JSON.of(pr.targetBranch()));
if (pr.targetBranch() != null) {
ret.put("targetBranch", JSON.of(pr.targetBranch()));
}
return ret;
})
.map(JSONObject::toString)
Expand Down

0 comments on commit 4df832a

Please sign in to comment.