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

Fix NPE when using the createTable macro function #3511

Merged
merged 2 commits into from
Jul 24, 2022

Conversation

Irarara
Copy link
Contributor

@Irarara Irarara commented Jul 23, 2022

Identify the Bug or Feature request

Fixes #3510, related to #3254

Description of the Change

This ensures that entryList in LookupTable is properly initialized (and removes the rather superfluous getInternalEntryList()).

Possible Drawbacks

None, unless I missed some undocumented importance of getInternalEntryList().

Documentation Notes

N/A

Release Notes

N/A


This change is Reviewable

Copy link
Member

@cwisniew cwisniew left a comment

Choose a reason for hiding this comment

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

I suspect that someone put the getInternalEntryList() there as the object was been deserialized somewhere and that was not initialising the variable with an empty array, but instead of a readResolve or similar this was resorted to.

The change to prodobuf probably removes the initial serilaization issue this was "resolving" if no errors are now being experienced after removal. If this works and introduces now new NPE errors on sending/reciving(or using after those) tables on the client end I am ok with change.

@Irarara
Copy link
Contributor Author

Irarara commented Jul 23, 2022

Yeah, that makes perfect sense.

I did make sure to test a bit and have not yet encountered any issues with creating or manipulating tables (through macros or the UI) or loading campaigns I have that have tables, as a host or connected client.

Copy link
Contributor

@Phergus Phergus left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Irarara)

@Phergus Phergus merged commit 77be1be into RPTools:develop Jul 24, 2022
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.

[Bug]: createTable fails
4 participants