>>>>> On Fri, 11 Sep 2015 20:51:33 +0200, arjan tijms <arjan.tijms_at_gmail.com> said:
AT> There are 3 solutions currently:
AT> 1. Don't compile with JDK8 u60 (can run with that, just don't use it
AT> for compiling)
Hello Arjan,
Please find attached a changebundle that rewrites the processBean() to
not use lambda. If it's ok with you, please let me know and I'll commit
it.
Thanks,
Ed
--
| edward.burns_at_oracle.com | office: +1 407 458 0017
| 38 Business days til JavaOne 2015
| 53 Business days til DOAG 2015
Don't use lambda in processBean() since Weld doesn't like it.
SECTION: Modified Files
----------------------------
M jsf-ri/src/main/java/com/sun/faces/cdi/CdiExtension.java
SECTION: Diffs
----------------------------
Index: jsf-ri/src/main/java/com/sun/faces/cdi/CdiExtension.java
===================================================================
--- jsf-ri/src/main/java/com/sun/faces/cdi/CdiExtension.java (revision 15195)
+++ jsf-ri/src/main/java/com/sun/faces/cdi/CdiExtension.java (working copy)
@@ -47,6 +47,7 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Optional;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
@@ -105,17 +106,13 @@
@SuppressWarnings("unchecked")
public <T extends DataModel<?>> void processBean(@Observes ProcessBean<T> event, BeanManager beanManager) {
- // Collect all classes annotated by @FacesDataModel in a Map
- // Key: (collection) class that a DataModel implementations wraps
- // Value: the DataModel implementation class
-
- getAnnotation(beanManager, event.getAnnotated(), FacesDataModel.class)
- .ifPresent(d ->
- forClassToDataModelClass.put(
- d.forClass(),
- (Class<? extends DataModel<?>>) event.getBean().getBeanClass()
- )
- );
+ Optional result;
+ result = getAnnotation(beanManager, event.getAnnotated(), FacesDataModel.class);
+ if (null != result && result.isPresent()) {
+ FacesDataModel d = (FacesDataModel) result.get();
+ forClassToDataModelClass.put(d.forClass(),
+ (Class<? extends DataModel<?>>) event.getBean().getBeanClass());
+ }
}
/**