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

Commit 8d95d0a1 authored by Tao Liejun's avatar Tao Liejun Committed by Nick Pelly
Browse files

Fix a bug introduced in obex cleanup

Avoid exception when an empty array is passed to convert to Unicode
Before cleanup, there used to be an empty try/catch
parent 2debd56b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -875,7 +875,7 @@ public final class ObexHelper {
     * @throws IllegalArgumentException if the byte array has an odd length
     */
    public static String convertToUnicode(byte[] b, boolean includesNull) {
        if (b == null) {
        if (b == null || b.length == 0) {
            return null;
        }
        int arrayLength = b.length;