From 2c3be92eccd45ebad09d4fea7245f11a3c14f583 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Fri, 2 Mar 2018 19:47:30 -0500 Subject: Replace explicit type with dimond type Change-Id: I1dedb9ef1ca7b734e3cfc0a3a594d733dbd298d4 Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java | 4 ++-- .../main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java | 4 ++-- common/src/main/java/org/openecomp/mso/utils/CheckResults.java | 2 +- .../mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'common') diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java b/common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java index 7b9c6a5166..b2b8d0aa33 100644 --- a/common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java +++ b/common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java @@ -162,8 +162,8 @@ public class MsoAlarmLogger implements ServletContextListener { encoder.setPattern(logPattern); encoder.setContext(context); encoder.start(); - RollingFileAppender fileAppender=new RollingFileAppender(); - TimeBasedRollingPolicy rollingPolicy=new TimeBasedRollingPolicy(); + RollingFileAppender fileAppender= new RollingFileAppender<>(); + TimeBasedRollingPolicy rollingPolicy= new TimeBasedRollingPolicy<>(); rollingPolicy.setContext(context); rollingPolicy.setFileNamePattern(msoAlarmFile + ".%d"); rollingPolicy.setParent(fileAppender); diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java b/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java index cf69cf92c8..3f81734796 100644 --- a/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java +++ b/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java @@ -78,7 +78,7 @@ public class MsoPropertiesFactory implements Serializable { // Hardcode if nothing is received prefixMsoPropertiesPath = ""; } - msoPropertiesCache = new ConcurrentHashMap (); + msoPropertiesCache = new ConcurrentHashMap<>(); } private static final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock (); @@ -268,7 +268,7 @@ public class MsoPropertiesFactory implements Serializable { */ public List getAllMsoProperties () { - List resultList = new LinkedList (); + List resultList = new LinkedList<>(); rwl.readLock ().lock (); try { diff --git a/common/src/main/java/org/openecomp/mso/utils/CheckResults.java b/common/src/main/java/org/openecomp/mso/utils/CheckResults.java index 75337f0cf1..ad0344d028 100644 --- a/common/src/main/java/org/openecomp/mso/utils/CheckResults.java +++ b/common/src/main/java/org/openecomp/mso/utils/CheckResults.java @@ -36,7 +36,7 @@ public class CheckResults { private List results; public CheckResults () { - results = new ArrayList (); + results = new ArrayList<>(); } public List getResults () { diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java index f038cbc851..a814c4ea9c 100644 --- a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java +++ b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java @@ -146,7 +146,7 @@ public class MsoPropertiesFactoryConcurrencyTest { public final void testGetMsoProperties() throws MsoPropertiesException, InterruptedException, ExecutionException, FileNotFoundException { - List> list = new ArrayList>(); + List> list = new ArrayList<>(); ExecutorService executor = Executors.newFixedThreadPool(20); for (int i = 0; i <= 100000; i++) { -- cgit 1.2.3-korg