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
Milestone

Comments

@huan0huan
Copy link

image

why not equals? This is bug ?

@harawata
Copy link
Member

Please explain how to reproduce the problem.

@huan0huan
Copy link
Author

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

@harawata
Copy link
Member

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
Copy link
Author

huan0huan commented Dec 31, 2019

I've uploaded it。see https://github.com/huan0huan/all-problem

@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 this to the 3.5.4 milestone Dec 31, 2019
@harawata
Copy link
Member

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!

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants