ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1822886 - in /webservices/wss4j/trunk: bindings/src/main/java/org/apache/wss4j/binding/wss11/ bindings/src/main/java/org/apache/wss4j/binding/wssc13/ bindings/src/main/java/org/apache/wss4j/binding/wssc200502/ policy/src/main/java/org/apac...
Date Thu, 01 Feb 2018 15:51:13 GMT
Author: coheigea
Date: Thu Feb  1 15:51:12 2018
New Revision: 1822886

URL: http://svn.apache.org/viewvc?rev=1822886&view=rev
Log:
Fixing some PMD related issues

Modified:
    webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss11/ObjectFactory.java
    webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/ObjectFactory.java
    webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/ObjectFactory.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractBinding.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSymmetricAsymmetricBinding.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractTokenWrapper.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AlgorithmSuite.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AsymmetricBinding.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/HttpsToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/IssuedToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KerberosToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KeyValueToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Layout.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RelToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RequiredElements.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SamlToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecureConversationToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecurityContextToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SpnegoContextToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SupportingTokens.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SymmetricBinding.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/TransportBinding.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust10.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust13.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java
    webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java
    webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/AbstractTestBase.java
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedAssertionProcessor.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/DerivedKeyTokenSTRParser.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityContextTokenInputHandler.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java
    webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java

Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss11/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss11/ObjectFactory.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss11/ObjectFactory.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss11/ObjectFactory.java Thu Feb  1 15:51:12 2018
@@ -102,7 +102,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = WSSE11_NS, name = "Salt")
     public JAXBElement<byte[]> createSalt(byte[] value) {
-        return new JAXBElement<byte[]>(_Salt_QNAME, byte[].class, null, ((byte[]) value));
+        return new JAXBElement<byte[]>(_Salt_QNAME, byte[].class, null, (byte[]) value);
     }
 
     /**

Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/ObjectFactory.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/ObjectFactory.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/ObjectFactory.java Thu Feb  1 15:51:12 2018
@@ -149,7 +149,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = WSSC13_NS, name = "Nonce")
     public JAXBElement<byte[]> createNonce(byte[] value) {
-        return new JAXBElement<byte[]>(_Nonce_QNAME, byte[].class, null, ((byte[]) value));
+        return new JAXBElement<byte[]>(_Nonce_QNAME, byte[].class, null, (byte[]) value);
     }
 
 }

Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/ObjectFactory.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/ObjectFactory.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/ObjectFactory.java Thu Feb  1 15:51:12 2018
@@ -95,7 +95,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = WSSC_NS, name = "Nonce")
     public JAXBElement<byte[]> createNonce(byte[] value) {
-        return new JAXBElement<byte[]>(_Nonce_QNAME, byte[].class, null, ((byte[]) value));
+        return new JAXBElement<byte[]>(_Nonce_QNAME, byte[].class, null, (byte[]) value);
     }
 
     /**

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractBinding.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractBinding.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractBinding.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractBinding.java Thu Feb  1 15:51:12 2018
@@ -110,8 +110,7 @@ public abstract class AbstractBinding ex
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 if (SPConstants.ALGORITHM_SUITE.equals(assertionName)) {
                     if (binding.getAlgorithmSuite() != null) {

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java Thu Feb  1 15:51:12 2018
@@ -210,8 +210,7 @@ public abstract class AbstractSecurityAs
     public boolean isAsserted(Map<QName, List<AssertionState>> assertionStatesMap) {
         List<AssertionState> assertionStateList = assertionStatesMap.get(getName());
         if (assertionStateList != null) {
-            for (int i = 0; i < assertionStateList.size(); i++) {
-                AssertionState assertionState = assertionStateList.get(i);
+            for (AssertionState assertionState : assertionStateList) {
                 if (assertionState.getAssertion() == this && !assertionState.isAsserted()) {
                     return false;
                 }

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSymmetricAsymmetricBinding.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSymmetricAsymmetricBinding.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSymmetricAsymmetricBinding.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSymmetricAsymmetricBinding.java Thu Feb  1 15:51:12 2018
@@ -99,8 +99,7 @@ public abstract class AbstractSymmetricA
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 ProtectionOrder protectionOrder = ProtectionOrder.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractTokenWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractTokenWrapper.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractTokenWrapper.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AbstractTokenWrapper.java Thu Feb  1 15:51:12 2018
@@ -92,8 +92,7 @@ public abstract class AbstractTokenWrapp
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 if (assertion instanceof AbstractToken) {
                     if (tokenWrapper.getToken() != null) {
                         throw new IllegalArgumentException(SPConstants.ERR_INVALID_POLICY);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AlgorithmSuite.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AlgorithmSuite.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AlgorithmSuite.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AlgorithmSuite.java Thu Feb  1 15:51:12 2018
@@ -672,8 +672,7 @@ public class AlgorithmSuite extends Abst
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 if (!getVersion().getNamespace().equals(assertionNamespace)) {

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AsymmetricBinding.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AsymmetricBinding.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AsymmetricBinding.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/AsymmetricBinding.java Thu Feb  1 15:51:12 2018
@@ -124,8 +124,7 @@ public class AsymmetricBinding extends A
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/HttpsToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/HttpsToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/HttpsToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/HttpsToken.java Thu Feb  1 15:51:12 2018
@@ -106,8 +106,7 @@ public class HttpsToken extends Abstract
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 AuthenticationType authenticationType = AuthenticationType.lookUp(assertionName);
                 if (authenticationType != null) {

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/IssuedToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/IssuedToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/IssuedToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/IssuedToken.java Thu Feb  1 15:51:12 2018
@@ -147,8 +147,7 @@ public class IssuedToken extends Abstrac
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 DerivedKeys derivedKeys = DerivedKeys.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KerberosToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KerberosToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KerberosToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KerberosToken.java Thu Feb  1 15:51:12 2018
@@ -105,8 +105,7 @@ public class KerberosToken extends Abstr
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 DerivedKeys derivedKeys = DerivedKeys.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KeyValueToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KeyValueToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KeyValueToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/KeyValueToken.java Thu Feb  1 15:51:12 2018
@@ -80,8 +80,7 @@ public class KeyValueToken extends Abstr
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Layout.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Layout.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Layout.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Layout.java Thu Feb  1 15:51:12 2018
@@ -120,8 +120,7 @@ public class Layout extends AbstractSecu
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 LayoutType layoutType = LayoutType.lookUp(assertionName);
                 if (layoutType != null) {

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RelToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RelToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RelToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RelToken.java Thu Feb  1 15:51:12 2018
@@ -106,8 +106,7 @@ public class RelToken extends AbstractTo
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 DerivedKeys derivedKeys = DerivedKeys.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RequiredElements.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RequiredElements.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RequiredElements.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/RequiredElements.java Thu Feb  1 15:51:12 2018
@@ -103,8 +103,7 @@ public class RequiredElements extends Ab
                                   writer.getNamespaceContext().getNamespaceURI(Constants.ATTR_WSP),
                                   Constants.ATTR_IGNORABLE, "true");
         }
-        for (int i = 0; i < xPaths.size(); i++) {
-            XPath xPath = xPaths.get(i);
+        for (XPath xPath : xPaths) {
             if (XPath.Version.V1 == xPath.getVersion()) {
                 writer.writeStartElement(
                         getVersion().getSPConstants().getXPathExpression().getPrefix(),

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SamlToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SamlToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SamlToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SamlToken.java Thu Feb  1 15:51:12 2018
@@ -107,8 +107,7 @@ public class SamlToken extends AbstractT
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 DerivedKeys derivedKeys = DerivedKeys.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecureConversationToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecureConversationToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecureConversationToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecureConversationToken.java Thu Feb  1 15:51:12 2018
@@ -89,8 +89,7 @@ public class SecureConversationToken ext
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 QName mustNotSendCancel = getVersion().getSPConstants().getMustNotSendCancel();

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecurityContextToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecurityContextToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecurityContextToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SecurityContextToken.java Thu Feb  1 15:51:12 2018
@@ -88,8 +88,7 @@ public class SecurityContextToken extend
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 DerivedKeys derivedKeys = DerivedKeys.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SpnegoContextToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SpnegoContextToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SpnegoContextToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SpnegoContextToken.java Thu Feb  1 15:51:12 2018
@@ -87,8 +87,7 @@ public class SpnegoContextToken extends
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 DerivedKeys derivedKeys = DerivedKeys.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SupportingTokens.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SupportingTokens.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SupportingTokens.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SupportingTokens.java Thu Feb  1 15:51:12 2018
@@ -151,8 +151,7 @@ public class SupportingTokens extends Ab
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 if (assertion instanceof AbstractToken) {

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SymmetricBinding.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SymmetricBinding.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SymmetricBinding.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/SymmetricBinding.java Thu Feb  1 15:51:12 2018
@@ -98,8 +98,7 @@ public class SymmetricBinding extends Ab
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/TransportBinding.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/TransportBinding.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/TransportBinding.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/TransportBinding.java Thu Feb  1 15:51:12 2018
@@ -84,8 +84,7 @@ public class TransportBinding extends Ab
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust10.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust10.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust10.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust10.java Thu Feb  1 15:51:12 2018
@@ -111,8 +111,7 @@ public class Trust10 extends AbstractSec
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust13.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust13.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust13.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Trust13.java Thu Feb  1 15:51:12 2018
@@ -88,8 +88,7 @@ public class Trust13 extends Trust10 {
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java Thu Feb  1 15:51:12 2018
@@ -127,8 +127,7 @@ public class UsernameToken extends Abstr
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 PasswordType passwordType = PasswordType.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java Thu Feb  1 15:51:12 2018
@@ -108,8 +108,7 @@ public class Wss10 extends AbstractSecur
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java Thu Feb  1 15:51:12 2018
@@ -84,8 +84,7 @@ public class Wss11 extends Wss10 {
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
 

Modified: webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java (original)
+++ webservices/wss4j/trunk/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java Thu Feb  1 15:51:12 2018
@@ -122,8 +122,7 @@ public class X509Token extends AbstractT
         //in contrary to a normalized policy where just one alternative exists
         if (alternatives.hasNext()) {
             List<Assertion> assertions = alternatives.next();
-            for (int i = 0; i < assertions.size(); i++) {
-                Assertion assertion = assertions.get(i);
+            for (Assertion assertion : assertions) {
                 String assertionName = assertion.getName().getLocalPart();
                 String assertionNamespace = assertion.getName().getNamespaceURI();
                 DerivedKeys derivedKeys = DerivedKeys.lookUp(assertionName);

Modified: webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/AbstractTestBase.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/AbstractTestBase.java (original)
+++ webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/AbstractTestBase.java Thu Feb  1 15:51:12 2018
@@ -31,7 +31,45 @@ import javax.xml.stream.XMLStreamWriter;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
 import org.apache.neethi.PolicyBuilder;
-import org.apache.wss4j.policy.builders.*;
+import org.apache.wss4j.policy.builders.AlgorithmSuiteBuilder;
+import org.apache.wss4j.policy.builders.AsymmetricBindingBuilder;
+import org.apache.wss4j.policy.builders.BootstrapPolicyBuilder;
+import org.apache.wss4j.policy.builders.ContentEncryptedElementsBuilder;
+import org.apache.wss4j.policy.builders.EncryptedElementsBuilder;
+import org.apache.wss4j.policy.builders.EncryptedPartsBuilder;
+import org.apache.wss4j.policy.builders.EncryptionTokenBuilder;
+import org.apache.wss4j.policy.builders.HttpsTokenBuilder;
+import org.apache.wss4j.policy.builders.InitiatorEncryptionTokenBuilder;
+import org.apache.wss4j.policy.builders.InitiatorSignatureTokenBuilder;
+import org.apache.wss4j.policy.builders.InitiatorTokenBuilder;
+import org.apache.wss4j.policy.builders.IssuedTokenBuilder;
+import org.apache.wss4j.policy.builders.KerberosTokenBuilder;
+import org.apache.wss4j.policy.builders.KeyValueTokenBuilder;
+import org.apache.wss4j.policy.builders.LayoutBuilder;
+import org.apache.wss4j.policy.builders.ProtectionTokenBuilder;
+import org.apache.wss4j.policy.builders.RecipientEncryptionTokenBuilder;
+import org.apache.wss4j.policy.builders.RecipientSignatureTokenBuilder;
+import org.apache.wss4j.policy.builders.RecipientTokenBuilder;
+import org.apache.wss4j.policy.builders.RelTokenBuilder;
+import org.apache.wss4j.policy.builders.RequiredElementsBuilder;
+import org.apache.wss4j.policy.builders.RequiredPartsBuilder;
+import org.apache.wss4j.policy.builders.SamlTokenBuilder;
+import org.apache.wss4j.policy.builders.SecureConversationTokenBuilder;
+import org.apache.wss4j.policy.builders.SecurityContextTokenBuilder;
+import org.apache.wss4j.policy.builders.SignatureTokenBuilder;
+import org.apache.wss4j.policy.builders.SignedElementsBuilder;
+import org.apache.wss4j.policy.builders.SignedPartsBuilder;
+import org.apache.wss4j.policy.builders.SpnegoContextTokenBuilder;
+import org.apache.wss4j.policy.builders.SupportingTokensBuilder;
+import org.apache.wss4j.policy.builders.SymmetricBindingBuilder;
+import org.apache.wss4j.policy.builders.TransportBindingBuilder;
+import org.apache.wss4j.policy.builders.TransportTokenBuilder;
+import org.apache.wss4j.policy.builders.Trust10Builder;
+import org.apache.wss4j.policy.builders.Trust13Builder;
+import org.apache.wss4j.policy.builders.UsernameTokenBuilder;
+import org.apache.wss4j.policy.builders.WSS10Builder;
+import org.apache.wss4j.policy.builders.WSS11Builder;
+import org.apache.wss4j.policy.builders.X509TokenBuilder;
 import org.custommonkey.xmlunit.DetailedDiff;
 import org.custommonkey.xmlunit.Diff;
 import org.custommonkey.xmlunit.XMLUnit;

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java Thu Feb  1 15:51:12 2018
@@ -396,7 +396,7 @@ public class SamlAssertionWrapper {
         } else if (samlVersion == SAMLVersion.VERSION_11) {
             List<SubjectStatement> subjectStatements = new ArrayList<>();
             org.opensaml.saml.saml1.core.Assertion saml1 =
-                ((org.opensaml.saml.saml1.core.Assertion)samlObject);
+                (org.opensaml.saml.saml1.core.Assertion)samlObject;
             subjectStatements.addAll(saml1.getSubjectStatements());
             subjectStatements.addAll(saml1.getAuthenticationStatements());
             subjectStatements.addAll(saml1.getAttributeStatements());

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedAssertionProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedAssertionProcessor.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedAssertionProcessor.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedAssertionProcessor.java Thu Feb  1 15:51:12 2018
@@ -70,7 +70,7 @@ public class EncryptedAssertionProcessor
                               ((Element)currentChild).getLocalName());
                 Processor proc = request.getWssConfig().getProcessor(el);
                 if (proc != null) {
-                    completeResults.addAll(proc.handleToken(((Element)currentChild), request));
+                    completeResults.addAll(proc.handleToken((Element)currentChild, request));
                 }
             }
         }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/DerivedKeyTokenSTRParser.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/DerivedKeyTokenSTRParser.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/DerivedKeyTokenSTRParser.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/DerivedKeyTokenSTRParser.java Thu Feb  1 15:51:12 2018
@@ -90,7 +90,7 @@ public class DerivedKeyTokenSTRParser im
         STRParserResult parserResult = new STRParserResult();
         RequestData data = parameters.getData();
 
-        Integer action = ((Integer)result.get(WSSecurityEngineResult.TAG_ACTION));
+        Integer action = (Integer)result.get(WSSecurityEngineResult.TAG_ACTION);
         if (action != null
             && (WSConstants.UT_NOPASSWORD == action.intValue() || WSConstants.UT == action.intValue())) {
             STRParserUtil.checkUsernameTokenBSPCompliance(secRef, data.getBSPEnforcer());

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java Thu Feb  1 15:51:12 2018
@@ -79,7 +79,7 @@ public class InboundWSSecurityContextImp
                     && securityEvent instanceof TokenSecurityEvent) {
                 @SuppressWarnings("unchecked")
                 TokenSecurityEvent<? extends InboundSecurityToken> tokenSecurityEvent =
-                        ((TokenSecurityEvent<? extends InboundSecurityToken>) securityEvent);
+                        (TokenSecurityEvent<? extends InboundSecurityToken>) securityEvent;
 
                 if (tokenSecurityEvent.getSecurityToken().getTokenUsages().contains(WSSecurityTokenConstants.TokenUsage_Encryption)) {
                     InboundSecurityToken securityToken = WSSUtils.getRootToken(tokenSecurityEvent.getSecurityToken());

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java Thu Feb  1 15:51:12 2018
@@ -100,7 +100,7 @@ public class DerivedKeyTokenInputHandler
                                 ((WSSSecurityProperties) securityProperties).getDecryptionCrypto(),
                                 ((WSSSecurityProperties)securityProperties).getCallbackHandler(),
                                 inputProcessorChain.getSecurityContext(),
-                                ((WSSSecurityProperties)securityProperties)
+                                (WSSSecurityProperties)securityProperties
                         );
                         this.referencedSecurityToken.addWrappedToken(this);
                         return this.referencedSecurityToken;

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityContextTokenInputHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityContextTokenInputHandler.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityContextTokenInputHandler.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityContextTokenInputHandler.java Thu Feb  1 15:51:12 2018
@@ -49,7 +49,7 @@ public class SecurityContextTokenInputHa
 
         @SuppressWarnings("unchecked")
         JAXBElement<AbstractSecurityContextTokenType> securityContextTokenTypeJAXBElement =
-                ((JAXBElement<AbstractSecurityContextTokenType>) parseStructure(eventQueue, index, securityProperties));
+                (JAXBElement<AbstractSecurityContextTokenType>) parseStructure(eventQueue, index, securityProperties);
         final AbstractSecurityContextTokenType securityContextTokenType = securityContextTokenTypeJAXBElement.getValue();
         if (securityContextTokenType.getId() == null) {
             securityContextTokenType.setId(IDGenerator.generateID(null));

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java Thu Feb  1 15:51:12 2018
@@ -94,14 +94,14 @@ public class SecurityTokenFactoryImpl ex
             if (securityTokenReferenceType != null) {
                 return getSecurityToken(securityTokenReferenceType, crypto,
                                         ((WSSSecurityProperties)securityProperties).getCallbackHandler(), inboundSecurityContext,
-                                        ((WSSSecurityProperties)securityProperties));
+                                        (WSSSecurityProperties)securityProperties);
             }
             final KeyValueType keyValueType
                     = XMLSecurityUtils.getQNameType(keyInfoType.getContent(), WSSConstants.TAG_dsig_KeyValue);
             if (keyValueType != null) {
                 return getSecurityToken(keyValueType, crypto, ((WSSSecurityProperties)securityProperties).getCallbackHandler(),
                                         inboundSecurityContext,
-                                        ((WSSSecurityProperties)securityProperties));
+                                        (WSSSecurityProperties)securityProperties);
             }
 
         } else if (crypto != null && crypto.getDefaultX509Identifier() != null) {
@@ -109,7 +109,7 @@ public class SecurityTokenFactoryImpl ex
                     (WSInboundSecurityContext) inboundSecurityContext, crypto,
                     ((WSSSecurityProperties)securityProperties).getCallbackHandler(), crypto.getDefaultX509Identifier(),
                     crypto.getDefaultX509Identifier(), WSSecurityTokenConstants.KeyIdentifier_NoKeyInfo,
-                    ((WSSSecurityProperties)securityProperties)
+                    (WSSSecurityProperties)securityProperties
             );
         }
         throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY, "noKeyinfo");

Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java?rev=1822886&r1=1822885&r2=1822886&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java Thu Feb  1 15:51:12 2018
@@ -234,7 +234,7 @@ public abstract class AbstractTestBase e
 
     protected Document doInboundSecurityWithWSS4J(Document document, String action) throws Exception {
         Map<String, Object> messageContext = doInboundSecurityWithWSS4J_1(document, action);
-        return ((Document) messageContext.get(SECURED_DOCUMENT));
+        return (Document) messageContext.get(SECURED_DOCUMENT);
     }
 
     protected Map<String, Object> doInboundSecurityWithWSS4J_1(Document document, String action) throws Exception {



Mime
View raw message