cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1135160 - in /cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security: policy/builders/ policy/interceptors/ policy/model/ trust/ trust/delegation/ wss4j/policyhandlers/
Date Mon, 13 Jun 2011 16:25:59 GMT
Author: coheigea
Date: Mon Jun 13 16:25:58 2011
New Revision: 1135160

URL: http://svn.apache.org/viewvc?rev=1135160&view=rev
Log:
Fixed some findbugs security warnings.

Modified:
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SamlTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AuthPolicyValidatingInterceptor.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/delegation/ReceivedTokenCallbackHandler.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java Mon Jun 13 16:25:58 2011
@@ -36,9 +36,6 @@ import org.apache.neethi.builders.Assert
 
 
 public class AlgorithmSuiteBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.ALGORITHM_SUITE, SP12Constants.ALGORITHM_SUITE};
-    
     
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {
@@ -59,7 +56,7 @@ public class AlgorithmSuiteBuilder imple
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.ALGORITHM_SUITE, SP12Constants.ALGORITHM_SUITE};
     }
 
 }

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java Mon Jun 13 16:25:58 2011
@@ -41,15 +41,13 @@ import org.apache.neethi.Policy;
 import org.apache.neethi.builders.AssertionBuilder;
 
 public class AsymmetricBindingBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.ASYMMETRIC_BINDING, SP12Constants.ASYMMETRIC_BINDING};
 
     PolicyBuilder builder;
     public AsymmetricBindingBuilder(PolicyBuilder b) {
         builder = b;
     }    
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.ASYMMETRIC_BINDING, SP12Constants.ASYMMETRIC_BINDING};
     }
     
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java Mon Jun 13 16:25:58 2011
@@ -35,8 +35,6 @@ import org.apache.neethi.builders.Assert
 
 
 public class ContentEncryptedElementsBuilder implements AssertionBuilder<Element> {
-    public static final QName KNOWN_ELEMENTS[] 
-        = {SP12Constants.CONTENT_ENCRYPTED_ELEMENTS};
     
     public Assertion build(Element element, AssertionBuilderFactory factory) {
         
@@ -58,7 +56,7 @@ public class ContentEncryptedElementsBui
         return contentEncryptedElements;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP12Constants.CONTENT_ENCRYPTED_ELEMENTS};
     }
     private void processElement(Element element, ContentEncryptedElements parent) {
         if (SPConstants.XPATH_EXPR.equals(element.getLocalName())) {

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java Mon Jun 13 16:25:58 2011
@@ -36,11 +36,9 @@ import org.apache.neethi.builders.Assert
 
 
 public class EncryptedElementsBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.ENCRYPTED_ELEMENTS, SP12Constants.ENCRYPTED_ELEMENTS};
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.ENCRYPTED_ELEMENTS, SP12Constants.ENCRYPTED_ELEMENTS};
     }
      
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java Mon Jun 13 16:25:58 2011
@@ -34,11 +34,9 @@ import org.apache.neethi.builders.Assert
 
 
 public class EncryptedPartsBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.ENCRYPTED_PARTS, SP12Constants.ENCRYPTED_PARTS};
     
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.ENCRYPTED_PARTS, SP12Constants.ENCRYPTED_PARTS};
     }
     
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -48,9 +48,6 @@ import org.apache.neethi.builders.Assert
  * 
  */
 public class HttpsTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.HTTPS_TOKEN, SP12Constants.HTTPS_TOKEN};
-
     
     PolicyBuilder builder;
     public HttpsTokenBuilder(PolicyBuilder b) {
@@ -101,7 +98,7 @@ public class HttpsTokenBuilder implement
      * {@inheritDoc}
      */
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.HTTPS_TOKEN, SP12Constants.HTTPS_TOKEN};
     }
     
 }

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -40,18 +40,15 @@ import org.apache.neethi.builders.Assert
 
 
 public class InitiatorTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.INITIATOR_TOKEN, SP12Constants.INITIATOR_TOKEN};
     
     PolicyBuilder builder;
     public InitiatorTokenBuilder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.INITIATOR_TOKEN, SP12Constants.INITIATOR_TOKEN};
     }
     
-    
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {
         

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -42,17 +42,13 @@ public class IssuedTokenBuilder implemen
     private static final String WSA_NAMESPACE_SUB = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
     private static final String WSA_NAMESPACE = "http://www.w3.org/2005/08/addressing";
     
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.ISSUED_TOKEN, SP12Constants.ISSUED_TOKEN};
-    
     PolicyBuilder builder;
     public IssuedTokenBuilder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.ISSUED_TOKEN, SP12Constants.ISSUED_TOKEN};
     }
