From c53ca18e969dd84afeec2305f9b3f3776c3ba111 Mon Sep 17 00:00:00 2001 From: carm Date: Sat, 22 Jan 2022 14:41:52 +0800 Subject: [PATCH] [v1.2.2] [A] Add GPG Settings. --- pom.xml | 6 ++++++ .../java/cc/carm/lib/githubreleases4j/GithubRelease.java | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 6090935..72a5cda 100644 --- a/pom.xml +++ b/pom.xml @@ -143,6 +143,12 @@ + + + --pinentry-mode + loopback + + org.apache.maven.plugins diff --git a/src/main/java/cc/carm/lib/githubreleases4j/GithubRelease.java b/src/main/java/cc/carm/lib/githubreleases4j/GithubRelease.java index 4aaefc7..c0f0efc 100644 --- a/src/main/java/cc/carm/lib/githubreleases4j/GithubRelease.java +++ b/src/main/java/cc/carm/lib/githubreleases4j/GithubRelease.java @@ -8,7 +8,6 @@ import org.json.JSONObject; import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -135,10 +134,8 @@ public class GithubRelease { * * @return The author user {@link GithubUser} */ - public @Nullable GithubUser getAuthor() { - return Optional.ofNullable(getContents().getJSONObject("author")) - .map(GithubUser::of) - .orElse(null); + public @NotNull GithubUser getAuthor() { + return GithubUser.of(getContents().getJSONObject("author")); } /**