Skip to content

Possible incorrect TypeVariable resolution in TypeParameterResolver #1794

Closed

Description

@huan0huan

image

why not equals? This is bug ?

Activity

  1. harawata commented on Dec 31, 2019

    @harawata
    Member

    Please explain how to reproduce the problem.

  2. huan0huan commented on Dec 31, 2019

    @huan0huan
    Author

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

  3. harawata commented on Dec 31, 2019

    @harawata
    Member

    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

  4. huan0huan commented on Dec 31, 2019

    @huan0huan
    Author
  5. changed the title [-]Get return value question?[/-] [+]Possible incorrect TypeVariable resolution in TypeParameterResolver[/+] on Dec 31, 2019
  6. self-assigned this
    on Dec 31, 2019
  7. added this to the 3.5.4 milestone on Dec 31, 2019
  8. added a commit that references this issue on Dec 31, 2019
  9. harawata commented on Dec 31, 2019

    @harawata
    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!

  10. added a commit that references this issue on Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions