aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java10
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java16
2 files changed, 10 insertions, 16 deletions
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java
index e8fc346494..68d61fe434 100644
--- a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java
+++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java
@@ -29,4 +29,14 @@ import lombok.Setter;
public class TestModel {
private Integer field1;
private String field2;
+ private TestModelInternalClass testModelInternalClass;
+
+
+ @Setter
+ @Getter
+ @NoArgsConstructor
+ public static class TestModelInternalClass {
+ private Integer field1;
+ private String field2;
+ }
}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java
index fcb668f393..ae7d44efd8 100644
--- a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java
@@ -167,12 +167,6 @@ public class CommonUtil {
&& fileOrigin.equalsIgnoreCase(OnboardingTypesEnum.ZIP.toString());
}
- public static Set<String> getClassFieldNames(Class<? extends Object> classType) {
- Set<String> fieldNames = new HashSet<>();
- Arrays.stream(classType.getDeclaredFields()).forEach(field -> fieldNames.add(field.getName()));
-
- return fieldNames;
- }
public static <T> Optional<T> createObjectUsingSetters(Object objectCandidate,
Class<T> classToCreate)
@@ -180,16 +174,6 @@ public class CommonUtil {
return org.onap.sdc.tosca.services.CommonUtil.createObjectUsingSetters(objectCandidate, classToCreate);
}
- private static boolean isComplexClass(Field field) {
- return !field.getType().equals(Map.class)
- && !field.getType().equals(String.class)
- && !field.getType().equals(Integer.class)
- && !field.getType().equals(Float.class)
- && !field.getType().equals(Double.class)
- && !field.getType().equals(Set.class)
- && !field.getType().equals(Object.class)
- && !field.getType().equals(List.class);
- }
public static Map<String, Object> getObjectAsMap(Object obj) {
return org.onap.sdc.tosca.services.CommonUtil.getObjectAsMap(obj);