Using Collection.isEmpty() to test for emptiness

This commit is contained in:
Artyom Melnikov committed 2016-06-14 15:21:23 +03:00
1 parent a64a020e36
commit 07edb2c81f
10 files changed
+14 -14

No files matched your search

@@ -794,7 +794,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
}
}
if (matchSet.size() == 0) {
if (matchSet.isEmpty()) {
// this is a unidirectional relationship
// ... that is no matching property on the 'detail' bean
return false;
@@ -477,7 +477,7 @@ public class DeployBeanDescriptor<T> {
* Return the BeanPersistController (could be a chain of them, 1 or null).
*/
public BeanPersistController getPersistController() {
if (persistControllers.size() == 0) {
if (persistControllers.isEmpty()) {
return null;
} else if (persistControllers.size() == 1) {
return persistControllers.get(0);
@@ -490,7 +490,7 @@ public class DeployBeanDescriptor<T> {
* Return the BeanPersistListener (could be a chain of them, 1 or null).
*/
public BeanPersistListener getPersistListener() {
if (persistListeners.size() == 0) {
if (persistListeners.isEmpty()) {
return null;
} else if (persistListeners.size() == 1) {
return persistListeners.get(0);
@@ -500,7 +500,7 @@ public class DeployBeanDescriptor<T> {
}
public BeanQueryAdapter getQueryAdapter() {
if (queryAdapters.size() == 0) {
if (queryAdapters.isEmpty()) {
return null;
} else if (queryAdapters.size() == 1) {
return queryAdapters.get(0);
@@ -513,7 +513,7 @@ public class DeployBeanDescriptor<T> {
* Return the BeanPostLoad (could be a chain of them, 1 or null).
*/
public BeanPostLoad getPostLoad() {
if (postLoaders.size() == 0) {
if (postLoaders.isEmpty()) {
return null;
} else if (postLoaders.size() == 1) {
return postLoaders.get(0);
@@ -46,7 +46,7 @@ public class DeployTableJoin {
* Return true if the JoinOnPair have been set.
*/
public boolean hasJoinColumns() {
return columns.size() > 0;
return !columns.isEmpty();
}
/**