tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject [10/12] tomee git commit: Added diamond operator usage to the OpenEJB Container Core project, where appropriate
Date Tue, 04 Dec 2018 04:54:41 GMT
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/FacilitiesInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/FacilitiesInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/FacilitiesInfo.java
index 5c5c01e..441b7a8 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/FacilitiesInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/FacilitiesInfo.java
@@ -23,13 +23,13 @@ import java.util.List;
 public class FacilitiesInfo extends InfoObject {
 
     public ProxyFactoryInfo intraVmServer;
-    public final List<JndiContextInfo> remoteJndiContexts = new ArrayList<JndiContextInfo>();
-    public final List<ResourceInfo> resources = new ArrayList<ResourceInfo>();
-    public final List<ConnectionManagerInfo> connectionManagers = new ArrayList<ConnectionManagerInfo>();
+    public final List<JndiContextInfo> remoteJndiContexts = new ArrayList<>();
+    public final List<ResourceInfo> resources = new ArrayList<>();
+    public final List<ConnectionManagerInfo> connectionManagers = new ArrayList<>();
     public TransactionServiceInfo transactionService;
     public SecurityServiceInfo securityService;
 
     // Don't add anything here unless it's overridable using the -DserviceId.property=value convention
-    public final List<ServiceInfo> services = new ArrayList<ServiceInfo>();
-    public final List<String> serverObservers = new ArrayList<String>();
+    public final List<ServiceInfo> services = new ArrayList<>();
+    public final List<String> serverObservers = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerChainInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerChainInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerChainInfo.java
index bbc23fa..b7b5ce9 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerChainInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerChainInfo.java
@@ -24,6 +24,6 @@ import java.util.List;
 public class HandlerChainInfo extends InfoObject {
     public QName serviceNamePattern;
     public QName portNamePattern;
-    public final List<String> protocolBindings = new ArrayList<String>();
-    public final List<HandlerInfo> handlers = new ArrayList<HandlerInfo>();
+    public final List<String> protocolBindings = new ArrayList<>();
+    public final List<HandlerInfo> handlers = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerInfo.java
index 357837b..c9b87de 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerInfo.java
@@ -26,6 +26,6 @@ public class HandlerInfo extends InfoObject {
     public String handlerName;
     public String handlerClass;
     public final Properties initParams = new Properties();
-    public final List<QName> soapHeaders = new ArrayList<QName>();
-    public final List<String> soapRoles = new ArrayList<String>();
+    public final List<QName> soapHeaders = new ArrayList<>();
+    public final List<String> soapRoles = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectableInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectableInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectableInfo.java
index f0bffc5..80e3a7c 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectableInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectableInfo.java
@@ -24,7 +24,7 @@ import java.util.List;
  * @version $Rev$ $Date$
  */
 public class InjectableInfo extends InfoObject {
-    public final List<InjectionInfo> targets = new ArrayList<InjectionInfo>();
+    public final List<InjectionInfo> targets = new ArrayList<>();
     public String referenceName;
 
     public ReferenceLocationInfo location;

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectionBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectionBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectionBuilder.java
index 77220f8..84426e7 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectionBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectionBuilder.java
@@ -32,7 +32,7 @@ public class InjectionBuilder {
 
     // TODO: check we can really skip the loadClass exception (TCKs)
     public List<Injection> buildInjections(final JndiEncInfo jndiEnc) throws OpenEJBException {
-        final List<Injection> injections = new ArrayList<Injection>();
+        final List<Injection> injections = new ArrayList<>();
         for (final EnvEntryInfo info : jndiEnc.envEntries) {
             for (final InjectionInfo target : info.targets) {
                 final Injection injection = injection(info.referenceName, target.propertyName, target.className);

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingBuilder.java
index 15cd4b3..70c42ce 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingBuilder.java
@@ -53,14 +53,14 @@ public class InterceptorBindingBuilder {
     }
 
     private final ArrayList<InterceptorBindingInfo> bindings;
-    private final Map<String, InterceptorData> interceptors = new HashMap<String, InterceptorData>();
+    private final Map<String, InterceptorData> interceptors = new HashMap<>();
 
     public InterceptorBindingBuilder(final ClassLoader cl, final EjbJarInfo ejbJarInfo) throws OpenEJBException {
-        bindings = new ArrayList<InterceptorBindingInfo>(ejbJarInfo.interceptorBindings);
+        bindings = new ArrayList<>(ejbJarInfo.interceptorBindings);
         Collections.sort(bindings, new IntercpetorBindingComparator());
         Collections.reverse(bindings);
 
-        packageAndClassBindings = new ArrayList<InterceptorBindingInfo>();
+        packageAndClassBindings = new ArrayList<>();
         for (final InterceptorBindingInfo binding : bindings) {
             final Level level = level(binding);
             if (level == Level.PACKAGE || level == Level.CLASS || level == Level.ANNOTATION_CLASS) {
@@ -108,7 +108,7 @@ public class InterceptorBindingBuilder {
             info.className = clazz.getName();
             final Method createMethod = beanContext.getCreateMethod();
             info.methodName = (createMethod != null) ? createMethod.getName(): "ejbCreate";
-            info.methodParams = new ArrayList<String>();
+            info.methodParams = new ArrayList<>();
 
             try {
                 final Method ejbcreate = MethodInfoUtil.toMethod(clazz, info);
@@ -163,7 +163,7 @@ public class InterceptorBindingBuilder {
     private List<InterceptorData> createInterceptorDatas(final Method method, final String ejbName, final List<InterceptorBindingInfo> bindings) {
         final List<InterceptorBindingInfo> methodBindings = processBindings(method, ejbName, bindings);
         Collections.reverse(methodBindings);
-        final List<InterceptorData> methodInterceptors = new ArrayList<InterceptorData>();
+        final List<InterceptorData> methodInterceptors = new ArrayList<>();
 
         for (final InterceptorBindingInfo info : methodBindings) {
             final List<String> classes = info.interceptorOrder.size() > 0 ? info.interceptorOrder : info.interceptors;
@@ -181,7 +181,7 @@ public class InterceptorBindingBuilder {
 
 
     private List<InterceptorBindingInfo> processBindings(final Method method, final String ejbName, final List<InterceptorBindingInfo> bindings) {
-        final List<InterceptorBindingInfo> methodBindings = new ArrayList<InterceptorBindingInfo>();
+        final List<InterceptorBindingInfo> methodBindings = new ArrayList<>();
 
         // The only critical thing to understand in this loop is that
         // the bindings have already been sorted high to low (first to last)
@@ -206,7 +206,7 @@ public class InterceptorBindingBuilder {
         //    - Any addition for current level and/or exclusion for a lower level
         //   (lowest)
         //
-        final Set<Level> excludes = new HashSet<Level>();
+        final Set<Level> excludes = new HashSet<>();
         for (final InterceptorBindingInfo info : bindings) {
             final Level level = level(info);
 
@@ -284,7 +284,7 @@ public class InterceptorBindingBuilder {
      * @param callbacks     the collection where the created methods will be placed
      */
     private void toMethods(final Class<?> clazz, final List<CallbackInfo> callbackInfos, final Set<Method> callbacks) {
-        final List<Method> methods = new ArrayList<Method>();
+        final List<Method> methods = new ArrayList<>();
 
         for (final CallbackInfo callbackInfo : callbackInfos) {
             try {
@@ -345,7 +345,7 @@ public class InterceptorBindingBuilder {
      * @param callbacks
      */
     private void toCallback(final Class<?> clazz, final List<CallbackInfo> callbackInfos, final Set<Method> callbacks, final Class<?>... parameterTypes) {
-        final List<Method> methods = new ArrayList<Method>();
+        final List<Method> methods = new ArrayList<>();
 
         for (final CallbackInfo callbackInfo : callbackInfos) {
             Class<?> usedClazz = clazz;

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingInfo.java
index 84a8e3d..e867ae6 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorBindingInfo.java
@@ -26,8 +26,8 @@ import java.util.List;
 public class InterceptorBindingInfo extends InfoObject {
     public String ejbName;
     public String className;
-    public final List<String> interceptors = new ArrayList<String>();
-    public final List<String> interceptorOrder = new ArrayList<String>();
+    public final List<String> interceptors = new ArrayList<>();
+    public final List<String> interceptorOrder = new ArrayList<>();
     public boolean excludeDefaultInterceptors;
     public boolean excludeClassInterceptors;
     public NamedMethodInfo method;

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorInfo.java
index 78454a6..9c6dc58 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InterceptorInfo.java
@@ -23,17 +23,17 @@ import java.util.List;
 public class InterceptorInfo extends InfoObject {
     public String clazz;
 
-    public final List<CallbackInfo> aroundInvoke = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> aroundInvoke = new ArrayList<>();
 
-    public final List<CallbackInfo> postConstruct = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> preDestroy = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> postConstruct = new ArrayList<>();
+    public final List<CallbackInfo> preDestroy = new ArrayList<>();
 
-    public final List<CallbackInfo> postActivate = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> prePassivate = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> postActivate = new ArrayList<>();
+    public final List<CallbackInfo> prePassivate = new ArrayList<>();
 
-    public final List<CallbackInfo> afterBegin = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> beforeCompletion = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> afterCompletion = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> afterBegin = new ArrayList<>();
+    public final List<CallbackInfo> beforeCompletion = new ArrayList<>();
+    public final List<CallbackInfo> afterCompletion = new ArrayList<>();
 
-    public final List<CallbackInfo> aroundTimeout = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> aroundTimeout = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JaccPermissionsBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JaccPermissionsBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JaccPermissionsBuilder.java
index 0276ec9..c6f268c 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JaccPermissionsBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JaccPermissionsBuilder.java
@@ -80,7 +80,7 @@ public class JaccPermissionsBuilder {
 
     public PolicyContext build(final EjbJarInfo ejbJar, final HashMap<String, BeanContext> deployments) throws OpenEJBException {
 
-        final List<MethodPermissionInfo> normalized = new ArrayList<MethodPermissionInfo>();
+        final List<MethodPermissionInfo> normalized = new ArrayList<>();
 
         List<MethodPermissionInfo> perms = ejbJar.methodPermissions;
 
@@ -122,7 +122,7 @@ public class JaccPermissionsBuilder {
 
                 bm.className = method.getDeclaringClass().getName();
                 bm.methodName = method.getName();
-                bm.methodParams = new ArrayList<String>();
+                bm.methodParams = new ArrayList<>();
                 for (final Class<?> type : method.getParameterTypes()) {
                     bm.methodParams.add(type.getName());
                 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
index d049d1b..1f22357 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
@@ -212,7 +212,7 @@ public class JndiBuilder {
 
             this.template = new StringTemplate(format);
 
-            beanInfos = new HashMap<String, EnterpriseBeanInfo>();
+            beanInfos = new HashMap<>();
             for (final EnterpriseBeanInfo beanInfo : ejbJarInfo.enterpriseBeans) {
                 beanInfos.put(beanInfo.ejbDeploymentId, beanInfo);
             }
@@ -225,7 +225,7 @@ public class JndiBuilder {
             // TODO we should just pass in the ModuleContext
             final ModuleContext moduleContext = it.next().getModuleContext();
 
-            appContext = new HashMap<String, String>();
+            appContext = new HashMap<>();
             putAll(appContext, SystemInstance.get().getProperties());
             putAll(appContext, moduleContext.getAppContext().getProperties());
             putAll(appContext, moduleContext.getProperties());
@@ -253,7 +253,7 @@ public class JndiBuilder {
         private Map<String, StringTemplate> addTemplate(final Map<String, StringTemplate> map, final String key, final StringTemplate template) {
             Map<String, StringTemplate> m = map;
             if (m == null) {
-                m = new TreeMap<String, StringTemplate>();
+                m = new TreeMap<>();
             }
             m.put(key, template);
             return m;
@@ -264,7 +264,7 @@ public class JndiBuilder {
 
             final EnterpriseBeanInfo beanInfo = beanInfos.get(bean.getDeploymentID());
 
-            templates = new HashMap<String, Map<String, StringTemplate>>();
+            templates = new HashMap<>();
             templates.put("", addTemplate(null, DEFAULT_NAME_KEY, template));
 
             for (final JndiNameInfo nameInfo : beanInfo.jndiNamess) {
@@ -277,7 +277,7 @@ public class JndiBuilder {
             beanInfo.jndiNames.clear();
             beanInfo.jndiNamess.clear();
 
-            this.beanContext = new HashMap<String, String>(appContext);
+            this.beanContext = new HashMap<>(appContext);
             putAll(this.beanContext, bean.getProperties());
             this.beanContext.put("ejbType", bean.getComponentType().name());
             this.beanContext.put("ejbClass", bean.getBeanClass().getName());
@@ -311,7 +311,7 @@ public class JndiBuilder {
                 template = templates.get("");
             }
 
-            final Map<String, String> contextData = new HashMap<String, String>(beanContext);
+            final Map<String, String> contextData = new HashMap<>(beanContext);
             contextData.put("interfaceType", type.getAnnotationName());
             contextData.put("interfaceType.annotationName", type.getAnnotationName());
             contextData.put("interfaceType.annotationNameLC", type.getAnnotationName().toLowerCase());
@@ -340,7 +340,7 @@ public class JndiBuilder {
 
         @Override
         public Map<String, String> getNames(final Class interfce, final Interface type) {
-            final Map<String, String> names = new HashMap<String, String>();
+            final Map<String, String> names = new HashMap<>();
             for (final String key : KEYS.split(",")) {
                 names.put(key, getName(interfce, key, type));
             }
@@ -379,7 +379,7 @@ public class JndiBuilder {
 
         @Override
         public Map<String, String> getNames(final Class interfce, final Interface type) {
-            final Map<String, String> names = new HashMap<String, String>();
+            final Map<String, String> names = new HashMap<>();
             names.put("", getName(interfce, DEFAULT_NAME_KEY, type));
             return names;
         }
@@ -759,7 +759,7 @@ public class JndiBuilder {
     }
 
     protected static final class Bindings {
-        private final List<String> bindings = new ArrayList<String>();
+        private final List<String> bindings = new ArrayList<>();
 
         public List<String> getBindings() {
             return bindings;

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
index 3c287f9..ca94877 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
@@ -193,7 +193,7 @@ public class JndiEncBuilder {
     }
 
     public Map<String, Object> buildMap(final JndiScope scope) throws OpenEJBException {
-        final Map<String, Object> bindings = new TreeMap<String, Object>(); // let it be sorted for real binding
+        final Map<String, Object> bindings = new TreeMap<>(); // let it be sorted for real binding
 
         // get JtaEntityManagerRegistry
         final JtaEntityManagerRegistry jtaEntityManagerRegistry = SystemInstance.get().getComponent(JtaEntityManagerRegistry.class);
@@ -484,7 +484,7 @@ public class JndiEncBuilder {
             }
 
             // port refs
-            final List<PortRefData> portRefs = new ArrayList<PortRefData>(referenceInfo.portRefs.size());
+            final List<PortRefData> portRefs = new ArrayList<>(referenceInfo.portRefs.size());
             for (final PortRefInfo portRefInfo : referenceInfo.portRefs) {
                 final PortRefData portRef = new PortRefData();
                 portRef.setQName(portRefInfo.qname);

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncInfo.java
index 21fe662..29287fb 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncInfo.java
@@ -27,12 +27,12 @@ import java.util.List;
  */
 
 public class JndiEncInfo extends InfoObject {
-    public final List<EnvEntryInfo> envEntries = new ArrayList<EnvEntryInfo>();
-    public final List<EjbReferenceInfo> ejbReferences = new ArrayList<EjbReferenceInfo>();
-    public final List<EjbLocalReferenceInfo> ejbLocalReferences = new ArrayList<EjbLocalReferenceInfo>();
-    public final List<ResourceReferenceInfo> resourceRefs = new ArrayList<ResourceReferenceInfo>();
-    public final List<PersistenceUnitReferenceInfo> persistenceUnitRefs = new ArrayList<PersistenceUnitReferenceInfo>();
-    public final List<PersistenceContextReferenceInfo> persistenceContextRefs = new ArrayList<PersistenceContextReferenceInfo>();
-    public final List<ResourceEnvReferenceInfo> resourceEnvRefs = new ArrayList<ResourceEnvReferenceInfo>();
-    public final List<ServiceReferenceInfo> serviceRefs = new ArrayList<ServiceReferenceInfo>();
+    public final List<EnvEntryInfo> envEntries = new ArrayList<>();
+    public final List<EjbReferenceInfo> ejbReferences = new ArrayList<>();
+    public final List<EjbLocalReferenceInfo> ejbLocalReferences = new ArrayList<>();
+    public final List<ResourceReferenceInfo> resourceRefs = new ArrayList<>();
+    public final List<PersistenceUnitReferenceInfo> persistenceUnitRefs = new ArrayList<>();
+    public final List<PersistenceContextReferenceInfo> persistenceContextRefs = new ArrayList<>();
+    public final List<ResourceEnvReferenceInfo> resourceEnvRefs = new ArrayList<>();
+    public final List<ServiceReferenceInfo> serviceRefs = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ManagedBeanInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ManagedBeanInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ManagedBeanInfo.java
index 2f08e05..c0b8816 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ManagedBeanInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ManagedBeanInfo.java
@@ -25,10 +25,10 @@ public class ManagedBeanInfo extends EnterpriseBeanInfo {
         type = MANAGED;
     }
 
-    public final List<CallbackInfo> postActivate = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> prePassivate = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> postActivate = new ArrayList<>();
+    public final List<CallbackInfo> prePassivate = new ArrayList<>();
 
-    public final List<RemoveMethodInfo> removeMethods = new ArrayList<RemoveMethodInfo>();
+    public final List<RemoveMethodInfo> removeMethods = new ArrayList<>();
 
     public boolean hidden;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MessageDrivenBeanInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MessageDrivenBeanInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MessageDrivenBeanInfo.java
index 324236c..46d5eec 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MessageDrivenBeanInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MessageDrivenBeanInfo.java
@@ -26,7 +26,7 @@ import java.util.Map;
 public class MessageDrivenBeanInfo extends EnterpriseBeanInfo {
     public String mdbInterface;
     public String destinationId;
-    public final Map<String, String> activationProperties = new HashMap<String, String>();
+    public final Map<String, String> activationProperties = new HashMap<>();
 
     public MessageDrivenBeanInfo() {
         type = MESSAGE;

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodAttributeInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodAttributeInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodAttributeInfo.java
index 3577b7a..2c0ebf5 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodAttributeInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodAttributeInfo.java
@@ -25,6 +25,6 @@ import java.util.List;
  */
 public class MethodAttributeInfo extends InfoObject {
 
-    public final List<MethodInfo> methods = new ArrayList<MethodInfo>();
+    public final List<MethodInfo> methods = new ArrayList<>();
 
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodConcurrencyBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodConcurrencyBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodConcurrencyBuilder.java
index 34d15b6..b70fda8 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodConcurrencyBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodConcurrencyBuilder.java
@@ -54,8 +54,8 @@ public class MethodConcurrencyBuilder {
 
         final Logger log = Logger.getInstance(LogCategory.OPENEJB_STARTUP.createChild("attributes"), MethodConcurrencyBuilder.class);
 
-        final List<MethodConcurrencyInfo> lockInfos = new ArrayList<MethodConcurrencyInfo>();
-        final List<MethodConcurrencyInfo> accessTimeoutInfos = new ArrayList<MethodConcurrencyInfo>();
+        final List<MethodConcurrencyInfo> lockInfos = new ArrayList<>();
+        final List<MethodConcurrencyInfo> accessTimeoutInfos = new ArrayList<>();
 
         MethodConcurrencyBuilder.normalize(methodConcurrencyInfos, lockInfos, accessTimeoutInfos);
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java
index 998e18d..f781eb7 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java
@@ -57,7 +57,7 @@ public class MethodInfoUtil {
      * @throws IllegalStateException if the method is not found in this class or any of its parent classes
      */
     public static Method toMethod(Class clazz, final NamedMethodInfo info) {
-        final List<Class> parameterTypes = new ArrayList<Class>();
+        final List<Class> parameterTypes = new ArrayList<>();
 
         if (info.methodParams != null) {
             for (final String paramType : info.methodParams) {
@@ -88,7 +88,7 @@ public class MethodInfoUtil {
     }
 
     public static List<Method> matchingMethods(final Method signature, final Class clazz) {
-        final List<Method> list = new ArrayList<Method>();
+        final List<Method> list = new ArrayList<>();
         METHOD:
         for (final Method method : clazz.getMethods()) {
             if (!method.getName().equals(signature.getName())) {
@@ -139,7 +139,7 @@ public class MethodInfoUtil {
     }
 
     private static List<Method> filterByClass(final MethodInfo mi, final List<Method> methods) {
-        final ArrayList<Method> list = new ArrayList<Method>();
+        final ArrayList<Method> list = new ArrayList<>();
         for (final Method method : methods) {
             final String className = method.getDeclaringClass().getName();
             if (mi.className.equals(className)) {
@@ -171,7 +171,7 @@ public class MethodInfoUtil {
     public static Method getMethod(final Class clazz, final MethodInfo info) {
         final ClassLoader cl = clazz.getClassLoader();
 
-        final List<Class> params = new ArrayList<Class>();
+        final List<Class> params = new ArrayList<>();
         for (final String methodParam : info.methodParams) {
             try {
                 params.add(getClassForParam(methodParam, cl));
@@ -194,7 +194,7 @@ public class MethodInfoUtil {
     }
 
     private static List<Method> filterByName(final Method[] methods, final String methodName) {
-        final List<Method> list = new ArrayList<Method>();
+        final List<Method> list = new ArrayList<>();
         for (final Method method : methods) {
             if (method.getName().equals(methodName)) {
                 list.add(method);
@@ -204,7 +204,7 @@ public class MethodInfoUtil {
     }
 
     private static List<Method> filterByNameAndParams(final Method[] methods, final MethodInfo mi) {
-        final List<Method> list = new ArrayList<Method>();
+        final List<Method> list = new ArrayList<>();
         for (final Method method : methods) {
             if (matches(method, mi)) {
                 list.add(method);
@@ -225,7 +225,7 @@ public class MethodInfoUtil {
      * @return a normalized list of new MethodPermissionInfo objects
      */
     public static List<MethodPermissionInfo> normalizeMethodPermissionInfos(final List<MethodPermissionInfo> infos) {
-        final List<MethodPermissionInfo> normalized = new ArrayList<MethodPermissionInfo>();
+        final List<MethodPermissionInfo> normalized = new ArrayList<>();
         for (final MethodPermissionInfo oldInfo : infos) {
             for (final MethodInfo methodInfo : oldInfo.methods) {
                 final MethodPermissionInfo newInfo = new MethodPermissionInfo();
@@ -269,7 +269,7 @@ public class MethodInfoUtil {
     }
 
     public static Map<Method, MethodAttributeInfo> resolveAttributes(final List<? extends MethodAttributeInfo> infos, final BeanContext beanContext) {
-        final Map<Method, MethodAttributeInfo> attributes = new LinkedHashMap<Method, MethodAttributeInfo>();
+        final Map<Method, MethodAttributeInfo> attributes = new LinkedHashMap<>();
 
         final Method[] wildCardView = getWildCardView(beanContext).toArray(new Method[]{});
 
@@ -278,7 +278,7 @@ public class MethodInfoUtil {
 
                 if (methodInfo.ejbName == null || methodInfo.ejbName.equals("*") || methodInfo.ejbName.equals(beanContext.getEjbName())) {
 
-                    final List<Method> methods = new ArrayList<Method>();
+                    final List<Method> methods = new ArrayList<>();
 
                     if (methodInfo.methodIntf == null) {
                         methods.addAll(matchingMethods(methodInfo, wildCardView));
@@ -318,7 +318,7 @@ public class MethodInfoUtil {
     }
 
     public static Map<ViewMethod, MethodAttributeInfo> resolveViewAttributes(final List<? extends MethodAttributeInfo> infos, final BeanContext beanContext) {
-        final Map<ViewMethod, MethodAttributeInfo> attributes = new LinkedHashMap<ViewMethod, MethodAttributeInfo>();
+        final Map<ViewMethod, MethodAttributeInfo> attributes = new LinkedHashMap<>();
 
         final Method[] wildCardView = getWildCardView(beanContext).toArray(new Method[]{});
 
@@ -327,7 +327,7 @@ public class MethodInfoUtil {
 
                 if (methodInfo.ejbName == null || methodInfo.ejbName.equals("*") || methodInfo.ejbName.equals(beanContext.getEjbName())) {
 
-                    final List<Method> methods = new ArrayList<Method>();
+                    final List<Method> methods = new ArrayList<>();
 
                     if (methodInfo.methodIntf == null) {
                         methods.addAll(matchingMethods(methodInfo, wildCardView));
@@ -433,7 +433,7 @@ public class MethodInfoUtil {
     }
 
     private static List<Method> getWildCardView(final BeanContext info) {
-        final List<Method> methods = new ArrayList<Method>();
+        final List<Method> methods = new ArrayList<>();
 
         final List<Method> beanMethods = asList(info.getBeanClass().getMethods());
         methods.addAll(beanMethods);
@@ -482,7 +482,7 @@ public class MethodInfoUtil {
     }
 
     private static List<Method> exclude(final List<Method> excludes, final Method[] methods) {
-        final ArrayList<Method> list = new ArrayList<Method>();
+        final ArrayList<Method> list = new ArrayList<>();
 
         for (final Method method : methods) {
             if (!matches(excludes, method)) {

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodPermissionInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodPermissionInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodPermissionInfo.java
index 0acb632..3237d6f 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodPermissionInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodPermissionInfo.java
@@ -23,7 +23,7 @@ import java.util.List;
 public class MethodPermissionInfo extends MethodAttributeInfo {
 
     public String description;
-    public final List<String> roleNames = new ArrayList<String>();
+    public final List<String> roleNames = new ArrayList<>();
     public boolean excluded;
     public boolean unchecked;
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodScheduleInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodScheduleInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodScheduleInfo.java
index 2c02043..ebd47e7 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodScheduleInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodScheduleInfo.java
@@ -24,7 +24,7 @@ public class MethodScheduleInfo extends InfoObject {
 
     public String description;
 
-    public final List<ScheduleInfo> schedules = new ArrayList<ScheduleInfo>();
+    public final List<ScheduleInfo> schedules = new ArrayList<>();
 
     public NamedMethodInfo method;
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodTransactionBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodTransactionBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodTransactionBuilder.java
index 72376c6..3f856ba 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodTransactionBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodTransactionBuilder.java
@@ -84,7 +84,7 @@ public class MethodTransactionBuilder {
      * @return a normalized list of new MethodTransactionInfo objects
      */
     public static List<MethodTransactionInfo> normalize(final List<MethodTransactionInfo> infos) {
-        final List<MethodTransactionInfo> normalized = new ArrayList<MethodTransactionInfo>();
+        final List<MethodTransactionInfo> normalized = new ArrayList<>();
         for (final MethodTransactionInfo oldInfo : infos) {
             for (final MethodInfo methodInfo : oldInfo.methods) {
                 final MethodTransactionInfo newInfo = new MethodTransactionInfo();

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceUnitInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceUnitInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceUnitInfo.java
index 2863ce8..5af0c42 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceUnitInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceUnitInfo.java
@@ -30,13 +30,13 @@ public class PersistenceUnitInfo extends InfoObject {
     public String transactionType;
     public String jtaDataSource;
     public String nonJtaDataSource;
-    public final List<String> mappingFiles = new ArrayList<String>();
-    public final List<String> jarFiles = new ArrayList<String>();
-    public final List<String> classes = new ArrayList<String>();
+    public final List<String> mappingFiles = new ArrayList<>();
+    public final List<String> jarFiles = new ArrayList<>();
+    public final List<String> classes = new ArrayList<>();
     public boolean excludeUnlistedClasses;
     public final Properties properties = new Properties();
     public String persistenceUnitRootUrl;
-    public final Set<String> watchedResources = new TreeSet<String>();
+    public final Set<String> watchedResources = new TreeSet<>();
     public String persistenceXMLSchemaVersion;
     public String sharedCacheMode;
     public String validationMode;

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PolicyContext.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PolicyContext.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PolicyContext.java
index 738e22b..a6407ce 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PolicyContext.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PolicyContext.java
@@ -28,7 +28,7 @@ public class PolicyContext {
 
     private final PermissionCollection excludedPermissions = new DelegatePermissionCollection();
     private final PermissionCollection uncheckedPermissions = new DelegatePermissionCollection();
-    private final Map<String, PermissionCollection> rolePermissions = new HashMap<String, PermissionCollection>();
+    private final Map<String, PermissionCollection> rolePermissions = new HashMap<>();
     private final String contextId;
 
     public PolicyContext(final String contextId) {

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortInfo.java
index d5baeaa..f26c803 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortInfo.java
@@ -35,7 +35,7 @@ public class PortInfo extends InfoObject {
     public String wsdlFile;
 
     public String serviceLink;
-    public final List<HandlerChainInfo> handlerChains = new ArrayList<HandlerChainInfo>();
+    public final List<HandlerChainInfo> handlerChains = new ArrayList<>();
     public boolean mtomEnabled;
     public String binding;
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ProxyInterfaceResolver.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ProxyInterfaceResolver.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ProxyInterfaceResolver.java
index 7826951..a081b2a 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ProxyInterfaceResolver.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ProxyInterfaceResolver.java
@@ -28,7 +28,7 @@ import java.util.List;
 public class ProxyInterfaceResolver {
 
     public static List<Class> getInterfaces(final Class implementation, final Class mainInterface, final List<Class> interfaces) {
-        final List<Class> valid = new ArrayList<Class>();
+        final List<Class> valid = new ArrayList<>();
         // The intended interface is safe to add
         if (mainInterface != null) {
             valid.add(mainInterface);
@@ -70,8 +70,8 @@ public class ProxyInterfaceResolver {
         // a runtime exception and must be throwable via the proxy.
 
 
-        final List<Class> remotes = new ArrayList<Class>();
-        final List<Class> nonremotes = new ArrayList<Class>();
+        final List<Class> remotes = new ArrayList<>();
+        final List<Class> nonremotes = new ArrayList<>();
         for (final Class interfce : valid) {
             if (Remote.class.isAssignableFrom(interfce)) {
                 remotes.add(interfce);
@@ -153,7 +153,7 @@ public class ProxyInterfaceResolver {
     }
 
     private static List<Signature> getSignatures(final Class mainInterface) {
-        final List<Signature> sigs = new ArrayList<Signature>();
+        final List<Signature> sigs = new ArrayList<>();
         for (final Method method : mainInterface.getMethods()) {
             sigs.add(new Signature(mainInterface, method));
         }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceInfo.java
index 21bc831..429a134 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceInfo.java
@@ -25,7 +25,7 @@ import java.util.Properties;
 public class ServiceInfo extends InfoObject {
 
     public String service;
-    public List<String> types = new ArrayList<String>();
+    public List<String> types = new ArrayList<>();
     public String description;
     public String id;
     public String displayName;

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceReferenceInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceReferenceInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceReferenceInfo.java
index b1763b1..bd02541 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceReferenceInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceReferenceInfo.java
@@ -36,7 +36,7 @@ public class ServiceReferenceInfo extends InjectableInfo {
 
     public String wsdlFile;
     public String jaxrpcMappingFile;
-    public final List<HandlerChainInfo> handlerChains = new ArrayList<HandlerChainInfo>();
-    public final List<PortRefInfo> portRefs = new ArrayList<PortRefInfo>();
+    public final List<HandlerChainInfo> handlerChains = new ArrayList<>();
+    public final List<PortRefInfo> portRefs = new ArrayList<>();
 
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServletInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServletInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServletInfo.java
index eea97af..92928b6 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServletInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServletInfo.java
@@ -24,6 +24,6 @@ public class ServletInfo extends InfoObject {
     public String servletName;
     public String servletClass;
     public String runAs;
-    public List<String> mappings = new ArrayList<String>();
-    public List<ParamValueInfo> initParams = new ArrayList<ParamValueInfo>();
+    public List<String> mappings = new ArrayList<>();
+    public List<ParamValueInfo> initParams = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/StatefulBeanInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/StatefulBeanInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/StatefulBeanInfo.java
index 8c3d2cb..28652c2 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/StatefulBeanInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/StatefulBeanInfo.java
@@ -26,13 +26,13 @@ public class StatefulBeanInfo extends EnterpriseBeanInfo {
         type = STATEFUL;
     }
 
-    public final List<CallbackInfo> postActivate = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> prePassivate = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> postActivate = new ArrayList<>();
+    public final List<CallbackInfo> prePassivate = new ArrayList<>();
 
-    public final List<InitMethodInfo> initMethods = new ArrayList<InitMethodInfo>();
-    public final List<RemoveMethodInfo> removeMethods = new ArrayList<RemoveMethodInfo>();
+    public final List<InitMethodInfo> initMethods = new ArrayList<>();
+    public final List<RemoveMethodInfo> removeMethods = new ArrayList<>();
 
-    public final List<CallbackInfo> afterBegin = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> beforeCompletion = new ArrayList<CallbackInfo>();
-    public final List<CallbackInfo> afterCompletion = new ArrayList<CallbackInfo>();
+    public final List<CallbackInfo> afterBegin = new ArrayList<>();
+    public final List<CallbackInfo> beforeCompletion = new ArrayList<>();
+    public final List<CallbackInfo> afterCompletion = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java
index bf6da24..0513f00 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java
@@ -293,7 +293,7 @@ public final class ValidatorBuilder {
         it.inject(instance, context);
         it.postConstruct(instance);
 
-        config.releasables.add(new Releasable<T>(context, it, instance));
+        config.releasables.add(new Releasable<>(context, it, instance));
 
         return instance;
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WebAppInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WebAppInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WebAppInfo.java
index d9c950d..9dcdf3a 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WebAppInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WebAppInfo.java
@@ -33,17 +33,17 @@ public class WebAppInfo extends CommonInfoObject {
     public String host;
     public String contextRoot;
     public int sessionTimeout;
-    public final Set<String> watchedResources = new TreeSet<String>();
-    public final Set<String> restClass = new TreeSet<String>();
-    public final Set<String> restApplications = new TreeSet<String>();
-    public final Set<String> ejbWebServices = new TreeSet<String>();
-    public final Set<String> ejbRestServices = new TreeSet<String>();
-    public final Set<ClassListInfo> webAnnotatedClasses = new LinkedHashSet<ClassListInfo>();
-    public final List<PortInfo> portInfos = new ArrayList<PortInfo>();
+    public final Set<String> watchedResources = new TreeSet<>();
+    public final Set<String> restClass = new TreeSet<>();
+    public final Set<String> restApplications = new TreeSet<>();
+    public final Set<String> ejbWebServices = new TreeSet<>();
+    public final Set<String> ejbRestServices = new TreeSet<>();
+    public final Set<ClassListInfo> webAnnotatedClasses = new LinkedHashSet<>();
+    public final List<PortInfo> portInfos = new ArrayList<>();
     public final JndiEncInfo jndiEnc = new JndiEncInfo();
-    public final List<ServletInfo> servlets = new ArrayList<ServletInfo>();
-    public final List<ClassListInfo> jsfAnnotatedClasses = new ArrayList<ClassListInfo>();
-    public final Set<String> jaxRsProviders = new TreeSet<String>();
-    public final List<ListenerInfo> listeners = new ArrayList<ListenerInfo>();
-    public final List<FilterInfo> filters = new ArrayList<FilterInfo>();
+    public final List<ServletInfo> servlets = new ArrayList<>();
+    public final List<ClassListInfo> jsfAnnotatedClasses = new ArrayList<>();
+    public final Set<String> jaxRsProviders = new TreeSet<>();
+    public final List<ListenerInfo> listeners = new ArrayList<>();
+    public final List<FilterInfo> filters = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WsBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WsBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WsBuilder.java
index 163726e..4f7d4e0 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WsBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WsBuilder.java
@@ -56,9 +56,9 @@ public class WsBuilder {
     }
 
     public static List<HandlerChainData> toHandlerChainData(final List<HandlerChainInfo> chains, final ClassLoader classLoader) throws OpenEJBException {
-        final List<HandlerChainData> handlerChains = new ArrayList<HandlerChainData>();
+        final List<HandlerChainData> handlerChains = new ArrayList<>();
         for (final HandlerChainInfo handlerChain : chains) {
-            final List<HandlerData> handlers = new ArrayList<HandlerData>();
+            final List<HandlerData> handlers = new ArrayList<>();
             for (final HandlerInfo handler : handlerChain.handlers) {
                 try {
                     final Class<?> handlerClass = classLoader.loadClass(handler.handlerClass);

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/util/ServiceInfos.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/util/ServiceInfos.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/util/ServiceInfos.java
index 41ac9ce..d2d6551 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/util/ServiceInfos.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/util/ServiceInfos.java
@@ -86,7 +86,7 @@ public final class ServiceInfos {
             return null;
         }
 
-        final List<Object> instances = new ArrayList<Object>();
+        final List<Object> instances = new ArrayList<>();
         for (final String id : ids) {
             Object instance = resolve(serviceInfos, id);
             if (instance == null) {  // maybe id == classname

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java b/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java
index 925671b..d14dd2d 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/async/AsynchronousPool.java
@@ -79,7 +79,7 @@ public class AsynchronousPool {
                 return null;
             }
 
-            return new FutureAdapter<Object>(future, asynchronousCancelled);
+            return new FutureAdapter<>(future, asynchronousCancelled);
         } catch (final RejectedExecutionException e) {
             throw new EJBException("fail to allocate internal resource to execute the target task", e);
         }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/bval/ValidatorUtil.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/bval/ValidatorUtil.java b/container/openejb-core/src/main/java/org/apache/openejb/bval/ValidatorUtil.java
index d20216c..397e059 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/bval/ValidatorUtil.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/bval/ValidatorUtil.java
@@ -99,7 +99,7 @@ public final class ValidatorUtil {
                     for (final AppContext appContext : containerSystem.getAppContexts()) {
                         final ClassLoader appContextClassLoader = appContext.getClassLoader();
                         if (tccl.equals(appContextClassLoader) || appContextClassLoader.equals(tccl)) {
-                            final Collection<String> tested = new ArrayList<String>();
+                            final Collection<String> tested = new ArrayList<>();
                             for (final BeanContext bean : appContext.getBeanContexts()) {
                                 if (BeanContext.Comp.class.equals(bean.getBeanClass())) {
                                     final String uniqueId = bean.getModuleContext().getUniqueId();

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBeanInfo.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBeanInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBeanInfo.java
index 0927c35..95fb80e 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBeanInfo.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBeanInfo.java
@@ -103,133 +103,133 @@ public class CdiBeanInfo implements JndiConsumer {
 
     public Collection<EnvEntry> getEnvEntry() {
         if (envEntry == null) {
-            envEntry = new KeyedCollection<String, EnvEntry>();
+            envEntry = new KeyedCollection<>();
         }
         return this.envEntry;
     }
 
     public Map<String, EnvEntry> getEnvEntryMap() {
         if (envEntry == null) {
-            envEntry = new KeyedCollection<String, EnvEntry>();
+            envEntry = new KeyedCollection<>();
         }
         return this.envEntry.toMap();
     }
 
     public Collection<EjbRef> getEjbRef() {
         if (ejbRef == null) {
-            ejbRef = new KeyedCollection<String, EjbRef>();
+            ejbRef = new KeyedCollection<>();
         }
         return this.ejbRef;
     }
 
     public Map<String, EjbRef> getEjbRefMap() {
         if (ejbRef == null) {
-            ejbRef = new KeyedCollection<String, EjbRef>();
+            ejbRef = new KeyedCollection<>();
         }
         return this.ejbRef.toMap();
     }
 
     public Collection<EjbLocalRef> getEjbLocalRef() {
         if (ejbLocalRef == null) {
-            ejbLocalRef = new KeyedCollection<String, EjbLocalRef>();
+            ejbLocalRef = new KeyedCollection<>();
         }
         return this.ejbLocalRef;
     }
 
     public Map<String, EjbLocalRef> getEjbLocalRefMap() {
         if (ejbLocalRef == null) {
-            ejbLocalRef = new KeyedCollection<String, EjbLocalRef>();
+            ejbLocalRef = new KeyedCollection<>();
         }
         return this.ejbLocalRef.toMap();
     }
 
     public Collection<ServiceRef> getServiceRef() {
         if (serviceRef == null) {
-            serviceRef = new KeyedCollection<String, ServiceRef>();
+            serviceRef = new KeyedCollection<>();
         }
         return this.serviceRef;
     }
 
     public Map<String, ServiceRef> getServiceRefMap() {
         if (serviceRef == null) {
-            serviceRef = new KeyedCollection<String, ServiceRef>();
+            serviceRef = new KeyedCollection<>();
         }
         return this.serviceRef.toMap();
     }
 
     public Collection<ResourceRef> getResourceRef() {
         if (resourceRef == null) {
-            resourceRef = new KeyedCollection<String, ResourceRef>();
+            resourceRef = new KeyedCollection<>();
         }
         return this.resourceRef;
     }
 
     public Map<String, ResourceRef> getResourceRefMap() {
         if (resourceRef == null) {
-            resourceRef = new KeyedCollection<String, ResourceRef>();
+            resourceRef = new KeyedCollection<>();
         }
         return this.resourceRef.toMap();
     }
 
     public Collection<ResourceEnvRef> getResourceEnvRef() {
         if (resourceEnvRef == null) {
-            resourceEnvRef = new KeyedCollection<String, ResourceEnvRef>();
+            resourceEnvRef = new KeyedCollection<>();
         }
         return this.resourceEnvRef;
     }
 
     public Map<String, ResourceEnvRef> getResourceEnvRefMap() {
         if (resourceEnvRef == null) {
-            resourceEnvRef = new KeyedCollection<String, ResourceEnvRef>();
+            resourceEnvRef = new KeyedCollection<>();
         }
         return this.resourceEnvRef.toMap();
     }
 
     public Collection<MessageDestinationRef> getMessageDestinationRef() {
         if (messageDestinationRef == null) {
-            messageDestinationRef = new KeyedCollection<String, MessageDestinationRef>();
+            messageDestinationRef = new KeyedCollection<>();
         }
         return this.messageDestinationRef;
     }
 
     public Map<String, MessageDestinationRef> getMessageDestinationRefMap() {
         if (messageDestinationRef == null) {
-            messageDestinationRef = new KeyedCollection<String, MessageDestinationRef>();
+            messageDestinationRef = new KeyedCollection<>();
         }
         return this.messageDestinationRef.toMap();
     }
 
     public Collection<PersistenceContextRef> getPersistenceContextRef() {
         if (persistenceContextRef == null) {
-            persistenceContextRef = new KeyedCollection<String, PersistenceContextRef>();
+            persistenceContextRef = new KeyedCollection<>();
         }
         return this.persistenceContextRef;
     }
 
     public Map<String, PersistenceContextRef> getPersistenceContextRefMap() {
         if (persistenceContextRef == null) {
-            persistenceContextRef = new KeyedCollection<String, PersistenceContextRef>();
+            persistenceContextRef = new KeyedCollection<>();
         }
         return this.persistenceContextRef.toMap();
     }
 
     public Collection<PersistenceUnitRef> getPersistenceUnitRef() {
         if (persistenceUnitRef == null) {
-            persistenceUnitRef = new KeyedCollection<String, PersistenceUnitRef>();
+            persistenceUnitRef = new KeyedCollection<>();
         }
         return this.persistenceUnitRef;
     }
 
     public Map<String, PersistenceUnitRef> getPersistenceUnitRefMap() {
         if (persistenceUnitRef == null) {
-            persistenceUnitRef = new KeyedCollection<String, PersistenceUnitRef>();
+            persistenceUnitRef = new KeyedCollection<>();
         }
         return this.persistenceUnitRef.toMap();
     }
 
     public List<LifecycleCallback> getPostConstruct() {
         if (postConstruct == null) {
-            postConstruct = new ArrayList<LifecycleCallback>();
+            postConstruct = new ArrayList<>();
         }
         return this.postConstruct;
     }
@@ -237,7 +237,7 @@ public class CdiBeanInfo implements JndiConsumer {
 
     public List<SecurityRoleRef> getSecurityRoleRef() {
         if (securityRoleRef == null) {
-            securityRoleRef = new ArrayList<SecurityRoleRef>();
+            securityRoleRef = new ArrayList<>();
         }
         return this.securityRoleRef;
     }
@@ -253,35 +253,35 @@ public class CdiBeanInfo implements JndiConsumer {
 
     public List<LifecycleCallback> getAfterBegin() {
         if (afterBegin == null) {
-            afterBegin = new ArrayList<LifecycleCallback>();
+            afterBegin = new ArrayList<>();
         }
         return afterBegin;
     }
 
     public List<LifecycleCallback> getAfterCompletion() {
         if (afterCompletion == null) {
-            afterCompletion = new ArrayList<LifecycleCallback>();
+            afterCompletion = new ArrayList<>();
         }
         return this.afterCompletion;
     }
 
     public List<LifecycleCallback> getBeforeCompletion() {
         if (beforeCompletion == null) {
-            beforeCompletion = new ArrayList<LifecycleCallback>();
+            beforeCompletion = new ArrayList<>();
         }
         return this.beforeCompletion;
     }
 
     public Collection<DataSource> getDataSource() {
         if (dataSource == null) {
-            dataSource = new KeyedCollection<String, DataSource>();
+            dataSource = new KeyedCollection<>();
         }
         return this.dataSource;
     }
 
     public Map<String, DataSource> getDataSourceMap() {
         if (dataSource == null) {
-            dataSource = new KeyedCollection<String, DataSource>();
+            dataSource = new KeyedCollection<>();
         }
         return this.dataSource.toMap();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
index be43cc2..e678c87 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
@@ -71,7 +71,7 @@ import javax.interceptor.Interceptor;
 import javax.transaction.UserTransaction;
 
 public class CdiEjbBean<T> extends BaseEjbBean<T> implements InterceptedMarker, DeploymentValidationService.BeanInterceptorInfoProvider {
-    private final Map<Integer, Object> dependentSFSBToBeRemoved = new ConcurrentHashMap<Integer, Object>();
+    private final Map<Integer, Object> dependentSFSBToBeRemoved = new ConcurrentHashMap<>();
 
     private final BeanContext beanContext;
     private final boolean isDependentAndStateful;
@@ -162,7 +162,7 @@ public class CdiEjbBean<T> extends BaseEjbBean<T> implements InterceptedMarker,
 
     @Override
     public List<Class<?>> getBusinessLocalInterfaces() {
-        final List<Class<?>> classes = new ArrayList<Class<?>>();
+        final List<Class<?>> classes = new ArrayList<>();
         for (final Type t : getTypes()) {
             if (Class.class.isInstance(t)) {
                 classes.add(Class.class.cast(t));
@@ -211,7 +211,7 @@ public class CdiEjbBean<T> extends BaseEjbBean<T> implements InterceptedMarker,
     }
 
     private List<Method> findRemove(final Class<?> beanClass, final Class<?> beanInterface) {
-        final List<Method> toReturn = new ArrayList<Method>();
+        final List<Method> toReturn = new ArrayList<>();
 
         // Get all the public methods of the bean class and super class
         final Method[] methods = beanClass.getMethods();
@@ -327,7 +327,7 @@ public class CdiEjbBean<T> extends BaseEjbBean<T> implements InterceptedMarker,
         public EJBBeanAttributesImpl(final BeanContext bc, final BeanAttributes<T> beanAttributes) {
             super(beanAttributes, false);
             this.beanContext = bc;
-            this.ejbTypes = new HashSet<Type>();
+            this.ejbTypes = new HashSet<>();
             initTypes();
         }
 
@@ -400,7 +400,7 @@ public class CdiEjbBean<T> extends BaseEjbBean<T> implements InterceptedMarker,
 
         @Override
         public InjectionTarget<T> createInjectionTarget(final Bean<T> bean) {
-            final EjbInjectionTargetImpl<T> injectionTarget = new EjbInjectionTargetImpl<T>(getAnnotatedType(), createInjectionPoints(bean), getWebBeansContext());
+            final EjbInjectionTargetImpl<T> injectionTarget = new EjbInjectionTargetImpl<>(getAnnotatedType(), createInjectionPoints(bean), getWebBeansContext());
             final InjectionTarget<T> it = getWebBeansContext().getWebBeansUtil().fireProcessInjectionTargetEvent(injectionTarget, getAnnotatedType()).getInjectionTarget();
 
             for (final InjectionPoint ip : it.getInjectionPoints()) {
@@ -413,7 +413,7 @@ public class CdiEjbBean<T> extends BaseEjbBean<T> implements InterceptedMarker,
             }
 
             if (!EjbInjectionTargetImpl.class.isInstance(it)) {
-                return new EjbInjectionTargetImpl<T>(injectionTarget, it);
+                return new EjbInjectionTargetImpl<>(injectionTarget, it);
             }
             return it;
         }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
index af39cd6..5b92bf2 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
@@ -108,13 +108,13 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl
             return;
         }
         if (!WebappWebBeansContext.class.isInstance(webBeansContext)) {
-            cacheProxies = new ConcurrentHashMap<Contextual<?>, Object>();
+            cacheProxies = new ConcurrentHashMap<>();
         } else { // share cache of proxies between the whole app otherwise hard to share an EJB between a webapp and the lib part of the app
             final WebBeansContext parent = WebappWebBeansContext.class.cast(webBeansContext).getParent();
             if (parent != null) {
                 cacheProxies = CdiPlugin.class.cast(parent.getPluginLoader().getEjbPlugin()).cacheProxies;
             } else {
-                cacheProxies = new ConcurrentHashMap<Contextual<?>, Object>();
+                cacheProxies = new ConcurrentHashMap<>();
             }
         }
     }
@@ -243,13 +243,13 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl
             }
 
             // only stateful normally
-            final InstanceBean<Object> bean = new InstanceBean<Object>(cdiEjbBean);
+            final InstanceBean<Object> bean = new InstanceBean<>(cdiEjbBean);
             if (webBeansContext.getBeanManagerImpl().isNormalScope(scopeClass)) {
                 final BeanContext beanContext = cdiEjbBean.getBeanContext();
                 final Provider provider = webBeansContext.getNormalScopeProxyFactory().getInstanceProvider(beanContext.getClassLoader(), cdiEjbBean);
 
                 if (!beanContext.isLocalbean()) {
-                    final List<Class> interfaces = new ArrayList<Class>();
+                    final List<Class> interfaces = new ArrayList<>();
                     final InterfaceType type = beanContext.getInterfaceType(interfce);
                     if (type != null) {
                         interfaces.addAll(beanContext.getInterfaces(type));
@@ -322,7 +322,7 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl
                 throw new DefinitionException("You can only specialize another EJB with at least the same API: " + clazz);
             }
         }
-        final CdiEjbBean<T> bean = new OpenEJBBeanBuilder<T>(bc, webBeansContext, annotatedType, attributes).createBean(clazz, !annotatedType.isAnnotationPresent(Vetoed.class));
+        final CdiEjbBean<T> bean = new OpenEJBBeanBuilder<>(bc, webBeansContext, annotatedType, attributes).createBean(clazz, !annotatedType.isAnnotationPresent(Vetoed.class));
 
         bc.set(CdiEjbBean.class, bean);
         bc.set(CurrentCreationalContext.class, new CurrentCreationalContext());
@@ -332,7 +332,7 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl
 
         final Set<ObserverMethod<?>> observerMethods;
         if (bean.isEnabled()) {
-            observerMethods = new ObserverMethodsBuilder<T>(webBeansContext, bean.getAnnotatedType()).defineObserverMethods(bean);
+            observerMethods = new ObserverMethodsBuilder<>(webBeansContext, bean.getAnnotatedType()).defineObserverMethods(bean);
         } else {
             observerMethods = new HashSet<>();
         }
@@ -463,7 +463,7 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl
 
     @Override
     public <T> Bean<T> defineNewSessionBean(final Class<T> clazz) {
-        return new NewCdiEjbBean<T>(findBeanContext(webBeansContext, clazz).get(CdiEjbBean.class));
+        return new NewCdiEjbBean<>(findBeanContext(webBeansContext, clazz).get(CdiEjbBean.class));
     }
 
     private static Map<Class<?>, BeanContext> pluginBeans(final WebBeansContext ctx) {
@@ -672,7 +672,7 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl
 
         @Override
         public Producer<T> getProducer() {
-            return new EjbProducer<T>(this, bean);
+            return new EjbProducer<>(this, bean);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiResourceInjectionService.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiResourceInjectionService.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiResourceInjectionService.java
index e43f793..0163af6 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiResourceInjectionService.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiResourceInjectionService.java
@@ -48,7 +48,7 @@ public class CdiResourceInjectionService implements ResourceInjectionService {
     private final Logger logger = Logger.getInstance(LogCategory.OPENEJB.createChild("cdi"), CdiResourceInjectionService.class);
 
     private final CdiPlugin ejbPlugin;
-    private final List<BeanContext> compContexts = new ArrayList<BeanContext>();
+    private final List<BeanContext> compContexts = new ArrayList<>();
     private volatile AppContext appCtx;
     private volatile boolean ear;
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/ConstructorInjectionBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/ConstructorInjectionBean.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/ConstructorInjectionBean.java
index 0ce078d..e8c1b32 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/ConstructorInjectionBean.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/ConstructorInjectionBean.java
@@ -57,7 +57,7 @@ public class ConstructorInjectionBean<T> extends InjectionTargetBean<T> { // TOD
     public ConstructorInjectionBean(final WebBeansContext webBeansContext, final Class<T> returnType, final AnnotatedType<T> at, final Boolean passivationCapable) {
         super(webBeansContext, WebBeansType.DEPENDENT, at, BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(at).build(), returnType);
         try {
-            INJECTION_TARGET_FIELD.set(this, new ConstructorInjectionTarget<T>(getAnnotatedType(), getInjectionPoints(), getWebBeansContext()));
+            INJECTION_TARGET_FIELD.set(this, new ConstructorInjectionTarget<>(getAnnotatedType(), getInjectionPoints(), getWebBeansContext()));
         } catch (final Exception e) {
             throw new OpenEJBRuntimeException(e);
         }

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/CurrentCreationalContext.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CurrentCreationalContext.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CurrentCreationalContext.java
index 4f33fc2..91731d4 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CurrentCreationalContext.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CurrentCreationalContext.java
@@ -23,7 +23,7 @@ import javax.enterprise.context.spi.CreationalContext;
  * @version $Rev$ $Date$
  */
 public final class CurrentCreationalContext<T> {
-    private final ThreadLocal<CreationalContext<T>> creationalContext = new ThreadLocal<CreationalContext<T>>();
+    private final ThreadLocal<CreationalContext<T>> creationalContext = new ThreadLocal<>();
 
     public CreationalContext<T> get() {
         return creationalContext.get();

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBBeanBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBBeanBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBBeanBuilder.java
index 3f01ebb..25b601b 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBBeanBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBBeanBuilder.java
@@ -38,7 +38,7 @@ public class OpenEJBBeanBuilder<A> extends EjbBeanBuilder<A, CdiEjbBean<A>> {
 
     @Override
     protected CdiEjbBean<A> createBean(final Class<A> beanClass, final boolean beanEnabled) {
-        return new CdiEjbBean<A>(beanContext, webBeansContext, annotatedType, beanAttributes);
+        return new CdiEjbBean<>(beanContext, webBeansContext, annotatedType, beanAttributes);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cdi/OptimizedLoaderService.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/OptimizedLoaderService.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/OptimizedLoaderService.java
index 94a3f96..742ce47 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/OptimizedLoaderService.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/OptimizedLoaderService.java
@@ -223,7 +223,7 @@ public class OptimizedLoaderService implements LoaderService {
         private static final String SERVICE_CONFIG = "META-INF/services/" + Extension.class.getName();
         private static final String FILE_ENCODING = "UTF-8";
 
-        private List<Class<?>> foundServiceClasses = new ArrayList<Class<?>>();
+        private List<Class<?>> foundServiceClasses = new ArrayList<>();
         private ClassLoader loader;
 
         private List<Extension> loadServiceImplementations() {

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/classloader/CompositeClassLoaderConfigurer.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/classloader/CompositeClassLoaderConfigurer.java b/container/openejb-core/src/main/java/org/apache/openejb/classloader/CompositeClassLoaderConfigurer.java
index 2175041..60cb40d 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/classloader/CompositeClassLoaderConfigurer.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/classloader/CompositeClassLoaderConfigurer.java
@@ -29,7 +29,7 @@ public class CompositeClassLoaderConfigurer implements ClassLoaderConfigurer {
     public CompositeClassLoaderConfigurer(final ClassLoaderConfigurer... configurers) {
         composites = configurers;
 
-        final Set<URL> urlSet = new HashSet<URL>();
+        final Set<URL> urlSet = new HashSet<>();
         for (final ClassLoaderConfigurer configurer : configurers) {
             if (configurer != null) {
                 urlSet.addAll(Arrays.asList(configurer.additionalURLs()));

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/classloader/ProvisioningClassLoaderConfigurer.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/classloader/ProvisioningClassLoaderConfigurer.java b/container/openejb-core/src/main/java/org/apache/openejb/classloader/ProvisioningClassLoaderConfigurer.java
index 6d26919..1da7749 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/classloader/ProvisioningClassLoaderConfigurer.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/classloader/ProvisioningClassLoaderConfigurer.java
@@ -71,8 +71,8 @@ public class ProvisioningClassLoaderConfigurer implements ClassLoaderConfigurer
     }
 
     public void setConfiguration(final String configFile) {
-        final Collection<URL> toAdd = new ArrayList<URL>();
-        final Collection<String> toExclude = new ArrayList<String>();
+        final Collection<URL> toAdd = new ArrayList<>();
+        final Collection<String> toExclude = new ArrayList<>();
 
         BufferedReader reader = null;
         try {

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java b/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java
index 9b18139..239a860 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java
@@ -156,7 +156,7 @@ public class MainImpl implements Main {
     }
 
     private String[] processSystemProperties(String[] args) {
-        final ArrayList<String> argsList = new ArrayList<String>();
+        final ArrayList<String> argsList = new ArrayList<>();
 
         // We have to pre-screen for openejb.base as it has a direct affect
         // on where we look for the conf/system.properties file which we

http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/main/java/org/apache/openejb/component/ClassLoaderEnricher.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/component/ClassLoaderEnricher.java b/container/openejb-core/src/main/java/org/apache/openejb/component/ClassLoaderEnricher.java
index 19c6678..e3b684d 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/component/ClassLoaderEnricher.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/component/ClassLoaderEnricher.java
@@ -23,7 +23,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
 
 public class ClassLoaderEnricher {
     // files used for war or lib part of ear
-    private final Collection<URL> applicationURLs = new CopyOnWriteArrayList<URL>();
+    private final Collection<URL> applicationURLs = new CopyOnWriteArrayList<>();
 
     public URL[] applicationEnrichment() {
         return applicationURLs.toArray(new URL[applicationURLs.size()]);


Mime
View raw message