From 25fd05d730f4466ac8a50c6e626d733a9d0bb28a Mon Sep 17 00:00:00 2001 From: Manfred Riem Date: Thu, 21 Sep 2023 16:28:05 -0500 Subject: [PATCH] Fixes #2182 - SpotBugs analysis: Holder.toString() may return null --- .../src/main/java/org/glassfish/grizzly/utils/Holder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/Holder.java b/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/Holder.java index 039b35c807..fc47b1c1c1 100644 --- a/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/Holder.java +++ b/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/Holder.java @@ -67,7 +67,7 @@ protected int evaluate() { @Override public String toString() { final E obj = get(); - return obj != null ? "{" + obj + "}" : null; + return obj != null ? "{" + obj + "}" : "{}"; } public static abstract class LazyHolder extends Holder {