From: James Moger Date: Fri, 21 Oct 2011 21:35:35 +0000 (-0400) Subject: Fixed minor bug in flatten strings X-Git-Tag: v0.7.0~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6e666fcdbbafedb583a13186fefac3fdd2c1a791;p=gitblit.git Fixed minor bug in flatten strings --- diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java index f4e9256f..8adf1e42 100644 --- a/src/com/gitblit/utils/StringUtils.java +++ b/src/com/gitblit/utils/StringUtils.java @@ -142,6 +142,10 @@ public class StringUtils { for (String value : values) { sb.append(value).append(separator); } + if (sb.length() > 0) { + // truncate trailing separator + sb.setLength(sb.length() - separator.length()); + } return sb.toString().trim(); }