Define and throw a dedicated exception instead of using a generic one
Sonar Link:
https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AV4-ValN32hFUzlqc5zj&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/cambria/service/impl/UIServiceImpl.java
Line No-118
Change-Id: Ief99865ceb889340c2895b023cede8c355052c19
Issue-ID: DMAAP-407
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
DMaaPResponseBuilder.respondOk(dmaapContext, key.asJsonObject());
} else {
LOGGER.info("Details of apikey [" + apiKey + "] not found. Returning response");
- throw new Exception("Key [" + apiKey + "] not found.");
+ throw new IOException("Key [" + apiKey + "] not found.");
}
}