This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 018e912  Replace size() == 0 with isEmpty
018e912 is described below

commit 018e91228d7f14c921710f8ac203a1a0a37110fa
Author: Colm O hEigeartaigh <cohei...@apache.org>
AuthorDate: Tue Mar 6 17:17:19 2018 +0000

    Replace size() == 0 with isEmpty
---
 .../src/main/java/org/apache/cxf/common/util/CollectionUtils.java | 4 ++--
 core/src/main/java/org/apache/cxf/common/util/PackageUtils.java   | 2 +-
 core/src/main/java/org/apache/cxf/common/util/StringUtils.java    | 2 +-
 core/src/main/java/org/apache/cxf/common/util/URIParserUtil.java  | 2 +-
 .../apache/cxf/interceptor/AbstractInDatabindingInterceptor.java  | 2 +-
 .../security/AbstractSecurityContextInInterceptor.java            | 2 +-
 .../main/java/org/apache/cxf/service/model/ServiceModelUtil.java  | 2 +-
 .../java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java    | 2 +-
 .../org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java  | 2 +-
 .../java/org/apache/cxf/workqueue/AutomaticWorkQueueImpl.java     | 2 +-
 .../java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java   | 8 ++++----
 .../java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java     | 2 +-
 .../java/org/apache/cxf/maven_plugin/wadlto/WADL2JavaMojo.java    | 2 +-
 .../org/apache/cxf/binding/corba/types/CorbaUnionHandler.java     | 2 +-
 .../org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java | 2 +-
 .../cxf/binding/soap/interceptor/SoapHeaderInterceptor.java       | 2 +-
 .../apache/cxf/binding/soap/MustUnderstandInterceptorTest.java    | 2 +-
 .../src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java   | 6 +++---
 .../jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java   | 2 +-
 .../main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java  | 2 +-
 .../main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java  | 2 +-
 .../src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java  | 4 ++--
 .../src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java      | 8 ++++----
 .../org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java     | 2 +-
 .../java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java  | 2 +-
 .../main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java  | 2 +-
 .../java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java | 2 +-
 .../src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java   | 2 +-
 .../org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java | 4 ++--
 .../java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java    | 4 ++--
 .../java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java  | 2 +-
 .../java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java | 2 +-
 .../cxf/jaxws/interceptors/WebFaultOutInterceptorTestCase.java    | 4 ++--
 .../org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java     | 2 +-
 .../apache/cxf/javascript/service/ServiceJavascriptBuilder.java   | 2 +-
 .../org/apache/cxf/management/jmx/InstrumentationManagerImpl.java | 2 +-
 .../src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java | 2 +-
 .../main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java    | 6 +++---
 .../apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java    | 2 +-
 .../java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java | 2 +-
 .../cxf/rs/security/cors/CrossOriginResourceSharingFilter.java    | 2 +-
 .../rs/security/oauth2/services/RedirectionBasedGrantService.java | 2 +-
 .../apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java  | 2 +-
 .../http/src/main/java/org/apache/cxf/transport/http/Cookies.java | 2 +-
 .../java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java | 2 +-
 .../src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java | 2 +-
 rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SequenceMonitor.java  | 2 +-
 rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SourceSequence.java   | 2 +-
 .../policy/interceptors/HttpsTokenInterceptorProvider.java        | 8 ++++----
 .../wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java     | 2 +-
 .../org/apache/cxf/ws/security/wss4j/StaxActionInInterceptor.java | 2 +-
 .../org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java | 2 +-
 .../apache/cxf/ws/security/tokenstore/EHCacheTokenStoreTest.java  | 2 +-
 .../apache/cxf/ws/security/tokenstore/MemoryTokenStoreTest.java   | 2 +-
 .../java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java     | 2 +-
 .../java/org/apache/cxf/wsdl/interceptors/BareOutInterceptor.java | 2 +-
 .../org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java | 2 +-
 .../cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java    | 2 +-
 .../src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java   | 2 +-
 .../src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java   | 4 ++--
 .../test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java   | 2 +-
 .../src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java    | 2 +-
 .../main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java    | 4 ++--
 .../java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java    | 4 ++--
 .../main/java/org/apache/cxf/sts/claims/mapper/ClaimUtils.java    | 2 +-
 .../java/org/apache/cxf/sts/cache/HazelCastTokenStoreTest.java    | 2 +-
 .../test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java  | 2 +-
 .../java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java   | 2 +-
 .../src/main/java/org/apache/cxf/wsn/AbstractPublisher.java       | 2 +-
 .../java/org/apache/cxf/wsn/jms/JmsTopicExpressionConverter.java  | 2 +-
 .../main/java/org/apache/cxf/xkms/x509/handlers/X509Locator.java  | 2 +-
 .../jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/Books.java   | 2 +-
 .../org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java | 2 +-
 .../src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java  | 2 +-
 .../org/apache/cxf/tools/corba/common/idltypes/IdlStructBase.java | 2 +-
 .../apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java | 6 +++---
 .../apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java   | 2 +-
 .../org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java     | 4 ++--
 .../tools/java2wsdl/generator/wsdl11/DateTypeCustomGenerator.java | 4 ++--
 .../org/apache/cxf/tools/validator/internal/ValidationResult.java | 2 +-
 .../org/apache/cxf/tools/validator/internal/WSDLRefValidator.java | 4 ++--
 .../java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java   | 6 +++---
 .../apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java | 2 +-
 .../wsdlto/frontend/jaxws/customization/CustomizationParser.java  | 2 +-
 .../cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java  | 2 +-
 .../tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java   | 2 +-
 .../cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java  | 2 +-
 .../tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java   | 2 +-
 .../tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java  | 2 +-
 .../frontend/jaxws/processor/internal/ParameterProcessor.java     | 4 ++--
 90 files changed, 119 insertions(+), 119 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/common/util/CollectionUtils.java 
b/core/src/main/java/org/apache/cxf/common/util/CollectionUtils.java
index 0bb7516..c0a7e08 100644
--- a/core/src/main/java/org/apache/cxf/common/util/CollectionUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/util/CollectionUtils.java
@@ -33,7 +33,7 @@ public final class CollectionUtils {
     }
 
     public static <T> Collection<T> diff(Collection<T> c1, Collection<T> c2) {
-        if (c1 == null || c1.size() == 0 || c2 == null || c2.size() == 0) {
+        if (c1 == null || c1.isEmpty() || c2 == null || c2.size() == 0) {
             return c1;
         }
         Collection<T> difference = new ArrayList<>();
@@ -46,7 +46,7 @@ public final class CollectionUtils {
     }
 
     public static <T> boolean isEmpty(Collection<T> c) {
-        if (c == null || c.size() == 0) {
+        if (c == null || c.isEmpty()) {
             return true;
         }
         for (Iterator<T> iter = c.iterator(); iter.hasNext();) {
diff --git a/core/src/main/java/org/apache/cxf/common/util/PackageUtils.java 
b/core/src/main/java/org/apache/cxf/common/util/PackageUtils.java
index afe858b..e90fa63 100644
--- a/core/src/main/java/org/apache/cxf/common/util/PackageUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/util/PackageUtils.java
@@ -104,7 +104,7 @@ public final class PackageUtils {
         }
 
         List<String> tokens = tokenize(nameSpaceURI, "/: ");
-        if (tokens.size() == 0) {
+        if (tokens.isEmpty()) {
             return null;
         }
 
diff --git a/core/src/main/java/org/apache/cxf/common/util/StringUtils.java 
b/core/src/main/java/org/apache/cxf/common/util/StringUtils.java
index f53bcb5..762b017 100644
--- a/core/src/main/java/org/apache/cxf/common/util/StringUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/util/StringUtils.java
@@ -81,7 +81,7 @@ public final class StringUtils {
     }
 
     public static boolean isEmpty(List<String> list) {
-        if (list == null || list.size() == 0) {
+        if (list == null || list.isEmpty()) {
             return true;
         }
         return list.size() == 1 && isEmpty(list.get(0));
diff --git a/core/src/main/java/org/apache/cxf/common/util/URIParserUtil.java 
b/core/src/main/java/org/apache/cxf/common/util/URIParserUtil.java
index ac08fb5..d8f0681 100644
--- a/core/src/main/java/org/apache/cxf/common/util/URIParserUtil.java
+++ b/core/src/main/java/org/apache/cxf/common/util/URIParserUtil.java
@@ -89,7 +89,7 @@ public final class URIParserUtil {
         }
 
         List<String> tokens = tokenize(nameSpaceURI, "/: ");
-        if (tokens.size() == 0) {
+        if (tokens.isEmpty()) {
             return "cxf";
         }
 
diff --git 
a/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
 
b/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
index e7051f6..fe6f23f 100644
--- 
a/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
+++ 
b/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
@@ -178,7 +178,7 @@ public abstract class AbstractInDatabindingInterceptor 
extends AbstractPhaseInte
             }
 
             Collection<MessagePartInfo> bodyParts = msgInfo.getMessageParts();
-            if (bodyParts.size() == 0 || bodyParts.size() <= index) {
+            if (bodyParts.isEmpty() || bodyParts.size() <= index) {
                 itr.remove();
                 continue;
             }
diff --git 
a/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
 
b/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
index 6066f6b..e4626d4 100644
--- 
a/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
+++ 
b/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
@@ -59,7 +59,7 @@ public abstract class AbstractSecurityContextInInterceptor 
extends AbstractPhase
             reportSecurityException("Failed Authentication : Subject has not 
been created, "
                                     + ex.getMessage());
         }
-        if (subject == null || subject.getPrincipals().size() == 0) {
+        if (subject == null || subject.getPrincipals().isEmpty()) {
             reportSecurityException("Failed Authentication : Invalid Subject");
         }
 
diff --git 
a/core/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java 
b/core/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
index fcdc604..b14102f 100644
--- a/core/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
+++ b/core/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
@@ -132,7 +132,7 @@ public final class ServiceModelUtil {
     public static List<String> getOperationInputPartNames(OperationInfo 
operation) {
         List<String> names = new ArrayList<>();
         List<MessagePartInfo> parts = operation.getInput().getMessageParts();
-        if (parts == null || parts.size() == 0) {
+        if (parts == null || parts.isEmpty()) {
             return names;
         }
 
diff --git 
a/core/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java 
b/core/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java
index 1659bc9..ba683e2 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java
@@ -218,7 +218,7 @@ public abstract class AbstractDOMStreamReader<T, I> 
implements XMLStreamReader {
      */
     public boolean hasNext() throws XMLStreamException {
 
-        return !(frame.ended && (frames.size() == 0 || 
frame.isDocumentFragment()));
+        return !(frame.ended && (frames.isEmpty() || 
frame.isDocumentFragment()));
 
     }
 
diff --git 
a/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
 
b/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
index fe4e4dd..f4303df 100644
--- 
a/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
+++ 
b/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
@@ -334,7 +334,7 @@ public class GZIPOutInterceptor extends 
AbstractPhaseInterceptor<Message> {
             header = new ArrayList<>();
             protocolHeaders.put(name, header);
         }
-        if (header.size() == 0) {
+        if (header.isEmpty()) {
             header.add(value);
         } else {
             header.set(0, header.get(0) + "," + value);
diff --git 
a/core/src/main/java/org/apache/cxf/workqueue/AutomaticWorkQueueImpl.java 
b/core/src/main/java/org/apache/cxf/workqueue/AutomaticWorkQueueImpl.java
index af4cc52..031e665 100644
--- a/core/src/main/java/org/apache/cxf/workqueue/AutomaticWorkQueueImpl.java
+++ b/core/src/main/java/org/apache/cxf/workqueue/AutomaticWorkQueueImpl.java
@@ -513,7 +513,7 @@ public class AutomaticWorkQueueImpl implements 
AutomaticWorkQueue {
 
 
     public boolean isEmpty() {
-        return executor == null ? true : executor.getQueue().size() == 0;
+        return executor == null ? true : executor.getQueue().isEmpty();
     }
 
     public boolean isFull() {
diff --git 
a/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java 
b/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
index 73eba3c..5b33b54 100644
--- a/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
+++ b/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
@@ -78,11 +78,11 @@ public class BusDefinitionParserTest extends Assert {
             Bus cxf1 = (Bus)context.getBean("cxf1");
 
             assertTrue(cxf1.getOutInterceptors().size() == 1);
-            assertTrue(cxf1.getInInterceptors().size() == 0);
+            assertTrue(cxf1.getInInterceptors().isEmpty());
 
             Bus cxf2 = (Bus)context.getBean("cxf2");
             assertTrue(cxf2.getInInterceptors().size() == 1);
-            assertTrue(cxf2.getOutInterceptors().size() == 0);
+            assertTrue(cxf2.getOutInterceptors().isEmpty());
         } finally {
             if (context != null) {
                 context.close();
@@ -98,12 +98,12 @@ public class BusDefinitionParserTest extends Assert {
             Bus cxf1 = (Bus)context.getBean("cxf1");
 
             assertTrue(cxf1.getOutInterceptors().size() == 1);
-            assertTrue(cxf1.getInInterceptors().size() == 0);
+            assertTrue(cxf1.getInInterceptors().isEmpty());
 
             Bus cxf2 = (Bus)context.getBean("cxf2");
 
             assertTrue(cxf2.getInInterceptors().size() == 1);
-            assertTrue(cxf2.getOutInterceptors().size() == 0);
+            assertTrue(cxf2.getOutInterceptors().isEmpty());
 
             cxf2.getExtension(BusLifeCycleManager.class)
                 .registerLifeCycleListener(new BusLifeCycleListener() {
diff --git 
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
 
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
index a19e4eb..7e15252 100644
--- 
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
+++ 
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
@@ -263,7 +263,7 @@ public abstract class AbstractCodegenMoho extends 
AbstractMojo {
 
             List<GenericWsdlOption> effectiveWsdlOptions = 
createWsdlOptionsFromScansAndExplicitWsdlOptions();
 
-            if (effectiveWsdlOptions.size() == 0) {
+            if (effectiveWsdlOptions.isEmpty()) {
                 getLog().info("Nothing to generate");
                 return;
             }
diff --git 
a/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/WADL2JavaMojo.java
 
b/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/WADL2JavaMojo.java
index cf4a806..e741e5e 100644
--- 
a/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/WADL2JavaMojo.java
+++ 
b/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/WADL2JavaMojo.java
@@ -110,7 +110,7 @@ public class WADL2JavaMojo extends 
AbstractCodeGeneratorMojo {
 
         List<WadlOption> effectiveWsdlOptions = 
createWadlOptionsFromScansAndExplicitWadlOptions(classesDir);
 
-        if (effectiveWsdlOptions.size() == 0) {
+        if (effectiveWsdlOptions.isEmpty()) {
             getLog().info("Nothing to generate");
             return;
         }
diff --git 
a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaUnionHandler.java
 
b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaUnionHandler.java
index 496cf9b..9264bd3 100644
--- 
a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaUnionHandler.java
+++ 
b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaUnionHandler.java
@@ -51,7 +51,7 @@ public class CorbaUnionHandler extends CorbaObjectHandler {
         for (Iterator<Unionbranch> branchesIter = branches.iterator(); 
branchesIter.hasNext();) {
             Unionbranch branch = branchesIter.next();
             List<CaseType> branchCases = branch.getCase();
-            if (branchCases.size() == 0) {
+            if (branchCases.isEmpty()) {
                 defaultIndex = index;
             } else {
                 for (Iterator<CaseType> casesIter = branchCases.iterator(); 
casesIter.hasNext();) {
diff --git 
a/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java
 
b/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java
index 8c4517a..88647ea 100644
--- 
a/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java
+++ 
b/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java
@@ -169,7 +169,7 @@ public class CorbaHandlerUtilsTest extends Assert {
         CorbaSequenceHandler seqHandler = (CorbaSequenceHandler)result;
         // This is an unbounded sequence so make sure there are no elements 
and the template
         // element has been set.
-        assertTrue(seqHandler.getElements().size() == 0);
+        assertTrue(seqHandler.getElements().isEmpty());
         assertNotNull(seqHandler.getTemplateElement());
 
         // Test for a bounded sequence handler
diff --git 
a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
 
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
index 3b63888..fbd3872 100644
--- 
a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
+++ 
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
@@ -101,7 +101,7 @@ public class SoapHeaderInterceptor extends 
AbstractInDatabindingInterceptor {
         }
 
         List<SoapHeaderInfo> headers = bmi.getExtensors(SoapHeaderInfo.class);
-        if (headers == null || headers.size() == 0) {
+        if (headers == null || headers.isEmpty()) {
             return;
         }
 
diff --git 
a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
 
b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
index cff5940..249c6ed 100644
--- 
a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
+++ 
b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
@@ -178,7 +178,7 @@ public class MustUnderstandInterceptorTest extends TestBase 
{
 
         public Set<URI> getRoles() {
             calledGetRoles = true;
-            if (roles.size() == 0) {
+            if (roles.isEmpty()) {
                 try {
                     roles.add(new 
URI("http://www.w3.org/2003/05/soap-envelope/role/next";));
                     roles.add(new 
URI("http://www.w3.org/2003/05/soap-envelope/role/none";));
diff --git 
a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
 
b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
index e304bf4..f9d1ff5 100644
--- 
a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
+++ 
b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
@@ -437,7 +437,7 @@ public class XMLTypeCreator extends AbstractTypeCreator {
             // specified
             List<Element> nodes = getMatches(mapping, "./method[@name='" + 
m.getName()
                                                       + 
"']/parameter[@index='" + index + "']/parent::*");
-            if (nodes.size() == 0) {
+            if (nodes.isEmpty()) {
                 // no mapping for this method
                 return info;
             }
@@ -455,7 +455,7 @@ public class XMLTypeCreator extends AbstractTypeCreator {
         } else {
             List<Element> nodes = getMatches(mapping, "./method[@name='" + 
m.getName()
                                                       + 
"']/return-type/parent::*");
-            if (nodes.size() == 0) {
+            if (nodes.isEmpty()) {
                 return info;
             }
             Element bestMatch = getBestMatch(mapping, m, nodes);
@@ -672,7 +672,7 @@ public class XMLTypeCreator extends AbstractTypeCreator {
             nodes.retainAll(availableNodes);
         }
         // no name found, so no matches
-        if (nodes.size() == 0) {
+        if (nodes.isEmpty()) {
             return null;
         }
         // if the method has no params, then more than one mapping is pointless
diff --git 
a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java 
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
index 20ab5c2..e2a1a45 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
@@ -359,7 +359,7 @@ public class JAXBDataBinding extends 
AbstractInterceptorProvidingDataBinding
 
             boolean schemasFromCache = false;
             Collection<DOMSource> schemas = getSchemas();
-            if (schemas == null || schemas.size() == 0) {
+            if (schemas == null || schemas.isEmpty()) {
                 schemas = cachedContextAndSchemas.getSchemas();
                 if (schemas != null) {
                     schemasFromCache = true;
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
index 9ecab0b..ea2e764 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
@@ -309,7 +309,7 @@ public class AbstractJAXRSFactoryBean extends 
AbstractEndpointFactory {
                 }
             }
         }
-        if (list.size() == 0) {
+        if (list.isEmpty()) {
             org.apache.cxf.common.i18n.Message msg =
                 new 
org.apache.cxf.common.i18n.Message("NO_RESOURCES_AVAILABLE",
                                                        BUNDLE);
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
index fbe8ff4..dc0b719 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/Attachment.java
@@ -162,7 +162,7 @@ public class Attachment implements Transferable {
 
     public String getHeader(String name) {
         List<String> header = headers.get(name);
-        if (header == null || header.size() == 0) {
+        if (header == null || header.isEmpty()) {
             return null;
         }
         StringBuilder sb = new StringBuilder();
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
index c69e8e1..373d79d 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
@@ -157,12 +157,12 @@ public class HttpHeadersImpl implements HttpHeaders {
 
     public Locale getLanguage() {
         List<String> values = getListValues(HttpHeaders.CONTENT_LANGUAGE);
-        return values.size() == 0 ? null : 
HttpUtils.getLocale(values.get(0).trim());
+        return values.isEmpty() ? null : 
HttpUtils.getLocale(values.get(0).trim());
     }
 
     public MediaType getMediaType() {
         List<String> values = getListValues(HttpHeaders.CONTENT_TYPE);
-        return values.size() == 0 ? null : 
JAXRSUtils.toMediaType(values.get(0));
+        return values.isEmpty() ? null : JAXRSUtils.toMediaType(values.get(0));
     }
 
     public MultivaluedMap<String, String> getRequestHeaders() {
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
index 9190eb0..ffa9d76 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
@@ -199,7 +199,7 @@ public class RequestImpl implements Request {
     private ResponseBuilder evaluateIfMatch(EntityTag eTag, Date date) {
         List<String> ifMatch = headers.getRequestHeader(HttpHeaders.IF_MATCH);
 
-        if (ifMatch == null || ifMatch.size() == 0) {
+        if (ifMatch == null || ifMatch.isEmpty()) {
             return date == null ? null : evaluateIfNotModifiedSince(date);
         }
 
@@ -223,7 +223,7 @@ public class RequestImpl implements Request {
     private ResponseBuilder evaluateIfNonMatch(EntityTag eTag, Date 
lastModified) {
         List<String> ifNonMatch = 
headers.getRequestHeader(HttpHeaders.IF_NONE_MATCH);
 
-        if (ifNonMatch == null || ifNonMatch.size() == 0) {
+        if (ifNonMatch == null || ifNonMatch.isEmpty()) {
             return lastModified == null ? null : 
evaluateIfModifiedSince(lastModified);
         }
 
@@ -263,7 +263,7 @@ public class RequestImpl implements Request {
     private ResponseBuilder evaluateIfModifiedSince(Date lastModified) {
         List<String> ifModifiedSince = 
headers.getRequestHeader(HttpHeaders.IF_MODIFIED_SINCE);
 
-        if (ifModifiedSince == null || ifModifiedSince.size() == 0) {
+        if (ifModifiedSince == null || ifModifiedSince.isEmpty()) {
             return null;
         }
 
@@ -289,7 +289,7 @@ public class RequestImpl implements Request {
     private ResponseBuilder evaluateIfNotModifiedSince(Date lastModified) {
         List<String> ifNotModifiedSince = 
headers.getRequestHeader(HttpHeaders.IF_UNMODIFIED_SINCE);
 
-        if (ifNotModifiedSince == null || ifNotModifiedSince.size() == 0) {
+        if (ifNotModifiedSince == null || ifNotModifiedSince.isEmpty()) {
             return null;
         }
 
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
index ccc05db..e2cbda7 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
@@ -96,7 +96,7 @@ public class JAXRSOutInterceptor extends 
AbstractOutDatabindingInterceptor {
             return;
         }
         MessageContentsList objs = 
MessageContentsList.getContentsList(message);
-        if (objs == null || objs.size() == 0) {
+        if (objs == null || objs.isEmpty()) {
             return;
         }
 
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
index c9ae400..e587b57 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
@@ -223,7 +223,7 @@ public abstract class AbstractJAXBProvider<T> extends 
AbstractConfigurableProvid
             }
             if (!schemaLocs.isEmpty()) {
                 this.setSchemaLocations(schemaLocs);
-                if (cris.size() == 0 && schema != null && sv != null) {
+                if (cris.isEmpty() && schema != null && sv != null) {
                     SchemaValidation.SchemaValidationType type = sv.type();
                     if (type == SchemaValidation.SchemaValidationType.OUT) {
                         validateInputIfPossible = false;
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
index a5767a0..1e8dd21 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
@@ -231,7 +231,7 @@ public abstract class ProviderFactory {
                 }
             }
         }
-        if (candidates.size() == 0) {
+        if (candidates.isEmpty()) {
             return null;
         } else if (candidates.size() == 1) {
             return candidates.get(0);
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
index f0a411a..a834108 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
@@ -141,7 +141,7 @@ public final class ServerProviderFactory extends 
ProviderFactory {
         if (wadlGenerator == null) {
             return filters;
         }
-        if (filters.size() == 0) {
+        if (filters.isEmpty()) {
             return Collections.singletonList(wadlGenerator);
         } else if (!syncNeeded) {
             filters.add(0, wadlGenerator);
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
index 7f88b84..8f4316c 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
@@ -418,7 +418,7 @@ public final class ResourceUtils {
             }
 
         });
-        return cs.size() == 0 ? null : cs.get(0);
+        return cs.isEmpty() ? null : cs.get(0);
     }
 
     public static List<Parameter> getParameters(Method resourceMethod) {
diff --git 
a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java
 
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java
index e8e935f..1c03141 100644
--- 
a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java
+++ 
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java
@@ -45,8 +45,8 @@ public class CacheControlHeaderProviderTest extends Assert {
         assertTrue(!c.isPrivate() && !c.isNoStore()
                    && c.isMustRevalidate() && !c.isProxyRevalidate());
         assertTrue(!c.isNoCache()
-                   && !c.isNoTransform() && c.getNoCacheFields().size() == 0
-                   && c.getPrivateFields().size() == 0);
+                   && !c.isNoTransform() && c.getNoCacheFields().isEmpty()
+                   && c.getPrivateFields().isEmpty());
     }
 
     @Test
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
index d658a59..9086477 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainBuilder.java
@@ -65,7 +65,7 @@ public class HandlerChainBuilder {
         return sortHandlers(buildHandlerChain(hc, getHandlerClassLoader()));
     }
     public List<Handler> 
buildHandlerChainFromConfiguration(List<PortComponentHandlerType> hc) {
-        if (null == hc || hc.size() == 0) {
+        if (null == hc || hc.isEmpty()) {
             return null;
         }
         List<Handler> handlers = new ArrayList<>();
@@ -167,7 +167,7 @@ public class HandlerChainBuilder {
             return;
         }
 
-        if (h.getInitParam().size() == 0) {
+        if (h.getInitParam().isEmpty()) {
             return;
         }
 
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
index e17c3b7..6c26805 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
@@ -66,7 +66,7 @@ public class SwAInInterceptor extends AbstractSoapInterceptor 
{
 
         SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);
 
-        if (sbi == null || sbi.getAttachments() == null || 
sbi.getAttachments().size() == 0) {
+        if (sbi == null || sbi.getAttachments() == null || 
sbi.getAttachments().isEmpty()) {
             return;
         }
 
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
index c508308..72c36b7 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
@@ -145,7 +145,7 @@ public class SwAOutInterceptor extends 
AbstractSoapInterceptor {
 
         SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);
 
-        if (sbi == null || sbi.getAttachments() == null || 
sbi.getAttachments().size() == 0) {
+        if (sbi == null || sbi.getAttachments() == null || 
sbi.getAttachments().isEmpty()) {
             Service s = ex.getService();
             DataBinding db = s.getDataBinding();
             if (db instanceof JAXBDataBinding
diff --git 
a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptorTestCase.java
 
b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptorTestCase.java
index 719dd4c..9bc55ff 100644
--- 
a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptorTestCase.java
+++ 
b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptorTestCase.java
@@ -108,7 +108,7 @@ public class WebFaultOutInterceptorTestCase {
         interceptor.handleMessage(message);
 
         Assert.assertTrue("SoapFault.subCodes are expected to be empty.",
-                soapFault.getSubCodes() == null || 
soapFault.getSubCodes().size() == 0);
+                soapFault.getSubCodes() == null || 
soapFault.getSubCodes().isEmpty());
         Assert.assertEquals(CODE, soapFault.getFaultCode());
     }
 
@@ -121,7 +121,7 @@ public class WebFaultOutInterceptorTestCase {
         interceptor.handleMessage(message);
 
         Assert.assertTrue("SoapFault.subCodes are expected to be empty.",
-                soapFault.getSubCodes() == null || 
soapFault.getSubCodes().size() == 0);
+                soapFault.getSubCodes() == null || 
soapFault.getSubCodes().isEmpty());
         Assert.assertEquals(CODE, soapFault.getFaultCode());
     }
 
diff --git 
a/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
 
b/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
index 2c99ac3..31aae70 100644
--- 
a/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
+++ 
b/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
@@ -940,7 +940,7 @@ public class DynamicClientFactory {
         List<Element> incElemList = 
DOMUtils.findAllElementsByTagNameNS(element,
                                                                         
"http://www.w3.org/2001/XMLSchema";,
                                                                      
"include");
-        if (impElemList.size() == 0 && incElemList.size() == 0) {
+        if (impElemList.isEmpty() && incElemList.isEmpty()) {
             return element;
         }
         element = (Element)cloneNode(element.getOwnerDocument(), element, 
true);
diff --git 
a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
 
b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
index 1280217..ed18f45 100755
--- 
a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
+++ 
b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
@@ -677,7 +677,7 @@ public class ServiceJavascriptBuilder extends 
ServiceModelVisitor {
                 return true;
             }
             XmlSchemaSequence sequence = getTypeSequence(complexType, 
parentName);
-            if (sequence.getItems().size() == 0) {
+            if (sequence.getItems().isEmpty()) {
                 return true;
             }
         }
diff --git 
a/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
 
b/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
index fab32f7..6b4d879 100644
--- 
a/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
+++ 
b/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
@@ -148,7 +148,7 @@ public class InstrumentationManagerImpl extends 
JMXConnectorPolicyType
                     if (mbeanServerID != null) {
                         servers = 
CastUtils.cast(MBeanServerFactory.findMBeanServer(mbeanServerID));
                     }
-                    if (servers == null || servers.size() == 0) {
+                    if (servers == null || servers.isEmpty()) {
                         mbs = 
MBeanServerFactory.createMBeanServer(mbeanServerName);
                         try {
                             mbeanServerID = (String) 
mbs.getAttribute(getDelegateName(),
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
index e2fb4ea..9f726c8 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
@@ -1212,7 +1212,7 @@ public abstract class AbstractClient implements Client {
         public void handleMessage(Message outMessage) throws Fault {
 
             MessageContentsList objs = 
MessageContentsList.getContentsList(outMessage);
-            if (objs == null || objs.size() == 0) {
+            if (objs == null || objs.isEmpty()) {
                 return;
             }
 
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index d7aacb9..8ac8866 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -251,7 +251,7 @@ public class ClientProxyImpl extends AbstractClient 
implements
             new MetadataMap<ParameterType, Parameter>();
 
         List<Parameter> parameters = ori.getParameters();
-        if (parameters.size() == 0) {
+        if (parameters.isEmpty()) {
             return map;
         }
         int requestBodyParam = 0;
@@ -367,7 +367,7 @@ public class ClientProxyImpl extends AbstractClient 
implements
 
         List<MediaType> accepts = getAccept(headers);
         if (accepts == null) {
-            boolean produceWildcard = ori.getProduceTypes().size() == 0
+            boolean produceWildcard = ori.getProduceTypes().isEmpty()
                 || 
ori.getProduceTypes().get(0).equals(MediaType.WILDCARD_TYPE);
             if (produceWildcard) {
                 accepts = InjectionUtils.isPrimitive(responseClass)
@@ -389,7 +389,7 @@ public class ClientProxyImpl extends AbstractClient 
implements
 
     private List<MediaType> getAccept(MultivaluedMap<String, String> 
allHeaders) {
         List<String> headers = allHeaders.get(HttpHeaders.ACCEPT);
-        if (headers == null || headers.size() == 0) {
+        if (headers == null || headers.isEmpty()) {
             return null;
         }
         List<MediaType> types = new ArrayList<>();
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
index 2b49e8f..7519818 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
@@ -71,7 +71,7 @@ public class ClientRequestContextImpl extends 
AbstractRequestContextImpl
 
     private Object getMessageContent() {
         MessageContentsList objs = MessageContentsList.getContentsList(m);
-        if (objs == null || objs.size() == 0) {
+        if (objs == null || objs.isEmpty()) {
             return null;
         }
         return objs.get(0);
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
index 951eed0..5078068 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
@@ -431,7 +431,7 @@ public class AtomPojoProvider extends 
AbstractConfigurableProvider
         }
 
         if (entry.getContentElement() == null
-            && entry.getExtensions().size() == 0) {
+            && entry.getExtensions().isEmpty()) {
             createEntryContent(factory, entry, o, cls);
         }
         return entry;
diff --git 
a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
 
b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
index 96edd8b..b46aea8 100644
--- 
a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
+++ 
b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
@@ -136,7 +136,7 @@ public class CrossOriginResourceSharingFilter implements 
ContainerRequestFilter,
             getAnnotation(resourceMethod, CrossOriginResourceSharing.class);
         List<String> headerOriginValues = 
getHeaderValues(CorsHeaderConstants.HEADER_ORIGIN, true);
         // 5.1.1 there has to be an origin
-        if (headerOriginValues == null || headerOriginValues.size() == 0) {
+        if (headerOriginValues == null || headerOriginValues.isEmpty()) {
             return null;
         }
 
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
index a0b9a02..b016df3 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
@@ -473,7 +473,7 @@ public abstract class RedirectionBasedGrantService extends 
AbstractOAuthService
         } else if (uris.size() == 1 && useRegisteredRedirectUriIfPossible) {
             redirectUri = uris.get(0);
         }
-        if (redirectUri == null && uris.size() == 0 && 
!canRedirectUriBeEmpty(client)) {
+        if (redirectUri == null && uris.isEmpty() && 
!canRedirectUriBeEmpty(client)) {
             reportInvalidRequestError("Client Redirect Uri is invalid");
         }
         if (redirectUri != null && matchRedirectUriWithApplicationUri
diff --git 
a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java
 
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java
index 3a3288e..7287be9 100644
--- 
a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java
+++ 
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java
@@ -90,7 +90,7 @@ public abstract class AbstractXmlSecOutInterceptor extends 
AbstractPhaseIntercep
 
     private Object getRequestBody(Message message) {
         MessageContentsList objs = 
MessageContentsList.getContentsList(message);
-        if (objs == null || objs.size() == 0) {
+        if (objs == null || objs.isEmpty()) {
             return null;
         }
         return objs.get(0);
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java
index 8c2708b..7a64392 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Cookies.java
@@ -64,7 +64,7 @@ public class Cookies {
      * @return New set of cookies
      */
     private void handleSetCookie(List<String> headers) {
-        if (headers == null || headers.size() == 0) {
+        if (headers == null || headers.isEmpty()) {
             return;
         }
 
diff --git 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
index 12523675..de87426 100644
--- 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
+++ 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
@@ -523,7 +523,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
                 && getWSAddressingFeature(message).isAddressingRequired()) {
                 boolean missingWsaHeader = false;
                 AssertionInfoMap aim = message.get(AssertionInfoMap.class);
-                if (aim == null || aim.size() == 0) {
+                if (aim == null || aim.isEmpty()) {
                     missingWsaHeader = true;
                 }
                 if (aim != null && !aim.isEmpty()) {
diff --git 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
index f134814..a829b41 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
@@ -772,7 +772,7 @@ public class MAPCodec extends AbstractSoapInterceptor {
                 List<String> soapActionHeaders = mimeHeaders.get("SOAPAction");
                 // only propogate to SOAPAction header if currently non-empty
                 if (!(soapActionHeaders == null
-                      || soapActionHeaders.size() == 0
+                      || soapActionHeaders.isEmpty()
                       || "".equals(soapActionHeaders.get(0)))) {
                     LOG.log(Level.FINE,
                             "encoding wsa:Action in SOAPAction header {0}",
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SequenceMonitor.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SequenceMonitor.java
index e9b887b..03f6eaf 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SequenceMonitor.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SequenceMonitor.java
@@ -67,7 +67,7 @@ public class SequenceMonitor {
     }
 
     protected void setMonitorInterval(long i) {
-        if (receiveTimes.size() == 0) {
+        if (receiveTimes.isEmpty()) {
             firstCheck = 0;
             monitorInterval = i;
         } else {
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SourceSequence.java 
b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SourceSequence.java
index b0dbbc7..2f80eda 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SourceSequence.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/SourceSequence.java
@@ -126,7 +126,7 @@ public class SourceSequence extends AbstractSequence {
         if (currentMessageNumber != num) {
             return true;
         }
-        if (acknowledgement.getAcknowledgementRange().size() == 0) {
+        if (acknowledgement.getAcknowledgementRange().isEmpty()) {
             return false;
         }
         if (acknowledgement.getAcknowledgementRange().size() == 1) {
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
index b2c24f6..6586954 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
@@ -154,7 +154,7 @@ public class HttpsTokenInterceptorProvider extends 
AbstractPolicyInterceptorProv
                     }
                     if (token.getAuthenticationType() == 
HttpsToken.AuthenticationType.HttpBasicAuthentication) {
                         List<String> auth = headers.get("Authorization");
-                        if (auth == null || auth.size() == 0
+                        if (auth == null || auth.isEmpty()
                             || !auth.get(0).startsWith("Basic")) {
                             ai.setNotAsserted("HttpBasicAuthentication is set, 
but not being used");
                         } else {
@@ -165,7 +165,7 @@ public class HttpsTokenInterceptorProvider extends 
AbstractPolicyInterceptorProv
                     }
                     if (token.getAuthenticationType() == 
HttpsToken.AuthenticationType.HttpDigestAuthentication) {
                         List<String> auth = headers.get("Authorization");
-                        if (auth == null || auth.size() == 0
+                        if (auth == null || auth.isEmpty()
                             || !auth.get(0).startsWith("Digest")) {
                             ai.setNotAsserted("HttpDigestAuthentication is 
set, but not being used");
                         } else {
@@ -259,7 +259,7 @@ public class HttpsTokenInterceptorProvider extends 
AbstractPolicyInterceptorProv
                 Map<String, List<String>> headers = 
getProtocolHeaders(message);
                 if (token.getAuthenticationType() == 
HttpsToken.AuthenticationType.HttpBasicAuthentication) {
                     List<String> auth = headers.get("Authorization");
-                    if (auth == null || auth.size() == 0
+                    if (auth == null || auth.isEmpty()
                         || !auth.get(0).startsWith("Basic")) {
                         asserted = false;
                     } else {
@@ -277,7 +277,7 @@ public class HttpsTokenInterceptorProvider extends 
AbstractPolicyInterceptorProv
                 }
                 if (token.getAuthenticationType() == 
HttpsToken.AuthenticationType.HttpDigestAuthentication) {
                     List<String> auth = headers.get("Authorization");
-                    if (auth == null || auth.size() == 0
+                    if (auth == null || auth.isEmpty()
                         || !auth.get(0).startsWith("Digest")) {
                         asserted = false;
                     } else {
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
index 34d5d76..0508dc2 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
@@ -166,7 +166,7 @@ public abstract class 
AbstractUsernameTokenAuthenticatingInterceptor extends WSS
             throw new 
WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION,
                                           ex);
         }
-        if (subject == null || subject.getPrincipals().size() == 0
+        if (subject == null || subject.getPrincipals().isEmpty()
             || 
!subject.getPrincipals().iterator().next().getName().equals(name)) {
             String errorMessage = "Failed Authentication : Invalid Subject";
             LOG.severe(errorMessage);
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxActionInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxActionInInterceptor.java
index a5005a5..5f593d5 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxActionInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxActionInInterceptor.java
@@ -56,7 +56,7 @@ public class StaxActionInInterceptor extends 
AbstractPhaseInterceptor<SoapMessag
     @Override
     public void handleMessage(SoapMessage soapMessage) throws Fault {
 
-        if (inActions == null || inActions.size() == 0) {
+        if (inActions == null || inActions.isEmpty()) {
             return;
         }
 
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
index 69c4e9b..3b41b3f 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
@@ -142,7 +142,7 @@ public class WSS4JStaxOutInterceptor extends 
AbstractWSS4JStaxInterceptor {
 
             final OutboundSecurityContext outboundSecurityContext = new 
OutboundSecurityContextImpl();
             configureProperties(mc, outboundSecurityContext, secProps);
-            if (secProps.getActions() == null || secProps.getActions().size() 
== 0) {
+            if (secProps.getActions() == null || 
secProps.getActions().isEmpty()) {
                 // If no actions configured then return
                 return;
             }
diff --git 
a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStoreTest.java
 
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStoreTest.java
index 3544892..69b11a6 100644
--- 
a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStoreTest.java
+++ 
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStoreTest.java
@@ -74,6 +74,6 @@ public class EHCacheTokenStoreTest extends org.junit.Assert {
         assertNull(store.getToken("test3"));
         store.remove(token1.getId());
         store.remove(token2.getId());
-        assertTrue(store.getTokenIdentifiers().size() == 0);
+        assertTrue(store.getTokenIdentifiers().isEmpty());
     }
 }
diff --git 
a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/MemoryTokenStoreTest.java
 
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/MemoryTokenStoreTest.java
index 562a68a..fc6d8c0 100644
--- 
a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/MemoryTokenStoreTest.java
+++ 
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/MemoryTokenStoreTest.java
@@ -69,7 +69,7 @@ public class MemoryTokenStoreTest extends org.junit.Assert {
         assertNull(store.getToken("test3"));
         store.remove(token1.getId());
         store.remove(token2.getId());
-        assertTrue(store.getTokenIdentifiers().size() == 0);
+        assertTrue(store.getTokenIdentifiers().isEmpty());
     }
 
     @org.junit.Test
diff --git 
a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
 
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
index 37510c4..f6eb7b1 100644
--- 
a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
+++ 
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
@@ -325,7 +325,7 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
         assertTrue(results != null && results.size() == 1);
         List<WSSecurityEngineResult> signatureResults =
             results.get(0).getActionResults().get(WSConstants.SIGN);
-        assertTrue(signatureResults == null || signatureResults.size() == 0);
+        assertTrue(signatureResults == null || signatureResults.isEmpty());
     }
 
     @Test
diff --git 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareOutInterceptor.java
 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareOutInterceptor.java
index 8da9751..2a204dc 100644
--- 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareOutInterceptor.java
+++ 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareOutInterceptor.java
@@ -44,7 +44,7 @@ public class BareOutInterceptor extends 
AbstractOutDatabindingInterceptor {
         }
 
         MessageContentsList objs = 
MessageContentsList.getContentsList(message);
-        if (objs == null || objs.size() == 0) {
+        if (objs == null || objs.isEmpty()) {
             return;
         }
 
diff --git 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
index 1df918d..2cc3a30 100644
--- 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
+++ 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
@@ -169,7 +169,7 @@ public class DocLiteralInInterceptor extends 
AbstractInDatabindingInterceptor {
 
                     MessagePartInfo p;
                     if (!client && msgInfo != null && 
msgInfo.getMessageParts() != null
-                        && msgInfo.getMessageParts().size() == 0) {
+                        && msgInfo.getMessageParts().isEmpty()) {
                         //no input messagePartInfo
                         return;
                     }
diff --git 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
index ce73343..e52b20d 100644
--- 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
+++ 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
@@ -1190,7 +1190,7 @@ public class ReflectionServiceFactoryBean extends 
org.apache.cxf.service.factory
         MessageInfo message = isOut ? opInfo.getOutput() : opInfo.getInput();
 
         final List<MessagePartInfo> messageParts = message.getMessageParts();
-        if (messageParts.size() == 0) {
+        if (messageParts.isEmpty()) {
             return;
         }
 
diff --git 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
index d1dd189..3085ce7 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
@@ -231,7 +231,7 @@ public class WSDLServiceBuilder {
                 }
             }
 
-            if (def.getPortTypes().size() == 0) {
+            if (def.getPortTypes().isEmpty()) {
 
                 DescriptionInfo description = new DescriptionInfo();
                 if (recordOriginal) {
diff --git 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java
index 992cc9b..49a6c14 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java
@@ -113,7 +113,7 @@ public class WSDLServiceFactory extends 
AbstractServiceFactoryBean {
             } catch (XmlSchemaException ex) {
                 throw new ServiceConstructionException(new 
Message("SERVICE_CREATION_MSG", LOG), ex);
             }
-            if (services.size() == 0) {
+            if (services.isEmpty()) {
                 throw new ServiceConstructionException(new 
Message("NO_SERVICE_EXC", LOG));
             }
             //@@TODO  - this isn't good, need to return all the services
@@ -161,7 +161,7 @@ public class WSDLServiceFactory extends 
AbstractServiceFactoryBean {
                 services = new 
WSDLServiceBuilder(getBus()).buildServices(definition,
                                                                           
wsdlService,
                                                                           
endpointName);
-                if (services.size() == 0) {
+                if (services.isEmpty()) {
                     throw new ServiceConstructionException(
                         new Message("NO_SUCH_ENDPOINT_EXC", LOG, 
endpointName));
                 }
diff --git 
a/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java 
b/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
index 083b4f1..dc4a673 100644
--- a/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
+++ b/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
@@ -369,7 +369,7 @@ public class WSDLServiceBuilderTest extends Assert {
         assertEquals(elementName.getLocalPart(), "sayHiResponse");
         assertEquals(elementName.getNamespaceURI(), 
"http://apache.org/hello_world_soap_http/types";);
 
-        assertTrue(sayHi.getFaults().size() == 0);
+        assertTrue(sayHi.getFaults().isEmpty());
 
         name = new QName(serviceInfo.getName().getNamespaceURI(), "pingMe");
         BindingOperationInfo pingMe = bindingInfo.getOperation(name);
diff --git 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
index 7a57219..4094876 100644
--- 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
+++ 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
@@ -133,7 +133,7 @@ public class ClaimsManager {
     }
 
     public ProcessedClaimCollection retrieveClaimValues(ClaimCollection 
claims, ClaimsParameters parameters) {
-        if (claims == null || claims.size() == 0) {
+        if (claims == null || claims.isEmpty()) {
             return null;
         }
 
diff --git 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
index 2774d42..7765e51 100644
--- 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
+++ 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
@@ -205,7 +205,7 @@ public class LdapClaimsHandler implements ClaimsHandler, 
RealmSupport {
                 ldapAttributes = LdapUtils.getAttributesOfEntry(ldap, 
this.userBaseDn, this.getObjectClass(), this
                     .getUserNameAttribute(), user, searchAttributes);
             }
-            if (this.userBaseDNs != null && (ldapAttributes == null || 
ldapAttributes.size() == 0)) {
+            if (this.userBaseDNs != null && (ldapAttributes == null || 
ldapAttributes.isEmpty())) {
                 for (String userBase : userBaseDNs) {
                     ldapAttributes = LdapUtils.getAttributesOfEntry(ldap, 
userBase, this.getObjectClass(), this
                         .getUserNameAttribute(), user, searchAttributes);
@@ -216,7 +216,7 @@ public class LdapClaimsHandler implements ClaimsHandler, 
RealmSupport {
             }
         }
 
-        if (ldapAttributes == null || ldapAttributes.size() == 0) {
+        if (ldapAttributes == null || ldapAttributes.isEmpty()) {
             //No result
             if (LOG.isLoggable(Level.INFO)) {
                 LOG.info("User '" + user + "' not found");
diff --git 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
index a9db2ae..379bf61 100644
--- 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
+++ 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
@@ -243,7 +243,7 @@ public class LdapGroupClaimsHandler implements 
ClaimsHandler, RealmSupport {
             LdapUtils.getAttributeOfEntries(ldap, this.groupBaseDn, 
this.getGroupObjectClass(),
                                             filters, "cn");
 
-        if (groups == null || groups.size() == 0) {
+        if (groups == null || groups.isEmpty()) {
             if (LOG.isLoggable(Level.INFO)) {
                 LOG.info("No groups found for user '" + user + "'");
             }
@@ -311,7 +311,7 @@ public class LdapGroupClaimsHandler implements 
ClaimsHandler, RealmSupport {
         }
 
         LOG.info("Filtered groups: " + filteredGroups);
-        if (filteredGroups.size() == 0) {
+        if (filteredGroups.isEmpty()) {
             LOG.info("No matching groups found for user '" + principal + "'");
             return new ProcessedClaimCollection();
         }
diff --git 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/mapper/ClaimUtils.java
 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/mapper/ClaimUtils.java
index 75a4415..c8ef597 100644
--- 
a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/mapper/ClaimUtils.java
+++ 
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/mapper/ClaimUtils.java
@@ -154,7 +154,7 @@ public class ClaimUtils {
             List<Object> values = resultClaim.getValues();
             List<Object> mappedValues = new ArrayList<>();
 
-            if (values == null || mapping == null || mapping.size() == 0) {
+            if (values == null || mapping == null || mapping.isEmpty()) {
                 resultClaim.setValues(mappedValues);
                 return resultClaim;
             }
diff --git 
a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/cache/HazelCastTokenStoreTest.java
 
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/cache/HazelCastTokenStoreTest.java
index 53dd443..687f9fc 100644
--- 
a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/cache/HazelCastTokenStoreTest.java
+++ 
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/cache/HazelCastTokenStoreTest.java
@@ -88,6 +88,6 @@ public class HazelCastTokenStoreTest extends org.junit.Assert 
{
         assertNull(store.getToken("test3"));
         store.remove(token1.getId());
         store.remove(token2.getId());
-        assertTrue(store.getTokenIdentifiers().size() == 0);
+        assertTrue(store.getTokenIdentifiers().isEmpty());
     }
 }
diff --git 
a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
 
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
index 4fb46a4..7b52b48 100644
--- 
a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
+++ 
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
@@ -103,7 +103,7 @@ public class CustomClaimsHandler implements ClaimsHandler {
                                 claim.addValue(requestedRole);
                             }
                         }
-                        if (claim.getValues().size() == 0) {
+                        if (claim.getValues().isEmpty()) {
                             continue;
                         }
                     } else {
diff --git 
a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
 
b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
index 715a4bd..d11b4bc 100644
--- 
a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
+++ 
b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
@@ -194,7 +194,7 @@ public final class WSDiscoveryClientTest {
                     System.out.println(pmt.getXAddrs());
                 }
             }
-            if (pmts.getProbeMatch().size() == 0) {
+            if (pmts.getProbeMatch().isEmpty()) {
                 System.exit(0);
             }
             pmts = c.probe(pt);
diff --git 
a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPublisher.java 
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPublisher.java
index f137640..9f3aa68 100644
--- 
a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPublisher.java
+++ 
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractPublisher.java
@@ -116,7 +116,7 @@ public abstract class AbstractPublisher extends 
AbstractEndpoint implements Publ
             PublisherRegistrationFailedFaultType fault = new 
PublisherRegistrationFailedFaultType();
             throw new PublisherRegistrationFailedFault("Invalid 
PublisherReference: null", fault);
         }
-        if (demand && (topic == null || topic.size() == 0)) {
+        if (demand && (topic == null || topic.isEmpty())) {
             InvalidTopicExpressionFaultType fault = new 
InvalidTopicExpressionFaultType();
             throw new InvalidTopicExpressionFault(
                     "Must specify at least one topic for demand-based 
publishing", fault);
diff --git 
a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsTopicExpressionConverter.java
 
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsTopicExpressionConverter.java
index 7156e1f..8fc1e68 100644
--- 
a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsTopicExpressionConverter.java
+++ 
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/jms/JmsTopicExpressionConverter.java
@@ -47,7 +47,7 @@ public class JmsTopicExpressionConverter {
     }
 
     public ActiveMQTopic toActiveMQTopic(List<TopicExpressionType> topics) 
throws InvalidTopicException {
-        if (topics == null || topics.size() == 0) {
+        if (topics == null || topics.isEmpty()) {
             return null;
         }
         int size = topics.size();
diff --git 
a/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/X509Locator.java
 
b/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/X509Locator.java
index fe52b86..0c44a15 100644
--- 
a/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/X509Locator.java
+++ 
b/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/X509Locator.java
@@ -72,7 +72,7 @@ public class X509Locator implements Locator {
 
     public X509Certificate findCertificate(List<UseKeyWithType> ids) throws 
CertificateException {
         X509Certificate cert = null;
-        if (ids.size() == 0) {
+        if (ids.isEmpty()) {
             throw new IllegalArgumentException("No UseKeyWithType elements 
found");
         }
         if (ids.size() == 1) {
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/Books.java 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/Books.java
index e07f804..23d68f2 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/Books.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/Books.java
@@ -40,6 +40,6 @@ public class Books {
     }
 
     public Book getBook() {
-        return books.size() == 0 ? null : books.get(0);
+        return books.isEmpty() ? null : books.get(0);
     }
 }
diff --git 
a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
 
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
index de17360..d0cd10e 100644
--- 
a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
+++ 
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
@@ -589,7 +589,7 @@ public abstract class AbstractTypeTestClient4 extends 
AbstractTypeTestClient3 {
     }
 
     protected boolean isNormalized(StructWithOccuringChoice x) {
-        return x == null || x.getVarIntOrVarString().size() == 0;
+        return x == null || x.getVarIntOrVarString().isEmpty();
     }
 
     @Test
diff --git 
a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java 
b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
index c5378f7..91a854c 100644
--- 
a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
+++ 
b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
@@ -1814,7 +1814,7 @@ public class SequenceTest extends 
AbstractBusClientServerTestBase {
                     it.remove();
                 }
             }
-            if (map.get(sid).size() == 0) {
+            if (map.get(sid).isEmpty()) {
                 map.remove(sid);
             }
         }
diff --git 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/idltypes/IdlStructBase.java
 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/idltypes/IdlStructBase.java
index 8629cf4..715dcd3 100644
--- 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/idltypes/IdlStructBase.java
+++ 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/idltypes/IdlStructBase.java
@@ -55,7 +55,7 @@ public abstract class IdlStructBase extends IdlScopeBase 
implements IdlType {
         if (isCircular()) {
             return false;
         }
-        if (definitions().size() == 0) {
+        if (definitions().isEmpty()) {
             return true;
         }
         boolean hasNonEmptyMembers = false;
diff --git 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
index ac063f4..ac293da 100644
--- 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
+++ 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
@@ -461,7 +461,7 @@ public class WSDLToCorbaHelper {
             }
         }
 
-        if ((struct != null) && (struct.getMember().size() == 0)) {
+        if ((struct != null) && (struct.getMember().isEmpty())) {
             String msgStr = "Cannot create CORBA Struct" + struct.getName()
                             + "from container with no members";
             org.apache.cxf.common.i18n.Message msg = new 
org.apache.cxf.common.i18n.Message(
@@ -787,7 +787,7 @@ public class WSDLToCorbaHelper {
 
     private boolean isEnumeration(XmlSchemaSimpleTypeRestriction restriction) {
 
-        if ((restriction == null) || (restriction.getFacets().size() == 0)
+        if ((restriction == null) || (restriction.getFacets().isEmpty())
             || (restriction.getBaseTypeName() == null)) {
             return false;
         }
@@ -878,7 +878,7 @@ public class WSDLToCorbaHelper {
     public boolean isLiteralArray(XmlSchemaComplexType type) {
         boolean array = false;
 
-        if ((type.getAttributes().size() == 0)
+        if ((type.getAttributes().isEmpty())
             && (type.getParticle() instanceof XmlSchemaSequence)) {
             XmlSchemaSequence stype = (XmlSchemaSequence)type.getParticle();
 
diff --git 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
index d0b33e4..3cdd2af 100644
--- 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
+++ 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
@@ -130,7 +130,7 @@ public class WSDLToIDLAction {
             // generate idl for all bindings in the file.
             // each idl file will have the name of the binding.
             Collection<Binding> bindings = 
CastUtils.cast(def.getAllBindings().values());
-            if (bindings.size() == 0) {
+            if (bindings.isEmpty()) {
                 String msgStr = "No bindings exists within this WSDL.";
                 org.apache.cxf.common.i18n.Message msg = new 
org.apache.cxf.common.i18n.Message(msgStr, LOG);
                 throw new Exception(msg.toString());
diff --git 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
index 7624570..610728d 100644
--- 
a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
+++ 
b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
@@ -267,7 +267,7 @@ public final class WSDLTypes {
         boolean isUnion = false;
 
         if (type.getParticle() instanceof XmlSchemaSequence
-            && type.getAttributes().size() == 0) {
+            && type.getAttributes().isEmpty()) {
 
             XmlSchemaSequence stype = (XmlSchemaSequence)type.getParticle();
 
@@ -294,7 +294,7 @@ public final class WSDLTypes {
     public static boolean isUnion(XmlSchemaComplexType type) {
         boolean isUnion = false;
 
-        if (type.getParticle() instanceof XmlSchemaChoice && 
type.getAttributes().size() == 0) {
+        if (type.getParticle() instanceof XmlSchemaChoice && 
type.getAttributes().isEmpty()) {
             isUnion = true;
         }
 
diff --git 
a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGenerator.java
 
b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGenerator.java
index 04b5e8a..56c7e02 100644
--- 
a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGenerator.java
+++ 
b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGenerator.java
@@ -81,14 +81,14 @@ public final class DateTypeCustomGenerator extends 
AbstractGenerator<File> {
             generator.setAttributes("datetype", dateType.getName());
 
             if (allowImports()) {
-                if (schemaFiles.size() == 0) {
+                if (schemaFiles.isEmpty()) {
                     return null;
                 }
                 generator.setAttributes("schemaFiles", schemaFiles);
             } else {
                 generator.setAttributes("wsdlName", wsdlName);
                 List<String> ns = getSchemaNamespaces();
-                if (ns.size() == 0) {
+                if (ns.isEmpty()) {
                     return null;
                 }
                 generator.setAttributes("targetNamespaces", ns);
diff --git 
a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java
 
b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java
index a91d87b..96b4a12 100644
--- 
a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java
+++ 
b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java
@@ -57,7 +57,7 @@ public final class ValidationResult {
     }
 
     public boolean isSuccessful() {
-        return errors.size() == 0 && warnings.size() == 0;
+        return errors.isEmpty() && warnings.size() == 0;
     }
 
     public String toString() {
diff --git 
a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
 
b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
index 889eca6..391ee12 100644
--- 
a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
+++ 
b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
@@ -269,7 +269,7 @@ public class WSDLRefValidator extends 
AbstractDefinitionValidator {
     private Map<QName, XNode> getBindings(Service service) {
         Map<QName, XNode> bindings = new HashMap<>();
 
-        if (service.getPorts().values().size() == 0) {
+        if (service.getPorts().values().isEmpty()) {
             throw new ToolException("Service " + service.getQName() + " does 
not contain any usable ports");
         }
         Collection<Port> ports = CastUtils.cast(service.getPorts().values());
@@ -387,7 +387,7 @@ public class WSDLRefValidator extends 
AbstractDefinitionValidator {
     }
 
     private void collectValidationPoints() throws Exception {
-        if (services.size() == 0) {
+        if (services.isEmpty()) {
             LOG.log(Level.WARNING, "WSDL document "
                     + this.definition.getDocumentBaseURI() + " does not define 
any services");
             //addWarning("WSDL document does not define any services");
diff --git 
a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
 
b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
index d60a0c7..d381b4e 100644
--- 
a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
+++ 
b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
@@ -331,7 +331,7 @@ public class SourceGenerator {
         }
 
         List<Element> resourceEls = getWadlElements(resourcesEls.get(0), 
"resource");
-        if (resourceEls.size() == 0) {
+        if (resourceEls.isEmpty()) {
             throw new IllegalStateException("WADL has no resource elements");
         }
 
@@ -1155,7 +1155,7 @@ public class SourceGenerator {
                 return true;
             }
         }
-        if (repElements.size() == 0) {
+        if (repElements.isEmpty()) {
             if (useVoidForEmptyResponses && !responseRequired || 
suspendedAsync) {
                 sbCode.append("void ");
                 return false;
@@ -1678,7 +1678,7 @@ public class SourceGenerator {
                                         Set<String> imports,
                                         boolean inRep,
                                         Element requestRepWithElement) {
-        if (repElements.size() == 0) {
+        if (repElements.isEmpty()) {
             return;
         }
         Class<?> cls = inRep ? Consumes.class : Produces.class;
diff --git 
a/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
 
b/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
index 098ca98..6e071d0 100644
--- 
a/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
+++ 
b/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
@@ -890,7 +890,7 @@ public class JAXBDataBinding implements DataBindingProfile {
                                                                      
ToolConstants.SCHEMA_URI,
                                                                      
"include");
         boolean hasJAXB = DOMUtils.hasElementInNS(element, 
ToolConstants.NS_JAXB_BINDINGS);
-        if (impElemList.size() == 0 && incElemList.size() == 0 && !hasJAXB) {
+        if (impElemList.isEmpty() && incElemList.size() == 0 && !hasJAXB) {
             return element;
         }
         element = (Element)cloneNode(element.getOwnerDocument(), element, 
true);
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
index 0c99d42..b78fb95 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
@@ -202,7 +202,7 @@ public final class CustomizationParser {
                 DOMUtils.findAllElementsByTagNameNS(jaxwsBinding,
                                                     
ToolConstants.HANDLER_CHAINS_URI,
                                                     
ToolConstants.HANDLER_CHAINS);
-            if (elemList.size() == 0) {
+            if (elemList.isEmpty()) {
                 continue;
             }
             // take the first one, anyway its 1 handler-config per 
customization
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
index dff77a1..31f1d1f 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
@@ -60,7 +60,7 @@ public class AntGenerator extends AbstractJAXWSGenerator {
         Map<QName, JavaModel> map = CastUtils.cast((Map<?, 
?>)penv.get(WSDLToJavaProcessor.MODEL_MAP));
         for (JavaModel javaModel : map.values()) {
 
-            if (javaModel.getServiceClasses().size() == 0) {
+            if (javaModel.getServiceClasses().isEmpty()) {
                 ServiceInfo serviceInfo = env.get(ServiceInfo.class);
                 String wsdl = serviceInfo.getDescription().getBaseURI();
                 Message msg = new Message("CAN_NOT_GEN_ANT", LOG, wsdl);
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
index 9abdef0..d50d2cb 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
@@ -58,7 +58,7 @@ public class ClientGenerator extends AbstractJAXWSGenerator {
         Map<QName, JavaModel> map = CastUtils.cast((Map<?, 
?>)penv.get(WSDLToJavaProcessor.MODEL_MAP));
         for (JavaModel javaModel : map.values()) {
 
-            if (javaModel.getServiceClasses().size() == 0) {
+            if (javaModel.getServiceClasses().isEmpty()) {
                 ServiceInfo serviceInfo = env.get(ServiceInfo.class);
                 String wsdl = serviceInfo.getDescription().getBaseURI();
                 Message msg = new Message("CAN_NOT_GEN_CLIENT", LOG, wsdl);
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
index 8ec3e8d..2b7c266 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
@@ -73,7 +73,7 @@ public class SEIGenerator extends AbstractJAXWSGenerator {
 
             Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
 
-            if (interfaces.size() == 0) {
+            if (interfaces.isEmpty()) {
                 ServiceInfo serviceInfo = env.get(ServiceInfo.class);
                 String wsdl = serviceInfo.getDescription().getBaseURI();
                 Message msg = new Message("CAN_NOT_GEN_SEI", LOG, wsdl);
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
index 63a4a57..88191e6 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
@@ -65,7 +65,7 @@ public class ServerGenerator extends AbstractJAXWSGenerator {
             String address = "CHANGE_ME";
             Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
 
-            if (javaModel.getServiceClasses().size() == 0) {
+            if (javaModel.getServiceClasses().isEmpty()) {
                 ServiceInfo serviceInfo = env.get(ServiceInfo.class);
                 String wsdl = serviceInfo.getDescription().getBaseURI();
                 Message msg = new Message("CAN_NOT_GEN_SRV", LOG, wsdl);
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
index 13c3e21..71523ac 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
@@ -77,7 +77,7 @@ public class ServiceGenerator extends AbstractJAXWSGenerator {
 
             Map<String, JavaServiceClass> serviceClasses = 
javaModel.getServiceClasses();
 
-            if (serviceClasses.size() == 0) {
+            if (serviceClasses.isEmpty()) {
                 ServiceInfo serviceInfo = env.get(ServiceInfo.class);
                 String wsdl = serviceInfo.getDescription().getBaseURI();
                 Message msg = new Message("CAN_NOT_GEN_SERVICE", LOG, wsdl);
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
index 884f54f..b2ea37c 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
@@ -239,7 +239,7 @@ public class ParameterProcessor extends AbstractProcessor {
         MessagePartInfo part = inputMessage.getFirstMessagePart();
 
         List<QName> wrappedElements = 
ProcessorUtil.getWrappedElementQNames(context, part.getElementQName());
-        if ((wrappedElements == null || wrappedElements.size() == 0)
+        if ((wrappedElements == null || wrappedElements.isEmpty())
             && countOutOfBandHeader(inputMessage) == 0) {
             return;
         }
@@ -399,7 +399,7 @@ public class ParameterProcessor extends AbstractProcessor {
             outputWrapElement = ProcessorUtil.getWrappedElementQNames(context, 
outputPart.getElementQName());
         }
 
-        if (inputWrapElement == null || outputWrapElement.size() == 0) {
+        if (inputWrapElement == null || outputWrapElement.isEmpty()) {
             addVoidReturn(method);
             return;
         }

-- 
To stop receiving notification emails like this one, please contact
cohei...@apache.org.

Reply via email to