Sonar Major issues 97/62997/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 27 Aug 2018 07:25:35 +0000 (12:55 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 27 Aug 2018 07:25:35 +0000 (12:55 +0530)
 Replace the type specification in this constructor call with the diamond operator

Sonar Link:
https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AV4-VadZ32hFUzlqc5qX&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/dmf/mr/beans/DMaaPNsaApiDb.java
Line No- L91 L103

Change-Id: I093fde71871e39a667a943b4f6386fe39769c4b1
Issue-ID: DMAAP-650
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/com/att/dmf/mr/beans/DMaaPNsaApiDb.java

index b6fcbf5..963ff2d 100644 (file)
@@ -88,7 +88,7 @@ public class DMaaPNsaApiDb {
                // if neither value was provided, don't encrypt api key db
                if (keyBase64 == null && initVectorBase64 == null) {
                        log.info("This server is configured to use an unencrypted API key database. See the settings documentation.");
-                       return new BaseNsaApiDbImpl<NsaSimpleApiKey>(cdb,
+                       return new BaseNsaApiDbImpl<>(cdb,
                                        new NsaSimpleApiKeyFactory());
                } else if (keyBase64 == null) {
                        // neither or both, otherwise something's goofed
@@ -100,7 +100,7 @@ public class DMaaPNsaApiDb {
                        log.info("This server is configured to use an encrypted API key database.");
                        final Key key = EncryptingLayer.readSecretKey(keyBase64);
                        final byte[] iv = rrConvertor.base64Decode(initVectorBase64);
-                       return new EncryptingApiDbImpl<NsaSimpleApiKey>(cdb,
+                       return new EncryptingApiDbImpl<>(cdb,
                                        new NsaSimpleApiKeyFactory(), key, iv);
                }
        }