aboutsummaryrefslogtreecommitdiffstats
path: root/aai-core/src/main/java/org/onap/aai/introspection/Introspector.java
diff options
context:
space:
mode:
Diffstat (limited to 'aai-core/src/main/java/org/onap/aai/introspection/Introspector.java')
-rw-r--r--aai-core/src/main/java/org/onap/aai/introspection/Introspector.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/introspection/Introspector.java b/aai-core/src/main/java/org/onap/aai/introspection/Introspector.java
index c9e1f455..87983d8d 100644
--- a/aai-core/src/main/java/org/onap/aai/introspection/Introspector.java
+++ b/aai-core/src/main/java/org/onap/aai/introspection/Introspector.java
@@ -103,9 +103,10 @@ public abstract class Introspector implements Cloneable {
Class<?> clazz = this.getClass(name);
if (this.isListType(name) && result == null) {
try {
- this.set(convertedName, clazz.newInstance());
+ this.set(convertedName, clazz.getDeclaredConstructor().newInstance());
result = this.get(convertedName);
- } catch (DynamicException | InstantiationException | IllegalAccessException e) {
+ } catch (DynamicException | InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException | NoSuchMethodException | SecurityException e) {
LOGGER.warn(e.getMessage(), e);
}
}
@@ -127,9 +128,10 @@ public abstract class Introspector implements Cloneable {
Class<?> clazz = this.getClass(name);
if (this.isListType(name) && value == null) {
try {
- this.set(convertedName, clazz.newInstance());
+ this.set(convertedName, clazz.getDeclaredConstructor().newInstance());
value = this.get(convertedName);
- } catch (DynamicException | InstantiationException | IllegalAccessException e) {
+ } catch (DynamicException | InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException | NoSuchMethodException | SecurityException e) {
LOGGER.warn(e.getMessage(), e);
}
}
@@ -159,9 +161,10 @@ public abstract class Introspector implements Cloneable {
Class<?> clazz = this.getClass(name);
if (isListType && value == null) {
try {
- this.set(convertedName, clazz.newInstance());
+ this.set(convertedName, clazz.getDeclaredConstructor().newInstance());
value = this.get(convertedName);
- } catch (DynamicException | InstantiationException | IllegalAccessException e) {
+ } catch (DynamicException | InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException | NoSuchMethodException | SecurityException e) {
LOGGER.warn(e.getMessage(), e);
}
}