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

String comparison using .equals() in ASM ClassReader [SPR-12382] #16990

Closed
spring-projects-issues opened this issue Oct 27, 2014 · 2 comments
Closed
Assignees
Labels
in: core type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 27, 2014

Ahn Jung Su opened SPR-12382 and commented

Comparison of String objects using == or != in org.springframework.asm.ClassReader.readMethod(ClassVisitor, Context, int)

if (mw.cw.cr == this && signature==mw.signature) {
...
}

Actually Type of signature and mw.signature are String.
It is better to use .equals()


Affects: 4.1.1

Issue Links:

  • #16970 Inefficient new Byte, Integer, Character constructor calls in ASM ClassReader

Referenced from: pull request #678, and commits cb09513

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 27, 2014

Ahn Jung Su commented

I changed source == operations to equlas() method. and commit

pull request : #678

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 28, 2014

Juergen Hoeller commented

I've applied this to master in a more defensive fashion including a null check.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants