<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=asenft" rel="nofollow">Andreas Senft</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-759?redirect=false" rel="nofollow">SPR-759</a></strong> and commented</p>
<p dir="auto">I just had a look at the implementation of AopUtils#getAllInterfacesForClassAsList.</p>
<p dir="auto">I remember that I usually implemented similar methods using a Set. If multiple classes in a hierarchy implement the same interfaces the resulting list would yield duplicate entries.</p>
<p dir="auto">Beside the cosmetic effect it could also affect performance when operations on the returned interfaces will be performed multiple times.</p>
<p dir="auto">Maybe it's not a too common case, but I see it from time to time. So I would suggest to use a Set here.</p>
<p dir="auto">Regards,<br>
Andreas</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.1.5</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=gjbaxter" rel="nofollow">George Baxter</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8737?redirect=false" rel="nofollow">SPR-8737</a></strong> and commented</p>
<p dir="auto">Java has a concurrency issue when examining annotations on a method or method parameters (synchronized around a jam-wide weak hash map).  In high concurrency environments, this becomes a bottleneck.  The only current solution is to cache the annotations.</p>
<p dir="auto">Currently, the MethodParameter class could cache the annotations based on the declaring class, the method and the parameter index.  We might have been able to extend MethodParameter class to provide this caching, but unfortunately, the object is instantiated directly within the HandlerMethodInvoker.resolveHandlerArguments(..) (private method).</p>
<p dir="auto">Currently a critical issue for us.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5, 3.0.6</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398118478" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13936" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13936/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13936">#13936</a> monitor contention at org.springframework.core.MethodParameter.getParameterAnnotations() (<em><strong>"duplicates"</strong></em>)</li>
</ul>