-    
 
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -35,8 +35,6 @@ import org.apache.neethi.builders.Assert
 
 public class KeyValueTokenBuilder implements AssertionBuilder<Element> {
     private static final String MS_NS = "http://schemas.microsoft.com/ws/2005/07/securitypolicy";
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP12Constants.KEYVALUE_TOKEN, new QName(MS_NS, "RsaToken")};
 
     public KeyValueTokenBuilder() {
     }
@@ -76,7 +74,7 @@ public class KeyValueTokenBuilder implem
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP12Constants.KEYVALUE_TOKEN, new QName(MS_NS, "RsaToken")};
     }
 
 }

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java Mon Jun 13 16:25:58 2011
@@ -34,16 +34,13 @@ import org.apache.neethi.AssertionBuilde
 import org.apache.neethi.builders.AssertionBuilder;
 
 public class LayoutBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.LAYOUT, SP12Constants.LAYOUT};
     
     public LayoutBuilder() {
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.LAYOUT, SP12Constants.LAYOUT};
     }
     
-    
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {
         

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -39,18 +39,15 @@ import org.apache.neethi.builders.Assert
 
 
 public class ProtectionTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.PROTECTION_TOKEN, SP12Constants.PROTECTION_TOKEN};
     
     PolicyBuilder builder;
     public ProtectionTokenBuilder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.PROTECTION_TOKEN, SP12Constants.PROTECTION_TOKEN};
     }
     
-    
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {
         SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -39,15 +39,13 @@ import org.apache.neethi.builders.Assert
 
 
 public class RecipientTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.RECIPIENT_TOKEN, SP12Constants.RECIPIENT_TOKEN};
 
     PolicyBuilder builder;
     public RecipientTokenBuilder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.RECIPIENT_TOKEN, SP12Constants.RECIPIENT_TOKEN};
     }
     
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java Mon Jun 13 16:25:58 2011
@@ -36,11 +36,9 @@ import org.apache.neethi.builders.Assert
 
 
 public class RequiredElementsBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.REQUIRED_ELEMENTS, SP12Constants.REQUIRED_ELEMENTS};
     
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.REQUIRED_ELEMENTS, SP12Constants.REQUIRED_ELEMENTS};
     }
 
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SamlTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SamlTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SamlTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SamlTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -38,8 +38,6 @@ import org.apache.neethi.builders.Assert
 
 
 public class SamlTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[]  
-        = {SP11Constants.SAML_TOKEN, SP12Constants.SAML_TOKEN};
 
     PolicyBuilder builder;
     public SamlTokenBuilder(PolicyBuilder b) {
@@ -88,6 +86,6 @@ public class SamlTokenBuilder implements
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.SAML_TOKEN, SP12Constants.SAML_TOKEN};
     }
 }

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -37,15 +37,13 @@ import org.apache.neethi.builders.Assert
 
 
 public class SecureConversationTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.SECURE_CONVERSATION_TOKEN, SP12Constants.SECURE_CONVERSATION_TOKEN};
     
     PolicyBuilder builder;
     public SecureConversationTokenBuilder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.SECURE_CONVERSATION_TOKEN, SP12Constants.SECURE_CONVERSATION_TOKEN};
     }
 
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -34,11 +34,9 @@ import org.apache.neethi.builders.Assert
 
 
 public class SecurityContextTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.SECURITY_CONTEXT_TOKEN, SP12Constants.SECURITY_CONTEXT_TOKEN};
     
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.SECURITY_CONTEXT_TOKEN, SP12Constants.SECURITY_CONTEXT_TOKEN};
     }
     
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java Mon Jun 13 16:25:58 2011
@@ -36,11 +36,9 @@ import org.apache.neethi.builders.Assert
 
 
 public class SignedElementsBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.SIGNED_ELEMENTS, SP12Constants.SIGNED_ELEMENTS};
     
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.SIGNED_ELEMENTS, SP12Constants.SIGNED_ELEMENTS};
     }
      
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java Mon Jun 13 16:25:58 2011
@@ -34,14 +34,11 @@ import org.apache.neethi.builders.Assert
 
 
 public class SignedPartsBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.SIGNED_PARTS, SP12Constants.SIGNED_PARTS};
     
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.SIGNED_PARTS, SP12Constants.SIGNED_PARTS};
     }
     
-    
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {
         

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java Mon Jun 13 16:25:58 2011
@@ -41,22 +41,20 @@ import org.apache.neethi.builders.Assert
 
 
 public class SupportingTokens12Builder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP12Constants.SUPPORTING_TOKENS,
-           SP12Constants.SIGNED_SUPPORTING_TOKENS,
-           SP12Constants.ENDORSING_SUPPORTING_TOKENS,
-           SP12Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS,
-           SP12Constants.ENCRYPTED_SUPPORTING_TOKENS,
-           SP12Constants.SIGNED_ENCRYPTED_SUPPORTING_TOKENS,
-           SP12Constants.ENDORSING_ENCRYPTED_SUPPORTING_TOKENS,
-           SP12Constants.SIGNED_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS};  
 
     PolicyBuilder builder;
     public SupportingTokens12Builder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP12Constants.SUPPORTING_TOKENS,
+                           SP12Constants.SIGNED_SUPPORTING_TOKENS,
+                           SP12Constants.ENDORSING_SUPPORTING_TOKENS,
+                           SP12Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS,
+                           SP12Constants.ENCRYPTED_SUPPORTING_TOKENS,
+                           SP12Constants.SIGNED_ENCRYPTED_SUPPORTING_TOKENS,
+                           SP12Constants.ENDORSING_ENCRYPTED_SUPPORTING_TOKENS,
+                           SP12Constants.SIGNED_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS};
     }
     
     

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java Mon Jun 13 16:25:58 2011
@@ -42,19 +42,16 @@ import org.apache.neethi.builders.Assert
 
 
 public class SupportingTokensBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.SUPPORTING_TOKENS, 
-           SP11Constants.SIGNED_SUPPORTING_TOKENS,
-           SP11Constants.ENDORSING_SUPPORTING_TOKENS,
-           SP11Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS};
-
     
     PolicyBuilder builder;
     public SupportingTokensBuilder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.SUPPORTING_TOKENS, 
+                           SP11Constants.SIGNED_SUPPORTING_TOKENS,
+                           SP11Constants.ENDORSING_SUPPORTING_TOKENS,
+                           SP11Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS};
     }
     
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java Mon Jun 13 16:25:58 2011
@@ -41,15 +41,13 @@ import org.apache.neethi.builders.Assert
 
 
 public class SymmetricBindingBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.SYMMETRIC_BINDING, SP12Constants.SYMMETRIC_BINDING};
     
     PolicyBuilder builder;
     public SymmetricBindingBuilder(PolicyBuilder b) {
         builder = b;
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.SYMMETRIC_BINDING, SP12Constants.SYMMETRIC_BINDING};
     }
     
     public Assertion build(Element element, AssertionBuilderFactory factory)

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java Mon Jun 13 16:25:58 2011
@@ -38,9 +38,6 @@ import org.apache.neethi.Constants;
 import org.apache.neethi.builders.AssertionBuilder;
 
 public class TransportBindingBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.TRANSPORT_BINDING, SP12Constants.TRANSPORT_BINDING};
-
     
     PolicyBuilder builder;
     public TransportBindingBuilder(PolicyBuilder b) {
@@ -60,7 +57,7 @@ public class TransportBindingBuilder imp
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.TRANSPORT_BINDING, SP12Constants.TRANSPORT_BINDING};
     }
 
     private void processAlternative(Element element, 

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -39,10 +39,6 @@ import org.apache.neethi.builders.Assert
 
 
 public class TransportTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] 
-        = {SP11Constants.TRANSPORT_TOKEN, SP12Constants.TRANSPORT_TOKEN};
-
-    
     
     PolicyBuilder builder;
     public TransportTokenBuilder(PolicyBuilder b) {
@@ -70,6 +66,6 @@ public class TransportTokenBuilder imple
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.TRANSPORT_TOKEN, SP12Constants.TRANSPORT_TOKEN};
     }
 }

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -38,8 +38,6 @@ import org.apache.neethi.builders.Assert
 
 
 public class UsernameTokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[]  
