James Moger
2014-06-09 ca4d98678c20e4033fdaca09ecbbf0f5952e0b84
src/main/java/com/gitblit/utils/StringUtils.java
@@ -138,6 +138,18 @@
   }
   /**
    * Flatten the list of strings into a single string with the specified
    * separator.
    *
    * @param values
    * @param separator
    * @return flattened list
    */
   public static String flattenStrings(String[]  values, String separator) {
      return flattenStrings(Arrays.asList(values), separator);
   }
   /**
    * Flatten the list of strings into a single string with a space separator.
    *
    * @param values
@@ -295,7 +307,7 @@
    * @param bytes
    * @return byte array as hex string
    */
   private static String toHex(byte[] bytes) {
   public static String toHex(byte[] bytes) {
      StringBuilder sb = new StringBuilder(bytes.length * 2);
      for (int i = 0; i < bytes.length; i++) {
         if ((bytes[i] & 0xff) < 0x10) {
@@ -630,7 +642,7 @@
            // ignore unsupported charsets
         }
      }
      if (value.startsWith("\uFEFF")) {
      if (value != null && value.startsWith("\uFEFF")) {
         // strip UTF-8 BOM
            return value.substring(1);
        }