diff options
author | Lars Vogel <Lars.Vogel@vogella.com> | 2019-12-17 23:51:00 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-12-18 00:18:41 +0100 |
commit | ccd68dc1dc2e90ba88aa1162b99ea40154a2cb93 (patch) | |
tree | 7ca4b0819367a99e604253fcafdede764340a481 | |
parent | 2db0c6bb7a1e2092de605d277711749899f8ebdf (diff) | |
download | jgit-ccd68dc1dc2e90ba88aa1162b99ea40154a2cb93.tar.gz jgit-ccd68dc1dc2e90ba88aa1162b99ea40154a2cb93.zip |
Using StringBuilder in StringUtils#capitalize method
StringBuffer is synchronized which is slower and should be replaced with
StringBuilder according to its Javadoc.
Change-Id: If4d4a5a49da289ded34bbec97132ab7636b937cc
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java index 7e8bbc80f8..b2e3446089 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java @@ -121,7 +121,7 @@ public final class StringUtils { if (str == null || (strLen = str.length()) == 0) { return str; } - return new StringBuffer(strLen) + return new StringBuilder(strLen) .append(Character.toTitleCase(str.charAt(0))) .append(str.substring(1)).toString(); } |