summaryrefslogtreecommitdiffstats
path: root/obex
diff options
context:
space:
mode:
authorTao Liejun <L.J.Tao@motorola.com>2009-07-15 17:56:32 -0700
committerNick Pelly <npelly@google.com>2009-07-15 18:08:10 -0700
commit8d95d0a13a278c4bd4dbffb682acf1e457dfb94b (patch)
tree9a8125cb6b4a55bcbdbd3a14ef5d944eb361ed92 /obex
parent2debd56b5b24d7f4c385f64bfcaf23d00d4d986a (diff)
downloadframeworks_base-8d95d0a13a278c4bd4dbffb682acf1e457dfb94b.zip
frameworks_base-8d95d0a13a278c4bd4dbffb682acf1e457dfb94b.tar.gz
frameworks_base-8d95d0a13a278c4bd4dbffb682acf1e457dfb94b.tar.bz2
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
Diffstat (limited to 'obex')
-rw-r--r--obex/javax/obex/ObexHelper.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/obex/javax/obex/ObexHelper.java b/obex/javax/obex/ObexHelper.java
index e6ade7b..f569595 100644
--- a/obex/javax/obex/ObexHelper.java
+++ b/obex/javax/obex/ObexHelper.java
@@ -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;