Skip to content
Permalink
Browse files
Fix incorrect use of optional result
Reviewed-by: ehelin
  • Loading branch information
rwestberg committed Jan 17, 2020
1 parent fd9d0e6 commit 5470429e8fa8b8026c53da85ebc4827a6162e1f3
Showing with 5 additions and 3 deletions.
  1. +4 −2 cli/src/main/java/org/openjdk/skara/cli/GitInfo.java
  2. +1 −1 issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java
@@ -234,8 +234,10 @@ public static void main(String[] args) throws IOException {
var issue = issueTracker.project(project).issue(issueId);
if (issue.isPresent()) {
for (var link : issue.get().links()) {
if (link.title().equals("Review")) {
System.out.println(decoration + link.uri().toString());
if (link.title().isPresent() && link.uri().isPresent()) {
if (link.title().get().equals("Review")) {
System.out.println(decoration + link.uri().get());
}
}
}
}
@@ -370,7 +370,7 @@ private void addWebLink(Link link) {
}

var query = JSON.object().put("globalId", "skaralink=" + link.uri().orElseThrow().toString());
var object = JSON.object().put("url", link.uri().toString()).put("title", link.title().orElseThrow());
var object = JSON.object().put("url", link.uri().orElseThrow().toString()).put("title", link.title().orElseThrow());
var status = JSON.object().put("resolved", link.resolved());
var icon = JSON.object();
var statusIcon = JSON.object();

0 comments on commit 5470429

Please sign in to comment.