diff options
author | Parshad Patel <pars.patel@samsung.com> | 2018-11-27 15:36:08 +0900 |
---|---|---|
committer | Tal Gitelman <tal.gitelman@att.com> | 2018-11-29 11:12:38 +0000 |
commit | 82c84075c71e285d1009bbe7e183ad2f0358d335 (patch) | |
tree | 93cd6a3c8b39318d63504a1abe0d34d096fe2f92 /asdctool/src/main/java/org | |
parent | 55c897b36c7bf0f123e561e5f334ca4d7fcc14bb (diff) |
Fix critical sonar issues
Fix rethrow the "InterruptedException" and Use "isAssignableFrom" sonar issues
Issue-ID: SDC-1895
Change-Id: I2cadc08b9e7acdc84cf25a3ce9d22199711afa5d
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'asdctool/src/main/java/org')
2 files changed, 2 insertions, 1 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java index 28a5bbdb24..8b89cc2706 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java @@ -133,7 +133,7 @@ public class TitanGraphInitializer { PropertyKey propKey = null; if (!graphMgt.containsPropertyKey(prop.getProperty())) { Class<?> clazz = prop.getClazz(); - if (!ArrayList.class.getName().equals(clazz.getName()) && !HashMap.class.getName().equals(clazz.getName())) { + if (!clazz.isAssignableFrom(ArrayList.class) && !clazz.isAssignableFrom(HashMap.class)) { propKey = graphMgt.makePropertyKey(prop.getProperty()).dataType(prop.getClazz()).make(); } } else { diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java index 4b9af31092..c63749e0d6 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java @@ -1110,6 +1110,7 @@ public class UpgradeMigration1710 implements PostMigration { } } catch (InterruptedException e) { log.error("Error occurred: {}", e.getMessage()); + Thread.currentThread().interrupt(); } } return false; |