diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-17 22:45:56 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-17 23:08:07 -0400 |
commit | 872462169ff63dfcd86ecb3f6e699686f1d3f725 (patch) | |
tree | 897602c6c7fdea6ead675033dd8dd8da38b08f18 | |
parent | 87170e14d1260c722c5e534c2e405764153d5946 (diff) | |
download | gitblit-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.java | 2 |
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);
}
|