警告:类型 List<Bean<?>> 来自 public void org.omnifaces.cdi.eager.EagerBeansRepository.setXxx 的参数 1 不可解析为具体类型

WARNING: Parameter 1 of type List<Bean<?>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setXxx is not resolvable to a concrete type

我正在使用 Omnifaces 1.8.1,每当我将我的应用程序部署到 Glassfish 时,我都会收到以下警告,这会导致部署过程出现一些延迟。

Warning:   WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener.DefaultHttpSessionListener. It will not be possible to produce instances of this type!
Warning:   WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener.DefaultServletContextListener. It will not be possible to produce instances of this type!
Warning:   WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener.DefaultServletRequestListener. It will not be possible to produce instances of this type!
Warning:   WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.filter.HttpFilter. It will not be possible to produce instances of this type!

Warning:   The following warnings have been detected: 

WARNING: Parameter 1 of type java.util.List<javax.enterprise.inject.spi.Bean<?>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setApplicationScopedBeans(java.util.List<javax.enterprise.inject.spi.Bean<?>>) is not resolvable to a concrete type.   
WARNING: Parameter 1 of type java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setRequestScopedBeansViewId(java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setRequestScopedBeansRequestURI(java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type java.util.List<javax.enterprise.inject.spi.Bean<?>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setSessionScopedBeans(java.util.List<javax.enterprise.inject.spi.Bean<?>>) is not resolvable to a concrete type.

我已经升级到 Omnifaces 2.0,但仍然收到相同的警告,这在经常应用部署的开发过程中非常烦人。是什么导致了这些警告?

PS:开发环境:

这是焊接特有的。这些警告是无害的,实际上不会显着延迟部署。

至于无法解析的参数警告,CDI确实不支持使用通配符参数化参数的代理方法,如List<?>。然而,这些警告的烦恼是可以理解的。由于这些方法无论如何都是包私有的,我已经按照 this commit the visibility so that Weld doesn't attempt to inspect them. The fix is available in OmniFaces 2.1 SNAPSHOT.

进行了缩减

至于WELD-001519 warning on abstract 类,这确实是完全没有必要的。这已经是 fixed in Weld 2.1.1/2.2.0. See also the duplicate question: WELD-001519 An InjectionTarget implementation is created for an abstract class 'xxx'. It will not be possible to produce instances of this type.