From efc42f5618721783c7451e96e5f3b91add29eb1e Mon Sep 17 00:00:00 2001 From: Stefan Spieker Date: Sun, 5 Nov 2023 12:07:44 +0100 Subject: [PATCH 1/2] removed obsolete suppression --- .../plugins/pipelinegraphview/utils/PipelineNodeUtil.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java b/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java index 6fe37fa7..b6497ed8 100644 --- a/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java +++ b/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java @@ -4,7 +4,6 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; -import edu.umd.cs.findbugs.annotations.SuppressWarnings; import hudson.AbortException; import hudson.console.AnnotatedLargeText; import hudson.model.Action; @@ -246,7 +245,6 @@ public static String convertLogToString(AnnotatedLargeText l * @param startByte The byte to start parsing from. * @return The AnnotatedLargeText object representing the log text for this node, or null. */ - @SuppressWarnings("RV_RETURN_VALUE_IGNORED") public static String convertLogToString(AnnotatedLargeText log, Long startByte) throws IOException { Writer stringWriter = new StringBuilderWriter(); From 9b70104a1bf1fdbc535c11885a1f8686c6a6451b Mon Sep 17 00:00:00 2001 From: Stefan Spieker Date: Sun, 5 Nov 2023 12:18:24 +0100 Subject: [PATCH 2/2] replace deprecated annotation --- .../plugins/pipelinegraphview/utils/PipelineNodeUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java b/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java index b6497ed8..7238463b 100644 --- a/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java +++ b/src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java @@ -4,6 +4,7 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import hudson.AbortException; import hudson.console.AnnotatedLargeText; import hudson.model.Action; @@ -245,7 +246,8 @@ public static String convertLogToString(AnnotatedLargeText l * @param startByte The byte to start parsing from. * @return The AnnotatedLargeText object representing the log text for this node, or null. */ - public static String convertLogToString(AnnotatedLargeText log, Long startByte) + @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED") + public static String convertLogToString(AnnotatedLargeText log, Long startByte) throws IOException { Writer stringWriter = new StringBuilderWriter(); // NOTE: This returns the total length of the console log, not the received bytes.