Use isEmpty() to check whether the collection is empty or not
Sonar Link:
https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.dmaapclient%3AdmaapClient&open=AV4-MbPA32hFUzlqc5Wa&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/MRClientBuilders.java
Line-No:365
Change-Id: I523aab6449c47a78bc647f63bf1b41dc12ccb76f
Issue-ID: DMAAP-354
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
*/
public T build ()
{
- if ( fHosts == null || fHosts.size() == 0 )
+ if ( fHosts.isEmpty() )
{
throw new IllegalArgumentException ( "You must provide at least one host and a topic name." );
}