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

slice2java: fix constructor parameter count check #1540

Merged
merged 7 commits into from
Oct 9, 2023

Conversation

externl
Copy link
Member

@externl externl commented Oct 9, 2023

Closes #1539

@externl externl changed the title slic2java: fix constructor parameter count slic2java: fix constructor parameter count check Oct 9, 2023
cpp/src/slice2java/Gen.cpp Outdated Show resolved Hide resolved
cpp/src/slice2java/GenCompat.cpp Outdated Show resolved Hide resolved
Copy link
Member

@InsertCreativityHere InsertCreativityHere left a comment

Choose a reason for hiding this comment

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

Looks good!

cpp/src/slice2java/GenCompat.cpp Outdated Show resolved Hide resolved
cpp/src/slice2java/Gen.cpp Outdated Show resolved Hide resolved
@bernardnormier bernardnormier changed the title slic2java: fix constructor parameter count check slice2java: fix constructor parameter count check Oct 9, 2023
cpp/src/slice2java/Gen.cpp Outdated Show resolved Hide resolved
cpp/src/slice2java/Gen.cpp Outdated Show resolved Hide resolved
cpp/src/slice2java/Gen.cpp Outdated Show resolved Hide resolved
cpp/src/slice2java/Gen.cpp Outdated Show resolved Hide resolved
cpp/src/slice2java/GenCompat.cpp Outdated Show resolved Hide resolved
@externl
Copy link
Member Author

externl commented Oct 9, 2023

I reworked the logic a bit. The new method now returns a bool indicating if the length is ok. I also found a few other places that needed fixing. I think this is cleaner than having lots of magic numbers (254, 255) scattered throughout the code.

cpp/src/Slice/JavaUtil.h Outdated Show resolved Hide resolved
cpp/src/Slice/JavaUtil.h Outdated Show resolved Hide resolved
Co-authored-by: Austin Henriksen <[email protected]>
@externl externl merged commit 45cf4a9 into zeroc-ice:3.7 Oct 9, 2023
2 checks passed
@externl externl deleted the 1539-java-constructor-fix branch October 9, 2023 17:47
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.

slice2java: fix max parameter count for constructors
4 participants