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

Getting exception when setting delete in SendLocalList with differential update #151

Closed
jmluy opened this issue Jul 29, 2021 · 0 comments · Fixed by #152
Closed

Getting exception when setting delete in SendLocalList with differential update #151

jmluy opened this issue Jul 29, 2021 · 0 comments · Fixed by #152

Comments

@jmluy
Copy link
Contributor

jmluy commented Jul 29, 2021

I'm trying to do a delete by sending a local list using a differential update and it's causing an NullPointerException.

Based on the OCPP 1.6 document on section 7.1, when you want to delete on a differential update, you can do it by not setting the IdTagInfo. Setting the IdTagInfo means it's for add/edit. NPE occurs because of the call to IdTagInfo.validate() in AuthorizationData.validate().

I think it should either allow null on the validate for AuthorizationData like
return ModelUtil.validate(idTag, 20) && (idTagInfo == null || idTagInfo.validate());
or validate() in SendLocalList should check update type and allow null IdTagInfo or call AuthorizationData.validate.

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 a pull request may close this issue.

1 participant