-        = {SP11Constants.USERNAME_TOKEN, SP12Constants.USERNAME_TOKEN};
 
     PolicyBuilder builder;
     public UsernameTokenBuilder(PolicyBuilder b) {
@@ -96,6 +94,6 @@ public class UsernameTokenBuilder implem
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.USERNAME_TOKEN, SP12Constants.USERNAME_TOKEN};
     }
 }

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java Mon Jun 13 16:25:58 2011
@@ -34,13 +34,11 @@ import org.apache.neethi.builders.Assert
 
 
 public class WSS10Builder implements AssertionBuilder<Element> {
-    private static final QName[] KNOWN_ELEMENTS 
-        = {SP11Constants.WSS10, SP12Constants.WSS10};
     
     public WSS10Builder() {
     }
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.WSS10, SP12Constants.WSS10};
     }
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java Mon Jun 13 16:25:58 2011
@@ -35,13 +35,10 @@ import org.apache.neethi.builders.Assert
 
 
 public class WSS11Builder implements AssertionBuilder<Element> {
-    private static final QName[] KNOWN_ELEMENTS 
-        = {SP11Constants.WSS11, SP12Constants.WSS11};
 
     public WSS11Builder() {
     }
 
-    
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {
         SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI())
@@ -52,7 +49,7 @@ public class WSS11Builder implements Ass
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.WSS11, SP12Constants.WSS11};
     }
     private void processAlternative(Element element, Wss11 parent, SPConstants consts) {
         Element polEl = PolicyConstants.findPolicyElement(element);

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java Mon Jun 13 16:25:58 2011
@@ -38,8 +38,6 @@ import org.apache.neethi.Policy;
 import org.apache.neethi.builders.AssertionBuilder;
 
 public class X509TokenBuilder implements AssertionBuilder<Element> {
-    private static final QName KNOWN_ELEMENTS[] = {SP11Constants.X509_TOKEN, SP12Constants.X509_TOKEN};
-    
     
     PolicyBuilder builder;
     public X509TokenBuilder(PolicyBuilder b) {
@@ -146,7 +144,7 @@ public class X509TokenBuilder implements
     }
 
     public QName[] getKnownElements() {
-        return KNOWN_ELEMENTS;
+        return new QName[]{SP11Constants.X509_TOKEN, SP12Constants.X509_TOKEN};
     }
 
 }

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java Mon Jun 13 16:25:58 2011
@@ -334,9 +334,9 @@ class SecureConversationInInterceptor ex
                         store.update(cancelToken);
                         writer.writeEmptyElement(prefix, "RequestedTokenCancelled", namespace);
                         exchange.put(SecurityConstants.TOKEN, cancelToken);
-                    } else if (requestType.endsWith("/Renew")) {
+                    } //else if (requestType.endsWith("/Renew")) {
                         //REVISIT - implement
