-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise CodecException if 2 node with the same id #511
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -309,13 +309,21 @@ private static LwM2mPath extractAndValidateBaseName(JsonRootObject jsonObject, L | |||
multiResource = new HashMap<>(); | |||
multiResourceMap.put(resourcePath, multiResource); | |||
} | |||
multiResource.put(nodePath.getResourceInstanceId(), resourceElt); | |||
JsonArrayEntry prevouisResInstance = multiResource.put(nodePath.getResourceInstanceId(), resourceElt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo "previous"
multiResource.put(nodePath.getResourceInstanceId(), resourceElt); | ||
JsonArrayEntry prevouisResInstance = multiResource.put(nodePath.getResourceInstanceId(), resourceElt); | ||
if (prevouisResInstance != null) { | ||
throw new CodecException("2 RESOURCE_INSTANCE (%s,%s) with the same identifier %d for path %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 RESOURCE_INSTANCE "nodes"?
tlv.getIdentifier(), model); | ||
LwM2mObjectInstance previousObjectInstance = instances.put(objectInstance.getId(), objectInstance); | ||
if (previousObjectInstance != null) { | ||
throw new CodecException("2 OBJECT INSTANCE (%s,%s) with the same identifier %d for path %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "_"
see #429