cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [06/12] cxf git commit: Fix a BUNCH more warnings
Date Fri, 04 Aug 2017 16:07:29 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
index 3ab7f16..3292c78 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
@@ -40,7 +40,7 @@ public class ResponseTimeMessageInvokerInterceptor extends AbstractMessageRespon
 
     public void handleMessage(Message message) throws Fault {
         Exchange ex = message.getExchange();
-        Boolean forceDisabled = Boolean.FALSE.equals((Boolean)ex.get("org.apache.cxf.management.counter.enabled"));
+        Boolean forceDisabled = Boolean.FALSE.equals(ex.get("org.apache.cxf.management.counter.enabled"));
         if (!forceDisabled && isServiceCounterEnabled(ex)) {
             message.getInterceptorChain().add(new ResponseTimeMessageInvokerEndingInteceptor());
         }
@@ -50,7 +50,7 @@ public class ResponseTimeMessageInvokerInterceptor extends AbstractMessageRespon
     @Override
     public void handleFault(Message message) {
         Exchange ex = message.getExchange();
-        Boolean forceDisabled = Boolean.FALSE.equals((Boolean)ex.get("org.apache.cxf.management.counter.enabled"));
+        Boolean forceDisabled = Boolean.FALSE.equals(ex.get("org.apache.cxf.management.counter.enabled"));
         if (isServiceCounterEnabled(ex) && !forceDisabled) {
             ex.put(FaultMode.class, message.get(FaultMode.class));
             if (ex.isOneWay() && !isClient(message)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
index 8ed344b..f3d09cb 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
@@ -36,7 +36,7 @@ public class ResponseTimeMessageOutInterceptor extends AbstractMessageResponseTi
 
     public void handleMessage(Message message) throws Fault {
         Exchange ex = message.getExchange();
-        Boolean forceDisabled = Boolean.FALSE.equals((Boolean)ex.get("org.apache.cxf.management.counter.enabled"));
+        Boolean forceDisabled = Boolean.FALSE.equals(ex.get("org.apache.cxf.management.counter.enabled"));
         if (!forceDisabled && isServiceCounterEnabled(ex)) {
             if (ex.get(Exception.class) != null) {
                 endHandlingMessage(ex);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
index f21b57a..ff251ce 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
@@ -71,7 +71,7 @@ public final class ClientProviderFactory extends ProviderFactory {
     @Override
     protected void setProviders(boolean custom, boolean busGlobal, Object... providers) {
         List<ProviderInfo<? extends Object>> theProviders =
-            prepareProviders(custom, busGlobal, (Object[])providers, null);
+            prepareProviders(custom, busGlobal, providers, null);
         super.setCommonProviders(theProviders);
         for (ProviderInfo<? extends Object> provider : theProviders) {
             Class<?> providerCls = ClassHelper.getRealClass(getBus(), provider.getProvider());

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JaxrsClientCallback.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JaxrsClientCallback.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JaxrsClientCallback.java
index 12e8af7..98443c5 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JaxrsClientCallback.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JaxrsClientCallback.java
@@ -118,7 +118,7 @@ public class JaxrsClientCallback<T> extends ClientCallback {
                 return getObject(callback.get()[0]);
             } catch (InterruptedException ex) {
                 if (callback.handler != null) {
-                    callback.handler.failed((InterruptedException)ex);
+                    callback.handler.failed(ex);
                 }
                 throw ex;
             }
@@ -129,7 +129,7 @@ public class JaxrsClientCallback<T> extends ClientCallback {
                 return getObject(callback.get(timeout, unit)[0]);
             } catch (InterruptedException ex) {
                 if (callback.handler != null) {
-                    callback.handler.failed((InterruptedException)ex);
+                    callback.handler.failed(ex);
                 }
                 throw ex;
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientReaderInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientReaderInterceptor.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientReaderInterceptor.java
index 3b83979..3be9402 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientReaderInterceptor.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/cache/CacheControlClientReaderInterceptor.java
@@ -94,7 +94,7 @@ public class CacheControlClientReaderInterceptor implements ReaderInterceptor {
         final boolean validCacheControl = isCacheControlValid(context, cacheControl);
         if (validCacheControl && cacheResponseInputStream) {
             // if Cache-Control is set and the stream needs to be cached then do it
-            cachedBytes = IOUtils.readBytesFromStream((InputStream)context.getInputStream());
+            cachedBytes = IOUtils.readBytesFromStream(context.getInputStream());
             context.setInputStream(new ByteArrayInputStream(cachedBytes));
         }
         // Read the stream and get the actual entity

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientResponseContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientResponseContextImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientResponseContextImpl.java
index df5d9cb..317ab21 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientResponseContextImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientResponseContextImpl.java
@@ -42,7 +42,7 @@ public class ClientResponseContextImpl extends AbstractResponseContextImpl
     public InputStream getEntityStream() {
         InputStream is = m.getContent(InputStream.class);
         if (is == null) {
-            is = ((ResponseImpl)r).convertEntityToStreamIfPossible();
+            is = r.convertEntityToStreamIfPossible();
         }
         return is;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 8a17ecf..821f32e 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -1274,7 +1274,7 @@ public class WadlGenerator implements ContainerRequestFilter {
         TransformerFactory transformerFactory = TransformerFactory.newInstance();
         transformerFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true);
         Transformer t = transformerFactory.newTemplates(new StreamSource(is)).newTransformer();
-        t.setParameter("base.path", (String)m.get("http.base.path"));
+        t.setParameter("base.path", m.get("http.base.path"));
         StringWriter stringWriter = new StringWriter();
         t.transform(source, new StreamResult(stringWriter));
         return stringWriter.toString();

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
index dfeaaa5..9abc650 100644
--- a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
+++ b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
@@ -105,7 +105,7 @@ public class SimpleTypeJsonProvider<T> extends AbstractConfigurableProvider
         throws IOException, WebApplicationException {
         if (!supportSimpleTypesOnly && !InjectionUtils.isPrimitive(type)) {
             MessageBodyReader<T> next =
-                (MessageBodyReader<T>)providers.getMessageBodyReader(type, genericType, annotations, mediaType);
+                providers.getMessageBodyReader(type, genericType, annotations, mediaType);
             JAXRSUtils.getCurrentMessage().put(ProviderFactory.ACTIVE_JAXRS_PROVIDER_KEY, this);
             try {
                 return next.readFrom(type, genericType, annotations, mediaType, headers, is);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/provider/ObservableReader.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/provider/ObservableReader.java b/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/provider/ObservableReader.java
index 1b76d2f..c4423ae 100644
--- a/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/provider/ObservableReader.java
+++ b/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/provider/ObservableReader.java
@@ -52,7 +52,7 @@ public class ObservableReader<T> implements MessageBodyReader<Observable<T>> {
         @SuppressWarnings("unchecked")
         Class<T> actualCls = (Class<T>)InjectionUtils.getActualType(t);
         final MessageBodyReader<T> mbr =
-            (MessageBodyReader<T>)providers.getMessageBodyReader(actualCls, actualCls, anns, mt);
+            providers.getMessageBodyReader(actualCls, actualCls, anns, mt);
         if (mbr == null) {
             throw new ProcessingException("MBR is null");
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaContentExtractor.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaContentExtractor.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaContentExtractor.java
index 99a32bc..fa697ac 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaContentExtractor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaContentExtractor.java
@@ -34,6 +34,7 @@ import org.apache.cxf.jaxrs.ext.search.SearchBean;
 import org.apache.tika.detect.DefaultDetector;
 import org.apache.tika.detect.Detector;
 import org.apache.tika.exception.TikaException;
+import org.apache.tika.metadata.HttpHeaders;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
 import org.apache.tika.parser.AutoDetectParser;
@@ -178,7 +179,7 @@ public class TikaContentExtractor {
                 mediaType = detector.detect(in, metadata);
             }
             if (mediaType != null) {
-                metadata.set(Metadata.CONTENT_TYPE, mediaType.toString());
+                metadata.set(HttpHeaders.CONTENT_TYPE, mediaType.toString());
             }
 
             Parser parser = null;

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
index 7a6ad77..3e91a64 100644
--- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
+++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
@@ -207,7 +207,7 @@ public class JPATypedQueryVisitorFiqlTest extends AbstractJPATypedQueryVisitorTe
         assertEquals(1, books.size());
         Object[] info = books.get(0);
         assertEquals(10, ((Integer)info[0]).intValue());
-        assertEquals("num10", (String)info[1]);
+        assertEquals("num10", info[1]);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
index affab8f..09cb75d 100644
--- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
+++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
@@ -170,7 +170,7 @@ public class JPATypedQueryVisitorODataTest extends AbstractJPATypedQueryVisitorT
         assertEquals(1, books.size());
         Object[] info = books.get(0);
         assertEquals(10, ((Integer)info[0]).intValue());
-        assertEquals("num10", (String)info[1]);
+        assertEquals("num10", info[1]);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
index 2b020df..04e3a9a 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
@@ -361,7 +361,7 @@ public final class KeyManagementUtils {
         // Initial chain validation, to be enhanced as needed
         try {
             X509CertSelector certSelect = new X509CertSelector();
-            certSelect.setCertificate((X509Certificate) inCerts.get(0));
+            certSelect.setCertificate(inCerts.get(0));
             PKIXBuilderParameters pbParams = new PKIXBuilderParameters(ks, certSelect);
             pbParams.addCertStore(CertStore.getInstance("Collection",
                                                         new CollectionCertStoreParameters(inCerts)));

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmContentEncryptionAlgorithm.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmContentEncryptionAlgorithm.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmContentEncryptionAlgorithm.java
index 20e35c9..96c4b2c 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmContentEncryptionAlgorithm.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmContentEncryptionAlgorithm.java
@@ -34,10 +34,10 @@ public class AesGcmContentEncryptionAlgorithm extends AbstractContentEncryptionA
         super(checkAlgorithm(algo), generateCekOnce);
     }
     public AesGcmContentEncryptionAlgorithm(String encodedCek, String encodedIv, ContentAlgorithm algo) {
-        this((byte[])CryptoUtils.decodeSequence(encodedCek), CryptoUtils.decodeSequence(encodedIv), algo);
+        this(CryptoUtils.decodeSequence(encodedCek), CryptoUtils.decodeSequence(encodedIv), algo);
     }
     public AesGcmContentEncryptionAlgorithm(String encodedCek, ContentAlgorithm algo) {
-        this((byte[])CryptoUtils.decodeSequence(encodedCek), null, algo);
+        this(CryptoUtils.decodeSequence(encodedCek), null, algo);
     }
     public AesGcmContentEncryptionAlgorithm(SecretKey key, ContentAlgorithm algo) {
         this(key, (byte[])null, algo);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java b/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
index 9702582..c77ce8b 100644
--- a/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
+++ b/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
@@ -76,13 +76,13 @@ public class JwsJsonConsumerTest extends Assert {
         List<JwsJsonSignatureEntry> sigEntries = consumer.getSignatureEntries();
         assertEquals(2, sigEntries.size());
         // 1st signature
-        String firstKid = (String)sigEntries.get(0).getKeyId();
+        String firstKid = sigEntries.get(0).getKeyId();
         assertEquals(KID_OF_THE_FIRST_SIGNER, firstKid);
         JsonWebKey rsaKey = jwks.getKey(firstKid);
         assertNotNull(rsaKey);
         assertTrue(sigEntries.get(0).verifySignatureWith(rsaKey));
         // 2nd signature
-        String secondKid = (String)sigEntries.get(1).getKeyId();
+        String secondKid = sigEntries.get(1).getKeyId();
         assertEquals(KID_OF_THE_SECOND_SIGNER, secondKid);
         JsonWebKey ecKey = jwks.getKey(secondKid);
         assertNotNull(ecKey);
@@ -96,7 +96,7 @@ public class JwsJsonConsumerTest extends Assert {
         List<JwsJsonSignatureEntry> sigEntries = consumer.getSignatureEntries();
         assertEquals(2, sigEntries.size());
         // 1st signature
-        String firstKid = (String)sigEntries.get(0).getKeyId();
+        String firstKid = sigEntries.get(0).getKeyId();
         assertEquals(KID_OF_THE_FIRST_SIGNER, firstKid);
         JsonWebKey rsaKey = jwks.getKey(firstKid);
         assertNotNull(rsaKey);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
index f428a4c..e12c515 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
@@ -174,7 +174,7 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider {
     protected static void putCacheValue(Ehcache cache, String key, Object value, long ttl) {
         Element element = new Element(key, value);
         int parsedTTL = (int)ttl;
-        if (ttl != (long)parsedTTL) {
+        if (ttl != parsedTTL) {
             throw new OAuthServiceException("Requested time to live can not be supported");
         }
         element.setTimeToLive(parsedTTL);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthServerJoseJwtProducer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthServerJoseJwtProducer.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthServerJoseJwtProducer.java
index 4e38d73..2cdadbd 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthServerJoseJwtProducer.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthServerJoseJwtProducer.java
@@ -19,8 +19,6 @@
 package org.apache.cxf.rs.security.oauth2.provider;
 
 import java.security.cert.X509Certificate;
-import java.security.interfaces.RSAPublicKey;
-
 import org.apache.cxf.rs.security.jose.jwa.ContentAlgorithm;
 import org.apache.cxf.rs.security.jose.jwa.KeyAlgorithm;
 import org.apache.cxf.rs.security.jose.jwe.JweEncryptionProvider;
@@ -44,7 +42,7 @@ public class OAuthServerJoseJwtProducer extends OAuthJoseJwtProducer {
         if (encryptWithClientCertificates && c != null && !c.getApplicationCertificates().isEmpty()) {
             X509Certificate cert =
                 (X509Certificate)CryptoUtils.decodeCertificate(c.getApplicationCertificates().get(0));
-            theEncryptionProvider = JweUtils.createJweEncryptionProvider((RSAPublicKey)cert.getPublicKey(),
+            theEncryptionProvider = JweUtils.createJweEncryptionProvider(cert.getPublicKey(),
                                                                          KeyAlgorithm.RSA_OAEP,
                                                                          ContentAlgorithm.A128GCM,
                                                                          null);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
index 1fa88d58..41e608b 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
@@ -175,7 +175,7 @@ public class AccessTokenService extends AbstractTokenService {
             if (super.getDataProvider() instanceof AuthorizationCodeDataProvider) {
                 AuthorizationCodeGrantHandler handler = new AuthorizationCodeGrantHandler();
                 if (handler.getSupportedGrantTypes().contains(grantType)) {
-                    handler.setDataProvider((AuthorizationCodeDataProvider)super.getDataProvider());
+                    handler.setDataProvider(super.getDataProvider());
                     return handler;
                 }
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AuthorizationCodeGrantService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AuthorizationCodeGrantService.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AuthorizationCodeGrantService.java
index b8dfe7b..0245a34 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AuthorizationCodeGrantService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AuthorizationCodeGrantService.java
@@ -111,7 +111,7 @@ public class AuthorizationCodeGrantService extends RedirectionBasedGrantService
             bean.setAuthorizationCode(grantCode);
             bean.setUserId(userSubject.getLogin());
             bean.setExpiresIn(grant.getExpiresIn());
-            return deliverOOBResponse((OOBAuthorizationResponse)bean);
+            return deliverOOBResponse(bean);
         } else if (isFormResponse(state)) {
             FormAuthorizationResponse bean = new FormAuthorizationResponse();
             bean.setAuthorizationCode(grantCode);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EHCacheUtil.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EHCacheUtil.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EHCacheUtil.java
index 73de08c..e0f275f 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EHCacheUtil.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EHCacheUtil.java
@@ -73,7 +73,7 @@ public final class EHCacheUtil {
         if (cc == null) {
             cc = new CacheConfiguration();
         } else {
-            cc = (CacheConfiguration)cc.clone();
+            cc = cc.clone();
         }
         cc.setName(key);
         return cc;

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
index 41f28ff..8ea26a5 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
@@ -23,7 +23,7 @@ import org.apache.cxf.rs.security.oidc.utils.OidcUtils;
 
 public class FormIdTokenResponse extends AbstractFormImplicitResponse {
     public String getIdToken() {
-        return (String)getParameters().get(OidcUtils.ID_TOKEN);
+        return getParameters().get(OidcUtils.ID_TOKEN);
     }
 
     public void setIdToken(String idToken) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/oidc/src/test/java/org/apache/cxf/rs/security/oidc/utils/OidcUtilsTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/test/java/org/apache/cxf/rs/security/oidc/utils/OidcUtilsTest.java b/rt/rs/security/sso/oidc/src/test/java/org/apache/cxf/rs/security/oidc/utils/OidcUtilsTest.java
index 98c80fc..7fe746b 100644
--- a/rt/rs/security/sso/oidc/src/test/java/org/apache/cxf/rs/security/oidc/utils/OidcUtilsTest.java
+++ b/rt/rs/security/sso/oidc/src/test/java/org/apache/cxf/rs/security/oidc/utils/OidcUtilsTest.java
@@ -20,7 +20,7 @@ package org.apache.cxf.rs.security.oidc.utils;
 
 import java.util.List;
 
-import org.apache.cxf.rs.security.oidc.common.UserInfo;
+import org.apache.cxf.rs.security.oidc.common.AbstractUserInfo;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -39,7 +39,7 @@ public class OidcUtilsTest extends Assert {
         List<String> claims = OidcUtils.getScopeClaims(OidcUtils.PHONE_SCOPE);
         assertNotNull(claims);
         assertEquals(1, claims.size());
-        assertEquals(UserInfo.PHONE_CLAIM, claims.get(0));
+        assertEquals(AbstractUserInfo.PHONE_CLAIM, claims.get(0));
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
index 18cc51f..7486c39 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
@@ -137,10 +137,10 @@ public class EHCacheTokenReplayCache implements TokenReplayCache<String> {
         }
 
         int parsedTTL = (int)timeToLive;
-        if (timeToLive != (long)parsedTTL || parsedTTL < 0 || parsedTTL > MAX_TTL) {
+        if (timeToLive != parsedTTL || parsedTTL < 0 || 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;
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheUtil.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheUtil.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheUtil.java
index 9ebb37d..73c31bd 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheUtil.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheUtil.java
@@ -64,7 +64,7 @@ public final class EHCacheUtil {
         if (cc == null) {
             cc = new CacheConfiguration();
         } else {
-            cc = (CacheConfiguration)cc.clone();
+            cc = cc.clone();
         }
         cc.setName(key);
         return cc;

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
index 32ec218..0d7a1b6 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
@@ -167,7 +167,7 @@ public class SamlPostBindingFilter extends AbstractServiceProviderFilter {
                     "Error generating KeyInfo from signing credential", ex);
         }
 
-        SignableSAMLObject signableObject = (SignableSAMLObject) authnRequest;
+        SignableSAMLObject signableObject = authnRequest;
         signableObject.setSignature(signature);
         signableObject.releaseDOM();
         signableObject.releaseChildrenDOM(true);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
index 795bdde..d500865 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
@@ -152,7 +152,7 @@ public class EHCacheSPStateManager implements SPStateManager {
         }
 
         int parsedTTL = (int)ttl;
-        if (ttl != (long)parsedTTL) {
+        if (ttl != parsedTTL) {
             // Fall back to 5 minutes if the default TTL is set incorrectly
             parsedTTL = 60 * 5;
         }
@@ -169,7 +169,7 @@ public class EHCacheSPStateManager implements SPStateManager {
         }
 
         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/13bcc236/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
index 4e465b1..f5f051c 100644
--- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
+++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
@@ -29,6 +29,8 @@ import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+
+import org.apache.wss4j.common.WSS4JConstants;
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.bean.ActionBean;
 import org.apache.wss4j.common.saml.bean.AttributeBean;
@@ -217,10 +219,10 @@ public abstract class AbstractSAMLCallbackHandler implements CallbackHandler {
             // Append the EncryptedKey to a KeyInfo element
             Element keyInfoElement =
                 doc.createElementNS(
-                    WSConstants.SIG_NS, WSConstants.SIG_PREFIX + ":" + WSConstants.KEYINFO_LN
+                    WSS4JConstants.SIG_NS, WSS4JConstants.SIG_PREFIX + ":" + WSS4JConstants.KEYINFO_LN
                 );
             keyInfoElement.setAttributeNS(
-                WSConstants.XMLNS_NS, "xmlns:" + WSConstants.SIG_PREFIX, WSConstants.SIG_NS
+                WSS4JConstants.XMLNS_NS, "xmlns:" + WSS4JConstants.SIG_PREFIX, WSS4JConstants.SIG_NS
             );
             keyInfoElement.appendChild(encryptedKeyElement);
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
index c8046b0..1cb6061 100644
--- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
+++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
@@ -28,6 +28,7 @@ import java.util.Collections;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.apache.cxf.helpers.DOMUtils;
+import org.apache.wss4j.common.WSS4JConstants;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoType;
 import org.apache.wss4j.common.crypto.Merlin;
@@ -41,7 +42,6 @@ import org.apache.wss4j.common.saml.bean.ConditionsBean;
 import org.apache.wss4j.common.saml.bean.SubjectConfirmationDataBean;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.common.util.Loader;
-import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.engine.WSSConfig;
 import org.joda.time.DateTime;
 import org.opensaml.saml.common.SignableSAMLObject;
@@ -125,7 +125,7 @@ public class CombinedValidatorTest extends org.junit.Assert {
         Element clonedAssertion = (Element)assertionElement.cloneNode(true);
         clonedAssertion.setAttributeNS(null, "ID", "_12345623562");
         Element sigElement =
-            (Element)clonedAssertion.getElementsByTagNameNS(WSConstants.SIG_NS, "Signature").item(0);
+            (Element)clonedAssertion.getElementsByTagNameNS(WSS4JConstants.SIG_NS, "Signature").item(0);
         clonedAssertion.removeChild(sigElement);
 
         Element subjElement =
@@ -366,7 +366,7 @@ public class CombinedValidatorTest extends org.junit.Assert {
         }
 
         // add the signature to the assertion
-        SignableSAMLObject signableObject = (SignableSAMLObject) response;
+        SignableSAMLObject signableObject = response;
         signableObject.setSignature(signature);
         signableObject.releaseDOM();
         signableObject.releaseChildrenDOM(true);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java
index 85f42c1..ef4c6ba 100644
--- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java
+++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java
@@ -807,7 +807,7 @@ public class SAMLResponseValidatorTest extends org.junit.Assert {
         }
 
         // add the signature to the assertion
-        SignableSAMLObject signableObject = (SignableSAMLObject) response;
+        SignableSAMLObject signableObject = response;
         signableObject.setSignature(signature);
         signableObject.releaseDOM();
         signableObject.releaseChildrenDOM(true);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
index f9beed9..77da0df 100644
--- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
+++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
@@ -721,7 +721,7 @@ public class SAMLSSOResponseValidatorTest extends org.junit.Assert {
         }
 
         // add the signature to the assertion
-        SignableSAMLObject signableObject = (SignableSAMLObject) response;
+        SignableSAMLObject signableObject = response;
         signableObject.setSignature(signature);
         signableObject.releaseDOM();
         signableObject.releaseChildrenDOM(true);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/RSSecurityUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/RSSecurityUtils.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/RSSecurityUtils.java
index 5642fdd..fa549a2 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/RSSecurityUtils.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/RSSecurityUtils.java
@@ -63,7 +63,7 @@ public final class RSSecurityUtils {
         Object signatureProperties =
             SecurityUtils.getSecurityPropertyValue(SecurityConstants.SIGNATURE_PROPERTIES, m);
 
-        return "POST".equals((String)requestMessage.get(Message.HTTP_REQUEST_METHOD))
+        return "POST".equals(requestMessage.get(Message.HTTP_REQUEST_METHOD))
             && encryptionProperties != null && signatureProperties != null;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SAMLUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SAMLUtils.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SAMLUtils.java
index c19b1aa..52c8dd0 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SAMLUtils.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SAMLUtils.java
@@ -87,7 +87,7 @@ public final class SAMLUtils {
     }
 
     private static org.opensaml.saml.saml1.core.Subject getSaml1Subject(SamlAssertionWrapper assertionW) {
-        for (Statement stmt : ((org.opensaml.saml.saml1.core.Assertion)assertionW.getSaml1()).getStatements()) {
+        for (Statement stmt : assertionW.getSaml1().getStatements()) {
             org.opensaml.saml.saml1.core.Subject samlSubject = null;
             if (stmt instanceof AttributeStatement) {
                 AttributeStatement attrStmt = (AttributeStatement) stmt;

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
index 00a6227..b3ccbfd 100644
--- a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
+++ b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
@@ -35,10 +35,10 @@ import org.apache.cxf.rt.security.saml.claims.SAMLSecurityContext;
 import org.apache.cxf.rt.security.saml.utils.SAMLUtils;
 import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.security.SecurityContext;
+import org.apache.wss4j.common.WSS4JConstants;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
-import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.message.token.UsernameToken;
 import org.apache.wss4j.dom.validate.Credential;
@@ -98,7 +98,7 @@ public abstract class WSS4JBasicAuthValidator {
 
         Document doc = DOMUtils.createDocument();
         UsernameToken token = new UsernameToken(false, doc,
-                                                WSConstants.PASSWORD_TEXT);
+                                                WSS4JConstants.PASSWORD_TEXT);
         token.setName(policy.getUserName());
         token.setPassword(policy.getPassword());
         return token;
@@ -130,7 +130,7 @@ public abstract class WSS4JBasicAuthValidator {
             }
 
             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/13bcc236/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
index 5bbfdcf..2427a94 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
@@ -809,7 +809,7 @@ public class JettyHTTPServerEngine implements ServerEngine {
     }
 
     private ThreadPool getThreadPool() {
-        ThreadPool pool = (ThreadPool)server.getThreadPool();
+        ThreadPool pool = server.getThreadPool();
         if (pool == null) {
             pool = new QueuedThreadPool();
             try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
index bb664b5..ea5ea42 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
@@ -74,8 +74,8 @@ public class JettyHTTPServerEngineFactoryHolder {
             Element element = StaxUtils.read(new StringReader(parsedElement)).getDocumentElement();
 
             JettyHTTPServerEngineFactoryConfigType config
-                = (JettyHTTPServerEngineFactoryConfigType) getJaxbObject(element,
-                    JettyHTTPServerEngineFactoryConfigType.class);
+                = getJaxbObject(element,
+                JettyHTTPServerEngineFactoryConfigType.class);
 
             factory = new JettyHTTPServerEngineFactory();
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
index 4b3ed0c..052afd7 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
@@ -772,10 +772,10 @@ public class JettyHTTPDestinationTest extends Assert {
                     bus, threadDefaultBus);
         assertNotNull("unexpected null message", inMessage);
         assertSame("unexpected HTTP request",
-                   inMessage.get(JettyHTTPDestination.HTTP_REQUEST),
+                   inMessage.get(AbstractHTTPDestination.HTTP_REQUEST),
                    request);
         assertSame("unexpected HTTP response",
-                   inMessage.get(JettyHTTPDestination.HTTP_RESPONSE),
+                   inMessage.get(AbstractHTTPDestination.HTTP_RESPONSE),
                    response);
         assertEquals("unexpected method",
                      inMessage.get(Message.HTTP_REQUEST_METHOD),
@@ -879,10 +879,10 @@ public class JettyHTTPDestinationTest extends Assert {
 
         if (oneway) {
             assertNull("unexpected HTTP response",
-                       outMsg.get(JettyHTTPDestination.HTTP_RESPONSE));
+                       outMsg.get(AbstractHTTPDestination.HTTP_RESPONSE));
         } else {
             assertNotNull("expected HTTP response",
-                           outMsg.get(JettyHTTPDestination.HTTP_RESPONSE));
+                           outMsg.get(AbstractHTTPDestination.HTTP_RESPONSE));
             responseOS.close();
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
index 8a0a679..06ec717 100644
--- a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
+++ b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
@@ -190,7 +190,7 @@ public class NettyHttpConduit extends URLConnectionHTTPConduit implements BusLif
             entity.createRequest(out.getOutBuffer());
             // TODO need to check how to set the Chunked feature
             //request.getRequest().setChunked(true);
-            entity.getRequest().headers().set(Message.CONTENT_TYPE, (String)message.get(Message.CONTENT_TYPE));
+            entity.getRequest().headers().set(Message.CONTENT_TYPE, message.get(Message.CONTENT_TYPE));
             return out;
         }
         return super.createOutputStream(message, needToCacheRequest, isChunking, chunkThreshold);
@@ -352,7 +352,7 @@ public class NettyHttpConduit extends URLConnectionHTTPConduit implements BusLif
                             session = sslHandler.engine().getSession();
                         }
                     } else {
-                        setException((Exception) future.cause());
+                        setException(future.cause());
                     }
                 }
             };

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/NettyHttpDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/NettyHttpDestinationTest.java b/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/NettyHttpDestinationTest.java
index 3483847..b76e15a 100644
--- a/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/NettyHttpDestinationTest.java
+++ b/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/NettyHttpDestinationTest.java
@@ -768,10 +768,10 @@ public class NettyHttpDestinationTest extends Assert {
                     bus, threadDefaultBus);
         assertNotNull("unexpected null message", inMessage);
         assertSame("unexpected HTTP request",
-                   inMessage.get(NettyHttpDestination.HTTP_REQUEST),
+                   inMessage.get(AbstractHTTPDestination.HTTP_REQUEST),
                    request);
         assertSame("unexpected HTTP response",
-                   inMessage.get(NettyHttpDestination.HTTP_RESPONSE),
+                   inMessage.get(AbstractHTTPDestination.HTTP_RESPONSE),
                    response);
         assertEquals("unexpected method",
                      inMessage.get(Message.HTTP_REQUEST_METHOD),
@@ -873,10 +873,10 @@ public class NettyHttpDestinationTest extends Assert {
 
         if (oneway) {
             assertNull("unexpected HTTP response",
-                       outMsg.get(NettyHttpDestination.HTTP_RESPONSE));
+                       outMsg.get(AbstractHTTPDestination.HTTP_RESPONSE));
         } else {
             assertNotNull("expected HTTP response",
-                           outMsg.get(NettyHttpDestination.HTTP_RESPONSE));
+                           outMsg.get(AbstractHTTPDestination.HTTP_RESPONSE));
             responseOS.close();
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/UndertowHTTPServerEngineFactoryHolder.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/UndertowHTTPServerEngineFactoryHolder.java b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/UndertowHTTPServerEngineFactoryHolder.java
index a31a991..7a6f0c6 100644
--- a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/UndertowHTTPServerEngineFactoryHolder.java
+++ b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/UndertowHTTPServerEngineFactoryHolder.java
@@ -73,8 +73,8 @@ public class UndertowHTTPServerEngineFactoryHolder {
             Element element = StaxUtils.read(new StringReader(parsedElement)).getDocumentElement();
 
             UndertowHTTPServerEngineFactoryConfigType config
-                = (UndertowHTTPServerEngineFactoryConfigType) getJaxbObject(element,
-                    UndertowHTTPServerEngineFactoryConfigType.class);
+                = getJaxbObject(element,
+                UndertowHTTPServerEngineFactoryConfigType.class);
 
             factory = new UndertowHTTPServerEngineFactory();
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/osgi/HTTPUndertowTransportActivator.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/osgi/HTTPUndertowTransportActivator.java b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/osgi/HTTPUndertowTransportActivator.java
index 1d917ca..2a54ce2 100644
--- a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/osgi/HTTPUndertowTransportActivator.java
+++ b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/osgi/HTTPUndertowTransportActivator.java
@@ -66,7 +66,7 @@ public class HTTPUndertowTransportActivator
 
     UndertowHTTPServerEngineFactory factory = new UndertowHTTPServerEngineFactory() {
         public MBeanServer getMBeanServer() {
-            return (MBeanServer)mbeanServerTracker.getService();
+            return mbeanServerTracker.getService();
         }
     };
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http-undertow/src/test/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-undertow/src/test/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestinationTest.java b/rt/transports/http-undertow/src/test/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestinationTest.java
index 18a87f0..22f6108 100644
--- a/rt/transports/http-undertow/src/test/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestinationTest.java
+++ b/rt/transports/http-undertow/src/test/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestinationTest.java
@@ -773,10 +773,10 @@ public class UndertowHTTPDestinationTest extends Assert {
                     bus, threadDefaultBus);
         assertNotNull("unexpected null message", inMessage);
         assertSame("unexpected HTTP request",
-                   inMessage.get(UndertowHTTPDestination.HTTP_REQUEST),
+                   inMessage.get(AbstractHTTPDestination.HTTP_REQUEST),
                    request);
         assertSame("unexpected HTTP response",
-                   inMessage.get(UndertowHTTPDestination.HTTP_RESPONSE),
+                   inMessage.get(AbstractHTTPDestination.HTTP_RESPONSE),
                    response);
         assertEquals("unexpected method",
                      inMessage.get(Message.HTTP_REQUEST_METHOD),
@@ -862,10 +862,10 @@ public class UndertowHTTPDestinationTest extends Assert {
 
         if (oneway) {
             assertNull("unexpected HTTP response",
-                       outMsg.get(UndertowHTTPDestination.HTTP_RESPONSE));
+                       outMsg.get(AbstractHTTPDestination.HTTP_RESPONSE));
         } else {
             assertNotNull("expected HTTP response",
-                           outMsg.get(UndertowHTTPDestination.HTTP_RESPONSE));
+                           outMsg.get(AbstractHTTPDestination.HTTP_RESPONSE));
             responseOS.close();
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
index 3f8f839..bb5abaf 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
@@ -140,7 +140,7 @@ public abstract class AbstractSpnegoAuthSupplier {
         }
 
         try {
-            return (byte[])Subject.doAs(subject, new CreateServiceTicketAction(context, token));
+            return Subject.doAs(subject, new CreateServiceTicketAction(context, token));
         } catch (PrivilegedActionException e) {
             if (e.getCause() instanceof GSSException) {
                 throw (GSSException) e.getCause();

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpConduitBPBeanDefinitionParser.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpConduitBPBeanDefinitionParser.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpConduitBPBeanDefinitionParser.java
index 0546141..b855c60 100755
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpConduitBPBeanDefinitionParser.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpConduitBPBeanDefinitionParser.java
@@ -42,6 +42,7 @@ import org.apache.cxf.transport.http.HTTPConduit;
 import org.apache.cxf.transport.http.MessageTrustDecider;
 import org.apache.cxf.transport.http.auth.HttpAuthSupplier;
 import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 public class HttpConduitBPBeanDefinitionParser extends AbstractBPBeanDefinitionParser {
@@ -56,7 +57,7 @@ public class HttpConduitBPBeanDefinitionParser extends AbstractBPBeanDefinitionP
         parseAttributes(element, context, bean);
         parseChildElements(element, context, bean);
 
-        bean.setScope(MutableBeanMetadata.SCOPE_PROTOTYPE);
+        bean.setScope(BeanMetadata.SCOPE_PROTOTYPE);
 
         return bean;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpDestinationBPBeanDefinitionParser.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpDestinationBPBeanDefinitionParser.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpDestinationBPBeanDefinitionParser.java
index 0bc7cf4..406ca02 100755
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpDestinationBPBeanDefinitionParser.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpDestinationBPBeanDefinitionParser.java
@@ -29,6 +29,7 @@ import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
 import org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser;
 import org.apache.cxf.transport.http.AbstractHTTPDestination;
 import org.apache.cxf.transports.http.configuration.HTTPServerPolicy;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 public class HttpDestinationBPBeanDefinitionParser extends AbstractBPBeanDefinitionParser {
@@ -51,7 +52,7 @@ public class HttpDestinationBPBeanDefinitionParser extends AbstractBPBeanDefinit
         parseAttributes(element, context, bean);
         parseChildElements(element, context, bean);
 
-        bean.setScope(MutableBeanMetadata.SCOPE_PROTOTYPE);
+        bean.setScope(BeanMetadata.SCOPE_PROTOTYPE);
 
         return bean;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
index a78b5ea..15bd03c 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java
@@ -77,7 +77,7 @@ public class CXFServlet extends CXFNonSpringServlet
             String busParam = servletConfig.getInitParameter(BUS_PARAMETER);
             String busName = busParam == null ? "cxf" : busParam.trim();
 
-            setBus((Bus)wac.getBean(busName, Bus.class));
+            setBus(wac.getBean(busName, Bus.class));
         } else {
             busCreated = true;
             setBus(BusFactory.newInstance().createBus());

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSHeaderTypeTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSHeaderTypeTest.java b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSHeaderTypeTest.java
index d92a8b8..955fd89 100644
--- a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSHeaderTypeTest.java
+++ b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSHeaderTypeTest.java
@@ -43,7 +43,7 @@ public class JMSHeaderTypeTest {
         JMSMessageHeadersType messageHeaders = JMSMessageHeadersType.from(message);
         Set<String> keys = messageHeaders.getPropertyKeys();
         Assert.assertEquals(1, keys.size());
-        assertEquals(TEST_VALUE, (String)messageHeaders.getProperty(org.apache.cxf.message.Message.RESPONSE_CODE));
+        assertEquals(TEST_VALUE, messageHeaders.getProperty(org.apache.cxf.message.Message.RESPONSE_CODE));
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
index 0810c49..866276c 100644
--- a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
+++ b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
@@ -128,7 +128,7 @@ public class UDPConduit extends AbstractConduit {
                 }
             } else {
                 IoSessionInputStream ins = message.getExchange().getInMessage().get(IoSessionInputStream.class);
-                ins.setBuffer((IoBuffer)buf);
+                ins.setBuffer(buf);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
index 41d758f..c1b22ba 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
@@ -397,7 +397,7 @@ public class AhcWebSocketConduit extends URLConnectionHTTPConduit {
                 entity = ((String)data).substring(pos);
             } else if (data instanceof byte[]) {
                 entity = new byte[((byte[])data).length - pos];
-                System.arraycopy((byte[])data, pos, (byte[])entity, 0, ((byte[])entity).length);
+                System.arraycopy(data, pos, entity, 0, ((byte[])entity).length);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
----------------------------------------------------------------------
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 d0d8410..2cf4f6e 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
@@ -226,7 +226,7 @@ public class MAPCodec extends AbstractSoapInterceptor {
                 discardMAPs(header, maps);
 
                 JAXBContext jaxbContext =
-                    VersionTransformer.getExposedJAXBContext(
+                    org.apache.cxf.ws.addressing.VersionTransformer.getExposedJAXBContext(
                                                      maps.getNamespaceURI());
                 QName duplicate = maps.getDuplicate();
                 encodeAsExposed(maps,
@@ -359,7 +359,7 @@ public class MAPCodec extends AbstractSoapInterceptor {
         return maps.getReplyTo() != null
             && maps.getReplyTo().getAddress() != null
             && maps.getReplyTo().getAddress().getValue() != null
-            && !(VersionTransformer.Names200408.WSA_NAMESPACE_NAME.equals(maps.getNamespaceURI())
+            && !(Names200408.WSA_NAMESPACE_NAME.equals(maps.getNamespaceURI())
                 && maps.getReplyTo().getAddress().getValue()
                 .equals(ContextUtils.getNoneEndpointReference().getAddress().getValue()));
     }
@@ -505,10 +505,10 @@ public class MAPCodec extends AbstractSoapInterceptor {
                         // Need to check the uri before getting unmarshaller else
                         // would get wrong unmarshaller and fail to process required
                         // headers.
-                        if (VersionTransformer.isSupported(headerURI)) {
+                        if (org.apache.cxf.ws.addressing.VersionTransformer.isSupported(headerURI)) {
                             if (unmarshaller == null) {
                                 JAXBContext jaxbContext =
-                                    VersionTransformer.getExposedJAXBContext(headerURI);
+                                    org.apache.cxf.ws.addressing.VersionTransformer.getExposedJAXBContext(headerURI);
                                 unmarshaller =
                                     jaxbContext.createUnmarshaller();
                                 unmarshaller.setEventHandler(null);

http://git-wip-us.apache.org/repos/asf/cxf/blob/13bcc236/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/VersionTransformer.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/VersionTransformer.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/VersionTransformer.java
index 5425386..faa0c9a 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/VersionTransformer.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/VersionTransformer.java
@@ -90,7 +90,8 @@ public class VersionTransformer extends org.apache.cxf.ws.addressing.VersionTran
             if (NATIVE_VERSION.equals(exposeAs)) {
                 codec.encodeMAP(message, value, new QName(exposeAs, localName), clz,
                                 marshaller, mustUnderstand);
-            } else if (Names200408.WSA_NAMESPACE_NAME.equals(exposeAs)) {
+            } else if (org.apache.cxf.ws.addressing.VersionTransformer.Names200408
+                            .WSA_NAMESPACE_NAME.equals(exposeAs)) {
                 if (AttributedURIType.class.equals(clz)) {
                     codec.encodeMAP(message,
                                     convert((AttributedURIType)value), new QName(exposeAs, localName),
@@ -98,13 +99,15 @@ public class VersionTransformer extends org.apache.cxf.ws.addressing.VersionTran
                 } else if (EndpointReferenceType.class.equals(clz)) {
                     codec.encodeMAP(message,
                                     convert((EndpointReferenceType)value), new QName(exposeAs, localName),
-                                    Names200408.EPR_TYPE, marshaller, mustUnderstand);
+                                    org.apache.cxf.ws.addressing.VersionTransformer.Names200408.EPR_TYPE,
+                                    marshaller, mustUnderstand);
                 } else if (RelatesToType.class.equals(clz)) {
                     codec.encodeMAP(message,
                                     convert((RelatesToType)value), new QName(exposeAs, localName),
                                     Relationship.class, marshaller, mustUnderstand);
                 }
-            } else if (Names200403.WSA_NAMESPACE_NAME.equals(exposeAs)) {
+            } else if (org.apache.cxf.ws.addressing.VersionTransformer.Names200403
+                            .WSA_NAMESPACE_NAME.equals(exposeAs)) {
                 if (AttributedURIType.class.equals(clz)) {
                     codec.encodeMAP(message,
                                     convertTo200403((AttributedURIType)value),
@@ -115,7 +118,8 @@ public class VersionTransformer extends org.apache.cxf.ws.addressing.VersionTran
                     codec.encodeMAP(message,
                                     convertTo200403((EndpointReferenceType)value), new QName(exposeAs,
                                                                                              localName),
-                                    Names200403.EPR_TYPE, marshaller, mustUnderstand);
+                                    org.apache.cxf.ws.addressing.VersionTransformer.Names200403.EPR_TYPE,
+                                    marshaller, mustUnderstand);
                 } else if (RelatesToType.class.equals(clz)) {
                     codec.encodeMAP(message,
                                     convertTo200403((RelatesToType)value), new QName(exposeAs, localName),
@@ -149,17 +153,19 @@ public class VersionTransformer extends org.apache.cxf.ws.addressing.VersionTran
             if (AttributedURIType.class.equals(clz)) {
                 ret = clz.cast(convert(codec.decodeMAP(AttributedURI.class, headerElement, unmarshaller)));
             } else if (EndpointReferenceType.class.equals(clz)) {
-                ret = clz.cast(convert(codec.decodeMAP(Names200408.EPR_TYPE, headerElement, unmarshaller)));
+                ret = clz.cast(convert(codec.decodeMAP(Names200408.EPR_TYPE,
+                                                       headerElement, unmarshaller)));
             } else if (RelatesToType.class.equals(clz)) {
                 ret = clz.cast(convert(codec.decodeMAP(Relationship.class, headerElement, unmarshaller)));
             }
-        } else if (Names200403.WSA_NAMESPACE_NAME.equals(encodedAs)) {
+        } else if (org.apache.cxf.ws.addressing.VersionTransformer.Names200403.WSA_NAMESPACE_NAME.equals(encodedAs)) {
             if (AttributedURIType.class.equals(clz)) {
                 ret = clz.cast(convert(codec
                     .decodeMAP(org.apache.cxf.ws.addressing.v200403.AttributedURI.class, headerElement,
                                unmarshaller)));
             } else if (EndpointReferenceType.class.equals(clz)) {
-                ret = clz.cast(convert(codec.decodeMAP(Names200403.EPR_TYPE, headerElement, unmarshaller)));
+                ret = clz.cast(convert(codec.decodeMAP(Names200403.EPR_TYPE,
+                                                       headerElement, unmarshaller)));
             } else if (RelatesToType.class.equals(clz)) {
                 ret = clz.cast(convert(codec
                     .decodeMAP(org.apache.cxf.ws.addressing.v200403.Relationship.class, headerElement,
@@ -175,59 +181,22 @@ public class VersionTransformer extends org.apache.cxf.ws.addressing.VersionTran
     static {
         Set<QName> headers = new HashSet<>();
         headers.addAll(Names.HEADERS);
-        Names200408.addHeaders(headers);
-        Names200403.addHeaders(headers);
-        HEADERS = Collections.unmodifiableSet(headers);
-    }
-
-    /**
-     * Holder for 2004/08 Names
-     */
-    public static final class Names200408
-        extends org.apache.cxf.ws.addressing.VersionTransformer.Names200408 {
-
-        protected Names200408() {
-        }
-
-        /**
-         * Adds 2004/08 headers to set.
-         *
-         * @param headers set of headers
-         */
-        private static void addHeaders(Set<QName> headers) {
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_FROM_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_TO_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_REPLYTO_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_FAULTTO_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_ACTION_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_MESSAGEID_NAME));
-        }
-    }
-
-    /**
-     * Adds 2004/03 headers to set.
-     *
-     * @param headers set of headers
-     */
-    public static final class Names200403
-        extends org.apache.cxf.ws.addressing.VersionTransformer.Names200403 {
-
-        protected Names200403() {
-        }
+        
+        headers.add(new QName(Names200408.WSA_NAMESPACE_NAME, Names.WSA_FROM_NAME));
+        headers.add(new QName(Names200408.WSA_NAMESPACE_NAME, Names.WSA_TO_NAME));
+        headers.add(new QName(Names200408.WSA_NAMESPACE_NAME, Names.WSA_REPLYTO_NAME));
+        headers.add(new QName(Names200408.WSA_NAMESPACE_NAME, Names.WSA_FAULTTO_NAME));
+        headers.add(new QName(Names200408.WSA_NAMESPACE_NAME, Names.WSA_ACTION_NAME));
+        headers.add(new QName(Names200408.WSA_NAMESPACE_NAME, Names.WSA_MESSAGEID_NAME));
+
+        headers.add(new QName(Names200403.WSA_NAMESPACE_NAME, Names.WSA_FROM_NAME));
+        headers.add(new QName(Names200403.WSA_NAMESPACE_NAME, Names.WSA_TO_NAME));
+        headers.add(new QName(Names200403.WSA_NAMESPACE_NAME, Names.WSA_REPLYTO_NAME));
+        headers.add(new QName(Names200403.WSA_NAMESPACE_NAME, Names.WSA_FAULTTO_NAME));
+        headers.add(new QName(Names200403.WSA_NAMESPACE_NAME, Names.WSA_ACTION_NAME));
+        headers.add(new QName(Names200403.WSA_NAMESPACE_NAME, Names.WSA_MESSAGEID_NAME));
 
-        /**
-         * Adds 2004/08 headers to set.
-         *
-         * @param headers set of headers
-         */
-        private static void addHeaders(Set<QName> headers) {
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_FROM_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_TO_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_REPLYTO_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_FAULTTO_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_ACTION_NAME));
-            headers.add(new QName(WSA_NAMESPACE_NAME, Names.WSA_MESSAGEID_NAME));
-        }
+        HEADERS = Collections.unmodifiableSet(headers);
     }
 
 }


Mime
View raw message