summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 22:45:56 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:08:07 -0400
commit872462169ff63dfcd86ecb3f6e699686f1d3f725 (patch)
tree897602c6c7fdea6ead675033dd8dd8da38b08f18
parent87170e14d1260c722c5e534c2e405764153d5946 (diff)
downloadgitblit-872462169ff63dfcd86ecb3f6e699686f1d3f725.tar.gz
gitblit-872462169ff63dfcd86ecb3f6e699686f1d3f725.zip
[findbugs] Add null check on decoding a string in StringUtils
-rw-r--r--src/main/java/com/gitblit/utils/StringUtils.java2
1 files changed, 1 insertions, 1 deletions
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);
}