openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1799087 [4/4] - in /openwebbeans/trunk: samples/conversation-sample/src/main/java/org/apache/webbeans/samples/conversation/ samples/guess/src/main/java/org/apache/webbeans/sample/model/conversation/ samples/reservation/src/main/java/org/ap...
Date Sun, 18 Jun 2017 13:57:10 GMT
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Sun Jun 18 13:57:08 2017
@@ -146,7 +146,6 @@ import java.lang.reflect.WildcardType;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.List;
@@ -165,9 +164,9 @@ public final class WebBeansUtil
     private final WebBeansContext webBeansContext;
 
     // cache to skip some validations
-    private final ConcurrentMap<Type, Boolean> noTypeVariables = new ConcurrentHashMap<Type,
Boolean>();
-    private final ConcurrentMap<EventCacheKey, Boolean> validEventType = new ConcurrentHashMap<EventCacheKey,
Boolean>();
-    private final ConcurrentMap<Type, Boolean> notContainerEvents = new ConcurrentHashMap<Type,
Boolean>();
+    private final ConcurrentMap<Type, Boolean> noTypeVariables = new ConcurrentHashMap<>();
+    private final ConcurrentMap<EventCacheKey, Boolean> validEventType = new ConcurrentHashMap<>();
+    private final ConcurrentMap<Type, Boolean> notContainerEvents = new ConcurrentHashMap<>();
 
     public WebBeansUtil(WebBeansContext webBeansContext)
     {
@@ -428,11 +427,11 @@ public final class WebBeansUtil
 
         AnnotatedType<T> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(type);
         BeanAttributesImpl<T> defaultBeanAttributes = BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(annotatedType).build();
-        BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<T>(defaultBeanAttributes.getTypes(),
Collections.<Annotation>singleton(new NewLiteral(type)));
+        BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<>(defaultBeanAttributes.getTypes(),
Collections.<Annotation>singleton(new NewLiteral(type)));
         // TODO replace this by InjectionPointBuilder
-        ManagedBeanBuilder<T, ManagedBean<T>> beanBuilder = new ManagedBeanBuilder<T,
ManagedBean<T>>(webBeansContext, annotatedType, newBeanAttributes, false);
+        ManagedBeanBuilder<T, ManagedBean<T>> beanBuilder = new ManagedBeanBuilder<>(webBeansContext,
annotatedType, newBeanAttributes, false);
         NewManagedBean<T> newBean
-            = new NewManagedBean<T>(webBeansContext, WebBeansType.MANAGED, annotatedType,
newBeanAttributes, type, beanBuilder.getBean().getInjectionPoints());
+            = new NewManagedBean<>(webBeansContext, WebBeansType.MANAGED, annotatedType,
newBeanAttributes, type, beanBuilder.getBean().getInjectionPoints());
         return newBean;
     }
     
@@ -451,8 +450,8 @@ public final class WebBeansUtil
         }
 
         AnnotatedType<T> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(type);
-        BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<T>(bean.getTypes(),
Collections.<Annotation>singleton(new NewLiteral(type)));
-        NewManagedBean<T> newBean = new NewManagedBean<T>(bean.getWebBeansContext(),
bean.getWebBeansType(), annotatedType, newBeanAttributes, type, bean.getInjectionPoints());
+        BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<>(bean.getTypes(),
Collections.<Annotation>singleton(new NewLiteral(type)));
+        NewManagedBean<T> newBean = new NewManagedBean<>(bean.getWebBeansContext(),
bean.getWebBeansType(), annotatedType, newBeanAttributes, type, bean.getInjectionPoints());
         //TODO XXX set producer
         return newBean;
     }
@@ -467,9 +466,9 @@ public final class WebBeansUtil
     public <T> ExtensionBean<T> createExtensionComponent(Class<T> clazz)
     {
         Asserts.nullCheckForClass(clazz);
-        ExtensionBeanBuilder<T> extensionBeanBuilder = new ExtensionBeanBuilder<T>(webBeansContext,
clazz);
+        ExtensionBeanBuilder<T> extensionBeanBuilder = new ExtensionBeanBuilder<>(webBeansContext,
clazz);
         ExtensionBean<T> bean = extensionBeanBuilder.getBean();
-        new ObserverMethodsBuilder<T>(webBeansContext, extensionBeanBuilder.getAnnotatedType()).defineObserverMethods(bean);
+        new ObserverMethodsBuilder<>(webBeansContext, extensionBeanBuilder.getAnnotatedType()).defineObserverMethods(bean);
         return bean;
     }
 
