diff options
Diffstat (limited to 'misc/env')
7 files changed, 16 insertions, 16 deletions
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/StoreImpl.java b/misc/env/src/main/java/org/onap/aaf/misc/env/StoreImpl.java index 54b0ce83..685bfb6e 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/StoreImpl.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/StoreImpl.java @@ -65,21 +65,21 @@ public class StoreImpl implements Store { public StoreImpl() {
staticState = new Object[growSize];
- staticMap = new HashMap<String,StaticSlot>();
- localMap = new HashMap<String,Slot>();
+ staticMap = new HashMap<>();
+ localMap = new HashMap<>();
}
public StoreImpl(String tag) {
staticState = new Object[growSize];
- staticMap = new HashMap<String,StaticSlot>();
- localMap = new HashMap<String,Slot>();
+ staticMap = new HashMap<>();
+ localMap = new HashMap<>();
}
public StoreImpl(String tag, String[] args) {
staticState = new Object[growSize];
- staticMap = new HashMap<String,StaticSlot>();
- localMap = new HashMap<String,Slot>();
+ staticMap = new HashMap<>();
+ localMap = new HashMap<>();
if(tag!=null) {
String tequals = tag + '=';
@@ -102,8 +102,8 @@ public class StoreImpl implements Store { public StoreImpl(String tag, Properties props) {
staticState = new Object[growSize];
- staticMap = new HashMap<String,StaticSlot>();
- localMap = new HashMap<String,Slot>();
+ staticMap = new HashMap<>();
+ localMap = new HashMap<>();
if(tag!=null) {
String fname = props.getProperty(tag);
@@ -191,7 +191,7 @@ public class StoreImpl implements Store { * @see com.att.env.Store#existingSlotNames()
*/
public List<String> existingSlotNames() {
- return new ArrayList<String>(localMap.keySet());
+ return new ArrayList<>(localMap.keySet());
}
/* (non-Javadoc)
@@ -234,7 +234,7 @@ public class StoreImpl implements Store { }
public List<String> existingStaticSlotNames() {
- return new ArrayList<String>(staticMap.keySet());
+ return new ArrayList<>(staticMap.keySet());
}
}
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java b/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java index f10de386..e378e2c3 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java @@ -37,7 +37,7 @@ public abstract class AbsTrans<ENV extends Env> implements TransStore { private static final Object[] EMPTYO = new Object[0];
protected ENV delegate;
- protected List<TimeTaken> trail = new ArrayList<TimeTaken>(30);
+ protected List<TimeTaken> trail = new ArrayList<>(30);
private Object[] state;
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/impl/BasicEnv.java b/misc/env/src/main/java/org/onap/aaf/misc/env/impl/BasicEnv.java index 2a3628d3..cd62a7e5 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/impl/BasicEnv.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/impl/BasicEnv.java @@ -84,7 +84,7 @@ public class BasicEnv extends StoreImpl implements EnvJAXB, TransCreate<TransJAX */
public BasicEnv(Applet applet, String ... tags) {
super(null, tags);
-// props = new HashMap<String, String>();
+// props = new HashMap<>();
// String value;
// for(int i=0;i<tags.length;++i) {
// value = applet.getParameter(tags[i]);
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java index 127eb154..4a01d8b1 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java @@ -64,7 +64,7 @@ import org.onap.aaf.misc.env.util.Pool.Pooled; */
public class JAXBmar {
// Need to store off possible JAXBContexts based on Class, which will be stored in Creator
- private static Map<Class<?>[],Pool<PMarshaller>> pools = new HashMap<Class<?>[], Pool<PMarshaller>>();
+ private static Map<Class<?>[],Pool<PMarshaller>> pools = new HashMap<>();
// Handle Marshaller class setting of properties only when needed
private class PMarshaller {
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java index 74072aaf..0c078a98 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java @@ -68,7 +68,7 @@ import org.w3c.dom.Node; */
public class JAXBumar {
// Need to store off possible JAXBContexts based on Class, which will be stored in Creator
- private static Map<Class<?>[],Pool<SUnmarshaller>> pools = new HashMap<Class<?>[], Pool<SUnmarshaller>>();
+ private static Map<Class<?>[],Pool<SUnmarshaller>> pools = new HashMap<>();
private Class<?> cls;
private Schema schema;
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/util/Pool.java b/misc/env/src/main/java/org/onap/aaf/misc/env/util/Pool.java index 1694a011..82f05b4a 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/util/Pool.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/util/Pool.java @@ -104,7 +104,7 @@ public class Pool<T> { public Pool(Creator<T> creator) {
count = spares = 0;
this.creator = creator;
- list = new LinkedList<Pooled<T>>();
+ list = new LinkedList<>();
}
/**
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/util/RefreshableThreadObject.java b/misc/env/src/main/java/org/onap/aaf/misc/env/util/RefreshableThreadObject.java index 56cd54e5..6892a4b5 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/util/RefreshableThreadObject.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/util/RefreshableThreadObject.java @@ -69,7 +69,7 @@ public class RefreshableThreadObject<T extends Creatable<T>> { * @throws APIException
*/
public RefreshableThreadObject(Class<T> clss) throws APIException {
- objs = new ConcurrentHashMap<Thread,T>();
+ objs = new ConcurrentHashMap<>();
try {
cnst = clss.getConstructor(new Class[]{Env.class} );
} catch (Exception e) {
|