Skip to content

Commit

Permalink
Fixes #2182 - SpotBugs analysis: Holder.toString() may return null
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Sep 21, 2023
1 parent fc8d17a commit 25fd05d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<E> extends Holder<E> {
Expand Down

0 comments on commit 25fd05d

Please sign in to comment.