@@ -489,7 +488,7 @@ public final class WebBeansUtil
      */
     public <T> InstanceBean<T> getInstanceBean()
     {
-        return new InstanceBean<T>(webBeansContext);
+        return new InstanceBean<>(webBeansContext);
     }
 
     /**
@@ -498,7 +497,7 @@ public final class WebBeansUtil
      */
     public <T> EventBean<T> getEventBean()
     {
-        return new EventBean<T>(webBeansContext);
+        return new EventBean<>(webBeansContext);
     }
 
     /**
@@ -516,7 +515,7 @@ public final class WebBeansUtil
      */
     public <T> BeanMetadataBean<T> getBeanMetadataBean()
     {
-        return new BeanMetadataBean<T>(webBeansContext);
+        return new BeanMetadataBean<>(webBeansContext);
     }
 
     /**
@@ -534,7 +533,7 @@ public final class WebBeansUtil
      */
     public <T> InterceptorMetadataBean<T> getInterceptorMetadataBean()
     {
-        return new InterceptorMetadataBean<T>(webBeansContext);
+        return new InterceptorMetadataBean<>(webBeansContext);
     }
 
     /**
@@ -543,7 +542,7 @@ public final class WebBeansUtil
      */
     public <T> DecoratorMetadataBean<T> getDecoratorMetadataBean()
     {
-        return new DecoratorMetadataBean<T>(webBeansContext);
+        return new DecoratorMetadataBean<>(webBeansContext);
     }
 
     /**
@@ -552,7 +551,7 @@ public final class WebBeansUtil
      */
     public <T> InterceptedOrDecoratedBeanMetadataBean<T> getInterceptedOrDecoratedBeanMetadataBean()
     {
-        return new InterceptedOrDecoratedBeanMetadataBean<T>(webBeansContext);
+        return new InterceptedOrDecoratedBeanMetadataBean<>(webBeansContext);
     }
 
     /**
@@ -680,8 +679,8 @@ public final class WebBeansUtil
 
         // collect all producer method beans
         Set<Bean<?>> beans = webBeansContext.getBeanManagerImpl().getBeans();
-        List<ProducerMethodBean> producerBeans = new ArrayList<ProducerMethodBean>();
-        Set<Class> classesDisabledDueToSpecialization = new HashSet<Class>();
+        List<ProducerMethodBean> producerBeans = new ArrayList<>();
+        Set<Class> classesDisabledDueToSpecialization = new HashSet<>();
 
         for(Bean b : beans)
         {
@@ -705,25 +704,21 @@ public final class WebBeansUtil
 
         // create sorted bean helper.
         SortedListHelper<ProducerMethodBean> producerBeanListHelper = new
-                SortedListHelper<ProducerMethodBean>(new ArrayList<ProducerMethodBean>(),
-                new Comparator<ProducerMethodBean>()
+            SortedListHelper<>(new ArrayList<>(),
+            (e1, e2) ->
+            {
+                if (e1.getBeanClass().isAssignableFrom(e2.getBeanClass()))
                 {
-                    @Override
-                    public int compare(ProducerMethodBean e1, ProducerMethodBean e2)
-                    {
-                        if (e1.getBeanClass().isAssignableFrom(e2.getBeanClass()))
-                        {
-                            return -1;
-                        }
-                        else if (e1.equals(e2))
-                        {
-                            return 0;
-                        }
-                        return 1;
-                    }
-                });
+                    return -1;
+                }
+                else if (e1.equals(e2))
+                {
+                    return 0;
+                }
+                return 1;
+            });
 
-        Set<Method> disabledProducerMethods = new HashSet<Method>();
+        Set<Method> disabledProducerMethods = new HashSet<>();
 
         while(true)
         {
@@ -928,7 +923,7 @@ public final class WebBeansUtil
 
          if (component instanceof EnterpriseBeanMarker)
          {
-             beans = new HashSet<Bean<?>>();
+             beans = new HashSet<>();
              Set<Bean<?>> allBeans = manager.getBeans(Object.class, AnnotationUtil.asArray(component.getQualifiers()));
 
              for(Bean<?> candidateBean : allBeans)
@@ -1251,7 +1246,7 @@ public final class WebBeansUtil
         }
     }
 
-    private final static Set<Type> EXTENSION_BEAN_EVENT_TYPES = new HashSet<Type>(
+    private final static Set<Type> EXTENSION_BEAN_EVENT_TYPES = new HashSet<>(
         Arrays.asList(new Class[]{
             GProcessAnnotatedType.class,
             GProcessSyntheticAnnotatedType.class,
@@ -1266,7 +1261,7 @@ public final class WebBeansUtil
         return EXTENSION_BEAN_EVENT_TYPES.contains(type);
     }
 
-    private final static Set<Type> DEFAULT_EXTENSION_BEAN_EVENT_TYPE = new HashSet<Type>(
+    private final static Set<Type> DEFAULT_EXTENSION_BEAN_EVENT_TYPE = new HashSet<>(
         Arrays.asList(new Class[]{
             ProcessAnnotatedType.class,
             ProcessSyntheticAnnotatedType.class,
@@ -1281,7 +1276,7 @@ public final class WebBeansUtil
         return DEFAULT_EXTENSION_BEAN_EVENT_TYPE.contains(clazz);
     }
 
-    private final static Set<Type> EXTENSION_PRODUCER_OR_OBSERVER_EVENT_TYPE = new
HashSet<Type>(
+    private final static Set<Type> EXTENSION_PRODUCER_OR_OBSERVER_EVENT_TYPE = new
HashSet<>(
         Arrays.asList(new Class[]{
             GProcessProducer.class,
             GProcessProducerField.class,
@@ -1293,7 +1288,7 @@ public final class WebBeansUtil
         return EXTENSION_PRODUCER_OR_OBSERVER_EVENT_TYPE.contains(type);
     }
 
-    private final static Set<Type> DEFAULT_EXTENSION_PRODUCER_OR_OBSERVER_EVENT_TYPE
= new HashSet<Type>(
+    private final static Set<Type> DEFAULT_EXTENSION_PRODUCER_OR_OBSERVER_EVENT_TYPE
= new HashSet<>(
         Arrays.asList(new Class[]{
             ProcessProducer.class,
             ProcessProducerField.class,
@@ -1402,14 +1397,14 @@ public final class WebBeansUtil
     public <T> ManagedBean<T> defineManagedBeanWithoutFireEvents(AnnotatedType<T>
type)
     {
         BeanAttributesImpl<T> beanAttributes = BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(type).build();
-        ManagedBeanBuilder<T, ManagedBean<T>> managedBeanCreator = new ManagedBeanBuilder<T,
ManagedBean<T>>(webBeansContext, type, beanAttributes, false);
+        ManagedBeanBuilder<T, ManagedBean<T>> managedBeanCreator = new ManagedBeanBuilder<>(webBeansContext,
type, beanAttributes, false);
 
         //Check for Enabled via Alternative
         setInjectionTargetBeanEnableFlag(managedBeanCreator.getBean());
         ManagedBean<T> managedBean = managedBeanCreator.getBean();
         new ProducerMethodBeansBuilder(managedBean.getWebBeansContext(), managedBean.getAnnotatedType()).defineProducerMethods(
                 managedBean, new ProducerFieldBeansBuilder(managedBean.getWebBeansContext(),
managedBean.getAnnotatedType()).defineProducerFields(managedBean));
-        new ObserverMethodsBuilder<T>(webBeansContext, managedBean.getAnnotatedType()).defineObserverMethods(managedBean);
+        new ObserverMethodsBuilder<>(webBeansContext, managedBean.getAnnotatedType()).defineObserverMethods(managedBean);
 
         if (managedBean.getProducer() instanceof AbstractProducer)
         {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveInformation.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveInformation.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveInformation.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveInformation.java
Sun Jun 18 13:57:08 2017
@@ -29,17 +29,17 @@ public class DefaultBeanArchiveInformati
     private final String bdaUrl;
     private String version;
     private BeanDiscoveryMode beanDiscoveryMode;
-    private List<String> interceptors = new ArrayList<String>();
-    private List<String> decorators = new ArrayList<String>();
-    private List<String> alternativeClasses = new ArrayList<String>();
-    private List<String> alternativeStereotypes = new ArrayList<String>();
+    private List<String> interceptors = new ArrayList<>();
+    private List<String> decorators = new ArrayList<>();
+    private List<String> alternativeClasses = new ArrayList<>();
+    private List<String> alternativeStereotypes = new ArrayList<>();
 
     /** Either an excluded class or an excluded .* path */
     private List<String> excludedClasses;
 
     /** Exclude all subpackages (exclude= .**) */
     private List<String> excludedPackages;
