-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Defensively create collections in JAXB getters #137
Comments
evdherberg
added a commit
to evdherberg/openfire-restAPI-plugin
that referenced
this issue
Jul 29, 2022
guusdk
added a commit
to evdherberg/openfire-restAPI-plugin
that referenced
this issue
Jul 31, 2022
guusdk
pushed a commit
to evdherberg/openfire-restAPI-plugin
that referenced
this issue
Jul 31, 2022
guusdk
added a commit
to evdherberg/openfire-restAPI-plugin
that referenced
this issue
Jul 31, 2022
guusdk
pushed a commit
to evdherberg/openfire-restAPI-plugin
that referenced
this issue
Jul 31, 2022
guusdk
added a commit
to evdherberg/openfire-restAPI-plugin
that referenced
this issue
Jul 31, 2022
guusdk
added a commit
to evdherberg/openfire-restAPI-plugin
that referenced
this issue
Jul 31, 2022
That is indeed the case. In my last tests, without my changes to the entity, the problem was not there anymore. So probably #131 was the same problem. I am closing this issue and I will close the PR too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
POST /restapi/v1/chatrooms
encounters NPE's whenever one of the optionalList
elements is included in the payload. Here it is suggested that JAXB does not use collection setters, so the collection getter should always return a non-null value. And, indeed, when I change the getter implementation to defensively create the list, the NPE disappears.What puzzles me is that this must have occurred before, when the create room functionality was initially developed. So either this resource was added with virtually no testing, or something changed since then (JAXB versions?), or there is something very local to my development environment that causes this problem. Anyway, I thought best to raise this issue, and I will prepare a PR for the defensive creation of collections in the
MUCRoomEntity
.The text was updated successfully, but these errors were encountered: