Collection.isEmpty() should be used to test for emptiness
Closes gh-1670
This commit is contained in:
committed by
Stephane Nicoll
parent
7da40abba5
commit
e381514b07
@@ -188,7 +188,7 @@ public class StringDecoder extends AbstractDataBufferDecoder<String> {
|
||||
* Joins the given list of buffers into a single buffer.
|
||||
*/
|
||||
private static Mono<DataBuffer> joinUntilEndFrame(List<DataBuffer> dataBuffers) {
|
||||
if (dataBuffers.size() > 0) {
|
||||
if (!dataBuffers.isEmpty()) {
|
||||
int lastIdx = dataBuffers.size() - 1;
|
||||
if (isEndFrame(dataBuffers.get(lastIdx))) {
|
||||
dataBuffers.remove(lastIdx);
|
||||
|
||||
Reference in New Issue
Block a user