Use isEmpty() where possible

See gh-20370
This commit is contained in:
dreis2211
2020-03-02 20:36:46 +01:00
committed by Stephane Nicoll
parent 4598680692
commit 9588188800
7 changed files with 13 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -154,7 +154,7 @@ class TypeUtils {
if (((TypeElement) this.types.asElement(type)).getQualifiedName().contentEquals(Collection.class.getName())) {
DeclaredType declaredType = (DeclaredType) type;
// raw type, just "Collection"
if (declaredType.getTypeArguments().size() == 0) {
if (declaredType.getTypeArguments().isEmpty()) {
return this.types.getDeclaredType(this.env.getElementUtils().getTypeElement(Object.class.getName()));
}
// return type argument to Collection<...>