Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afa77e94 authored by Winson Chung's avatar Winson Chung
Browse files

Don't try and trim null strings.

Bug: 21161481
parent a214a63b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -627,6 +627,10 @@ public final class Utilities {
     * Non-breaking whitespaces are also removed.
     */
    public static String trim(CharSequence s) {
        if (s == null) {
            return null;
        }

        // Just strip any sequence of whitespace or java space characters from the beginning and end
        Matcher m = sTrimPattern.matcher(s);
        return m.replaceAll("$1");