From 872462169ff63dfcd86ecb3f6e699686f1d3f725 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 17 Apr 2014 22:45:56 -0400 Subject: [PATCH] [findbugs] Add null check on decoding a string in StringUtils --- src/main/java/com/gitblit/utils/StringUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/utils/StringUtils.java b/src/main/java/com/gitblit/utils/StringUtils.java index 7605fe01..d7e1ea3d 100644 --- a/src/main/java/com/gitblit/utils/StringUtils.java +++ b/src/main/java/com/gitblit/utils/StringUtils.java @@ -642,7 +642,7 @@ public class StringUtils { // ignore unsupported charsets } } - if (value.startsWith("\uFEFF")) { + if (value != null && value.startsWith("\uFEFF")) { // strip UTF-8 BOM return value.substring(1); } -- 2.39.5