From 9a5e6fd17fefb013f39ca5ae3017bf36d86ee40b Mon Sep 17 00:00:00 2001 From: Debayan Ghosh Date: Fri, 29 Dec 2023 22:22:34 +0530 Subject: [PATCH] Updated DetailsTableModel.java to display '-' for issues with blank categories --- .../plugins/analysis/core/model/DetailsTableModel.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/DetailsTableModel.java b/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/DetailsTableModel.java index e11d2cf069..cbbe1713c2 100644 --- a/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/DetailsTableModel.java +++ b/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/DetailsTableModel.java @@ -247,7 +247,7 @@ protected String formatSeverity(final Severity severity) { } /** - * Formats the text of the specified property column. T he text actually is a link to the UI representation of + * Formats the text of the specified property column. The text actually is a link to the UI representation of * the property. * * @param property @@ -258,7 +258,11 @@ protected String formatSeverity(final Severity severity) { * @return the formatted column */ protected String formatProperty(final String property, final String value) { - return String.format("%s", property, value.hashCode(), render(value)); + String renderedValue = render(value); + if (StringUtils.isBlank(value)) { + renderedValue="-"; + } + return String.format("%s", property, value.hashCode(), renderedValue); } /**