IntelliJ code inspection JEE wrong: ManagedExecutorService
已回答
IntelliJ Code inspection marks the following code as incorrect:
@Singleton
public class BlaBla{
@Resource
private ManagedExecutorService threadPool;
@Resource
private ManagedScheduledExecutorService scheduledExecutorService;
...
}
But according to the Documentation at https://docs.oracle.com/javaee/7/api/javax/enterprise/concurrent/ManagedExecutorService.html
the ManagedExecutorService can be injected with @Resource into an application component and the EJB with the @Singleton
annotation is an application component according to EE.2.3. JEE7 specification.
In fact the application container injects both the ManagedExecutorService and ManagedScheduledExecutorService into our EJB.
The IntelliJ code inspection should not report this as wrong.
请先登录再写评论。
Looks like https://youtrack.jetbrains.com/issue/IDEA-151644, please vote.
Thank you, yes, I agree and have voted there.
I also voted. Still an issue in 2017.3