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

Possible incorrect TypeVariable resolution in TypeParameterResolver #1794

Closed
huan0huan opened this issue Dec 31, 2019 · 5 comments
Closed

Possible incorrect TypeVariable resolution in TypeParameterResolver #1794

huan0huan opened this issue Dec 31, 2019 · 5 comments
Assignees
Labels
bug
Milestone

Comments

@huan0huan
Copy link

@huan0huan huan0huan commented Dec 31, 2019

image

why not equals? This is bug ?

@harawata

This comment has been minimized.

Copy link
Member

@harawata harawata commented Dec 31, 2019

Please explain how to reproduce the problem.

@huan0huan

This comment has been minimized.

Copy link
Author

@huan0huan huan0huan commented Dec 31, 2019

I load mapper on my first visit after startup, which may occur when multithreaded access occurs

@harawata

This comment has been minimized.

Copy link
Member

@harawata harawata commented Dec 31, 2019

Please create a small demo project so that we can replicate the issue on our end.
Here are some project templates to start with. https://github.com/harawata/mybatis-issues

@huan0huan

This comment has been minimized.

Copy link
Author

@huan0huan huan0huan commented Dec 31, 2019

@harawata harawata changed the title Get return value question? Possible incorrect TypeVariable resolution in TypeParameterResolver Dec 31, 2019
@harawata harawata self-assigned this Dec 31, 2019
@harawata harawata added bug and removed waiting for feedback labels Dec 31, 2019
@harawata harawata added this to the 3.5.4 milestone Dec 31, 2019
harawata added a commit that referenced this issue Dec 31, 2019
@harawata

This comment has been minimized.

Copy link
Member

@harawata harawata commented Dec 31, 2019

Thank you very much for the repro, @huan0huan !

You are right. The javadoc says:

Multiple objects may be instantiated at run-time to represent a given type variable. Even though a type variable is created only once, this does not imply any requirement to cache instances representing the type variable. However, all instances representing a type variable must be equal() to each other. As a consequence, users of type variables must not rely on the identity of instances of classes implementing this interface.

The fix is in the latest 3.5.4-SNAPSHOT.
Please let me know if you noticed anything!

@harawata harawata closed this Dec 31, 2019
piotrponikowski pushed a commit to piotrponikowski/mybatis-3 that referenced this issue Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.