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

Avoid monitor contention inside MethodParameter.getParameterAnnotations() #63

Closed
wants to merge 1 commit into from

Conversation

dukehoops-zz
Copy link

MethodParameter.getParameterAnnotations() calls
Method.getParameterAnnotations() on every invocation. Latter ends up
contending for a monitor inside (Sun) JDK code. Fix by caching values
returned by Method.getParameterAnnotations() in a static ConcurrentMap

Issue: SPR-9298

MethodParameter.getParameterAnnotations() calls
Method.getParameterAnnotations() on every invocation. Latter ends up
contending for a monitor inside (Sun) JDK code. Fix by caching values
returned by Method.getParameterAnnotations() in a static ConcurrentMap

Issue: SPR-9298
@dukehoops-zz
Copy link
Author

FYI, I already submitted the CLA request

@cbeams
Copy link
Contributor

cbeams commented May 16, 2012

Thanks, Nikita. This is now merged. The substance of your commit was pretty solid, but note that there were a number of changes necessary before actually committing:

  • Reformatting of commit comment, including subject line, content of body and updating your Author: metadata
  • Formatting of new static final fields
  • Completing Javadoc for new #getMethodParameterAnnotations
  • Updating Apache license header date ranges
  • Consistent formatting of braces, e.g. opening { on same line, not newline; else { on newline instead of same line } else {
  • Use of Spring's own Assert class instead of native Java assertions

Also, for any future pull requests, please submit from a topic branch with the same name as the JIRA issue, e.g. SPR-9298.

Most of the items above are covered in the contributor guidelines.

@cbeams cbeams closed this May 16, 2012
cbeams added a commit that referenced this pull request May 16, 2012
* SPR-9298:
  Cache MethodParameter annotation lookup results
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jun 20, 2016
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jul 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants