Use Collection.isEmpty (#10525)

Fixes 47 SAT UseCollectionIsEmpty findings.

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2021-04-15 21:00:47 +02:00
committed by GitHub
parent 7a22d65406
commit 1633c705a1
35 changed files with 67 additions and 68 deletions

View File

@@ -375,7 +375,7 @@ public class UpnpXMLParser {
entries.add(new UpnpEntry(id, refId, parentId, upnpClass.toString()).withTitle(title.toString())
.withAlbum(album.toString()).withAlbumArtUri(albumArtUri.toString())
.withCreator(creator.toString())
.withArtist(artistList.size() > 0 ? artistList.get(0) : artist.toString())
.withArtist(!artistList.isEmpty() ? artistList.get(0) : artist.toString())
.withPublisher(publisher.toString()).withGenre(genre.toString()).withTrackNumber(trackNumberVal)
.withResList(resList));