cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [05/12] cxf git commit: Remove bunch of unnecessary casts and change a bunch of calls to static methods to use the appropriate static class
Date Fri, 04 Aug 2017 19:35:05 GMT
Remove  bunch of unnecessary casts and change a bunch of calls to static methods to use the appropriate static class


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ed5dfc98
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ed5dfc98
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ed5dfc98

Branch: refs/heads/master
Commit: ed5dfc9871a9d6717d76c7e1a7de1e2ceb050f2f
Parents: aaa00d1
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Aug 4 14:01:33 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Aug 4 14:02:07 2017 -0400

----------------------------------------------------------------------
 .../ws/security/cache/CacheCleanupListener.java |   4 +-
 .../security/tokenstore/EHCacheTokenStore.java  |   2 +-
 .../cxf/ws/security/trust/STSLoginModule.java   |   6 +-
 .../wss4j/PolicyBasedWSS4JInInterceptor.java    |   8 +-
 .../wss4j/UsernameTokenInterceptor.java         |   2 +-
 .../policyhandlers/AbstractBindingBuilder.java  |   2 +-
 .../AbstractStaxBindingHandler.java             |   2 +-
 .../StaxAsymmetricBindingHandler.java           |   4 +-
 .../StaxSymmetricBindingHandler.java            |   4 +-
 .../StaxTransportBindingHandler.java            |   4 +-
 .../RequiredPartsPolicyValidator.java           |   2 +-
 .../wss4j/AbstractPolicySecurityTest.java       |   8 +-
 .../cxf/sts/cache/HazelCastTokenStore.java      |   6 +-
 .../cxf/sts/claims/LdapClaimsHandler.java       |   2 +-
 .../org/apache/cxf/sts/claims/LdapUtils.java    |   2 +-
 .../apache/cxf/sts/event/map/EventMapper.java   |   8 +-
 .../apache/cxf/sts/request/RequestParser.java   |   2 +-
 .../sts/rest/RESTSecurityTokenServiceImpl.java  |   2 +-
 .../sts/token/provider/SymmetricKeyHandler.java |   8 +-
 .../sts/token/renewer/SAMLTokenRenewerTest.java |   6 +-
 .../AsymmetricEncryptionTest.java               |   5 +-
 .../sts/basic_auth/JaxwsBasicAuthTest.java      |   9 +-
 .../systest/sts/batch/SAMLBatchUnitTest.java    |   5 +-
 .../systest/sts/batch/SimpleBatchSTSClient.java |   2 +-
 .../BinarySecurityTokenTest.java                |   9 +-
 .../cxf/systest/sts/caching/CachingTest.java    |  13 +-
 .../systest/sts/caching/ServerCachingTest.java  |  13 +-
 .../cxf/systest/sts/claims/ClaimsTest.java      |  33 +--
 .../sts/cross_domain/CrossDomainTest.java       |   9 +-
 .../systest/sts/custom/CustomParameterTest.java |  21 +-
 .../custom_onbehalfof/CustomOnBehalfOfTest.java |   9 +-
 .../DistributedCachingTest.java                 |  13 +-
 .../apache/cxf/systest/sts/jwt/JWTUnitTest.java |   5 +-
 .../cxf/systest/sts/jwt/JaxrsJWTTest.java       |   5 +-
 .../kerberos/KerberosDelegationTokenTest.java   |   5 +-
 .../systest/sts/realms/DifferentRealmTest.java  |  17 +-
 .../cxf/systest/sts/renew/SAMLRenewTest.java    |   5 +-
 .../systest/sts/renew/SAMLRenewUnitTest.java    |  25 +--
 .../sts/secure_conv/SecureConversationTest.java |  13 +-
 .../SecurityContextTokenCancelTest.java         |   5 +-
 .../SecurityContextTokenUnitTest.java           |  17 +-
 .../cxf/systest/sts/soap12/Soap12Test.java      |   9 +-
 .../STSSenderVouchesTest.java                   |   5 +-
 .../sts/transformation/TransformationTest.java  |   9 +-
 .../sts/usernametoken/UsernameTokenTest.java    |  17 +-
 .../sts/asymmetric/AsymmetricBindingTest.java   |  17 +-
 .../cxf/systest/sts/bearer/BearerTest.java      |   9 +-
 .../sts/delegation/SAMLDelegationTest.java      |  17 +-
 .../IntermediaryTransformationCachingTest.java  |   5 +-
 .../IntermediaryTransformationTest.java         |   9 +-
 .../cxf/systest/sts/issuer/IssuerTest.java      |  13 +-
 .../systest/sts/issueunit/IssueUnitTest.java    |  37 ++--
 .../apache/cxf/systest/sts/jaas/JAASTest.java   |  33 +--
 .../cxf/systest/sts/rest/STSRESTTest.java       | 117 +++++------
 .../sts/sendervouches/SenderVouchesTest.java    |   5 +-
 .../systest/sts/stsclient/STSClientTest.java    |   9 +-
 .../sts/symmetric/SymmetricBindingTest.java     |  25 +--
 .../cxf/systest/sts/template/TemplateTest.java  |  25 +--
 .../sts/transport/TransportBindingTest.java     |  33 +--
 .../UsernameActAsCachingTest.java               |  17 +-
 .../sts/username_actas/UsernameActAsTest.java   |   5 +-
 .../UsernameOnBehalfOfCachingTest.java          |  17 +-
 .../UsernameOnBehalfOfTest.java                 |   5 +-
 .../sts/x509/X509AsymmetricBindingTest.java     |   5 +-
 .../sts/x509/X509SymmetricBindingTest.java      |  21 +-
 .../cxf/systest/ws/action/ActionTest.java       |  49 ++---
 .../ws/action/SignatureWhitespaceTest.java      |  13 +-
 .../systest/ws/algsuite/AlgorithmSuiteTest.java |  25 +--
 .../ws/algsuite/StaxAlgorithmSuiteTest.java     |   5 +-
 .../cxf/systest/ws/basicauth/BasicAuthTest.java |   9 +-
 .../ws/bindings/BindingPropertiesTest.java      |  45 +++--
 .../cxf/systest/ws/cache/CachingTest.java       |   9 +-
 .../CryptoCoverageCheckerTest.java              |  57 +++---
 .../apache/cxf/systest/ws/fault/FaultTest.java  |  20 +-
 .../systest/ws/fault/ModifiedRequestTest.java   |  21 +-
 .../org/apache/cxf/systest/ws/gcm/GCMTest.java  |  21 +-
 .../cxf/systest/ws/httpget/HTTPGetTest.java     |  17 +-
 .../cxf/systest/ws/https/HttpsTokenTest.java    |  17 +-
 .../cxf/systest/ws/mtom/MTOMSecurityTest.java   |  33 +--
 .../apache/cxf/systest/ws/parts/PartsTest.java  |  45 +++--
 .../ws/policy/PolicyAlternativeTest.java        |  25 +--
 .../ws/policy/UriDomainFactoryBeanListener.java |   2 +-
 .../cxf/systest/ws/saml/SamlTokenTest.java      | 101 +++++-----
 .../saml/subjectconf/SamlSubjectConfTest.java   |  33 +--
 .../systest/ws/security/SecurityPolicyTest.java |  36 ++--
 .../cxf/systest/ws/swa/SWAActionTest.java       |  21 +-
 .../cxf/systest/ws/swa/SWAPolicyTest.java       |  29 +--
 .../ws/tokens/BinarySecurityTokenTest.java      |   5 +-
 .../ws/tokens/EndorsingSupportingTokenTest.java |   9 +-
 .../systest/ws/tokens/SupportingTokenTest.java  |  17 +-
 .../systest/ws/ut/UsernameTokenDerivedTest.java |  29 +--
 .../systest/ws/ut/UsernameTokenPolicyTest.java  |  21 +-
 .../cxf/systest/ws/ut/UsernameTokenTest.java    |  53 ++---
 .../cxf/systest/ws/wssc/WSSCUnitTest.java       |  21 +-
 .../cxf/systest/ws/x509/X509TokenTest.java      | 201 ++++++++++---------
 .../apache/cxf/systest/ws/xkms/XKMSTest.java    |   9 +-
 96 files changed, 928 insertions(+), 856 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/CacheCleanupListener.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/CacheCleanupListener.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/CacheCleanupListener.java
index 1fbe882..4682904 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/CacheCleanupListener.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/CacheCleanupListener.java
@@ -59,11 +59,11 @@ public class CacheCleanupListener implements ServerLifeCycleListener, ClientLife
         }
         ReplayCache rc = (ReplayCache)info.getProperty(SecurityConstants.NONCE_CACHE_INSTANCE);
         if (rc != null) {
-            close((Closeable)rc);
+            close(rc);
         }
         rc = (ReplayCache)info.getProperty(SecurityConstants.TIMESTAMP_CACHE_INSTANCE);
         if (rc != null) {
-            close((Closeable)rc);
+            close(rc);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
index 0786732..435de10 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
@@ -141,7 +141,7 @@ public class EHCacheTokenStore implements TokenStore, Closeable, BusLifeCycleLis
 
     private int getTTL() {
         int parsedTTL = (int)ttl;
-        if (ttl != (long)parsedTTL) {
+        if (ttl != parsedTTL) {
              // Fall back to 60 minutes if the default TTL is set incorrectly
             parsedTTL = 3600;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
index 194f68f..5357f35 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
@@ -284,8 +284,8 @@ public class STSLoginModule implements LoginModule {
             URL busFile = Loader.getResource(cxfSpringCfg);
 
             Bus bus = bf.createBus(busFile.toString());
-            SpringBusFactory.setDefaultBus(bus);
-            SpringBusFactory.setThreadDefaultBus(bus);
+            BusFactory.setDefaultBus(bus);
+            BusFactory.setThreadDefaultBus(bus);
             c = new STSClient(bus);
         } else if (msg == null) {
             Bus bus = BusFactory.getDefaultBus(true);
@@ -370,7 +370,7 @@ public class STSLoginModule implements LoginModule {
             }
 
             ClaimCollection claims =
-                SAMLUtils.getClaims((SamlAssertionWrapper)samlAssertion);
+                SAMLUtils.getClaims(samlAssertion);
             return SAMLUtils.parseRolesFromClaims(claims, roleAttributeName, null);
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
index b4ecea8..1b83bcf 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
@@ -144,10 +144,10 @@ public class PolicyBasedWSS4JInInterceptor extends WSS4JInInterceptor {
         if (encrCrypto != null) {
             final String encCryptoRefId = "RefId-" + encrCrypto.hashCode();
             message.put(WSHandlerConstants.SIG_VER_PROP_REF_ID, encCryptoRefId);
-            message.put(encCryptoRefId, (Crypto)encrCrypto);
+            message.put(encCryptoRefId, encrCrypto);
         } else if (signCrypto != null) {
             message.put(WSHandlerConstants.SIG_VER_PROP_REF_ID, signCryptoRefId);
-            message.put(signCryptoRefId, (Crypto)signCrypto);
+            message.put(signCryptoRefId, signCrypto);
         }
 
         return action;
@@ -184,10 +184,10 @@ public class PolicyBasedWSS4JInInterceptor extends WSS4JInInterceptor {
         if (encrCrypto != null) {
             final String encCryptoRefId = "RefId-" + encrCrypto.hashCode();
             message.put(WSHandlerConstants.SIG_VER_PROP_REF_ID, encCryptoRefId);
-            message.put(encCryptoRefId, (Crypto)encrCrypto);
+            message.put(encCryptoRefId, encrCrypto);
         } else if (signCrypto != null) {
             message.put(WSHandlerConstants.SIG_VER_PROP_REF_ID, signCryptoRefId);
-            message.put(signCryptoRefId, (Crypto)signCrypto);
+            message.put(signCryptoRefId, signCrypto);
         }
 
         return action;

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
index b75d317..8a411d4 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
@@ -158,7 +158,7 @@ public class UsernameTokenInterceptor extends AbstractTokenInterceptor {
         }
 
         ClaimCollection claims =
-            SAMLUtils.getClaims((SamlAssertionWrapper)samlAssertion);
+            SAMLUtils.getClaims(samlAssertion);
         Set<Principal> roles =
             SAMLUtils.parseRolesFromClaims(claims, roleAttributeName, null);
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 39e0042..833ebea 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -903,7 +903,7 @@ public abstract class AbstractBindingBuilder extends AbstractCommonBindingHandle
         if (o == null) {
             SecurityToken securityToken = getSecurityToken();
             if (securityToken != null) {
-                Element tokenElement = (Element)securityToken.getToken();
+                Element tokenElement = securityToken.getToken();
                 String namespace = tokenElement.getNamespaceURI();
                 String localname = tokenElement.getLocalName();
                 SamlTokenType tokenType = token.getSamlTokenType();

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
index 47bc21b..ea22b1e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
@@ -656,7 +656,7 @@ public abstract class AbstractStaxBindingHandler extends AbstractCommonBindingHa
             } */
             } else if (token instanceof IssuedToken) {
                 SecurityToken sigTok = getSecurityToken();
-                SecurePart securePart = addIssuedToken((IssuedToken)token, sigTok, signed, endorse);
+                SecurePart securePart = addIssuedToken(token, sigTok, signed, endorse);
                 if (securePart != null) {
                     ret.put(token, securePart);
                     if (suppTokens.isEncryptedToken()) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
index 037a2cb..f138a1a 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
@@ -130,7 +130,7 @@ public class StaxAsymmetricBindingHandler extends AbstractStaxBindingHandler {
                 AbstractToken initiatorToken = initiatorWrapper.getToken();
                 if (initiatorToken instanceof IssuedToken) {
                     SecurityToken sigTok = getSecurityToken();
-                    addIssuedToken((IssuedToken)initiatorToken, sigTok, false, true);
+                    addIssuedToken(initiatorToken, sigTok, false, true);
 
                     if (sigTok != null) {
                         storeSecurityToken(initiatorToken, sigTok);
@@ -257,7 +257,7 @@ public class StaxAsymmetricBindingHandler extends AbstractStaxBindingHandler {
                 AbstractToken initiatorToken = initiatorWrapper.getToken();
                 if (initiatorToken instanceof IssuedToken) {
                     SecurityToken sigTok = getSecurityToken();
-                    addIssuedToken((IssuedToken)initiatorToken, sigTok, false, true);
+                    addIssuedToken(initiatorToken, sigTok, false, true);
 
                     if (sigTok != null) {
                         storeSecurityToken(initiatorToken, sigTok);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
index 6c80607..df86a11 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
@@ -169,7 +169,7 @@ public class StaxSymmetricBindingHandler extends AbstractStaxBindingHandler {
                 }
             } else if (encryptionToken instanceof IssuedToken) {
                 tok = getSecurityToken();
-                addIssuedToken((IssuedToken)encryptionToken, tok, false, true);
+                addIssuedToken(encryptionToken, tok, false, true);
 
                 if (tok == null && !isRequestor()) {
                     org.apache.xml.security.stax.securityToken.SecurityToken securityToken =
@@ -295,7 +295,7 @@ public class StaxSymmetricBindingHandler extends AbstractStaxBindingHandler {
                     }
                 } else if (sigToken instanceof IssuedToken) {
                     sigTok = getSecurityToken();
-                    addIssuedToken((IssuedToken)sigToken, sigTok, false, true);
+                    addIssuedToken(sigToken, sigTok, false, true);
 
                     if (sigTok == null && !isRequestor()) {
                         org.apache.xml.security.stax.securityToken.SecurityToken securityToken =

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxTransportBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxTransportBindingHandler.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxTransportBindingHandler.java
index 812e5bf..ff71d2f 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxTransportBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxTransportBindingHandler.java
@@ -108,7 +108,7 @@ public class StaxTransportBindingHandler extends AbstractStaxBindingHandler {
                         unassertPolicy(token.getToken(), "No transport token id");
                         return;
                     }
-                    addIssuedToken((IssuedToken)token.getToken(), secToken, false, false);
+                    addIssuedToken(token.getToken(), secToken, false, false);
                 }
                 assertToken(token.getToken());
                 assertTokenWrapper(token);
@@ -222,7 +222,7 @@ public class StaxTransportBindingHandler extends AbstractStaxBindingHandler {
             if (token instanceof UsernameToken) {
                 addUsernameToken((UsernameToken)token);
             } else if (token instanceof IssuedToken) {
-                addIssuedToken((IssuedToken)token, getSecurityToken(), false, false);
+                addIssuedToken(token, getSecurityToken(), false, false);
             } else if (token instanceof KerberosToken) {
                 addKerberosToken((KerberosToken)token, false, false, false);
             } else if (token instanceof SamlToken) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/RequiredPartsPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/RequiredPartsPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/RequiredPartsPolicyValidator.java
index f6fe386..e5407a4 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/RequiredPartsPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/RequiredPartsPolicyValidator.java
@@ -58,7 +58,7 @@ public class RequiredPartsPolicyValidator implements SecurityPolicyValidator {
             ai.setAsserted(true);
             for (Header h : rp.getHeaders()) {
                 QName qName = new QName(h.getNamespace(), h.getName());
-                if (header == null || DOMUtils.getFirstChildWithName((Element)header, qName) == null) {
+                if (header == null || DOMUtils.getFirstChildWithName(header, qName) == null) {
                     ai.setNotAsserted("No header element of name " + qName + " found.");
                 }
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
index b0b677a..c3407f2 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
@@ -502,7 +502,7 @@ public abstract class AbstractPolicySecurityTest extends AbstractSecurityTest {
             (NodeList) digestAlgoExpr.evaluate(signedDoc, XPathConstants.NODESET);
 
         for (int i = 0; i < digestMethodNodes.getLength(); i++) {
-            Node node = (Node)digestMethodNodes.item(i);
+            Node node = digestMethodNodes.item(i);
             String digestAlgorithm = node.getAttributes().getNamedItem("Algorithm").getNodeValue();
             assertEquals(expectedDigestAlgorithm, digestAlgorithm);
         }
@@ -532,10 +532,10 @@ public abstract class AbstractPolicySecurityTest extends AbstractSecurityTest {
 
         String strId = null;
         for (int i = 0; i < strKeyIdNodes.getLength(); i++) {
-            Node keyIdNode = (Node) strKeyIdNodes.item(i);
+            Node keyIdNode = strKeyIdNodes.item(i);
             String strKey = keyIdNode.getTextContent();
             if (strKey.equals(assertionId)) {
-                Node strNode = (Node) keyIdNode.getParentNode();
+                Node strNode = keyIdNode.getParentNode();
                 strId = strNode.getAttributes().
                     getNamedItemNS(nsContext.getNamespaceURI("wsu"), "Id").getNodeValue();
                 break;
@@ -552,7 +552,7 @@ public abstract class AbstractPolicySecurityTest extends AbstractSecurityTest {
 
         boolean foundStrReference = false;
         for (int i = 0; i < sigReferenceNodes.getLength(); i++) {
-            Node sigRefNode = (Node) sigReferenceNodes.item(i);
+            Node sigRefNode = sigReferenceNodes.item(i);
             String sigRefURI = sigRefNode.getAttributes().getNamedItem("URI").getNodeValue();
             if (sigRefURI.equals("#" + strId)) {
                 foundStrReference = true;

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/HazelCastTokenStore.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/HazelCastTokenStore.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/HazelCastTokenStore.java
index 28ab73a..ee85219 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/HazelCastTokenStore.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/HazelCastTokenStore.java
@@ -135,10 +135,10 @@ public class HazelCastTokenStore implements TokenStore {
             Duration duration = Duration.between(now, expires);
 
             parsedTTL = (int)duration.getSeconds();
-            if (duration.getSeconds() != (long)parsedTTL || parsedTTL > MAX_TTL) {
+            if (duration.getSeconds() != parsedTTL || parsedTTL > MAX_TTL) {
                 // Default to configured value
                 parsedTTL = (int)ttl;
-                if (ttl != (long)parsedTTL) {
+                if (ttl != parsedTTL) {
                     // Fall back to 60 minutes if the default TTL is set incorrectly
                     parsedTTL = 3600;
                 }
@@ -146,7 +146,7 @@ public class HazelCastTokenStore implements TokenStore {
         } else {
             // Default to configured value
             parsedTTL = (int)ttl;
-            if (ttl != (long)parsedTTL) {
+            if (ttl != parsedTTL) {
                 // Fall back to 60 minutes if the default TTL is set incorrectly
                 parsedTTL = 3600;
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
----------------------------------------------------------------------
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 c89df6c..2774d42 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
@@ -254,7 +254,7 @@ public class LdapClaimsHandler implements ClaimsHandler, RealmSupport {
         c.setPrincipal(principal);
 
         try {
-            NamingEnumeration<?> list = (NamingEnumeration<?>)attr.getAll();
+            NamingEnumeration<?> list = attr.getAll();
             while (list.hasMore()) {
                 Object obj = list.next();
                 if (obj instanceof String) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapUtils.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapUtils.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapUtils.java
index b453ae6..42a5f88 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapUtils.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapUtils.java
@@ -114,7 +114,7 @@ public final class LdapUtils {
             public Object mapFromAttributes(Attributes attrs) throws NamingException {
                 NamingEnumeration<? extends Attribute> attrEnum = attrs.getAll();
                 while (attrEnum.hasMore()) {
-                    return (String) attrEnum.next().get();
+                    return attrEnum.next().get();
                 }
                 return null;
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
index 1eb54ef..aeda39a 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
@@ -88,7 +88,7 @@ public class EventMapper implements STSEventListener {
                 (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
             map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
             map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-            map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
+            map.put(KEYS.URL.name(), params.getMessageContext().get("org.apache.cxf.request.url"));
         } catch (Exception ex) {
             map.put(KEYS.REMOTE_HOST.name(), "N.A.");
             map.put(KEYS.REMOTE_PORT.name(), "N.A.");
@@ -136,7 +136,7 @@ public class EventMapper implements STSEventListener {
             (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
         map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
         map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-        map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
+        map.put(KEYS.URL.name(), params.getMessageContext().get("org.apache.cxf.request.url"));
         map.put(KEYS.TOKENTYPE.name(), params.getTokenRequirements().getTokenType());
         if (params.getTokenRequirements().getActAs() != null) {
             map.put(KEYS.VALIDATE_PRINCIPAL.name(), params.getTokenRequirements().getValidateTarget().getPrincipal()
@@ -157,7 +157,7 @@ public class EventMapper implements STSEventListener {
             (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
         map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
         map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-        map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
+        map.put(KEYS.URL.name(), params.getMessageContext().get("org.apache.cxf.request.url"));
         map.put(KEYS.TOKENTYPE.name(), params.getTokenRequirements().getTokenType());
         if (params.getTokenRequirements().getActAs() != null) {
             map.put(KEYS.CANCEL_PRINCIPAL.name(), params.getTokenRequirements().getCancelTarget().getPrincipal()
@@ -177,7 +177,7 @@ public class EventMapper implements STSEventListener {
             (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
         map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
         map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-        map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
+        map.put(KEYS.URL.name(), params.getMessageContext().get("org.apache.cxf.request.url"));
         map.put(KEYS.TOKENTYPE.name(), params.getTokenRequirements().getTokenType());
         if (params.getTokenRequirements().getRenewTarget() != null) {
             map.put(KEYS.RENEW_PRINCIPAL.name(), params.getTokenRequirements().getRenewTarget().getPrincipal()

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
index 960b9b7..b53c95f 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
@@ -151,7 +151,7 @@ public class RequestParser {
                     tokenRequirements.setAppliesTo(element);
                     LOG.fine("Found AppliesTo element");
                 } else if (allowCustomContent) {
-                    tokenRequirements.addCustomContent((Element)requestObject);
+                    tokenRequirements.addCustomContent(requestObject);
                 } else {
                     LOG.log(
                         Level.WARNING,

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
index b9c0030..627f5f9 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
@@ -380,7 +380,7 @@ public class RESTSecurityTokenServiceImpl extends SecurityTokenServiceImpl imple
 
     private X509Certificate getTLSClientCertificate() {
         TLSSessionInfo tlsInfo =
-            (TLSSessionInfo)PhaseInterceptorChain.getCurrentMessage().get(TLSSessionInfo.class);
+            PhaseInterceptorChain.getCurrentMessage().get(TLSSessionInfo.class);
         if (tlsInfo != null && tlsInfo.getPeerCertificates() != null
                 && tlsInfo.getPeerCertificates().length > 0
                 && (tlsInfo.getPeerCertificates()[0] instanceof X509Certificate)

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SymmetricKeyHandler.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SymmetricKeyHandler.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SymmetricKeyHandler.java
index 9d4ef04..4c5d8a3 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SymmetricKeyHandler.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SymmetricKeyHandler.java
@@ -109,8 +109,8 @@ public class SymmetricKeyHandler {
             } else if (STSConstants.SYMMETRIC_KEY_TYPE.equals(binarySecret.getBinarySecretType())
                 || binarySecret.getBinarySecretType() == null) {
                 byte[] secretValue = binarySecret.getBinarySecretValue();
-                if (((long)secretValue.length * 8L) < signatureProperties.getMinimumKeySize()
-                    || ((long)secretValue.length * 8L) > signatureProperties.getMaximumKeySize()) {
+                if ((secretValue.length * 8L) < signatureProperties.getMinimumKeySize()
+                    || (secretValue.length * 8L) > signatureProperties.getMaximumKeySize()) {
                     LOG.log(
                         Level.WARNING, "Received secret of length " + secretValue.length
                         + " bits is not accepted"
@@ -128,8 +128,8 @@ public class SymmetricKeyHandler {
             }
         } else if (clientEntropy.getDecryptedKey() != null) {
             byte[] secretValue = clientEntropy.getDecryptedKey();
-            if (((long)secretValue.length * 8L) < signatureProperties.getMinimumKeySize()
-                || ((long)secretValue.length * 8L) > signatureProperties.getMaximumKeySize()) {
+            if ((secretValue.length * 8L) < signatureProperties.getMinimumKeySize()
+                || (secretValue.length * 8L) > signatureProperties.getMaximumKeySize()) {
                 LOG.log(
                     Level.WARNING, "Received secret of length " + secretValue.length
                     + " bits is not accepted"

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
index 77b772b..1500e89 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
@@ -123,7 +123,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         assertTrue(renewerResponse.getToken() != null);
 
         String oldId = new SamlAssertionWrapper(samlToken).getId();
-        String newId = new SamlAssertionWrapper((Element)renewerResponse.getToken()).getId();
+        String newId = new SamlAssertionWrapper(renewerResponse.getToken()).getId();
         assertFalse(oldId.equals(newId));
 
         // Now validate it again
@@ -264,7 +264,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         assertTrue(renewerResponse.getToken() != null);
 
         String oldId = new SamlAssertionWrapper(samlToken).getId();
-        String newId = new SamlAssertionWrapper((Element)renewerResponse.getToken()).getId();
+        String newId = new SamlAssertionWrapper(renewerResponse.getToken()).getId();
         assertFalse(oldId.equals(newId));
 
         // Now validate it again
@@ -340,7 +340,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         assertTrue(renewerResponse.getToken() != null);
 
         String oldId = new SamlAssertionWrapper(samlToken).getId();
-        String newId = new SamlAssertionWrapper((Element)renewerResponse.getToken()).getId();
+        String newId = new SamlAssertionWrapper(renewerResponse.getToken()).getId();
         assertFalse(oldId.equals(newId));
 
         // Now validate it again

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java
index 0eef807..be22d01 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
@@ -90,8 +91,8 @@ public class AsymmetricEncryptionTest extends AbstractBusClientServerTestBase {
         URL busFile = SecurityContextTokenUnitTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         SecurityToken token = requestSecurityToken(bus, test.getStsPort());
         assertTrue(token != null);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java
index d109850..096c2b1 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java
@@ -26,6 +26,7 @@ import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
@@ -111,8 +112,8 @@ public class JaxwsBasicAuthTest extends AbstractBusClientServerTestBase {
         URL busFile = JaxwsBasicAuthTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = JaxwsBasicAuthTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -138,8 +139,8 @@ public class JaxwsBasicAuthTest extends AbstractBusClientServerTestBase {
         URL busFile = JaxwsBasicAuthTest.class.getResource("cxf-bad-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = JaxwsBasicAuthTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SAMLBatchUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SAMLBatchUnitTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SAMLBatchUnitTest.java
index acae8fe..6636851 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SAMLBatchUnitTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SAMLBatchUnitTest.java
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
@@ -92,8 +93,8 @@ public class SAMLBatchUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLBatchUnitTest.class.getResource("cxf-client-unit.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport?wsdl";

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
index 8cfcf8a..d4da6a8 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
@@ -617,7 +617,7 @@ public class SimpleBatchSTSClient implements Configurable, InterceptorProvider {
         while (child != null) {
             if (child instanceof Element
                 && "RequestSecurityTokenResponse".equals(((Element)child).getLocalName())) {
-                Element rstrChild = DOMUtils.getFirstElement((Element)child);
+                Element rstrChild = DOMUtils.getFirstElement(child);
                 while (rstrChild != null) {
                     if ("Status".equals(rstrChild.getLocalName())) {
                         Element e2 =

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java
index ddbddf3..4fe4515 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java
@@ -26,6 +26,7 @@ import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
@@ -111,8 +112,8 @@ public class BinarySecurityTokenTest extends AbstractBusClientServerTestBase {
         URL busFile = BinarySecurityTokenTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = BinarySecurityTokenTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -138,8 +139,8 @@ public class BinarySecurityTokenTest extends AbstractBusClientServerTestBase {
         URL busFile = BinarySecurityTokenTest.class.getResource("cxf-bad-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = BinarySecurityTokenTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
index 2449094..79bd61d 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
@@ -28,6 +28,7 @@ import javax.xml.ws.soap.SOAPFaultException;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.Endpoint;
@@ -86,8 +87,8 @@ public class CachingTest extends AbstractBusClientServerTestBase {
         URL busFile = CachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -131,8 +132,8 @@ public class CachingTest extends AbstractBusClientServerTestBase {
         URL busFile = CachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -173,8 +174,8 @@ public class CachingTest extends AbstractBusClientServerTestBase {
         URL busFile = CachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
index 0bf1302..017d41c 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
@@ -29,6 +29,7 @@ import javax.xml.ws.Service;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.Endpoint;
@@ -95,8 +96,8 @@ public class ServerCachingTest extends AbstractBusClientServerTestBase {
         URL busFile = ServerCachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ServerCachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -147,8 +148,8 @@ public class ServerCachingTest extends AbstractBusClientServerTestBase {
         URL busFile = ServerCachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ServerCachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -186,8 +187,8 @@ public class ServerCachingTest extends AbstractBusClientServerTestBase {
         URL busFile = ServerCachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ServerCachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java
index 22fa75e..f3b1af4 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java
@@ -27,6 +27,7 @@ import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
@@ -119,8 +120,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -148,8 +149,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -178,8 +179,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleItWrongClaims.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -213,8 +214,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-bad-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -248,8 +249,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -278,8 +279,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleItWrongClaims.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -316,8 +317,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-client-cbhandler.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleItNoClaims.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -346,8 +347,8 @@ public class ClaimsTest extends AbstractBusClientServerTestBase {
         URL busFile = ClaimsTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = ClaimsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainTest.java
index 09c656e..4f68a23 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainTest.java
@@ -26,6 +26,7 @@ import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -101,8 +102,8 @@ public class CrossDomainTest extends AbstractBusClientServerTestBase {
         URL busFile = CrossDomainTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CrossDomainTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -133,8 +134,8 @@ public class CrossDomainTest extends AbstractBusClientServerTestBase {
         URL busFile = CrossDomainTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CrossDomainTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
index 96122ba..9859460 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom/CustomParameterTest.java
@@ -34,6 +34,7 @@ import javax.xml.ws.Service;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.rt.security.SecurityConstants;
@@ -104,8 +105,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         URL busFile = CustomParameterTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CustomParameterTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -149,8 +150,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         URL busFile = CustomParameterTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CustomParameterTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -199,8 +200,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         URL busFile = CustomParameterTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CustomParameterTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -244,8 +245,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         URL busFile = CustomParameterTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CustomParameterTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -293,8 +294,8 @@ public class CustomParameterTest extends AbstractBusClientServerTestBase {
         URL busFile = CustomParameterTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String address = "https://localhost:" + STSPORT + "/SecurityTokenServiceREST/token";
         WebClient client = WebClient.create(address, busFile.toString());

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
index d1c43d4..2d3546d 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
@@ -25,6 +25,7 @@ import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.rt.security.SecurityConstants;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
@@ -80,8 +81,8 @@ public class CustomOnBehalfOfTest extends AbstractBusClientServerTestBase {
         URL busFile = CustomOnBehalfOfTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CustomOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -106,8 +107,8 @@ public class CustomOnBehalfOfTest extends AbstractBusClientServerTestBase {
         URL busFile = CustomOnBehalfOfTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = CustomOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java
index d76ae46..a5717c8 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java
@@ -24,6 +24,7 @@ import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -85,8 +86,8 @@ public class DistributedCachingTest extends AbstractBusClientServerTestBase {
         URL busFile = DistributedCachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = DistributedCachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -108,8 +109,8 @@ public class DistributedCachingTest extends AbstractBusClientServerTestBase {
         URL busFile = DistributedCachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = DistributedCachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -131,8 +132,8 @@ public class DistributedCachingTest extends AbstractBusClientServerTestBase {
         URL busFile = DistributedCachingTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = DistributedCachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JWTUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JWTUnitTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JWTUnitTest.java
index 89965a4..2a6718a 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JWTUnitTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JWTUnitTest.java
@@ -23,6 +23,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.deployment.STSServer;
@@ -64,8 +65,8 @@ public class JWTUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = JWTUnitTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         // Issue the token
         SecurityToken token =

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JaxrsJWTTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JaxrsJWTTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JaxrsJWTTest.java
index e833ebc..bc234e5 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JaxrsJWTTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/jwt/JaxrsJWTTest.java
@@ -30,6 +30,7 @@ import javax.ws.rs.client.ClientRequestFilter;
 import javax.ws.rs.core.HttpHeaders;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.message.Message;
@@ -85,8 +86,8 @@ public class JaxrsJWTTest extends AbstractBusClientServerTestBase {
         URL busFile = JaxrsJWTTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         final String address = "https://localhost:" + PORT + "/doubleit/services/doubleit-rs";
         final int numToDouble = 25;

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosDelegationTokenTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosDelegationTokenTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosDelegationTokenTest.java
index f0b2883..d301e24 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosDelegationTokenTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosDelegationTokenTest.java
@@ -26,6 +26,7 @@ import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
@@ -92,8 +93,8 @@ public class KerberosDelegationTokenTest extends AbstractBusClientServerTestBase
         URL busFile = KerberosDelegationTokenTest.class.getResource("cxf-intermediary-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = KerberosDelegationTokenTest.class.getResource("DoubleItIntermediary.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java
index 422da0c..e987866 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java
@@ -24,6 +24,7 @@ import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -83,8 +84,8 @@ public class DifferentRealmTest extends AbstractBusClientServerTestBase {
         URL busFile = DifferentRealmTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = DifferentRealmTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -111,8 +112,8 @@ public class DifferentRealmTest extends AbstractBusClientServerTestBase {
         URL busFile = DifferentRealmTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = DifferentRealmTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -138,8 +139,8 @@ public class DifferentRealmTest extends AbstractBusClientServerTestBase {
         URL busFile = DifferentRealmTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = DifferentRealmTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -171,8 +172,8 @@ public class DifferentRealmTest extends AbstractBusClientServerTestBase {
         URL busFile = DifferentRealmTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = DifferentRealmTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
index f1c836c..8c89252 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewTest.java
@@ -25,6 +25,7 @@ import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -79,8 +80,8 @@ public class SAMLRenewTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLRenewTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = SAMLRenewTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java
index 9057545..5f46498 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.systest.sts.common.TestParam;
@@ -89,8 +90,8 @@ public class SAMLRenewUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLRenewUnitTest.class.getResource("cxf-client-unit.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport?wsdl";
@@ -126,8 +127,8 @@ public class SAMLRenewUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLRenewUnitTest.class.getResource("cxf-client-unit.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport?wsdl";
@@ -163,8 +164,8 @@ public class SAMLRenewUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLRenewUnitTest.class.getResource("cxf-client-unit.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport?wsdl";
@@ -193,8 +194,8 @@ public class SAMLRenewUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLRenewUnitTest.class.getResource("cxf-client-unit.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport?wsdl";
@@ -225,8 +226,8 @@ public class SAMLRenewUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLRenewUnitTest.class.getResource("cxf-client-unit.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport?wsdl";
@@ -256,8 +257,8 @@ public class SAMLRenewUnitTest extends AbstractBusClientServerTestBase {
         URL busFile = SAMLRenewUnitTest.class.getResource("cxf-client-unit.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport?wsdl";

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java
index 53519a8..a96ae8f 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java
@@ -24,6 +24,7 @@ import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -74,8 +75,8 @@ public class SecureConversationTest extends AbstractBusClientServerTestBase {
         URL busFile = SecureConversationTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = SecureConversationTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -95,8 +96,8 @@ public class SecureConversationTest extends AbstractBusClientServerTestBase {
         URL busFile = SecureConversationTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = SecureConversationTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -116,8 +117,8 @@ public class SecureConversationTest extends AbstractBusClientServerTestBase {
         URL busFile = SecureConversationTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         URL wsdl = SecureConversationTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed5dfc98/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
index 58cebf8..acfc85e 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
@@ -23,6 +23,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.systest.sts.common.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -64,8 +65,8 @@ public class SecurityContextTokenCancelTest extends AbstractBusClientServerTestB
         URL busFile = SecurityContextTokenCancelTest.class.getResource("cxf-client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
+        BusFactory.setDefaultBus(bus);
+        BusFactory.setThreadDefaultBus(bus);
 
         String wsdlLocation =
             "https://localhost:" + STSPORT + "/SecurityTokenService/TransportSCT?wsdl";


Mime
View raw message