summaryrefslogtreecommitdiffstats
path: root/aai-core/src/main/java
diff options
context:
space:
mode:
authorDavid Brilla <david.brilla@tieto.com>2020-02-11 15:32:52 +0100
committerDavid Brilla <david.brilla@tieto.com>2020-02-11 17:02:16 +0100
commit2fc06a2adc033666785d4889576584d6b6c7d934 (patch)
tree12a836dd0e56fe245c8ce3269062f6aefb91ca60 /aai-core/src/main/java
parent6cd3a885616a0842fbc2d873d71b343b55489600 (diff)
Use isAssignableFrom instead
Change from class -> string -> equals to isAssignableFrom Issue-ID: AAI-2786 Change-Id: I0f48ad5b7ad5728b397c54bfa883fea9431dd0a5 Signed-off-by: David Brilla <david.brilla@tieto.com>
Diffstat (limited to 'aai-core/src/main/java')
-rw-r--r--aai-core/src/main/java/org/onap/aai/introspection/Introspector.java6
1 files changed, 3 insertions, 3 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 9e599a64..11e6233f 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
@@ -177,7 +177,7 @@ public abstract class Introspector implements Cloneable {
if (obj != null) {
try {
- if (!obj.getClass().getName().equals(nameClass.getName())) {
+ if (!nameClass.isAssignableFrom(obj.getClass())) {
if (nameClass.isPrimitive()) {
nameClass = ClassUtils.primitiveToWrapper(nameClass);
result = nameClass.getConstructor(String.class).newInstance(obj.toString());
@@ -349,7 +349,7 @@ public abstract class Introspector implements Cloneable {
/**
* This will returned the generic parameterized type of the underlying
* object if it exists
- *
+ *
* @param name
* @return the generic type of the java class of the underlying object
*/
@@ -414,7 +414,7 @@ public abstract class Introspector implements Cloneable {
/**
* Is this type not a Java String or primitive
- *
+ *
* @param name
* @return
*/