From e409bcd51428cacfee12beb46901893158bb0a75 Mon Sep 17 00:00:00 2001 From: Snigdha Sucharita Patra Date: Mon, 29 Jan 2018 11:46:37 +0530 Subject: sonar critical throw a dedicated exception Define and throw a dedicated exception instead of using a generic one Sonar Link: https://sonar.onap.org/component_issues?id=org.onap.dcaegen2.platform%3Ainventory-api#resolved=false|severities=CRITICAL|assignees=Snigdha503415 Location: src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java Line No-134 Change-Id: I94f4d39fd55dc11c1459971074944fc2ff589cae Issue-ID: DCAEGEN2-214 Signed-off-by: Snigdha Sucharita Patra --- src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/onap/dcae/inventory/daos') diff --git a/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java b/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java index b5f0b04..717d8c9 100644 --- a/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java +++ b/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java @@ -131,7 +131,7 @@ public final class InventoryDAOManager { LOG.info(String.format("Sql view created: %s", viewName)); } } catch (Exception e) { - throw new RuntimeException("", e); + throw new InventoryDAOManagerSetupException("view does not exist, " + e); } // Do this assignment at the end after performing table checks to ensure that connection is good -- cgit 1.2.3-korg