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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user