-                    }
+                    //}
                     writer.writeEndElement();
                     if (STSUtils.WST_NS_05_12.equals(namespace)) {
                         writer.writeEndElement();

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java Mon Jun 13 16:25:58 2011
@@ -55,10 +55,10 @@ public class SymmetricBinding extends Sy
      * @param encryptionToken The encryptionToken to set.
      */
     public void setEncryptionToken(EncryptionToken encryptionToken) {
-        if (this.protectionToken != null) {
+        //if (this.protectionToken != null) {
             // throw new WSSPolicyException("Cannot use an EncryptionToken in a " +
             // "SymmetricBinding when there is a ProtectionToken");
-        }
+        //}
         this.encryptionToken = encryptionToken;
     }
 
@@ -73,11 +73,11 @@ public class SymmetricBinding extends Sy
      * @param protectionToken The protectionToken to set.
      */
     public void setProtectionToken(ProtectionToken protectionToken) {
-        if (this.encryptionToken != null || this.signatureToken != null) {
+        //if (this.encryptionToken != null || this.signatureToken != null) {
             // throw new WSSPolicyException("Cannot use a ProtectionToken in a " +
             // "SymmetricBinding when there is a SignatureToken or an" +
             // "EncryptionToken");
-        }
+        //}
         this.protectionToken = protectionToken;
     }
 
@@ -92,10 +92,10 @@ public class SymmetricBinding extends Sy
      * @param signatureToken The signatureToken to set.
      */
     public void setSignatureToken(SignatureToken signatureToken) {
-        if (this.protectionToken != null) {
+        //if (this.protectionToken != null) {
             // throw new WSSPolicyException("Cannot use a SignatureToken in a " +
             // "SymmetricBinding when there is a ProtectionToken");
-        }
+        //}
         this.signatureToken = signatureToken;
     }
 

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AuthPolicyValidatingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AuthPolicyValidatingInterceptor.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AuthPolicyValidatingInterceptor.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AuthPolicyValidatingInterceptor.java Mon Jun 13 16:25:58 2011
@@ -54,11 +54,14 @@ public class AuthPolicyValidatingInterce
     
     public void handleMessage(Message message) throws Fault {
 
-        String name = null;
-        String password = null;
-        
         AuthorizationPolicy policy = (AuthorizationPolicy)message.get(AuthorizationPolicy.class);
         if (policy == null || policy.getUserName() == null || policy.getPassword() == null) {
+            String name = null;
+            String password = null;
+            if (policy != null) {
+                name = policy.getUserName();
+                password = policy.getPassword();
+            }
             org.apache.cxf.common.i18n.Message errorMsg = 
                 new org.apache.cxf.common.i18n.Message("NO_USER_PASSWORD", 
                                                        BUNDLE, 

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/delegation/ReceivedTokenCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/delegation/ReceivedTokenCallbackHandler.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/delegation/ReceivedTokenCallbackHandler.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/delegation/ReceivedTokenCallbackHandler.java Mon Jun 13 16:25:58 2011
@@ -63,7 +63,9 @@ public class ReceivedTokenCallbackHandle
                             message.get(PhaseInterceptorChain.PREVIOUS_MESSAGE);
                     SoapMessage previousSoapMessage = wr.get();
                     Element token = getTokenFromMessage(previousSoapMessage);
-                    callback.setToken(token);
+                    if (token != null) {
+                        callback.setToken(token);
+                    }
                 }
                 
             } else {

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java Mon Jun 13 16:25:58 2011
@@ -215,9 +215,9 @@ public class AsymmetricBindingHandler ex
             throw new Fault(ex);
         }
         
-        if (encryptionToken == null && encrParts.size() > 0) {
+        //if (encryptionToken == null && encrParts.size() > 0) {
             //REVISIT - no token to encrypt with  
-        }
+        //}
         
         if (encryptionToken != null && encrParts.size() > 0) {
             WSSecBase encrBase = doEncryption(wrapper, encrParts, true);

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java Mon Jun 13 16:25:58 2011
@@ -123,6 +123,7 @@ public class SymmetricBindingHandler ext
     
     private void initializeTokens()  {
         //Setting up encryption token and signature token
+        /*
         Token sigTok = getSignatureToken().getToken();
         //Token encrTok = getEncryptionToken().getToken();
         
@@ -133,6 +134,7 @@ public class SymmetricBindingHandler ext
         } else if (sigTok instanceof SecureConversationToken) {
             //REVISIT - SecureConversation token retrieval
         }
+        */
     }
     
     private void doEncryptBeforeSign() {
@@ -142,9 +144,9 @@ public class SymmetricBindingHandler ext
             List<WSEncryptionPart> encrParts = getEncryptedParts();
             List<WSEncryptionPart> sigParts = getSignedParts();
             
-            if (encryptionToken == null && encrParts.size() > 0) {
+            //if (encryptionToken == null && encrParts.size() > 0) {
                 //REVISIT - nothing to encrypt?
-            }
+            //}
             
             if (encryptionToken != null && encrParts.size() > 0) {
                 //The encryption token can be an IssuedToken or a 
@@ -163,10 +165,10 @@ public class SymmetricBindingHandler ext
                     }
                 }
                 if (tok == null) {
-                    if (tokenId == null || tokenId.length() == 0) {
+                    //if (tokenId == null || tokenId.length() == 0) {
                         //REVISIT - no tokenId?   Exception?
-                    }
-                    if (tokenId.startsWith("#")) {
+                    //}
+                    if (tokenId != null && tokenId.startsWith("#")) {
                         tokenId = tokenId.substring(1);
                     }
                     
@@ -290,9 +292,9 @@ public class SymmetricBindingHandler ext
             if (sigTok == null) {
                 sigTok = tokenStore.getToken(sigTokId);
             }
-            if (sigTok == null) {
+            //if (sigTok == null) {
                 //REVISIT - no token?
-            }
+            //}
             
             boolean tokIncluded = true;
             if (includeToken(sigToken.getInclusion())) {

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java?rev=1135160&r1=1135159&r2=1135160&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java Mon Jun 13 16:25:58 2011
@@ -332,11 +332,11 @@ public class TransportBindingHandler ext
         if (includeToken(token.getInclusion())) {
             //Add the token
             Element el = cloneElement(secTok.getToken());
-            if (securityTok != null) {
+            //if (securityTok != null) {
                 //do we need to sign this as well?
                 //String id = addWsuIdToElement(el);
                 //sigParts.add(new WSEncryptionPart(id));                          
-            }
+            //}
             
             addEncryptedKeyElement(el);
             tokenIncluded = true;



Mime
View raw message