<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=washley" rel="nofollow">William Ashley</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6093?redirect=false" rel="nofollow">SPR-6093</a></strong> and commented</p>
<p dir="auto">I currently run a patched M4 build to work around problems with <code class="notranslate">@ExceptionHandler</code> methods (and <code class="notranslate">@ResponseStatus</code> on them) not functioning with overridden methods (in my case it's due to <code class="notranslate">@Transactional</code> CGlib proxies). While patching these issues, I also changed handling of some other annotations which were being queried using Method.getAnnotation/Method.isAnnotationPresent as opposed to AnnotationUtils.findAnnotation.</p>
<p dir="auto">I have attached my patch as a starting point. I believe I found all instances where AnnotationUtils.findAnnotation was not being used and fixed them. However, I only updated the tests for AnnotationMethodHandlerExceptionResolver. I did not feel confident with the amount of time I had to update the tests for AnnotationMethodHandlerAdapter.</p>
<p dir="auto">I think these changes are in line with a recent checkin (revision 1852) related to inheritance of JMX annotations (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398079053" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8316" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8316/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8316">#8316</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398089997" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9714" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9714/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9714">#9714</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398095486" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10483" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10483/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10483">#10483</a>).</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M4</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15703/mvc-annotation-inheritance.patch" rel="nofollow">mvc-annotation-inheritance.patch</a> (<em>7.99 kB</em>)</li>
</ul>
<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="398096437" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10627" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10627/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10627">#10627</a> <code class="notranslate">@ExceptionHandler</code> on CGLib-proxied controller is ineffectual (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398096304" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10604" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10604/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10604">#10604</a> <code class="notranslate">@Controller</code> marked class cannot implements Comparator</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/04fa5d4b99989d96a478fd788b0e821aba9f32d6/hovercard" href="https://github.com/spring-projects/spring-framework/commit/04fa5d4b99989d96a478fd788b0e821aba9f32d6"><tt>04fa5d4</tt></a></p>
<p dir="auto">1 votes, 1 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=aofry" rel="nofollow">adi ofry</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7004?redirect=false" rel="nofollow">SPR-7004</a></strong> and commented</p>
<p dir="auto">When running CronTrigger on short interval I get the task triggered sooner then requested and also get duplicates.</p>
<p dir="auto">public void initScheduler() {<br>
System.out.println("Got initScheduler");<br>
taskExecutor = new ThreadPoolTaskScheduler();<br>
taskExecutor.initialize();</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="taskExecutor.schedule(new Runnable() {
          @Override
     public void run() {
                                                                                                                                                                  System.out.println(new Date());				
     }
},new CronTrigger(&quot;0/5 * * * * ?&quot;));"><pre class="notranslate"><code class="notranslate">taskExecutor.schedule(new Runnable() {
          @Override
     public void run() {
                                                                                                                                                                  System.out.println(new Date());				
     }
},new CronTrigger("0/5 * * * * ?"));
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">The output is:<br>
Got initScheduler<br>
Thu Mar 18 17:08:19 IST 2010<br>
Thu Mar 18 17:08:24 IST 2010<br>
Thu Mar 18 17:08:24 IST 2010<br>
Thu Mar 18 17:08:25 IST 2010<br>
Thu Mar 18 17:08:29 IST 2010<br>
Thu Mar 18 17:08:30 IST 2010</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.1</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/16565/spr-7004.zip" rel="nofollow">spr-7004.zip</a> (<em>7.98 kB</em>)</li>
</ul>
<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="398103808" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11646" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11646/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11646">#11646</a> Spring TaskScheduler not accurate (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398103048" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11525" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11525/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11525">#11525</a> Scheduled tasks seem to run twice</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/dea5918d66aa25ea9ad9f44598cea3f765e21f75/hovercard" href="https://github.com/spring-projects/spring-framework/commit/dea5918d66aa25ea9ad9f44598cea3f765e21f75"><tt>dea5918</tt></a></p>