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

Minor improvements: #105

Merged
merged 1 commit into from May 2, 2022
Merged

Minor improvements: #105

merged 1 commit into from May 2, 2022

Conversation

arturobernalg
Copy link
Member

  • Use contains method.
  • Avoid unnecessary boxing
  • Avoid unnecessary unboxing
  • Use Long.compare

@sebbASF
Copy link
Contributor

sebbASF commented Apr 15, 2022

AIUI Formatter.format requires Object parameters, so changing from Long.valueOf(long) to long just hides the boxing that must happen. Likewise for HashMap entries.

The code generally uses explicit boxing and unboxing. This shows where it may be possible to improve data storage types to reduce conversions.

Please remove the boxing changes from this PR

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

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

Hi @arturobernalg
Thank you for the PR but please leave boxing and unboxing alone.

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

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

@arturobernalg
See my previous comment.

@arturobernalg
Copy link
Member Author

@arturobernalg
See my previous comment.

HI @garydgregory
Reverted.
TY

@garydgregory garydgregory merged commit 9943c1b into apache:master May 2, 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
3 participants