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-MbPM32hFUzlqc5Wq&resolved=false&rules=squid%3AS2293&severities=MAJOR
Location:
src/main/java/org/onap/dmaap/mr/client/MRClientFactory.java
Line No-351
Change-Id: I729b24bff9c8652d368410e8126bfd8c48711b69
Issue-ID: DMAAP-1011
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
*/
public static MRBatchingPublisher createBatchingPublisher(String[] hostSet, String topic, int maxBatchSize,
long maxAgeMs, boolean compress) {
- final TreeSet<String> hosts = new TreeSet<String>();
+ final TreeSet<String> hosts = new TreeSet<>();
for (String hp : hostSet) {
hosts.add(hp);
}