Skip to content

Commit

Permalink
#781: fix opaque decoder issue with null/empty value.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Dec 31, 2019
1 parent 346bf6c commit d44a562
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -35,7 +35,7 @@ public static LwM2mNode decode(byte[] content, LwM2mPath path, LwM2mModel model)
"Invalid content format [%s] for path [%s], OPAQUE can only be used for single OPAQUE resource",
desc.type, path);
}
return LwM2mSingleResource.newBinaryResource(path.getResourceId(), content);
return LwM2mSingleResource.newBinaryResource(path.getResourceId(), content != null ? content : new byte[0]);
}

}

0 comments on commit d44a562

Please sign in to comment.