Skip to content

Commit

Permalink
Issue eclipse-leshan#1674 correction
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslawLegierski committed Nov 20, 2024
1 parent 5f0d210 commit 7803d95
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public ReadCompositeResponse(ResponseCode responseCode, Map<LwM2mPath, LwM2mNode
TimestampedLwM2mNodes timestampedContent, String errorMessage, Object coapResponse) {
super(responseCode, errorMessage, coapResponse);

if (timestampedContent != null) {
if (timestampedContent != null && isSuccess()) {
// Handle if timestamped value is passed

// check that we don't pass content too.
Expand Down Expand Up @@ -78,7 +78,7 @@ public ReadCompositeResponse(ResponseCode responseCode, Map<LwM2mPath, LwM2mNode
// handle if content (not timestamped) value is passed

// check content is not null
if (content == null) {
if (content == null && isSuccess()) {
throw new IllegalArgumentException("content OR timestampedValue should be not null");
}

Expand Down

0 comments on commit 7803d95

Please sign in to comment.