diff options
author | 2018-01-29 14:33:42 +0530 | |
---|---|---|
committer | 2018-01-29 14:34:29 +0530 | |
commit | 2342bb1b5e101354319a30d62bb02bfde0d3805d (patch) | |
tree | a91ba3e2a698fa16aebf268d84241f27abf76c3b /src/main/java/org/onap/dcae | |
parent | e409bcd51428cacfee12beb46901893158bb0a75 (diff) |
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-143
Change-Id: I52ecbd360bff6efa8906623ae7345ef694491d6b
Issue-ID: DCAEGEN2-215
Signed-off-by: Snigdha Sucharita Patra <sp00503415@techmahindra.com>
Diffstat (limited to 'src/main/java/org/onap/dcae')
-rw-r--r-- | src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
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 717d8c9..c2527e2 100644 --- a/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java +++ b/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java @@ -140,7 +140,7 @@ public final class InventoryDAOManager { private InventoryDAO getDAO(Class<? extends InventoryDAO> klass) { if (jdbi == null) { - throw new RuntimeException("InventoryDAOManager has not been initialized!"); + throw new InventoryDAOManagerSetupException("InventoryDAOManager has not been initialized!"); } // Using this approach to constructing the DAO, the client is not responsible for closing the handle. |