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

#220 avoid unnecessary getters in Bucket class #223

Conversation

winfriedgerlach
Copy link
Contributor

No description provided.

Copy link
Member

@cowtowncoder cowtowncoder left a comment

Choose a reason for hiding this comment

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

Seems unlikely to matter perf-wise, but sure why not. I'll change naming to remove prefix (since it's direct field access).

@cowtowncoder cowtowncoder merged commit 012a512 into FasterXML:master Nov 27, 2024
4 of 5 checks passed
@winfriedgerlach
Copy link
Contributor Author

Seems unlikely to matter perf-wise, but sure why not. I'll change naming to remove prefix (since it's direct field access).

I agree: The direct access is faster than calling a method, but in this case, the Java compiler/JIT will certainly make this a direct access anyway.

I have to admit I was only following https://www.jetbrains.com/help/inspectopedia/CallToSimpleGetterFromWithinClass.html here.

@cowtowncoder
Copy link
Member

This removes couple of lines of code, has no negative side effects so it's all good. :)

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.

2 participants