-    private List<String> allowProxyingClasses = new ArrayList<String>();
+    private List<String> allowProxyingClasses = new ArrayList<>();
 
     public DefaultBeanArchiveInformation(String bdaUrl)
     {
@@ -164,7 +164,7 @@ public class DefaultBeanArchiveInformati
     {
         if (excludedClasses == null)
         {
-            excludedClasses = new ArrayList<String>();
+            excludedClasses = new ArrayList<>();
         }
 
         excludedClasses.add(classOrPath);
@@ -174,7 +174,7 @@ public class DefaultBeanArchiveInformati
     {
         if (excludedPackages == null)
         {
-            excludedPackages = new ArrayList<String>();
+            excludedPackages = new ArrayList<>();
         }
 
         excludedPackages.add(packageName);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
Sun Jun 18 13:57:08 2017
@@ -58,7 +58,7 @@ public class DefaultBeanArchiveService i
     /**
      * Contains a map from the URL externalForm to the stored BeanArchiveInformation
      */
-    private Map<String, BeanArchiveInformation> beanArchiveInformations = new HashMap<String,
BeanArchiveInformation>();
+    private Map<String, BeanArchiveInformation> beanArchiveInformations = new HashMap<>();
 
     private UrlSet registeredBeanArchives = new UrlSet();
 
@@ -176,7 +176,7 @@ public class DefaultBeanArchiveService i
             return null;
         }
 
-        List<String> mergedList = new ArrayList<String>(list1);
+        List<String> mergedList = new ArrayList<>(list1);
 
         for (String val : list2)
         {

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java
(original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java
Sun Jun 18 13:57:08 2017
@@ -58,8 +58,8 @@ public final class JmsComponentFactory
     {
         Asserts.assertNotNull(model,"model parameter");
         
-        Set<Type> apiTypes = new HashSet<Type>();
-        Set<Annotation> qualifiers = new HashSet<Annotation>();
+        Set<Type> apiTypes = new HashSet<>();
+        Set<Annotation> qualifiers = new HashSet<>();
         
         if(model.getJmsType() == JMSType.QUEUE)
         {
@@ -85,6 +85,6 @@ public final class JmsComponentFactory
             qualifiers.add(a);
         }
         
-        return new JmsBean<T>(webBeansContext, model, new BeanAttributesImpl<T>(apiTypes,
qualifiers));
+        return new JmsBean<>(webBeansContext, model, new BeanAttributesImpl<>(apiTypes,
qualifiers));
     }
 }

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java
(original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java
Sun Jun 18 13:57:08 2017
@@ -51,9 +51,9 @@ public class JmsProxyHandler implements
 
     private AtomicBoolean cfSet = new AtomicBoolean(false);
 
-    private static Map<JMSType, Connection> connections = new ConcurrentHashMap<JMSType,
Connection>();
+    private static Map<JMSType, Connection> connections = new ConcurrentHashMap<>();
 
-    private static Map<String, Destination> dests = new ConcurrentHashMap<String,
Destination>();
+    private static Map<String, Destination> dests = new ConcurrentHashMap<>();
     
     private Object jmsObject;
     

Modified: openwebbeans/trunk/webbeans-maven/src/main/java/org/apache/openwebbeans/maven/shade/OpenWebBeansPropertiesTransformer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-maven/src/main/java/org/apache/openwebbeans/maven/shade/OpenWebBeansPropertiesTransformer.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-maven/src/main/java/org/apache/openwebbeans/maven/shade/OpenWebBeansPropertiesTransformer.java
(original)
+++ openwebbeans/trunk/webbeans-maven/src/main/java/org/apache/openwebbeans/maven/shade/OpenWebBeansPropertiesTransformer.java
Sun Jun 18 13:57:08 2017
@@ -31,7 +31,7 @@ import java.util.zip.ZipEntry;
 
 public class OpenWebBeansPropertiesTransformer implements ResourceTransformer
 {
-    private final List<Properties> configurations = new ArrayList<Properties>();
+    private final List<Properties> configurations = new ArrayList<>();
 
     private String resource = "META-INF/openwebbeans/openwebbeans.properties";
     private String ordinalKey = "configuration.ordinal";
@@ -89,7 +89,7 @@ public class OpenWebBeansPropertiesTrans
 
     private List<Properties> sortProperties(List<Properties> allProperties)
     {
-        List<Properties> sortedProperties = new ArrayList<Properties>();
+        List<Properties> sortedProperties = new ArrayList<>();
         for (Properties p : allProperties)
         {
             int configOrder = getConfigurationOrdinal(p);

Modified: openwebbeans/trunk/webbeans-osgi/src/main/java/org/apache/webbeans/osgi/scanner/OsgiMetaDataScannerService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-osgi/src/main/java/org/apache/webbeans/osgi/scanner/OsgiMetaDataScannerService.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-osgi/src/main/java/org/apache/webbeans/osgi/scanner/OsgiMetaDataScannerService.java
(original)
+++ openwebbeans/trunk/webbeans-osgi/src/main/java/org/apache/webbeans/osgi/scanner/OsgiMetaDataScannerService.java
Sun Jun 18 13:57:08 2017
@@ -64,14 +64,14 @@ public class OsgiMetaDataScannerService
     private static final String WEB_INF_BEANS_XML = "WEB-INF/beans.xml";
 
     /** All classes which have to be scanned for Bean information */
-    private Set<Class<?>> beanClasses = new HashSet<Class<?>>();
+    private Set<Class<?>> beanClasses = new HashSet<>();
 
     /** the paths of all META-INF/beans.xml files */
     private UrlSet beanXMLs = new UrlSet();
 
     /**contains all the JARs we found with valid beans.xml in it */
-    private Set<String> beanArchiveJarNames = new HashSet<String>();
-    private Map<String, Set<String>> classAnnotations = new HashMap<String,
Set<String>>();
+    private Set<String> beanArchiveJarNames = new HashSet<>();
+    private Map<String, Set<String>> classAnnotations = new HashMap<>();
 
     @Override
     public void init(Object object)
@@ -85,9 +85,9 @@ public class OsgiMetaDataScannerService
     @Override
     public void release()
     {
-        beanClasses = new HashSet<Class<?>>();
+        beanClasses = new HashSet<>();
         beanXMLs = new UrlSet();
-        beanArchiveJarNames = new HashSet<String>();
+        beanArchiveJarNames = new HashSet<>();
         classAnnotations.clear();
     }
 
@@ -174,7 +174,7 @@ public class OsgiMetaDataScannerService
 
     private Set<String> collectAnnotations(Class<?> cls)
     {
-        Set<String> annotations = new HashSet<String>();
+        Set<String> annotations = new HashSet<>();
 
         addAnnotations(annotations, cls.getAnnotations());
 

Modified: openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java
(original)
+++ openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java
Sun Jun 18 13:57:08 2017
@@ -64,7 +64,7 @@ public class StandaloneResourceInjection
     /**
      * Cache the information if a certain class contains any EE resource at all
      */
-    private final Map<Class<?>, Boolean> classContainsEEResources = new ConcurrentHashMap<Class<?>,
Boolean>();
+    private final Map<Class<?>, Boolean> classContainsEEResources = new ConcurrentHashMap<>();
 
     public StandaloneResourceInjectionService(WebBeansContext webBeansContext)
     {

Modified: openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceProcessor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceProcessor.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceProcessor.java
(original)
+++ openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceProcessor.java
Sun Jun 18 13:57:08 2017
@@ -46,7 +46,7 @@ public class StandaloneResourceProcessor
     /**
      *  A cache for EntityManagerFactories.
      */
-    private Map<String, EntityManagerFactory> factoryCache = new ConcurrentHashMap<String,
EntityManagerFactory>();    
+    private Map<String, EntityManagerFactory> factoryCache = new ConcurrentHashMap<>();
     
     static
     {

Modified: openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/ContextLifecycleListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/ContextLifecycleListener.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/ContextLifecycleListener.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/ContextLifecycleListener.java
Sun Jun 18 13:57:08 2017
@@ -85,7 +85,7 @@ public class ContextLifecycleListener im
     private void addOwbListeners(StandardContext context)
     {
         String[] oldListeners = context.findApplicationListeners();
-        LinkedList<String> listeners = new LinkedList<String>();
+        LinkedList<String> listeners = new LinkedList<>();
 
         listeners.addFirst(WebBeansConfigurationListener.class.getName());
 

Modified: openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatInstanceManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatInstanceManager.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatInstanceManager.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatInstanceManager.java
Sun Jun 18 13:57:08 2017
@@ -36,7 +36,7 @@ public class TomcatInstanceManager imple
 
     private ClassLoader loader;
 
-    private Map<Object, Object> objects = new ConcurrentHashMap<Object, Object>();
+    private Map<Object, Object> objects = new ConcurrentHashMap<>();
 
     public TomcatInstanceManager(ClassLoader loader, InstanceManager processor)
     {

Modified: openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatSecurityFilter.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatSecurityFilter.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatSecurityFilter.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatSecurityFilter.java
Sun Jun 18 13:57:08 2017
@@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletReq
  */
 public class TomcatSecurityFilter implements Filter
 {
-    private static ThreadLocal<Principal> principal = new ThreadLocal<Principal>();
+    private static ThreadLocal<Principal> principal = new ThreadLocal<>();
     
     public static Principal getPrincipal()
     {

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Sun Jun 18 13:57:08 2017
@@ -111,9 +111,9 @@ public class WebContextsService extends
         applicationContext = new ApplicationContext();
         applicationContext.setActive(true);
 
-        requestContexts = new ThreadLocal<ServletRequestContext>();
-        sessionContexts = new ThreadLocal<SessionContext>();
-        conversationContexts = new ThreadLocal<ConversationContext>();
+        requestContexts = new ThreadLocal<>();
+        sessionContexts = new ThreadLocal<>();
+        conversationContexts = new ThreadLocal<>();
 
         //Dependent context is always active
         dependentContext = new DependentContext();

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletContextBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletContextBean.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletContextBean.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletContextBean.java
Sun Jun 18 13:57:08 2017
@@ -31,15 +31,15 @@ class ServletContextBean extends BuiltIn
 {
     ServletContextBean(WebBeansContext ctx, ServletContext context)
     {
-        super(ctx, WebBeansType.SERVLET_CONTEXT, ServletContext.class, new SimpleProducerFactory<ServletContext>(
-                new ProviderBasedProducer<>(ctx, ServletContext.class, new Provider<ServletContext>()
+        super(ctx, WebBeansType.SERVLET_CONTEXT, ServletContext.class, new SimpleProducerFactory<>(
+            new ProviderBasedProducer<>(ctx, ServletContext.class, new Provider<ServletContext>()
+            {
+                @Override
+                public ServletContext get()
                 {
-                    @Override
-                    public ServletContext get()
-                    {
-                        return context;
-                    }
-                }, true)));
+                    return context;
+                }
+            }, true)));
     }
 
     @Override

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletRequestBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletRequestBean.java?rev=1799087&r1=1799086&r2=1799087&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletRequestBean.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/ServletRequestBean.java
Sun Jun 18 13:57:08 2017
@@ -33,16 +33,16 @@ class ServletRequestBean extends BuiltIn
 {
     ServletRequestBean(WebBeansContext ctx, WebContextsService contexts)
     {
-        super(ctx, WebBeansType.SERVLET_REQUEST, HttpServletRequest.class, new SimpleProducerFactory<HttpServletRequest>(
-                new ProviderBasedProducer<>(ctx, HttpServletRequest.class, new Provider<HttpServletRequest>()
+        super(ctx, WebBeansType.SERVLET_REQUEST, HttpServletRequest.class, new SimpleProducerFactory<>(
+            new ProviderBasedProducer<>(ctx, HttpServletRequest.class, new Provider<HttpServletRequest>()
+            {
+                @Override
+                public HttpServletRequest get()
                 {
-                    @Override
-                    public HttpServletRequest get()
-                    {
-                        ServletRequestContext requestContext = contexts.getRequestContext(false);
-                        return requestContext == null ? null : requestContext.getServletRequest();
-                    }
-                }, true)));
+                    ServletRequestContext requestContext = contexts.getRequestContext(false);
+                    return requestContext == null ? null : requestContext.getServletRequest();
+                }
+            }, true)));
     }
 
     @Override



Mime
View raw message