Skip to content
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

Merged
merged 4 commits into from
Jun 7, 2018
Merged

Conversation

sbernard31
Copy link
Contributor

see #429

Copy link
Contributor

@msangoi msangoi left a 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);
Copy link
Contributor

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",
Copy link
Contributor

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing "_"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants