Sonar major issues 63/62063/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Thu, 23 Aug 2018 11:15:36 +0000 (16:45 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Thu, 23 Aug 2018 11:15:36 +0000 (16:45 +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.dmaapclient%3AdmaapClient&open=AV4-MbUO32hFUzlqc5g5&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/test/support/MRBatchingPublisherMock.java
Line No- L54 L88 L154 L178

Change-Id: I74e590275efd6221f6395a9a28d4e73a0bb643a4
Issue-ID: DMAAP-633
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/com/att/nsa/mr/test/support/MRBatchingPublisherMock.java

index 3c123b1..56bec36 100644 (file)
@@ -61,7 +61,7 @@ public class MRBatchingPublisherMock implements MRBatchingPublisher
 
        public MRBatchingPublisherMock ()
        {
-               fCaptures = new LinkedList<Entry> ();
+               fCaptures = new LinkedList<> ();
        }
 
        public interface Listener
@@ -85,7 +85,7 @@ public class MRBatchingPublisherMock implements MRBatchingPublisher
 
        public List<Entry> getCaptures ( MessageFilter filter )
        {
-               final LinkedList<Entry> result = new LinkedList<Entry> ();
+               final LinkedList<Entry> result = new LinkedList<> ();
                for ( Entry capture : fCaptures )
                {
                        if ( filter.match ( capture.fMessage ) )
@@ -151,7 +151,7 @@ public class MRBatchingPublisherMock implements MRBatchingPublisher
        @Override
        public List<message> close ( long timeout, TimeUnit timeoutUnits )
        {
-               return new LinkedList<message> ();
+               return new LinkedList<> ();
        }
 
        @Override
@@ -175,7 +175,7 @@ public class MRBatchingPublisherMock implements MRBatchingPublisher
        }
 
        private final LinkedList<Entry> fCaptures;
-       private LinkedList<Listener> fListeners = new LinkedList<Listener> ();
+       private LinkedList<Listener> fListeners = new LinkedList<> ();
        @Override
        public MRPublisherResponse sendBatchWithResponse() {
                // TODO Auto-generated method stub