You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2018/12/04 04:54:35 UTC
[04/12] tomee git commit: Added diamond operator usage to the OpenEJB
Container Core project, where appropriate
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java
index aa71ace..9d1ff9e 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java
@@ -41,7 +41,7 @@ public class EarUnpackTest extends TestCase {
final File ear = new File(appsDir, "colors.ear");
{ // First Version of the EAR
- final Map<String, Object> contents = new HashMap<String, Object>();
+ final Map<String, Object> contents = new HashMap<>();
contents.put("orange.jar", Archives.jarArchive(Orange.class));
Archives.jarArchive(ear, contents);
@@ -51,7 +51,7 @@ public class EarUnpackTest extends TestCase {
}
{ // First Version of the EAR
- final Map<String, Object> contents = new HashMap<String, Object>();
+ final Map<String, Object> contents = new HashMap<>();
contents.put("yellow.jar", Archives.jarArchive(Yellow.class));
Archives.jarArchive(ear, contents);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/EjbModuleIdTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/EjbModuleIdTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/EjbModuleIdTest.java
index 9f16d18..5fe82d9 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/EjbModuleIdTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/EjbModuleIdTest.java
@@ -40,7 +40,7 @@ public class EjbModuleIdTest extends Assert {
@Test
public void testDefault() throws Exception {
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar/>");
final File file = Archives.jarArchive(map, "test", OrangeBean.class);
@@ -55,7 +55,7 @@ public class EjbModuleIdTest extends Assert {
@Test
public void testId() throws Exception {
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar id=\"orange\"/>");
final File file = Archives.jarArchive(map, "test", OrangeBean.class);
@@ -70,7 +70,7 @@ public class EjbModuleIdTest extends Assert {
@Test
public void testModuleName() throws Exception {
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar><module-name>orange</module-name></ejb-jar>");
final File file = Archives.jarArchive(map, "test", OrangeBean.class);
@@ -86,7 +86,7 @@ public class EjbModuleIdTest extends Assert {
@Test
public void testModuleNameAndId() throws Exception {
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar id=\"orangeId\"><module-name>orangeName</module-name></ejb-jar>");
final File file = Archives.jarArchive(map, "test", OrangeBean.class);
@@ -106,7 +106,7 @@ public class EjbModuleIdTest extends Assert {
*/
@Test
public void testSystemProperty() throws Exception {
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar id=\"orangeId\"><module-name>orangeName</module-name></ejb-jar>");
final File file = Archives.jarArchive(map, "test", OrangeBean.class);
@@ -129,10 +129,10 @@ public class EjbModuleIdTest extends Assert {
*/
@Test
public void testInvalidNames() throws Exception {
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar/>");
- final List<String> dirs = new ArrayList<String>();
+ final List<String> dirs = new ArrayList<>();
dirs.add("orangeDir");
dirs.add("classes"); // invalid
dirs.add("test-classes"); // invalid
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/JMXDataSourceTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/JMXDataSourceTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/JMXDataSourceTest.java
index 279d3b6..01bde67 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/JMXDataSourceTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/JMXDataSourceTest.java
@@ -106,7 +106,7 @@ public class JMXDataSourceTest {
final ObjectName on = new ObjectName("openejb.management:ObjectType=datasources,DataSource=JMXDataSourceTest");
final MBeanInfo mBeanInfo = ManagementFactory.getPlatformMBeanServer().getMBeanInfo(on);
assertNotNull(mBeanInfo);
- final Map<String, Object> map = new HashMap<String, Object>();
+ final Map<String, Object> map = new HashMap<>();
for (final MBeanAttributeInfo mBeanAttributeInfo : mBeanInfo.getAttributes()) {
final String name = mBeanAttributeInfo.getName();
final Object value = ManagementFactory.getPlatformMBeanServer().getAttribute(on, name);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/JndiEncInfoBuilderInsertTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/JndiEncInfoBuilderInsertTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/JndiEncInfoBuilderInsertTest.java
index 26608f0..2bc4845 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/JndiEncInfoBuilderInsertTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/JndiEncInfoBuilderInsertTest.java
@@ -26,10 +26,10 @@ import java.util.List;
public class JndiEncInfoBuilderInsertTest {
final JndiEncInfoBuilder builder = new JndiEncInfoBuilder(new AppInfo());
- final List<InjectableInfo> global = new ArrayList<InjectableInfo>();
- final List<InjectableInfo> app = new ArrayList<InjectableInfo>();
- final List<InjectableInfo> module = new ArrayList<InjectableInfo>();
- final List<InjectableInfo> comp = new ArrayList<InjectableInfo>();
+ final List<InjectableInfo> global = new ArrayList<>();
+ final List<InjectableInfo> app = new ArrayList<>();
+ final List<InjectableInfo> module = new ArrayList<>();
+ final List<InjectableInfo> comp = new ArrayList<>();
private void insert(final String referenceName) {
final InjectableInfo injectableInfo = new InjectableInfo();
@@ -38,7 +38,7 @@ public class JndiEncInfoBuilderInsertTest {
}
private String[] getNames(final List<InjectableInfo> infoList) {
- final List<String> names = new ArrayList<String>();
+ final List<String> names = new ArrayList<>();
for (final InjectableInfo info : infoList) {
names.add(info.referenceName);
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
index dbdab1a..b04dbd5 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
@@ -99,7 +99,7 @@ public class MBeanDeployerTest {
@Test
public void mbeans() throws Exception {
- final Set<String> parsed = new HashSet<String>();
+ final Set<String> parsed = new HashSet<>();
for (final Object name : appInfo.jmx.values()) {
final ObjectName on = new ObjectName((String) name);
final String cn = on.getCanonicalName();
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/ModulePropertiesTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/ModulePropertiesTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/ModulePropertiesTest.java
index 51afca4..38c7e6f 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/ModulePropertiesTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/ModulePropertiesTest.java
@@ -62,7 +62,7 @@ public class ModulePropertiesTest extends TestCase {
}
{
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/module.properties", "color=orange");
final File app = Archives.fileArchive(map, WidgetBean.class);
@@ -87,7 +87,7 @@ public class ModulePropertiesTest extends TestCase {
{
SystemInstance.get().getProperties().put("fooModule.color", "orange");
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar id=\"fooModule\"/>");
final File module = Archives.fileArchive(map, WidgetBean.class);
@@ -113,7 +113,7 @@ public class ModulePropertiesTest extends TestCase {
{
SystemInstance.get().getProperties().put("fooModule.color", "orange");
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar id=\"fooModule\"/>");
map.put("META-INF/module.properties", "color=white");
@@ -139,7 +139,7 @@ public class ModulePropertiesTest extends TestCase {
}
{
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar id=\"fooModule\"/>");
map.put("META-INF/module.properties", "color=white");
@@ -169,7 +169,7 @@ public class ModulePropertiesTest extends TestCase {
{
SystemInstance.get().getProperties().put("fooApp.fooModule.color", "orange");
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
map.put("META-INF/ejb-jar.xml", "<ejb-jar id=\"fooModule\"/>");
map.put("META-INF/module.properties", "color=white");
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/PersistenceContextAnnFactoryTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/PersistenceContextAnnFactoryTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/PersistenceContextAnnFactoryTest.java
index 2bcc26c..924a558 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/PersistenceContextAnnFactoryTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/PersistenceContextAnnFactoryTest.java
@@ -64,7 +64,7 @@ public class PersistenceContextAnnFactoryTest extends TestCase {
assertEquals(annotation.unitName(), wrapper.unitName());
assertEquals(annotation.type().toString(), wrapper.type());
- final Map<String, String> properties = new HashMap<String, String>();
+ final Map<String, String> properties = new HashMap<>();
for (final PersistenceProperty property : annotation.properties()) {
properties.put(property.name(), property.value());
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/ProviderManagerTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/ProviderManagerTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/ProviderManagerTest.java
index d1d9c70..4c5ee90 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/ProviderManagerTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/ProviderManagerTest.java
@@ -215,7 +215,7 @@ public class ProviderManagerTest extends TestCase {
@Override
public List<ServiceProvider> load(final String namespace) {
- final List<ServiceProvider> list = new ArrayList<ServiceProvider>();
+ final List<ServiceProvider> list = new ArrayList<>();
list.add(load(new ID(namespace, "color")));
list.add(load(new ID(namespace, "red")));
list.add(load(new ID(namespace, "orange")));
@@ -363,7 +363,7 @@ public class ProviderManagerTest extends TestCase {
@Override
public List<ServiceProvider> load(final String namespace) {
- final List<ServiceProvider> list = new ArrayList<ServiceProvider>();
+ final List<ServiceProvider> list = new ArrayList<>();
list.add(load(new ID(namespace, "color")));
list.add(load(new ID(namespace, "red")));
list.add(load(new ID(namespace, "orange")));
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/ServiceClasspathTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/ServiceClasspathTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/ServiceClasspathTest.java
index f7d8189..7836810 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/ServiceClasspathTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/ServiceClasspathTest.java
@@ -307,8 +307,8 @@ public class ServiceClasspathTest extends Assert {
*/
public static class Archive {
- final Map<String, String> manifest = new HashMap<String, String>();
- final Map<String, byte[]> entries = new HashMap<String, byte[]>();
+ final Map<String, String> manifest = new HashMap<>();
+ final Map<String, byte[]> entries = new HashMap<>();
public static Archive archive() {
return new Archive();
@@ -410,7 +410,7 @@ public class ServiceClasspathTest extends Assert {
}
private HashMap<String, byte[]> entries() {
- final HashMap<String, byte[]> entries = new HashMap<String, byte[]>(this.entries);
+ final HashMap<String, byte[]> entries = new HashMap<>(this.entries);
entries.put("META-INF/MANIFEST.MF", buildManifest().getBytes());
return entries;
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/SunCmpConversionTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/SunCmpConversionTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/SunCmpConversionTest.java
index 2363199..4e30d1f 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/SunCmpConversionTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/SunCmpConversionTest.java
@@ -121,7 +121,7 @@ public class SunCmpConversionTest extends TestCase {
final String expected = readContent(in);
// Sun doen't really support generated primary keys, so we need to add them by hand here
- final Set<String> generatedPks = new HashSet<String>(Arrays.asList("BasicCmp2", "AOBasicCmp2", "EncCmp2", "Cmp2RmiIiop"));
+ final Set<String> generatedPks = new HashSet<>(Arrays.asList("BasicCmp2", "AOBasicCmp2", "EncCmp2", "Cmp2RmiIiop"));
final EntityMappings cmpMappings = appModule.getCmpMappings();
for (final Entity entity : cmpMappings.getEntity()) {
if (generatedPks.contains(entity.getName())) {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/XmlOverridesTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/XmlOverridesTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/XmlOverridesTest.java
index ca3a6c4..f2188b9 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/XmlOverridesTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/XmlOverridesTest.java
@@ -159,7 +159,7 @@ public class XmlOverridesTest extends TestCase {
private <T extends InjectableInfo> Map<String, T> map(final List<T> list) {
try {
- final Map<String, T> entries = new HashMap<String, T>();
+ final Map<String, T> entries = new HashMap<>();
for (final T envEntry : list) {
entries.put("java:" + envEntry.referenceName, envEntry);
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/rules/CheckInvalidAsynchronousAnnotationsTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/CheckInvalidAsynchronousAnnotationsTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/CheckInvalidAsynchronousAnnotationsTest.java
index ea9a198..ecb33b2 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/CheckInvalidAsynchronousAnnotationsTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/CheckInvalidAsynchronousAnnotationsTest.java
@@ -124,7 +124,7 @@ public class CheckInvalidAsynchronousAnnotationsTest {
public static class AsyncBeanMethodWithFutureReturnType {
@Asynchronous
public Future<String> validReturnType() {
- return new AsyncResult<String>("returning from async call");
+ return new AsyncResult<>("returning from async call");
}
}
@@ -144,7 +144,7 @@ public class CheckInvalidAsynchronousAnnotationsTest {
@Asynchronous
public static class AsyncBeanWithFutureReturnType {
public Future<String> validReturnType() {
- return new AsyncResult<String>("returning from async call");
+ return new AsyncResult<>("returning from async call");
}
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
index d7c6eb0..c663ff1 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
@@ -160,7 +160,7 @@ public class InvokeMethod extends Statement {
private Map<Integer, List<String>> validateKeys() throws Exception {
final Keys annotation = testMethod.getAnnotation(Keys.class);
final Key[] keys = annotation.value();
- final ArrayList<String> wrongKeys = new ArrayList<String>();
+ final ArrayList<String> wrongKeys = new ArrayList<>();
for (final Key key : keys) {
if (allKeys.contains("1." + key.value())) {
continue;
@@ -169,10 +169,10 @@ public class InvokeMethod extends Statement {
}
}
if (wrongKeys.isEmpty()) {
- final Map<Integer, List<String>> validKeys = new HashMap<Integer, List<String>>();
- final ArrayList<String> failureKeys = new ArrayList<String>();
- final ArrayList<String> warningKeys = new ArrayList<String>();
- final ArrayList<String> errorKeys = new ArrayList<String>();
+ final Map<Integer, List<String>> validKeys = new HashMap<>();
+ final ArrayList<String> failureKeys = new ArrayList<>();
+ final ArrayList<String> warningKeys = new ArrayList<>();
+ final ArrayList<String> errorKeys = new ArrayList<>();
for (final Key key : keys) {
for (int i = 0; i < key.count(); i++) {
switch (key.type()) {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/rules/KeysAnnotationVisitor.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/KeysAnnotationVisitor.java b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/KeysAnnotationVisitor.java
index 736d7e2..a3f63e4 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/KeysAnnotationVisitor.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/KeysAnnotationVisitor.java
@@ -88,7 +88,7 @@ public class KeysAnnotationVisitor extends EmptyVisitor {
public ClassInfo(final String clazz) {
this.clazz = clazz;
- methuds = new HashSet<MethodInfo>();
+ methuds = new HashSet<>();
}
@Override
@@ -123,7 +123,7 @@ public class KeysAnnotationVisitor extends EmptyVisitor {
public MethodInfo(final String methud) {
this.methud = methud;
- keys = new HashSet<String>();
+ keys = new HashSet<>();
}
@Override
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationAssertions.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationAssertions.java b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationAssertions.java
index 54be9c8..4331a1c 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationAssertions.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationAssertions.java
@@ -43,7 +43,7 @@ public class ValidationAssertions {
}
private static void assertValidation(final List<String> expectedKeys, final ValidationException[] validations) {
- final List<String> actualKeys = new ArrayList<String>();
+ final List<String> actualKeys = new ArrayList<>();
for (final ValidationException validation : validations) {
actualKeys.add(validation.getMessageKey());
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationKeysAuditorTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationKeysAuditorTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationKeysAuditorTest.java
index e5d3e1f..843e22f 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationKeysAuditorTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/ValidationKeysAuditorTest.java
@@ -112,7 +112,7 @@ public class ValidationKeysAuditorTest {
final String newLine = System.getProperty("line.separator");
final Set<String> testedKeys = getTestedKeys(visitor.classInfos);
Set<String> untestedKeys = getUntestedKeys(testedKeys);
- untestedKeys = new TreeSet<String>(untestedKeys);// sort the keys
+ untestedKeys = new TreeSet<>(untestedKeys);// sort the keys
prepareConfluenceSummary(untestedKeys, output, newLine);
prepareConfluenceUntestedKeyList(untestedKeys, output, newLine);
prepareConfluenceTestedKeysDetailedReport(visitor.classInfos, output, newLine);
@@ -121,7 +121,7 @@ public class ValidationKeysAuditorTest {
}
private void prepareConfluenceTestedKeysDetailedReport(final HashSet<ClassInfo> classInfos, final StringBuilder output, final String newLine) {
- final TreeMap<String, TreeSet<String>> info = new TreeMap<String, TreeSet<String>>();
+ final TreeMap<String, TreeSet<String>> info = new TreeMap<>();
output.append("h2.List of keys which have been tested.").append(newLine);
output.append("{table-plus:autoNumber=true}").append(newLine);
output.append("|| Key | Method which tests the key ||").append(newLine);
@@ -131,7 +131,7 @@ public class ValidationKeysAuditorTest {
final HashSet<String> keys = methodInfo.keys;
for (final String key : keys) {
if (!info.containsKey(key)) {
- final TreeSet<String> set = new TreeSet<String>();
+ final TreeSet<String> set = new TreeSet<>();
set.add(createConfluenceLink(classInfo.clazz + "." + methodInfo.methud + "()"));
info.put(key, set);
} else {
@@ -192,7 +192,7 @@ public class ValidationKeysAuditorTest {
final String newLine = System.getProperty("line.separator");
final Set<String> testedKeys = getTestedKeys(KeysAnnotationVisitor.classInfos);
Set<String> untestedKeys = getUntestedKeys(testedKeys);
- untestedKeys = new TreeSet<String>(untestedKeys);// sort the keys
+ untestedKeys = new TreeSet<>(untestedKeys);// sort the keys
prepareSummary(untestedKeys, output, newLine);
prepareUntestedKeyList(untestedKeys, output, newLine);
prepareTestedKeysDetailedReport(KeysAnnotationVisitor.classInfos, output, newLine);
@@ -203,14 +203,14 @@ public class ValidationKeysAuditorTest {
output.append("================================================================================================").append(newLine);
output.append("List of all keys tested. Next to each is the the test method which tests the key").append(newLine);
output.append("================================================================================================").append(newLine);
- final TreeMap<String, TreeSet<String>> info = new TreeMap<String, TreeSet<String>>();
+ final TreeMap<String, TreeSet<String>> info = new TreeMap<>();
for (final ClassInfo classInfo : classInfos) {
final HashSet<MethodInfo> methuds = classInfo.methuds;
for (final MethodInfo methodInfo : methuds) {
final HashSet<String> keys = methodInfo.keys;
for (final String key : keys) {
if (!info.containsKey(key)) {
- final TreeSet<String> set = new TreeSet<String>();
+ final TreeSet<String> set = new TreeSet<>();
set.add(classInfo.clazz + "." + methodInfo.methud + "()");
info.put(key, set);
} else {
@@ -280,7 +280,7 @@ public class ValidationKeysAuditorTest {
}
private Set<String> getUntestedKeys(final Set<String> testedKeys) {
- final Set<String> untestedKeys = new HashSet<String>();
+ final Set<String> untestedKeys = new HashSet<>();
for (final String key : allKeys) {
if (!testedKeys.contains(key))
untestedKeys.add(key);
@@ -289,7 +289,7 @@ public class ValidationKeysAuditorTest {
}
private Set<String> getTestedKeys(final HashSet<ClassInfo> classInfos) {
- final Set<String> testedKeys = new HashSet<String>();
+ final Set<String> testedKeys = new HashSet<>();
for (final ClassInfo classInfo : classInfos) {
final HashSet<MethodInfo> methuds = classInfo.methuds;
for (final MethodInfo methodInfo : methuds) {
@@ -300,7 +300,7 @@ public class ValidationKeysAuditorTest {
}
private static Set<String> stripPrefixes(final Set<String> allKeys) {
- final Set<String> keys = new HashSet<String>();
+ final Set<String> keys = new HashSet<>();
for (String key : allKeys) {
key = key.substring(key.indexOf(".") + 1);
if (!keys.contains(key))
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/InheritedAppExceptionTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/InheritedAppExceptionTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/InheritedAppExceptionTest.java
index 26017c3..08f3cf5 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/InheritedAppExceptionTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/InheritedAppExceptionTest.java
@@ -62,7 +62,7 @@ public class InheritedAppExceptionTest {
@Test
public void testRollback() throws Exception {
SystemInstance.init(new Properties());
- final BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo", null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<String, String>());
+ final BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo", null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<>());
cdi.addApplicationException(AE1.class, true, true);
cdi.addApplicationException(AE3.class, true, false);
cdi.addApplicationException(AE6.class, false, true);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchInRoleTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchInRoleTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchInRoleTest.java
index cf05abb..04f154b 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchInRoleTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchInRoleTest.java
@@ -220,14 +220,14 @@ public class AsynchInRoleTest {
public Future<String> testB(final long callerThreadId) {
Assert.assertFalse("testB should be executed in asynchronous mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testB";
- return new AsyncResult<String>("testB");
+ return new AsyncResult<>("testB");
}
@Override
public Future<String> testC(final long callerThreadId) {
Assert.assertTrue("testC should be executed in blocing mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testC";
- return new AsyncResult<String>("testC");
+ return new AsyncResult<>("testC");
}
@Override
@@ -261,14 +261,14 @@ public class AsynchInRoleTest {
public Future<String> testB(final long callerThreadId) {
Assert.assertFalse("testB should be executed in asynchronous mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testB";
- return new AsyncResult<String>("testB");
+ return new AsyncResult<>("testB");
}
@Override
public Future<String> testC(final long callerThreadId) {
Assert.assertTrue("testC should be executed in blocing mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testC";
- return new AsyncResult<String>("testC");
+ return new AsyncResult<>("testC");
}
@Override
@@ -298,7 +298,7 @@ public class AsynchInRoleTest {
public Future<String> testB(final long callerThreadId) {
Assert.assertFalse("testB should be executed in asynchronous mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testB";
- return new AsyncResult<String>("testB" + callerThreadId);
+ return new AsyncResult<>("testB" + callerThreadId);
}
}
@@ -317,7 +317,7 @@ public class AsynchInRoleTest {
public Future<String> testC(final long callerThreadId) {
Assert.assertTrue("testC should be executed in blocing mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testC";
- return new AsyncResult<String>("testC");
+ return new AsyncResult<>("testC");
}
@Override
@@ -362,7 +362,7 @@ public class AsynchInRoleTest {
}
Assert.assertTrue(sessionContext.wasCancelCalled());
lastInvokeMethod = "testB";
- return new AsyncResult<String>("echoB");
+ return new AsyncResult<>("echoB");
}
@Override
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchTest.java
index 29eff39..aa87667 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/asynch/AsynchTest.java
@@ -200,14 +200,14 @@ public class AsynchTest {
public Future<String> testB(final long callerThreadId) {
Assert.assertFalse("testB should be executed in asynchronous mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testB";
- return new AsyncResult<String>("testB");
+ return new AsyncResult<>("testB");
}
@Override
public Future<String> testC(final long callerThreadId) {
Assert.assertTrue("testC should be executed in blocing mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testC";
- return new AsyncResult<String>("testC");
+ return new AsyncResult<>("testC");
}
@Override
@@ -239,14 +239,14 @@ public class AsynchTest {
public Future<String> testB(final long callerThreadId) {
Assert.assertFalse("testB should be executed in asynchronous mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testB";
- return new AsyncResult<String>("testB");
+ return new AsyncResult<>("testB");
}
@Override
public Future<String> testC(final long callerThreadId) {
Assert.assertTrue("testC should be executed in blocing mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testC";
- return new AsyncResult<String>("testC");
+ return new AsyncResult<>("testC");
}
@Override
@@ -276,7 +276,7 @@ public class AsynchTest {
public Future<String> testB(final long callerThreadId) {
Assert.assertFalse("testB should be executed in asynchronous mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testB";
- return new AsyncResult<String>("testB" + callerThreadId);
+ return new AsyncResult<>("testB" + callerThreadId);
}
}
@@ -293,7 +293,7 @@ public class AsynchTest {
public Future<String> testC(final long callerThreadId) {
Assert.assertTrue("testC should be executed in blocing mode", Thread.currentThread().getId() == callerThreadId);
lastInvokeMethod = "testC";
- return new AsyncResult<String>("testC");
+ return new AsyncResult<>("testC");
}
@Override
@@ -336,7 +336,7 @@ public class AsynchTest {
}
Assert.assertTrue(sessionContext.wasCancelCalled());
lastInvokeMethod = "testB";
- return new AsyncResult<String>("echoB");
+ return new AsyncResult<>("echoB");
}
@Override
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java b/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java
index 669ede9..a97983f 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java
@@ -57,7 +57,7 @@ public class AuthorBean implements EntityBean, Cmp2Entity {
private transient boolean deleted;
private String name;
- private final Set<BookBean> books = new HashSet<BookBean>();
+ private final Set<BookBean> books = new HashSet<>();
private final transient SetValuedCmr booksCmr = new SetValuedCmr(this, "books", BookBean.class, "authors");
public AuthorBean() {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java b/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java
index 9a65148..012f4a0 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java
@@ -57,7 +57,7 @@ public class BookBean implements EntityBean, Cmp2Entity {
private transient boolean deleted;
private String title;
- private final Set<AuthorBean> authors = new HashSet<AuthorBean>();
+ private final Set<AuthorBean> authors = new HashSet<>();
private final transient SetValuedCmr authorsCmr = new SetValuedCmr(this, "authors", AuthorBean.class, "books");
public BookBean() {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/ivm/naming/IvmContextTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/ivm/naming/IvmContextTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/ivm/naming/IvmContextTest.java
index 8f6150b..3628ec7 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/ivm/naming/IvmContextTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/ivm/naming/IvmContextTest.java
@@ -60,7 +60,7 @@ public class IvmContextTest extends TestCase {
visit(context, name, new Visitor() {
public void visit(final Context context, final String name, final String parentName) throws NamingException {
- final Map<String, Object> expected = new TreeMap<String, Object>();
+ final Map<String, Object> expected = new TreeMap<>();
for (final Map.Entry<String, Integer> entry : map.entrySet()) {
String key = entry.getKey();
@@ -79,7 +79,7 @@ public class IvmContextTest extends TestCase {
}
public void setUp() throws Exception {
- map = new LinkedHashMap<String, Integer>();
+ map = new LinkedHashMap<>();
map.put("color/orange", 1);
map.put("color/blue", 2);
map.put("color/red/scarlet", 3);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/CustomMdbContainerTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/CustomMdbContainerTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/CustomMdbContainerTest.java
index 8832df4..c1c2619 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/CustomMdbContainerTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/CustomMdbContainerTest.java
@@ -153,7 +153,7 @@ public class CustomMdbContainerTest extends TestCase {
public static class EmailResourceAdapter implements javax.resource.spi.ResourceAdapter {
public boolean started;
- private final Map<String, EmailConsumer> consumers = new HashMap<String, EmailConsumer>();
+ private final Map<String, EmailConsumer> consumers = new HashMap<>();
public void start(final BootstrapContext bootstrapContext) throws ResourceAdapterInternalException {
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/JmsTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/JmsTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/JmsTest.java
index 3d1e3e8..f56c3b4 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/JmsTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/JmsTest.java
@@ -123,7 +123,7 @@ public class JmsTest extends TestCase {
MessageConsumer consumer = null;
try {
// create request
- final Map<String, Object> request = new TreeMap<String, Object>();
+ final Map<String, Object> request = new TreeMap<>();
request.put("args", new Object[]{"cheese"});
// create a new temp response queue
@@ -185,7 +185,7 @@ public class JmsTest extends TestCase {
final String returnValue = "test-" + args[0];
// create response map
- final Map<String, Object> response = new TreeMap<String, Object>();
+ final Map<String, Object> response = new TreeMap<>();
response.put("return", returnValue);
// create response message
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbInvoker.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbInvoker.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbInvoker.java
index 49541b3..8e19794 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbInvoker.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbInvoker.java
@@ -32,7 +32,7 @@ import java.util.Map;
import java.util.TreeMap;
public class MdbInvoker implements MessageListener {
- private final Map<String, Method> signatures = new TreeMap<String, Method>();
+ private final Map<String, Method> signatures = new TreeMap<>();
private final Object target;
private Connection connection;
private Session session;
@@ -100,7 +100,7 @@ public class MdbInvoker implements MessageListener {
MessageProducer producer = null;
try {
// create response
- final Map<String, Object> response = new TreeMap<String, Object>();
+ final Map<String, Object> response = new TreeMap<>();
if (exception) {
response.put("exception", "true");
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbProxy.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbProxy.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbProxy.java
index 709bf98..c84bf1c 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbProxy.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbProxy.java
@@ -99,7 +99,7 @@ public class MdbProxy {
if (session == null) throw new IllegalStateException("Proxy has been destroyed");
// create request
- final Map<String, Object> request = new TreeMap<String, Object>();
+ final Map<String, Object> request = new TreeMap<>();
final String signature = MdbUtil.getSignature(method);
request.put("method", signature);
request.put("args", args);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbTest.java
index a14b31b..7064d1a 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/MdbTest.java
@@ -57,7 +57,7 @@ public class MdbTest extends JmsTest {
connection.start();
// create request
- final Map<String, Object> request = new TreeMap<String, Object>();
+ final Map<String, Object> request = new TreeMap<>();
request.put("args", new Object[]{"cheese"});
// create a new temp response queue
@@ -160,7 +160,7 @@ public class MdbTest extends JmsTest {
final String returnValue = "test-" + args[0];
// create response map
- final Map<String, Object> response = new TreeMap<String, Object>();
+ final Map<String, Object> response = new TreeMap<>();
response.put("return", returnValue);
// create response message
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/NoMessageDeliveryTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/NoMessageDeliveryTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/NoMessageDeliveryTest.java
index 104d775..fd4867a 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/NoMessageDeliveryTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/NoMessageDeliveryTest.java
@@ -160,7 +160,7 @@ public class NoMessageDeliveryTest extends TestCase {
public static class EmailResourceAdapter implements javax.resource.spi.ResourceAdapter {
public boolean started;
- private final Map<String, EmailConsumer> consumers = new HashMap<String, EmailConsumer>();
+ private final Map<String, EmailConsumer> consumers = new HashMap<>();
public void start(final BootstrapContext bootstrapContext) throws ResourceAdapterInternalException {
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleManagedConnection.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleManagedConnection.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleManagedConnection.java
index 97098dd..a528b23 100755
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleManagedConnection.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleManagedConnection.java
@@ -46,7 +46,7 @@ public class SampleManagedConnection implements ManagedConnection {
public SampleManagedConnection(SampleManagedConnectionFactory mcf) {
this.mcf = mcf;
this.logwriter = null;
- this.listeners = Collections.synchronizedList(new ArrayList<ConnectionEventListener>(1));
+ this.listeners = Collections.synchronizedList(new ArrayList<>(1));
this.connection = null;
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleResourceAdapter.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleResourceAdapter.java b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleResourceAdapter.java
index b135df8..6918b96 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleResourceAdapter.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/mdb/connector/impl/SampleResourceAdapter.java
@@ -37,7 +37,7 @@ import java.util.concurrent.Executors;
@Connector(description = "Sample Resource Adapter", displayName = "Sample Resource Adapter", eisType = "Sample Resource Adapter", version = "1.0")
public class SampleResourceAdapter implements ResourceAdapter {
- private final Map<SampleActivationSpec, MessageEndpointFactory> targets = new ConcurrentHashMap<SampleActivationSpec, MessageEndpointFactory>();
+ private final Map<SampleActivationSpec, MessageEndpointFactory> targets = new ConcurrentHashMap<>();
private final ExecutorService threadPool = Executors.newFixedThreadPool(50);
public void start(BootstrapContext bootstrapContext) throws ResourceAdapterInternalException {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/singleton/AsyncPostContructTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/singleton/AsyncPostContructTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/singleton/AsyncPostContructTest.java
index 9f5300f..d4ead83 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/singleton/AsyncPostContructTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/singleton/AsyncPostContructTest.java
@@ -75,8 +75,8 @@ public class AsyncPostContructTest {
private Future<Boolean> future;
private final AtomicLong startEnd = new AtomicLong();
private final AtomicLong asyncStart = new AtomicLong();
- private final AtomicReference<Object> startInstance = new AtomicReference<Object>();
- private final AtomicReference<Object> asyncInstance = new AtomicReference<Object>();
+ private final AtomicReference<Object> startInstance = new AtomicReference<>();
+ private final AtomicReference<Object> asyncInstance = new AtomicReference<>();
@PostConstruct
public void start() {
@@ -94,7 +94,7 @@ public class AsyncPostContructTest {
public Future<Boolean> async() {
asyncStart.set(System.nanoTime());
asyncInstance.set(this);
- return new AsyncResult<Boolean>(true);
+ return new AsyncResult<>(true);
}
public void waitFuture() {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/EntityManagerPropogationTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/EntityManagerPropogationTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/EntityManagerPropogationTest.java
index a3ca83b..aede285 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/EntityManagerPropogationTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/EntityManagerPropogationTest.java
@@ -151,8 +151,8 @@ public class EntityManagerPropogationTest extends TestCase {
for (int l = 0; l < 10; l++) { // because Romain is not sure of the Random ;-)
Node node = (Node) ctx.lookup("ExtendedLocalBean");
- final List<Node> nodes = new ArrayList<Node>();
- final List<EntityManager> delegates = new ArrayList<EntityManager>();
+ final List<Node> nodes = new ArrayList<>();
+ final List<EntityManager> delegates = new ArrayList<>();
while (node.getChild() != null) {
nodes.add(node);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulConcurrentLookupTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulConcurrentLookupTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulConcurrentLookupTest.java
index b01388d..2509c55 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulConcurrentLookupTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulConcurrentLookupTest.java
@@ -100,7 +100,7 @@ public class StatefulConcurrentLookupTest {
final CountDownLatch startingLine = new CountDownLatch(THREAD_COUNT);
final CountDownLatch finishingLine = new CountDownLatch(THREAD_COUNT);
- final List<TestRunnable> runnables = new ArrayList<TestRunnable>();
+ final List<TestRunnable> runnables = new ArrayList<>();
int i = 0;
for (; i < THREAD_COUNT; i++) {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
index cbc87ae..45b42b3 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulContainerTest.java
@@ -249,7 +249,7 @@ public class StatefulContainerTest extends TestCase {
WidgetBean.lifecycle.clear();
expectedLifecycle = Arrays.asList(Lifecycle.values());
- inTxExpectedLifecycle = new ArrayList<Lifecycle>();
+ inTxExpectedLifecycle = new ArrayList<>();
for (final Lifecycle lifecycle : Lifecycle.values()) {
if (!lifecycle.name().startsWith("PRE_PASSIVATE") &&
!lifecycle.name().startsWith("POST_ACTIVATE")) {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSecurityPermissionsTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSecurityPermissionsTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSecurityPermissionsTest.java
index 1684474..247c5d6 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSecurityPermissionsTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulSecurityPermissionsTest.java
@@ -241,7 +241,7 @@ public class StatefulSecurityPermissionsTest extends TestCase {
}
public void login(final String user, final String... roles) throws LoginException {
- final Set<Principal> set = new HashSet<Principal>();
+ final Set<Principal> set = new HashSet<>();
set.add(new UserPrincipal(user));
for (final String role : roles) {
set.add(new GroupPrincipal(role));
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
index 3e25f43..6a878bc 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
@@ -99,7 +99,7 @@ public class StatelessPoolStatsTest extends TestCase {
* Pool MBeanInfo
*
*/
- final List<MBeanAttributeInfo> expectedAttributes = new ArrayList<MBeanAttributeInfo>();
+ final List<MBeanAttributeInfo> expectedAttributes = new ArrayList<>();
expectedAttributes.add(new MBeanAttributeInfo("AccessTimeouts", "long", "", true, false, false));
expectedAttributes.add(new MBeanAttributeInfo("AccessTimeouts.Latest", "java.lang.String", "", true, false, false));
expectedAttributes.add(new MBeanAttributeInfo("AccessTimeouts.LatestTime", "long", "", true, false, false));
@@ -147,7 +147,7 @@ public class StatelessPoolStatsTest extends TestCase {
// The hardest part, check the values of each, PoolVersion is AtomicaInteger, *.Latest are time-sensitive, so not verified.
- final Map<String, Object> expectedAttributesValue = new TreeMap<String, Object>();
+ final Map<String, Object> expectedAttributesValue = new TreeMap<>();
expectedAttributesValue.put("AccessTimeouts", (long) 0);
expectedAttributesValue.put("Aged", (long) 0);
expectedAttributesValue.put("AvailablePermits", 15);
@@ -175,8 +175,8 @@ public class StatelessPoolStatsTest extends TestCase {
// expectedAttributesValue.put("Sweeps", (long) 1);
expectedAttributesValue.put("StrictPooling", true);
- final List<MBeanAttributeInfo> actualAttributes = new ArrayList<MBeanAttributeInfo>();
- final Map<String, Object> actualAttributesValue = new TreeMap<String, Object>();
+ final List<MBeanAttributeInfo> actualAttributes = new ArrayList<>();
+ final Map<String, Object> actualAttributesValue = new TreeMap<>();
for (final MBeanAttributeInfo info : poolMBeanInfo.getAttributes()) {
actualAttributes.add(info);
if (!info.getName().endsWith(".Latest") && !info.getName().endsWith(".LatestTime")
@@ -192,14 +192,14 @@ public class StatelessPoolStatsTest extends TestCase {
final MBeanParameterInfo[] operations = {
new MBeanParameterInfo("excludeRegex", "java.lang.String", "\"\""),
new MBeanParameterInfo("includeRegex", "java.lang.String", "\"\"")};
- final List<MBeanOperationInfo> expectedOperations = new ArrayList<MBeanOperationInfo>();
+ final List<MBeanOperationInfo> expectedOperations = new ArrayList<>();
expectedOperations.add(new MBeanOperationInfo(
"FilterAttributes",
"Filters the attributes that show up in the MBeanInfo. The exclude is applied first, then any attributes that match the include are re-added. It may be required to disconnect and reconnect the JMX console to force a refresh of the MBeanInfo",
operations, "void", MBeanOperationInfo.UNKNOWN));
expectedOperations.add(new MBeanOperationInfo("flush", "", new MBeanParameterInfo[0], "void", MBeanOperationInfo.UNKNOWN));
- final List<MBeanOperationInfo> actualOperations = new ArrayList<MBeanOperationInfo>();
+ final List<MBeanOperationInfo> actualOperations = new ArrayList<>();
actualOperations.addAll(Arrays.asList(poolMBeanInfo.getOperations()));
assertEquals(expectedOperations, actualOperations);
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedBean.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedBean.java
index 9ed196e..604dbdd 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedBean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedBean.java
@@ -34,14 +34,14 @@ public class FullyInterceptedBean extends FullyInterceptedSuperClass implements
@Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
public List<String> businessMethod() {
- final List<String> list = new ArrayList<String>();
+ final List<String> list = new ArrayList<>();
list.add("businessMethod");
return list;
}
@Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
public List<String> methodWithDefaultInterceptorsExcluded() {
- final List<String> list = new ArrayList<String>();
+ final List<String> list = new ArrayList<>();
list.add("methodWithDefaultInterceptorsExcluded");
return list;
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedTest.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedTest.java
index 6dde27c..65794d4 100755
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyInterceptedTest.java
@@ -65,7 +65,7 @@ public class FullyInterceptedTest extends TestCase {
public void testBusinessMethod() throws Exception {
assert fullyIntercepted != null;
- final List<String> expected = new ArrayList<String>();
+ final List<String> expected = new ArrayList<>();
expected.add("DefaultInterceptorOne");
expected.add("DefaultInterceptorTwo");
expected.add("ClassLevelInterceptorSuperClassOne");
@@ -85,7 +85,7 @@ public class FullyInterceptedTest extends TestCase {
public void testMethodWithDefaultInterceptorsExcluded() throws Exception {
assert fullyIntercepted != null;
- final List<String> expected = new ArrayList<String>();
+ final List<String> expected = new ArrayList<>();
expected.add("ClassLevelInterceptorSuperClassOne");
expected.add("ClassLevelInterceptorSuperClassTwo");
expected.add("ClassLevelInterceptorOne");
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlySLSBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlySLSBean.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlySLSBean.java
index 4aa1d02..f84fb77 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlySLSBean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlySLSBean.java
@@ -28,7 +28,7 @@ public class MethodLevelInterceptorOnlySLSBean implements MethodLevelInterceptor
@Interceptors(MethodLevelInterceptorOne.class)
public List<String> makePersistent(final String entity) {
- final List<String> list = new ArrayList<String>();
+ final List<String> list = new ArrayList<>();
list.add("makePersistent");
return list;
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlyTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlyTest.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlyTest.java
index 1dab63f..f21b2bd 100755
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlyTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlyTest.java
@@ -59,7 +59,7 @@ public class MethodLevelInterceptorOnlyTest extends TestCase {
assert bean != null;
- final List<String> expected = new ArrayList<String>();
+ final List<String> expected = new ArrayList<>();
expected.add("MethodLevelInterceptorOne");
expected.add("makePersistent");
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedBean.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedBean.java
index 58c431c..4332e71 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedBean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedBean.java
@@ -32,7 +32,7 @@ public class SecondStatelessInterceptedBean implements SecondStatelessIntercepte
@Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
public List<String> methodWithDefaultInterceptorsExcluded() {
- final List<String> list = new ArrayList<String>();
+ final List<String> list = new ArrayList<>();
list.add("methodWithDefaultInterceptorsExcluded");
return list;
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedTest.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedTest.java
index 75e59dc..7882874 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/SecondStatelessInterceptedTest.java
@@ -60,7 +60,7 @@ public class SecondStatelessInterceptedTest extends TestCase {
assert bean != null;
- final List<String> expected = new ArrayList<String>();
+ final List<String> expected = new ArrayList<>();
expected.add("ClassLevelInterceptorOne");
expected.add("ClassLevelInterceptorTwo");
expected.add("MethodLevelInterceptorOne");
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBean.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBean.java
index b148b48..5dc7a35 100755
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBean.java
@@ -35,7 +35,7 @@ public class ThirdSLSBean implements ThirdSLSBeanLocal {
@Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
public List<String> businessMethod() {
- final List<String> list = new ArrayList<String>();
+ final List<String> list = new ArrayList<>();
list.add("businessMethod");
return list;
}
@@ -43,7 +43,7 @@ public class ThirdSLSBean implements ThirdSLSBeanLocal {
@Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
@ExcludeClassInterceptors
public List<String> anotherBusinessMethod() {
- final List<String> list = new ArrayList<String>();
+ final List<String> list = new ArrayList<>();
list.add("anotherBusinessMethod");
return list;
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBeanTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBeanTest.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBeanTest.java
index c43ac68..7ebd151 100755
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBeanTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/ThirdSLSBeanTest.java
@@ -59,7 +59,7 @@ public class ThirdSLSBeanTest extends TestCase {
public void testMethodWithDefaultInterceptorsExcluded() throws Exception {
assert bean != null;
- final List<String> expected = new ArrayList<String>();
+ final List<String> expected = new ArrayList<>();
expected.add("ClassLevelInterceptorOne");
expected.add("ClassLevelInterceptorTwo");
expected.add("MethodLevelInterceptorOne");
@@ -75,7 +75,7 @@ public class ThirdSLSBeanTest extends TestCase {
public void testMethodWithDefaultAndClassInterceptorsExcluded() throws Exception {
assert bean != null;
- final List<String> expected = new ArrayList<String>();
+ final List<String> expected = new ArrayList<>();
expected.add("MethodLevelInterceptorOne");
expected.add("MethodLevelInterceptorTwo");
expected.add("ThirdSLSBean");
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/interceptors/Utils.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/Utils.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/Utils.java
index f6a8c03..bbeba4e 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/Utils.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/Utils.java
@@ -26,7 +26,7 @@ import java.util.List;
public class Utils {
public static List<String> addClassSimpleName(final InvocationContext ic, final String classSimpleName) throws Exception {
- final List<String> list = new ArrayList<String>();
+ final List<String> list = new ArrayList<>();
list.add(classSimpleName);
final List<String> listOfStrings = (List<String>) ic.proceed();
if (listOfStrings != null) {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/meta/MetaTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/meta/MetaTest.java b/container/openejb-core/src/test/java/org/apache/openejb/meta/MetaTest.java
index 1c0ab19..23633f7 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/meta/MetaTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/meta/MetaTest.java
@@ -145,7 +145,7 @@ public @interface MetaTest {
assembler.createTransactionManager(factory.configureService(TransactionServiceInfo.class));
assembler.createSecurityService(factory.configureService(SecurityServiceInfo.class));
- final ArrayList<File> files = new ArrayList<File>();
+ final ArrayList<File> files = new ArrayList<>();
{ // expected archive
final HashMap map = new HashMap();
@@ -181,7 +181,7 @@ public @interface MetaTest {
private Class[] getClasses(final MetaTest annotation) {
final Class clazz = annotation.actual();
- final List<Class> classes = new ArrayList<Class>();
+ final List<Class> classes = new ArrayList<>();
getClasses(clazz, classes);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/persistence/JtaEntityManagerTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/persistence/JtaEntityManagerTest.java b/container/openejb-core/src/test/java/org/apache/openejb/persistence/JtaEntityManagerTest.java
index 3660691..4a25642 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/persistence/JtaEntityManagerTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/persistence/JtaEntityManagerTest.java
@@ -42,7 +42,7 @@ public class JtaEntityManagerTest {
assertTrue(JtaEntityManager.isJPA21(new ReloadableEntityManagerFactory(
loader,
- new EntityManagerFactoryCallable(Jpa21Provider.class.getName(), info, loader, new HashMap<ComparableValidationConfig, ValidatorFactory>(), false),
+ new EntityManagerFactoryCallable(Jpa21Provider.class.getName(), info, loader, new HashMap<>(), false),
info)));
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/resource/AutoConnectionTrackerTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/resource/AutoConnectionTrackerTest.java b/container/openejb-core/src/test/java/org/apache/openejb/resource/AutoConnectionTrackerTest.java
index 598a4bc..529bb50 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/resource/AutoConnectionTrackerTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/resource/AutoConnectionTrackerTest.java
@@ -375,7 +375,7 @@ public class AutoConnectionTrackerTest extends TestCase {
public static class FakeManagedConnection implements ManagedConnection {
private final Logger logger = Logger.getInstance(LogCategory.OPENEJB_CONNECTOR, FakeManagedConnection.class);
private final FakeManagedConnectionFactory mcf;
- private final List<ConnectionEventListener> listeners = new ArrayList<ConnectionEventListener>();
+ private final List<ConnectionEventListener> listeners = new ArrayList<>();
private FakeConnection connection;
private PrintWriter writer;
@@ -530,7 +530,7 @@ public class AutoConnectionTrackerTest extends TestCase {
public static class LogCaptureHandler extends Handler {
- private List<LogRecord> recordList = Collections.synchronizedList(new ArrayList<LogRecord>());
+ private List<LogRecord> recordList = Collections.synchronizedList(new ArrayList<>());
@Override
public void publish(final LogRecord record) {
@@ -548,8 +548,8 @@ public class AutoConnectionTrackerTest extends TestCase {
}
public List<LogRecord> find(final String message) {
- final List<LogRecord> allRecords = new ArrayList<LogRecord>(recordList);
- final List<LogRecord> matchingRecords = new ArrayList<LogRecord>();
+ final List<LogRecord> allRecords = new ArrayList<>(recordList);
+ final List<LogRecord> matchingRecords = new ArrayList<>();
for (final LogRecord record : allRecords) {
if (record.getMessage().contains(message)) {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/DynamicDataSourceTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/DynamicDataSourceTest.java b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/DynamicDataSourceTest.java
index 8b03d45..a601501 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/DynamicDataSourceTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/DynamicDataSourceTest.java
@@ -140,7 +140,7 @@ public class DynamicDataSourceTest {
final Context ctx = new InitialContext();
// running persist on all "routed" databases
- final List<String> databases = new ArrayList<String>();
+ final List<String> databases = new ArrayList<>();
databases.add("database1");
databases.add("database2");
databases.add("database3");
@@ -247,7 +247,7 @@ public class DynamicDataSourceTest {
private String dataSourceNames;
private String defaultDataSourceName;
private Map<String, DataSource> dataSources = null;
- private final ThreadLocal<DataSource> currentDataSource = new ThreadLocal<DataSource>();
+ private final ThreadLocal<DataSource> currentDataSource = new ThreadLocal<>();
/**
* @param datasourceList datasource resource name, separator is a space
@@ -260,7 +260,7 @@ public class DynamicDataSourceTest {
* lookup datasource in openejb resources
*/
private void init() {
- dataSources = new ConcurrentHashMap<String, DataSource>();
+ dataSources = new ConcurrentHashMap<>();
for (final String ds : dataSourceNames.split(" ")) {
final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/MultiThreadedManagedDataSourceTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/MultiThreadedManagedDataSourceTest.java b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/MultiThreadedManagedDataSourceTest.java
index 7f908c6..9c116eb 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/MultiThreadedManagedDataSourceTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/MultiThreadedManagedDataSourceTest.java
@@ -152,7 +152,7 @@ public class MultiThreadedManagedDataSourceTest {
final AtomicInteger errors = new AtomicInteger(0);
final AtomicInteger fail = new AtomicInteger(0);
final AtomicInteger ok = new AtomicInteger(0);
- final List<Exception> ex = new CopyOnWriteArrayList<Exception>();
+ final List<Exception> ex = new CopyOnWriteArrayList<>();
run(new Runnable() {
@Override
public void run() {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetomany/ExampleABean_ABean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetomany/ExampleABean_ABean.java b/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetomany/ExampleABean_ABean.java
index 45658a7..42d4c3b 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetomany/ExampleABean_ABean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetomany/ExampleABean_ABean.java
@@ -28,10 +28,10 @@ public class ExampleABean_ABean extends ArtistBean implements Cmp2Entity {
private transient boolean deleted;
private Integer field1;
private String field2;
- private final Set<ExampleBBean_BBean> b = new HashSet<ExampleBBean_BBean>();
+ private final Set<ExampleBBean_BBean> b = new HashSet<>();
private final SetValuedCmr bCmr = new SetValuedCmr(this, "b", ExampleBBean_BBean.class, "a");
- private final Set<ExampleBBean_BBean> bNonCascade = new HashSet<ExampleBBean_BBean>();
+ private final Set<ExampleBBean_BBean> bNonCascade = new HashSet<>();
private final SetValuedCmr bNonCascadeCmr = new SetValuedCmr(this, "bNonCascade", ExampleBBean_BBean.class, "aNonCascade");
public Integer getId() {
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleABean_ABean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleABean_ABean.java b/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleABean_ABean.java
index 35a0379..80e4db9 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleABean_ABean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleABean_ABean.java
@@ -26,7 +26,7 @@ public class ExampleABean_ABean extends PersonBean implements Cmp2Entity {
private Integer id;
private String name;
private ExampleBBean_BBean License;
- private final SingleValuedCmr<ExampleBBean_BBean, LicenseLocal> bCmr = new SingleValuedCmr<ExampleBBean_BBean, LicenseLocal>(this, "b", ExampleBBean_BBean.class, "a");
+ private final SingleValuedCmr<ExampleBBean_BBean, LicenseLocal> bCmr = new SingleValuedCmr<>(this, "b", ExampleBBean_BBean.class, "a");
public Integer getId() {
return id;
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleBBean_BBean.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleBBean_BBean.java b/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleBBean_BBean.java
index 0bd4e29..e20e055 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleBBean_BBean.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/test/entity/cmr/onetoone/ExampleBBean_BBean.java
@@ -28,7 +28,7 @@ public class ExampleBBean_BBean extends LicenseBean implements Cmp2Entity {
private Integer field3;
private String field4;
private ExampleABean_ABean a;
- private final SingleValuedCmr<ExampleABean_ABean, PersonLocal> aCmr = new SingleValuedCmr<ExampleABean_ABean, PersonLocal>(this, "a", ExampleABean_ABean.class, "b");
+ private final SingleValuedCmr<ExampleABean_ABean, PersonLocal> aCmr = new SingleValuedCmr<>(this, "a", ExampleABean_ABean.class, "b");
public Integer getId() {
return field1;
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/transaction/TransactionRollbackCauseTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/transaction/TransactionRollbackCauseTest.java b/container/openejb-core/src/test/java/org/apache/openejb/transaction/TransactionRollbackCauseTest.java
index 9e12395..3766469 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/transaction/TransactionRollbackCauseTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/transaction/TransactionRollbackCauseTest.java
@@ -44,7 +44,7 @@ public class TransactionRollbackCauseTest extends TestCase {
private UserTransaction userTransaction;
public void test() throws Exception {
- final Map<String, Object> map = new HashMap<String, Object>();
+ final Map<String, Object> map = new HashMap<>();
map.put(EJBContainer.MODULES, new SingletonBean(Orange.class));
EJBContainer.createEJBContainer(map).getContext().bind("inject", this);
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/util/Archives.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/util/Archives.java b/container/openejb-core/src/test/java/org/apache/openejb/util/Archives.java
index cd75791..ecdc00c 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/util/Archives.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/util/Archives.java
@@ -43,7 +43,7 @@ import static org.junit.Assert.assertTrue;
public class Archives {
public static File fileArchive(final Class[] classes) throws IOException {
- return fileArchive(new HashMap<String, String>(), classes);
+ return fileArchive(new HashMap<>(), classes);
}
@SuppressWarnings("unchecked")
http://git-wip-us.apache.org/repos/asf/tomee/blob/bfb1ed40/container/openejb-core/src/test/java/org/apache/openejb/util/DynamicEJBImplTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/util/DynamicEJBImplTest.java b/container/openejb-core/src/test/java/org/apache/openejb/util/DynamicEJBImplTest.java
index 0b57e41..54f98c4 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/util/DynamicEJBImplTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/util/DynamicEJBImplTest.java
@@ -177,7 +177,7 @@ public class DynamicEJBImplTest {
@Test
public void query() {
- final Map<String, String> params = new HashMap<String, String>();
+ final Map<String, String> params = new HashMap<>();
params.put("name", "foo");
Collection<User> users = dao.namedQuery("dynamic-ejb-impl-test.query", params, 0, 100);
@@ -203,7 +203,7 @@ public class DynamicEJBImplTest {
@Test
public void inheritance() {
- final Map<String, String> params = new HashMap<String, String>();
+ final Map<String, String> params = new HashMap<>();
params.put("name", "foo");
Collection<User> users = child.namedQuery("dynamic-ejb-impl-test.query", params, 0, 100);