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

optimize DefaultParameterHandler create same MeteObject multiple times #2946

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

yffstart
Copy link
Contributor

When invoke DefaultParameterHandler#setParameters to get parameter's property values using MetaObject, parameterMappings will create the same MetaObject multiple times during traversal. I think this can be avoided in order to reduce object creation.

import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.*;
Copy link
Member

Choose a reason for hiding this comment

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

@yffstart Please switch back to actual imports. Avoid star imports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reply. I have fix it.

@hazendaz hazendaz self-assigned this Aug 31, 2023
…hen obtaining properties of the same parameter object
@hazendaz hazendaz merged commit 7edcfa4 into mybatis:master Sep 2, 2023
17 checks passed
@kazuki43zoo kazuki43zoo added the polishing Improve a implementation code or doc without change in current behavior/content label Oct 29, 2023
@kazuki43zoo kazuki43zoo added this to the 3.5.14 milestone Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
polishing Improve a implementation code or doc without change in current behavior/content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants