ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1336054 [1/2] - in /webservices/wss4j/trunk: ./ src/main/java/org/apache/ws/security/ src/main/java/org/apache/ws/security/action/ src/main/java/org/apache/ws/security/components/crypto/ src/main/java/org/apache/ws/security/conversation/ s...
Date Wed, 09 May 2012 10:20:07 GMT
Author: coheigea
Date: Wed May  9 10:20:05 2012
New Revision: 1336054

URL: http://svn.apache.org/viewvc?rev=1336054&view=rev
Log:
More cleanup + fixed ant build

Modified:
    webservices/wss4j/trunk/build.xml
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/SOAPConstants.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSConfig.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSecurityEngine.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/Action.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/SignatureConfirmationAction.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Crypto.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/CryptoFactory.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Merlin.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/MerlinDevice.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/X509NameTokenizer.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/ConversationConstants.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/DerivationAlgorithm.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/P_SHA1.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/CallbackLookup.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecSignatureBase.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/Processor.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/SignatureProcessor.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuer.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerFactory.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerImpl.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/OpenSAMLUtil.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoClientAction.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoServiceAction.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/STRParser.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/transform/STRTransform.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/util/Base64.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/util/DOM2Writer.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/util/NSStack.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/util/UUIDGenerator.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/util/XMLUtils.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/util/XmlSchemaDateFormat.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/KerberosTokenDecoder.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/SamlAssertionValidator.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/SignatureTrustValidator.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/Validator.java

Modified: webservices/wss4j/trunk/build.xml
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/build.xml?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/build.xml (original)
+++ webservices/wss4j/trunk/build.xml Wed May  9 10:20:05 2012
@@ -282,6 +282,7 @@ org.apache.ws.security.util
         <copy todir="${build.classes}">
             <fileset dir="${dir.src.resources}">
                 <include name="**/*.properties"/>
+            	<include name="**/*.xml"/>
             </fileset>
         </copy>
     </target>

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/SOAPConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/SOAPConstants.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/SOAPConstants.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/SOAPConstants.java Wed May  9 10:20:05 2012
@@ -38,41 +38,41 @@ public interface SOAPConstants extends S
     /**
      * SOAP 1.1 constants - thread-safe and shared
      */
-    public SOAP11Constants SOAP11_CONSTANTS = new SOAP11Constants();
+    SOAP11Constants SOAP11_CONSTANTS = new SOAP11Constants();
     /**
      * SOAP 1.2 constants - thread-safe and shared
      */
-    public SOAP12Constants SOAP12_CONSTANTS = new SOAP12Constants();
+    SOAP12Constants SOAP12_CONSTANTS = new SOAP12Constants();
 
     /**
      * Obtain the envelope namespace for this version of SOAP
      */
-    public String getEnvelopeURI();
+    String getEnvelopeURI();
 
     /**
      * Obtain the QName for the Header element
      */
-    public QName getHeaderQName();
+    QName getHeaderQName();
 
     /**
      * Obtain the QName for the Body element
      */
-    public QName getBodyQName();
+    QName getBodyQName();
 
     /**
      * Obtain the QName for the role attribute (actor/role)
      */
-    public QName getRoleAttributeQName();
+    QName getRoleAttributeQName();
 
     /**
      * Obtain the "next" role/actor URI
      */
-    public String getNextRoleURI();
+    String getNextRoleURI();
 
     /**
      * Obtain the "next" role/actor URI
      */
-    public String getMustUnderstand();
+    String getMustUnderstand();
     
 
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSConfig.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSConfig.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSConfig.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSConfig.java Wed May  9 10:20:05 2012
@@ -52,7 +52,7 @@ import org.apache.xml.security.utils.XML
  */
 public class WSSConfig {
     
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(WSSConfig.class);
 
     /**
@@ -95,8 +95,8 @@ public class WSSConfig {
                 org.apache.ws.security.action.SignatureConfirmationAction.class
             );
         } catch (final Exception ex) {
-            if (log.isDebugEnabled()) {
-                log.debug(ex.getMessage(), ex);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(ex.getMessage(), ex);
             }
         }
         DEFAULT_ACTIONS = java.util.Collections.unmodifiableMap(tmp);
@@ -166,8 +166,8 @@ public class WSSConfig {
                 org.apache.ws.security.processor.EncryptedDataProcessor.class
             );
         } catch (final Exception ex) {
-            if (log.isDebugEnabled()) {
-                log.debug(ex.getMessage(), ex);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(ex.getMessage(), ex);
             }
         }
         DEFAULT_PROCESSORS = java.util.Collections.unmodifiableMap(tmp);
@@ -201,8 +201,8 @@ public class WSSConfig {
                 org.apache.ws.security.validate.UsernameTokenValidator.class
             );
         } catch (final Exception ex) {
-            if (log.isDebugEnabled()) {
-                log.debug(ex.getMessage(), ex);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(ex.getMessage(), ex);
             }
         }
         DEFAULT_VALIDATORS = java.util.Collections.unmodifiableMap(tmp);
@@ -285,7 +285,7 @@ public class WSSConfig {
      * The default wsu:Id allocator is a simple "start at 1 and increment up"
      * thing that is very fast.
      */
-    public static WsuIdAllocator DEFAULT_ID_ALLOCATOR = new WsuIdAllocator() {
+    public static final WsuIdAllocator DEFAULT_ID_ALLOCATOR = new WsuIdAllocator() {
         int i;
         private synchronized String next() {
             return Integer.toString(++i);
@@ -666,8 +666,8 @@ public class WSSConfig {
             try {
                 return (Action)((Class<?>)actionObject).newInstance();
             } catch (Throwable t) {
-                if (log.isDebugEnabled()) {
-                    log.debug(t.getMessage(), t);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(t.getMessage(), t);
                 }
                 throw new WSSecurityException(WSSecurityException.FAILURE,
                         "unableToLoadClass", new Object[] { ((Class<?>)actionObject).getName() }, t);
@@ -758,8 +758,8 @@ public class WSSConfig {
             try {
                 return (Validator)((Class<?>)validatorObject).newInstance();
             } catch (Throwable t) {
-                if (log.isDebugEnabled()) {
-                    log.debug(t.getMessage(), t);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(t.getMessage(), t);
                 }
                 throw new WSSecurityException(WSSecurityException.FAILURE,
                     "unableToLoadClass", new Object[] { ((Class<?>)validatorObject).getName() }, t);
@@ -784,8 +784,8 @@ public class WSSConfig {
             try {
                 return (Processor)((Class<?>)processorObject).newInstance();
             } catch (Throwable t) {
-                if (log.isDebugEnabled()) {
-                    log.debug(t.getMessage(), t);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(t.getMessage(), t);
                 }
                 throw new WSSecurityException(WSSecurityException.FAILURE,
                         "unableToLoadClass", new Object[] { ((Class<?>)processorObject).getName() }, t);
@@ -819,8 +819,8 @@ public class WSSConfig {
                 Provider provider = clazz.newInstance();
                 return addJceProvider(name, provider);
             } catch (Throwable t) {
-                if (log.isDebugEnabled()) {
-                    log.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
                 }
                 return null;
             }
@@ -864,16 +864,16 @@ public class WSSConfig {
                 if (ret == 0) {
                     ret = Security.insertProviderAt(provider, 2);
                 }
-                if (log.isDebugEnabled()) {
-                    log.debug(
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(
                         "The provider " + provider.getName() + " - "
                          + provider.getVersion() + " was added at position: " + ret
                     );
                 }
                 return provider.getName();
             } catch (Throwable t) {
-                if (log.isDebugEnabled()) {
-                    log.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
                 }
                 return null;
             }
@@ -904,16 +904,16 @@ public class WSSConfig {
                 Provider provider = clazz.newInstance();
                 
                 int ret = Security.addProvider(provider);
-                if (log.isDebugEnabled()) {
-                    log.debug(
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(
                         "The provider " + provider.getName() 
                         + " was added at position: " + ret
                     );
                 }
                 return provider.getName();
             } catch (Throwable t) {
-                if (log.isDebugEnabled()) {
-                    log.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
                 }
                 return null;
             }
@@ -939,16 +939,16 @@ public class WSSConfig {
         if (currentProvider == null) {
             try {
                 int ret = Security.addProvider(provider);
-                if (log.isDebugEnabled()) {
-                    log.debug(
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(
                         "The provider " + provider.getName() 
                         + " was added at position: " + ret
                     );
                 }
                 return provider.getName();
             } catch (Throwable t) {
-                if (log.isDebugEnabled()) {
-                    log.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("The provider " + name + " could not be added: " + t.getMessage(), t);
                 }
                 return null;
             }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSecurityEngine.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSecurityEngine.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSecurityEngine.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSSecurityEngine.java Wed May  9 10:20:05 2012
@@ -23,7 +23,6 @@ import org.apache.ws.security.components
 import org.apache.ws.security.conversation.ConversationConstants;
 import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.message.CallbackLookup;
-import org.apache.ws.security.message.token.UsernameToken;
 import org.apache.ws.security.processor.Processor;
 import org.apache.ws.security.util.WSSecurityUtil;
 import org.w3c.dom.Document;

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/Action.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/Action.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/Action.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/Action.java Wed May  9 10:20:05 2012
@@ -29,7 +29,7 @@ import org.apache.ws.security.WSSecurity
  */
 public interface Action {
     
-    public void execute(
+    void execute(
         WSHandler handler, 
         int actionToDo, 
         Document doc,

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/SignatureConfirmationAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/SignatureConfirmationAction.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/SignatureConfirmationAction.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/action/SignatureConfirmationAction.java Wed May  9 10:20:05 2012
@@ -35,7 +35,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 public class SignatureConfirmationAction implements Action {
-    protected static org.apache.commons.logging.Log log = 
+    protected static final org.apache.commons.logging.Log log = 
         org.apache.commons.logging.LogFactory.getLog(SignatureConfirmationAction.class);
 
     @SuppressWarnings("unchecked")

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Crypto.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Crypto.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Crypto.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Crypto.java Wed May  9 10:20:05 2012
@@ -38,13 +38,13 @@ public interface Crypto {
      * Get the crypto provider associated with this implementation
      * @return the crypto provider
      */
-    public String getCryptoProvider();
+    String getCryptoProvider();
     
     /**
      * Set the crypto provider associated with this implementation
      * @param provider the crypto provider to set
      */
-    public void setCryptoProvider(String provider);
+    void setCryptoProvider(String provider);
     
     /**
      * Retrieves the identifier name of the default certificate. This should be the certificate 
@@ -55,7 +55,7 @@ public interface Crypto {
      *
      * @return name of the default X509 certificate.
      */
-    public String getDefaultX509Identifier() throws WSSecurityException;
+    String getDefaultX509Identifier() throws WSSecurityException;
     
     /**
      * Sets the identifier name of the default certificate. This should be the certificate 
@@ -65,7 +65,7 @@ public interface Crypto {
      *
      * @param identifier name of the default X509 certificate.
      */
-    public void setDefaultX509Identifier(String identifier);
+    void setDefaultX509Identifier(String identifier);
     
     /**
      * Sets the CertificateFactory instance on this Crypto instance
@@ -73,7 +73,7 @@ public interface Crypto {
      * @param provider the CertificateFactory provider name
      * @param certFactory the CertificateFactory the CertificateFactory instance to set
      */
-    public void setCertificateFactory(String provider, CertificateFactory certFactory);
+    void setCertificateFactory(String provider, CertificateFactory certFactory);
     
     /**
      * Get the CertificateFactory instance on this Crypto instance
@@ -82,7 +82,7 @@ public interface Crypto {
      *         X509 certificates
      * @throws org.apache.ws.security.WSSecurityException
      */
-    public CertificateFactory getCertificateFactory() throws WSSecurityException;
+    CertificateFactory getCertificateFactory() throws WSSecurityException;
     
     //
     // Base Crypto functionality methods
@@ -95,7 +95,7 @@ public interface Crypto {
      * @return An X509 certificate
      * @throws WSSecurityException
      */
-    public X509Certificate loadCertificate(InputStream in) throws WSSecurityException;
+    X509Certificate loadCertificate(InputStream in) throws WSSecurityException;
     
     /**
      * Reads the SubjectKeyIdentifier information from the certificate.
@@ -109,7 +109,7 @@ public interface Crypto {
      * @param cert The certificate to read SKI
      * @return The byte array containing the binary SKI data
      */
-    public byte[] getSKIBytesFromCert(X509Certificate cert) throws WSSecurityException;
+    byte[] getSKIBytesFromCert(X509Certificate cert) throws WSSecurityException;
     
     /**
      * Get a byte array given an array of X509 certificates.
@@ -119,7 +119,7 @@ public interface Crypto {
      * @return The byte array for the certificates
      * @throws WSSecurityException
      */
-    public byte[] getBytesFromCertificates(X509Certificate[] certs) throws WSSecurityException;
+    byte[] getBytesFromCertificates(X509Certificate[] certs) throws WSSecurityException;
 
     /**
      * Construct an array of X509Certificate's from the byte array.
@@ -128,7 +128,7 @@ public interface Crypto {
      * @return An array of X509 certificates
      * @throws WSSecurityException
      */
-    public X509Certificate[] getCertificatesFromBytes(byte[] data) throws WSSecurityException;
+    X509Certificate[] getCertificatesFromBytes(byte[] data) throws WSSecurityException;
     
     //
     // Implementation-specific Crypto functionality methods
@@ -145,7 +145,7 @@ public interface Crypto {
      * TYPE.ALIAS - A certificate (chain) is located by an alias. This alias is implementation
      * specific, for example - it could be a java KeyStore alias.
      */
-    public X509Certificate[] getX509Certificates(CryptoType cryptoType) throws WSSecurityException;
+    X509Certificate[] getX509Certificates(CryptoType cryptoType) throws WSSecurityException;
     
     /**
      * Get the implementation-specific identifier corresponding to the cert parameter, e.g. the
@@ -154,7 +154,7 @@ public interface Crypto {
      * @return the identifier corresponding to the cert parameter
      * @throws WSSecurityException
      */
-    public String getX509Identifier(X509Certificate cert) throws WSSecurityException;
+    String getX509Identifier(X509Certificate cert) throws WSSecurityException;
     
     /**
      * Gets the private key corresponding to the certificate.
@@ -163,7 +163,7 @@ public interface Crypto {
      * @param callbackHandler The callbackHandler needed to get the password
      * @return The private key
      */
-    public PrivateKey getPrivateKey(
+    PrivateKey getPrivateKey(
         X509Certificate certificate, CallbackHandler callbackHandler
     ) throws WSSecurityException;
        
@@ -174,7 +174,7 @@ public interface Crypto {
      * @param password The password needed to get the key
      * @return The private key
      */
-    public PrivateKey getPrivateKey(
+    PrivateKey getPrivateKey(
         String identifier, String password
     ) throws WSSecurityException;
     
@@ -186,7 +186,7 @@ public interface Crypto {
      * @throws WSSecurityException
      */
     @Deprecated
-    public boolean verifyTrust(X509Certificate[] certs) throws WSSecurityException;
+    boolean verifyTrust(X509Certificate[] certs) throws WSSecurityException;
     
     /**
      * Evaluate whether a given certificate chain should be trusted.
@@ -196,7 +196,7 @@ public interface Crypto {
      * @return true if the certificate chain is valid, false otherwise
      * @throws WSSecurityException
      */
-    public boolean verifyTrust(
+    boolean verifyTrust(
         X509Certificate[] certs, boolean enableRevocation
     ) throws WSSecurityException;
     
@@ -206,6 +206,6 @@ public interface Crypto {
      * @param publicKey The PublicKey to be evaluated
      * @return whether the PublicKey parameter is trusted or not
      */
-    public boolean verifyTrust(PublicKey publicKey) throws WSSecurityException;
+    boolean verifyTrust(PublicKey publicKey) throws WSSecurityException;
 
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/CryptoFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/CryptoFactory.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/CryptoFactory.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/CryptoFactory.java Wed May  9 10:20:05 2012
@@ -35,7 +35,7 @@ import java.util.Properties;
  * @author Davanum Srinivas (dims@yahoo.com).
  */
 public abstract class CryptoFactory {
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(CryptoFactory.class);
     private static final Class<? extends Crypto> defaultCryptoClass = 
         org.apache.ws.security.components.crypto.Merlin.class;
@@ -108,8 +108,8 @@ public abstract class CryptoFactory {
                 // instruct the class loader to load the crypto implementation
                 cryptoClass = Loader.loadClass(cryptoClassName, Crypto.class);
             } catch (ClassNotFoundException ex) {
-                if (log.isDebugEnabled()) {
-                    log.debug(ex.getMessage(), ex);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(ex.getMessage(), ex);
                 }
                 throw new WSSecurityException(cryptoClassName + " Not Found", ex);
             }
@@ -182,16 +182,16 @@ public abstract class CryptoFactory {
         Map<Object, Object> map, 
         ClassLoader loader
     ) throws WSSecurityException {
-        if (log.isDebugEnabled()) {
-            log.debug("Using Crypto Engine [" + cryptoClass + "]");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Using Crypto Engine [" + cryptoClass + "]");
         }
         try {
             Class<?>[] classes = new Class[]{Map.class, ClassLoader.class};
             Constructor<? extends Crypto> c = cryptoClass.getConstructor(classes);
             return c.newInstance(new Object[] {map, loader});
         } catch (java.lang.Exception e) {
-            if (log.isDebugEnabled()) {
-                log.debug("Unable to instantiate: " + cryptoClass.getName(), e);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Unable to instantiate: " + cryptoClass.getName(), e);
             }
             throw new WSSecurityException(cryptoClass + " cannot create instance", e);
         }
@@ -210,16 +210,16 @@ public abstract class CryptoFactory {
         Properties map, 
         ClassLoader loader
     ) throws WSSecurityException {
-        if (log.isDebugEnabled()) {
-            log.debug("Using Crypto Engine [" + cryptoClass + "]");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Using Crypto Engine [" + cryptoClass + "]");
         }
         try {
             Class<?>[] classes = new Class[]{Properties.class, ClassLoader.class};
             Constructor<? extends Crypto> c = cryptoClass.getConstructor(classes);
             return c.newInstance(new Object[] {map, loader});
         } catch (java.lang.Exception e) {
-            if (log.isDebugEnabled()) {
-                log.debug("Unable to instantiate: " + cryptoClass.getName(), e);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Unable to instantiate: " + cryptoClass.getName(), e);
             }
             throw new WSSecurityException(cryptoClass + " cannot create instance", e);
         }
@@ -248,8 +248,8 @@ public abstract class CryptoFactory {
             }
             properties.load(url.openStream());
         } catch (IOException e) {
-            if (log.isDebugEnabled()) {
-                log.debug("Cannot find resource: " + propFilename, e);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Cannot find resource: " + propFilename, e);
             }
             throw new WSSecurityException(
                 WSSecurityException.FAILURE, 

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Merlin.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Merlin.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Merlin.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/Merlin.java Wed May  9 10:20:05 2012
@@ -114,9 +114,9 @@ public class Merlin extends CryptoBase {
     public static final String X509_CRL_FILE = 
         "org.apache.ws.security.crypto.merlin.x509crl.file";
     
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(Merlin.class);
-    private static final boolean doDebug = log.isDebugEnabled();
+    private static final boolean doDebug = LOG.isDebugEnabled();
 
     protected static CertificateFactory certFact;
     protected Properties properties = null;
@@ -189,7 +189,7 @@ public class Merlin extends CryptoBase {
                 }
                 keystore = load(is, passwd, provider, type);
                 if (doDebug) {
-                    log.debug(
+                    LOG.debug(
                         "The KeyStore " + keyStoreLocation + " of type " + type 
                         + " has been loaded"
                     );
@@ -205,7 +205,7 @@ public class Merlin extends CryptoBase {
             }
         } else {
             if (doDebug) {
-                log.debug("The KeyStore is not loaded as KEYSTORE_FILE is null");
+                LOG.debug("The KeyStore is not loaded as KEYSTORE_FILE is null");
             }
         }
         
@@ -228,7 +228,7 @@ public class Merlin extends CryptoBase {
                 }
                 truststore = load(is, passwd, provider, type);
                 if (doDebug) {
-                    log.debug(
+                    LOG.debug(
                         "The TrustStore " + trustStoreLocation + " of type " + type 
                         + " has been loaded"
                     );
@@ -257,7 +257,7 @@ public class Merlin extends CryptoBase {
                     }
                     truststore = load(is, cacertsPasswd, null, KeyStore.getDefaultType());
                     if (doDebug) {
-                        log.debug("CA certs have been loaded");
+                        LOG.debug("CA certs have been loaded");
                     }
                     loadCACerts = true;
                 } finally {
@@ -294,13 +294,13 @@ public class Merlin extends CryptoBase {
                         );
                 }
                 if (doDebug) {
-                    log.debug(
+                    LOG.debug(
                         "The CRL " + crlLocation + " has been loaded"
                     );
                 }
             } catch (Exception e) {
                 if (doDebug) {
-                    log.debug(e.getMessage(), e);
+                    LOG.debug(e.getMessage(), e);
                 }
                 throw new CredentialException(CredentialException.IO_ERROR, "ioError00", e);
             } finally {
@@ -332,7 +332,7 @@ public class Merlin extends CryptoBase {
                     is = new FileInputStream(location);
                 } catch (Exception e) {
                     if (doDebug) {
-                        log.debug(e.getMessage(), e);
+                        LOG.debug(e.getMessage(), e);
                     }
                     throw new CredentialException(
                         CredentialException.IO_ERROR, "proxyNotFound", new Object[]{location}, e
@@ -366,17 +366,17 @@ public class Merlin extends CryptoBase {
                 ? new char[0] : storepass.toCharArray());
         } catch (IOException e) {
             if (doDebug) {
-                log.debug(e.getMessage(), e);
+                LOG.debug(e.getMessage(), e);
             }
             throw new CredentialException(CredentialException.IO_ERROR, "ioError00", e);
         } catch (GeneralSecurityException e) {
             if (doDebug) {
-                log.debug(e.getMessage(), e);
+                LOG.debug(e.getMessage(), e);
             }
             throw new CredentialException(CredentialException.SEC_ERROR, "secError00", e);
         } catch (Exception e) {
             if (doDebug) {
-                log.debug(e.getMessage(), e);
+                LOG.debug(e.getMessage(), e);
             }
             throw new CredentialException(CredentialException.FAILURE, "error00", e);
         }
@@ -487,7 +487,7 @@ public class Merlin extends CryptoBase {
                                 mapKeystoreProviderToCertProvider(keyStoreProvider), factory
                             );
                         } catch (Exception ex) {
-                            log.debug(ex);
+                            LOG.debug(ex);
                             //Ignore, we'll just use the default since they didn't specify one.
                             //Hopefully that will work for them.
                         }
@@ -647,7 +647,7 @@ public class Merlin extends CryptoBase {
             if (identifier == null || !keystore.isKeyEntry(identifier)) {
                 String msg = "Cannot find key for alias: [" + identifier + "]";
                 String logMsg = createKeyStoreErrorMessage(keystore);
-                log.error(msg + logMsg);
+                LOG.error(msg + logMsg);
                 throw new WSSecurityException(msg);
             }
             String password = getPassword(identifier, callbackHandler);
@@ -662,7 +662,7 @@ public class Merlin extends CryptoBase {
             if (!(keyTmp instanceof PrivateKey)) {
                 String msg = "Key is not a private key, alias: [" + identifier + "]";
                 String logMsg = createKeyStoreErrorMessage(keystore);
-                log.error(msg + logMsg);
+                LOG.error(msg + logMsg);
                 throw new WSSecurityException(msg);
             }
             return (PrivateKey) keyTmp;
@@ -699,7 +699,7 @@ public class Merlin extends CryptoBase {
             if (identifier == null || !keystore.isKeyEntry(identifier)) {
                 String msg = "Cannot find key for alias: [" + identifier + "]";
                 String logMsg = createKeyStoreErrorMessage(keystore);
-                log.error(msg + logMsg);
+                LOG.error(msg + logMsg);
                 throw new WSSecurityException(msg);
             }
             if (password == null && privatePasswordSet) {
@@ -713,7 +713,7 @@ public class Merlin extends CryptoBase {
             if (!(keyTmp instanceof PrivateKey)) {
                 String msg = "Key is not a private key, alias: [" + identifier + "]";
                 String logMsg = createKeyStoreErrorMessage(keystore);
-                log.error(msg + logMsg);
+                LOG.error(msg + logMsg);
                 throw new WSSecurityException(msg);
             }
             return (PrivateKey) keyTmp;

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/MerlinDevice.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/MerlinDevice.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/MerlinDevice.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/MerlinDevice.java Wed May  9 10:20:05 2012
@@ -37,9 +37,9 @@ import java.util.Properties;
  */
 public class MerlinDevice extends Merlin {
     
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(MerlinDevice.class);
-    private static final boolean doDebug = log.isDebugEnabled();
+    private static final boolean doDebug = LOG.isDebugEnabled();
 
     
     @Override
@@ -87,7 +87,7 @@ public class MerlinDevice extends Merlin
             try {
                 keystore = load(is, keyStorePassword, provider, keyStoreType);
                 if (doDebug) {
-                    log.debug(
+                    LOG.debug(
                         "The KeyStore " + keyStoreLocation + " of type " + keyStoreType 
                         + " has been loaded"
                     );
@@ -124,7 +124,7 @@ public class MerlinDevice extends Merlin
             try {
                 truststore = load(is, trustStorePassword, provider, trustStoreType);
                 if (doDebug) {
-                    log.debug(
+                    LOG.debug(
                         "The TrustStore " + trustStoreLocation + " of type " + trustStoreType 
                         + " has been loaded"
                     );
@@ -148,7 +148,7 @@ public class MerlinDevice extends Merlin
                 }
                 truststore = load(is, cacertsPasswd, null, KeyStore.getDefaultType());
                 if (doDebug) {
-                    log.debug("CA certs have been loaded");
+                    LOG.debug("CA certs have been loaded");
                 }
                 loadCACerts = true;
             } finally {
@@ -186,13 +186,13 @@ public class MerlinDevice extends Merlin
                         );
                 }
                 if (doDebug) {
-                    log.debug(
+                    LOG.debug(
                         "The CRL " + crlLocation + " has been loaded"
                     );
                 }
             } catch (Exception e) {
                 if (doDebug) {
-                    log.debug(e.getMessage(), e);
+                    LOG.debug(e.getMessage(), e);
                 }
                 throw new CredentialException(CredentialException.IO_ERROR, "ioError00", e);
             } finally {

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/X509NameTokenizer.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/X509NameTokenizer.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/X509NameTokenizer.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/components/crypto/X509NameTokenizer.java Wed May  9 10:20:05 2012
@@ -35,20 +35,20 @@ public class X509NameTokenizer {
     private int index = 0;
 
     public X509NameTokenizer(String dn) {
-       final String _DN = RFC2253Parser.normalize(dn);
+       final String normalizedDN = RFC2253Parser.normalize(dn);
        int i = 0;
        int l = 0;
        int k;
-       for (int j = 0; (k = _DN.indexOf(",", j)) >= 0; j = k + 1) {
-          l += countQuotes(_DN, j, k);
-          if ((k > 0) && (_DN.charAt(k - 1) != '\\') && (l % 2) == 0) {
-             tokens.add(_DN.substring(i, k).trim());
+       for (int j = 0; (k = normalizedDN.indexOf(',', j)) >= 0; j = k + 1) {
+          l += countQuotes(normalizedDN, j, k);
+          if ((k > 0) && (normalizedDN.charAt(k - 1) != '\\') && (l % 2) == 0) {
+             tokens.add(normalizedDN.substring(i, k).trim());
              i = k + 1;
              l = 0;
           }
        }
-       if (_DN.trim().length() != 0) {
-           tokens.add(trim(_DN.substring(i)));
+       if (normalizedDN.trim().length() != 0) {
+           tokens.add(trim(normalizedDN.substring(i)));
        }
     }
 

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/ConversationConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/ConversationConstants.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/ConversationConstants.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/ConversationConstants.java Wed May  9 10:20:05 2012
@@ -164,10 +164,10 @@ public class ConversationConstants {
     public static final String KEY_CONTEXT_MAP = "contextMap";
     
     public interface DerivationAlgorithm {
-        public static final String P_SHA_1 = 
+        String P_SHA_1 = 
             "http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1";
         
-        public static final String P_SHA_1_2005_12 = 
+        String P_SHA_1_2005_12 = 
             "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1";
     }
     

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/DerivationAlgorithm.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/DerivationAlgorithm.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/DerivationAlgorithm.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/DerivationAlgorithm.java Wed May  9 10:20:05 2012
@@ -27,6 +27,6 @@ import org.apache.ws.security.conversati
  */
 public interface DerivationAlgorithm {
 
-    public byte[] createKey(byte[] secret, byte[] seed, int offset,
+    byte[] createKey(byte[] secret, byte[] seed, int offset,
             long length) throws ConversationException;
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/P_SHA1.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/P_SHA1.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/P_SHA1.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/conversation/dkalgo/P_SHA1.java Wed May  9 10:20:05 2012
@@ -46,21 +46,20 @@ import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.ws.security.conversation.ConversationException;
 
-public class P_SHA1
-        implements DerivationAlgorithm {
+public class P_SHA1 implements DerivationAlgorithm {
 
     public byte[] createKey(byte[] secret, byte[] seed, int offset,
             long length) throws ConversationException {
         try {
             Mac mac = Mac.getInstance("HmacSHA1");
 
-            byte[] tempBytes = P_hash(secret, seed, mac,
-                    (offset + (int) length));
+            byte[] tempBytes = P_hash(secret, seed, mac, (offset + (int) length));
 
             byte[] key = new byte[(int) length];
 
-            for (int i = 0; i < key.length; i++)
+            for (int i = 0; i < key.length; i++) {
                 key[i] = tempBytes[i + offset];
+            }
 
             return key;
         } catch (Exception ex) {
@@ -78,20 +77,19 @@ public class P_SHA1
      * @return
      * @throws java.lang.Exception
      */
-    private static byte[] P_hash(byte[] secret, byte[] seed, Mac mac,
-                                 int required) throws Exception {
+    private static byte[] P_hash(byte[] secret, byte[] seed, Mac mac, int required) throws Exception {
         byte[] out = new byte[required];
         int offset = 0, tocpy;
-        byte[] A, tmp;
-        A = seed;
+        byte[] a, tmp;
+        a = seed;
         while (required > 0) {
             SecretKeySpec key = new SecretKeySpec(secret, "HMACSHA1");
             mac.init(key);
-            mac.update(A);
-            A = mac.doFinal();
+            mac.update(a);
+            a = mac.doFinal();
             mac.reset();
             mac.init(key);
-            mac.update(A);
+            mac.update(a);
             mac.update(seed);
             tmp = mac.doFinal();
             tocpy = min(required, tmp.length);

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/CallbackLookup.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/CallbackLookup.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/CallbackLookup.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/CallbackLookup.java Wed May  9 10:20:05 2012
@@ -40,7 +40,7 @@ public interface CallbackLookup {
      * @return the located element
      * @throws WSSecurityException
      */
-    public Element getElement(
+    Element getElement(
         String id, String valueType, boolean checkMultipleElements
     ) throws WSSecurityException;
     
@@ -51,7 +51,7 @@ public interface CallbackLookup {
      * @return the located element(s)
      * @throws WSSecurityException
      */
-    public List<Element> getElements(
+    List<Element> getElements(
         String localname, String namespace
     ) throws WSSecurityException;
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecSignatureBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecSignatureBase.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecSignatureBase.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecSignatureBase.java Wed May  9 10:20:05 2012
@@ -227,7 +227,7 @@ public class WSSecSignatureBase extends 
             }
         }
 
-        if (excludeVisible == true) {
+        if (excludeVisible) {
             NamedNodeMap attributes = target.getAttributes();
             for (int i = 0; i < attributes.getLength(); i++) {
                 Node attribute = attributes.item(i);

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java Wed May  9 10:20:05 2012
@@ -174,7 +174,7 @@ public class BinarySecurity {
     /**
      * get the encoding type.
      * 
-     * @return TODO
+     * @return the encoding type.
      */
     public String getEncodingType() {
         return element.getAttribute("EncodingType");
@@ -230,7 +230,7 @@ public class BinarySecurity {
     /**
      * return the first text node.
      * 
-     * @return TODO
+     * @return the first text node.
      */
     protected Text getFirstNode() {
         Node node = element.getFirstChild();
@@ -240,7 +240,7 @@ public class BinarySecurity {
     /**
      * return the dom element.
      * 
-     * @return TODO
+     * @return the dom element.
      */
     public Element getElement() {
         return element;

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java Wed May  9 10:20:05 2012
@@ -775,14 +775,14 @@ public class UsernameToken {
         //
         // Make the first hash round with start value
         //
-        byte[] K = sha.digest(pwSalt);
+        byte[] k = sha.digest(pwSalt);
         //
         // Perform the 1st up to iteration-1 hash rounds
         //
         for (int i = 1; i < iteration; i++) {
-            K = sha.digest(K);
+            k = sha.digest(k);
         }
-        return K;
+        return k;
     }
     
     /**
@@ -984,17 +984,17 @@ public class UsernameToken {
     ) throws Exception {
         byte[] out = new byte[required];
         int offset = 0, tocpy;
-        byte[] A, tmp;
+        byte[] a, tmp;
         //
-        // A(0) is the seed
+        // a(0) is the seed
         //
-        A = seed;
+        a = seed;
         SecretKeySpec key = new SecretKeySpec(secret, "HMACSHA1");
         mac.init(key);
         while (required > 0) {
-            mac.update(A);
-            A = mac.doFinal();
-            mac.update(A);
+            mac.update(a);
+            a = mac.doFinal();
+            mac.update(a);
             mac.update(seed);
             tmp = mac.doFinal();
             tocpy = min(required, tmp.length);

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/Processor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/Processor.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/Processor.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/Processor.java Wed May  9 10:20:05 2012
@@ -29,7 +29,7 @@ import java.util.List;
 
 public interface Processor {
     
-    public List<WSSecurityEngineResult> handleToken(
+    List<WSSecurityEngineResult> handleToken(
         Element elem,
         RequestData request,
         WSDocInfo wsDocInfo

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/SignatureProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/SignatureProcessor.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/SignatureProcessor.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/processor/SignatureProcessor.java Wed May  9 10:20:05 2012
@@ -80,7 +80,7 @@ import java.util.List;
 import java.util.Map;
 
 public class SignatureProcessor implements Processor {
-    private static org.apache.commons.logging.Log LOG = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(SignatureProcessor.class);
     
     private XMLSignatureFactory signatureFactory;

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuer.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuer.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuer.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuer.java Wed May  9 10:20:05 2012
@@ -41,87 +41,87 @@ public interface SAMLIssuer {
      * @return AssertionWrapper
      * @throws WSSecurityException
      */
-    public AssertionWrapper newAssertion() throws WSSecurityException;
+    AssertionWrapper newAssertion() throws WSSecurityException;
     
     /**
      * Set whether to send the key value or whether to include the entire cert.
      * @param sendKeyValue whether to send the key value.
      */
-    public void setSendKeyValue(boolean sendKeyValue);
+    void setSendKeyValue(boolean sendKeyValue);
     
     /**
      * Get whether to send the key value or whether to include the entire cert.
      * @return whether to send the key value
      */
-    public boolean isSendKeyValue();
+    boolean isSendKeyValue();
     
     /**
      * Set whether to sign the assertion or not.
      * @param signAssertion whether to sign the assertion or not.
      */
-    public void setSignAssertion(boolean signAssertion);
+    void setSignAssertion(boolean signAssertion);
     
     /**
      * Get whether to sign the assertion or not
      * @return whether to sign the assertion or not
      */
-    public boolean isSignAssertion();
+    boolean isSignAssertion();
     
     /**
      * Set the CallbackHandler to use
      * @param callbackHandler the CallbackHandler to use
      */
-    public void setCallbackHandler(CallbackHandler callbackHandler);
+    void setCallbackHandler(CallbackHandler callbackHandler);
     
     /**
      * Get the CallbackHandler in use
      * @return the CallbackHandler in use
      */
-    public CallbackHandler getCallbackHandler();
+    CallbackHandler getCallbackHandler();
     
     /**
      * Set the issuer crypto
      * @param issuerCrypto the issuer crypto
      */
-    public void setIssuerCrypto(Crypto issuerCrypto);
+    void setIssuerCrypto(Crypto issuerCrypto);
 
     /**
      * @return Returns the issuerCrypto.
      */
-    public Crypto getIssuerCrypto();
+    Crypto getIssuerCrypto();
     
     /**
      * Set the issuer name
      * @param issuer the issuer name
      */
-    public void setIssuerName(String issuer);
+    void setIssuerName(String issuer);
     
     /**
      * Get the issuer name
      * @return the issuer name
      */
-    public String getIssuerName();
+    String getIssuerName();
     
     /**
      * Set the issuer key name
      * @param issuerKeyName the issuer key name
      */
-    public void setIssuerKeyName(String issuerKeyName);
+    void setIssuerKeyName(String issuerKeyName);
 
     /**
      * @return Returns the issuerKeyName.
      */
-    public String getIssuerKeyName();
+    String getIssuerKeyName();
 
     /**
      * Set the issuer key password
      * @param issuerKeyPassword the issuerKeyPassword.
      */
-    public void setIssuerKeyPassword(String issuerKeyPassword);
+    void setIssuerKeyPassword(String issuerKeyPassword);
     
     /**
      * @return Returns the issuerKeyPassword.
      */
-    public String getIssuerKeyPassword();
+    String getIssuerKeyPassword();
 
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerFactory.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerFactory.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerFactory.java Wed May  9 10:20:05 2012
@@ -34,7 +34,7 @@ import java.util.Properties;
  * @author Davanum Srinivas (dims@yahoo.com).
  */
 public abstract class SAMLIssuerFactory {
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(SAMLIssuerFactory.class);
     private static final Class<? extends SAMLIssuer> defaultSAMLClass = 
         org.apache.ws.security.saml.SAMLIssuerImpl.class;
@@ -110,8 +110,8 @@ public abstract class SAMLIssuerFactory 
                 // instruct the class loader to load the crypto implementation
                 samlIssuerClass = Loader.loadClass(samlClassName, SAMLIssuer.class);
             } catch (ClassNotFoundException ex) {
-                if (log.isDebugEnabled()) {
-                    log.debug(ex.getMessage(), ex);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug(ex.getMessage(), ex);
                 }
                 throw new WSSecurityException(samlClassName + " Not Found", ex);
             }
@@ -125,8 +125,8 @@ public abstract class SAMLIssuerFactory 
         Properties properties
     ) throws WSSecurityException {
         SAMLIssuer samlIssuer = null;
-        if (log.isDebugEnabled()) {
-            log.debug("Using Crypto Engine [" + samlIssuerClass + "]");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Using Crypto Engine [" + samlIssuerClass + "]");
         }
         try {
             Class<?>[] classes = new Class<?>[]{Properties.class};
@@ -134,8 +134,8 @@ public abstract class SAMLIssuerFactory 
             samlIssuer = c.newInstance(new Object[]{properties});
             return samlIssuer;
         } catch (java.lang.Exception ex) {
-            if (log.isDebugEnabled()) {
-                log.debug(ex.getMessage(), ex);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(ex.getMessage(), ex);
             }
             throw new WSSecurityException(samlIssuerClass.getName() + " cannot create instance", ex);
         }
@@ -164,8 +164,8 @@ public abstract class SAMLIssuerFactory 
             }
             properties.load(url.openStream());
         } catch (IOException e) {
-            if (log.isDebugEnabled()) {
-                log.debug("Cannot find resource: " + propFilename, e);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Cannot find resource: " + propFilename, e);
             }
             throw new WSSecurityException(
                 WSSecurityException.FAILURE, 

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerImpl.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerImpl.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLIssuerImpl.java Wed May  9 10:20:05 2012
@@ -37,7 +37,7 @@ import javax.security.auth.callback.Call
  */
 public class SAMLIssuerImpl implements SAMLIssuer {
 
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(SAMLIssuerImpl.class);
 
     private Properties properties = null;
@@ -113,8 +113,8 @@ public class SAMLIssuerImpl implements S
      * @return a new AssertionWrapper.
      */
     public AssertionWrapper newAssertion() throws WSSecurityException {
-        if (log.isDebugEnabled()) {
-            log.debug(
+        if (LOG.isDebugEnabled()) {
+            LOG.debug(
                 "Entering AssertionWrapper.newAssertion() ... creating SAML token"
             );
         }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java Wed May  9 10:20:05 2012
@@ -79,7 +79,7 @@ public class AssertionWrapper {
     /**
      * Field log
      */
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(AssertionWrapper.class);
 
     /**
@@ -189,7 +189,7 @@ public class AssertionWrapper {
             this.saml2 = (org.opensaml.saml2.core.Assertion) xmlObject;
             samlVersion = SAMLVersion.VERSION_20;
         } else {
-            log.error(
+            LOG.error(
                 "AssertionWrapper: found unexpected type " 
                 + (xmlObject != null ? xmlObject.getClass().getName() : null)
             );
@@ -309,10 +309,10 @@ public class AssertionWrapper {
         } else if (saml1 != null) {
             id = saml1.getID();
         } else {
-            log.error("AssertionWrapper: unable to return ID - no saml assertion object");
+            LOG.error("AssertionWrapper: unable to return ID - no saml assertion object");
         }
         if (id == null || id.length() == 0) {
-            log.error("AssertionWrapper: ID was null, seeting a new ID value");
+            LOG.error("AssertionWrapper: ID was null, seeting a new ID value");
             id = "_" + UUIDGenerator.getUUID();
             if (saml2 != null) {
                 saml2.setID(id);
@@ -334,7 +334,7 @@ public class AssertionWrapper {
         } else if (saml1 != null) {
             return saml1.getIssuer();
         }
-        log.error(
+        LOG.error(
             "AssertionWrapper: unable to return Issuer string - no saml assertion "
             + "object or issuer is null"
         );
@@ -410,7 +410,7 @@ public class AssertionWrapper {
             signableObject.releaseDOM();
             signableObject.releaseChildrenDOM(true);
         } else {
-            log.error("Attempt to sign an unsignable object " + xmlObject.getClass().getName());
+            LOG.error("Attempt to sign an unsignable object " + xmlObject.getClass().getName());
         }
     }
     
@@ -452,7 +452,7 @@ public class AssertionWrapper {
         //
         Signature signature = OpenSAMLUtil.buildSignature();
         signature.setCanonicalizationAlgorithm(canonicalizationAlgorithm);
-        log.debug("Using Canonicalization algorithm " + canonicalizationAlgorithm);
+        LOG.debug("Using Canonicalization algorithm " + canonicalizationAlgorithm);
         // prepare to sign the SAML token
         CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
         cryptoType.setAlias(issuerKeyName);
@@ -465,13 +465,13 @@ public class AssertionWrapper {
 
         String sigAlgo = signatureAlgorithm;
         String pubKeyAlgo = issuerCerts[0].getPublicKey().getAlgorithm();
-        if (log.isDebugEnabled()) {
-            log.debug("automatic sig algo detection: " + pubKeyAlgo);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("automatic sig algo detection: " + pubKeyAlgo);
         }
         if (pubKeyAlgo.equalsIgnoreCase("DSA")) {
             sigAlgo = defaultDSASignatureAlgorithm;
         }
-        log.debug("Using Signature algorithm " + sigAlgo);
+        LOG.debug("Using Signature algorithm " + sigAlgo);
         PrivateKey privateKey = null;
         try {
             privateKey = issuerCrypto.getPrivateKey(issuerKeyName, issuerKeyPassword);
@@ -558,7 +558,7 @@ public class AssertionWrapper {
             }
             signatureKeyInfo = samlKeyInfo;
         } else {
-            log.debug("AssertionWrapper: no signature to validate");
+            LOG.debug("AssertionWrapper: no signature to validate");
         }
     }
     
@@ -598,8 +598,8 @@ public class AssertionWrapper {
     public SAMLVersion getSamlVersion() {
         if (samlVersion == null) {
             // Try to set the version.
-            if (log.isDebugEnabled()) {
-                log.debug(
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(
                     "The SAML version was null in getSamlVersion(). Recomputing SAML version..."
                 );
             }
@@ -682,7 +682,7 @@ public class AssertionWrapper {
             this.saml2 = (org.opensaml.saml2.core.Assertion) xmlObject;
             samlVersion = SAMLVersion.VERSION_20;
         } else {
-            log.error(
+            LOG.error(
                 "AssertionWrapper: found unexpected type " 
                 + (xmlObject != null ? xmlObject.getClass().getName() : xmlObject)
             );

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/OpenSAMLUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/OpenSAMLUtil.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/OpenSAMLUtil.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/OpenSAMLUtil.java Wed May  9 10:20:05 2012
@@ -37,7 +37,7 @@ import org.w3c.dom.Element;
  * Created on May 18, 2009
  */
 public class OpenSAMLUtil {
-    private static final org.apache.commons.logging.Log log = 
+    private static final org.apache.commons.logging.Log LOG = 
         org.apache.commons.logging.LogFactory.getLog(OpenSAMLUtil.class);
 
     private static XMLObjectBuilderFactory builderFactory;
@@ -48,10 +48,10 @@ public class OpenSAMLUtil {
     /**
      * Initialise the SAML library
      */
-    public synchronized static void initSamlEngine() {
+    public static synchronized void initSamlEngine() {
         if (!samlEngineInitialized) {
-            if (log.isDebugEnabled()) {
-                log.debug("Initializing the opensaml2 library...");
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Initializing the opensaml2 library...");
             }
             try {
                 OpenSAMLBootstrap.bootstrap();
@@ -59,11 +59,11 @@ public class OpenSAMLUtil {
                 marshallerFactory = Configuration.getMarshallerFactory();
                 unmarshallerFactory = Configuration.getUnmarshallerFactory();
                 samlEngineInitialized = true;
-                if (log.isDebugEnabled()) {
-                    log.debug("opensaml2 library bootstrap complete");
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("opensaml2 library bootstrap complete");
                 }
             } catch (ConfigurationException e) {
-                log.error(
+                LOG.error(
                     "Unable to bootstrap the opensaml2 library - all SAML operations will fail", 
                     e
                 );
@@ -200,7 +200,7 @@ public class OpenSAMLUtil {
         QName qName = Signature.DEFAULT_ELEMENT_NAME;
         XMLObjectBuilder<Signature> builder = builderFactory.getBuilder(qName);
         if (builder == null) {
-            log.error(
+            LOG.error(
                 "Unable to retrieve builder for object QName " 
                 + qName
             );

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoClientAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoClientAction.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoClientAction.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoClientAction.java Wed May  9 10:20:05 2012
@@ -32,21 +32,21 @@ public interface SpnegoClientAction exte
     /**
      * Whether to enable mutual authentication or not.
      */
-    public void setMutualAuth(boolean mutualAuthentication);
+    void setMutualAuth(boolean mutualAuthentication);
     
     /**
      * The Service Name
      */
-    public void setServiceName(String serviceName);
+    void setServiceName(String serviceName);
 
     /**
      * Obtain a service ticket
      */
-    public byte[] run();
+    byte[] run();
     
     /**
      * Get the GSSContext that was created after a service ticket was obtained
      */
-    public GSSContext getContext();
+    GSSContext getContext();
     
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoServiceAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoServiceAction.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoServiceAction.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/spnego/SpnegoServiceAction.java Wed May  9 10:20:05 2012
@@ -32,21 +32,21 @@ public interface SpnegoServiceAction ext
     /**
      * Set the ticket to validate
      */
-    public void setTicket(byte[] ticket);
+    void setTicket(byte[] ticket);
     
     /**
      * The Service Name
      */
-    public void setServiceName(String serviceName);
+    void setServiceName(String serviceName);
     
     /**
      * Validate a service ticket
      */
-    public byte[] run();
+    byte[] run();
     
     /**
      * Get the GSSContext that was created after a service ticket was obtained
      */
-    public GSSContext getContext();
+    GSSContext getContext();
     
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/STRParser.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/STRParser.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/STRParser.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/STRParser.java Wed May  9 10:20:05 2012
@@ -44,7 +44,7 @@ public interface STRParser {
      * DIRECT_REF - A certificate (chain) is located directly via an Id to another security token
      * Note that a Thumbprint reference is also a KeyIdentifier, but takes precedence over it.
      */
-    public enum REFERENCE_TYPE {
+    enum REFERENCE_TYPE {
         ISSUER_SERIAL, THUMBPRINT_SHA1, KEY_IDENTIFIER, DIRECT_REF
     };
     
@@ -57,7 +57,7 @@ public interface STRParser {
      * @param parameters A set of implementation-specific parameters
      * @throws WSSecurityException
      */
-    public void parseSecurityTokenReference(
+    void parseSecurityTokenReference(
         Element strElement,
         RequestData data,
         WSDocInfo wsDocInfo,
@@ -68,25 +68,25 @@ public interface STRParser {
      * Get the X509Certificates associated with this SecurityTokenReference
      * @return the X509Certificates associated with this SecurityTokenReference
      */
-    public X509Certificate[] getCertificates();
+    X509Certificate[] getCertificates();
     
     /**
      * Get the Principal associated with this SecurityTokenReference
      * @return the Principal associated with this SecurityTokenReference
      */
-    public Principal getPrincipal();
+    Principal getPrincipal();
     
     /**
      * Get the PublicKey associated with this SecurityTokenReference
      * @return the PublicKey associated with this SecurityTokenReference
      */
-    public PublicKey getPublicKey();
+    PublicKey getPublicKey();
     
     /**
      * Get the Secret Key associated with this SecurityTokenReference
      * @return the Secret Key associated with this SecurityTokenReference
      */
-    public byte[] getSecretKey();
+    byte[] getSecretKey();
     
     /**
      * Get whether the returned credential is already trusted or not. This is currently
@@ -95,12 +95,12 @@ public interface STRParser {
      * the SignatureProcessor does not need to verify trust on the credential.
      * @return true if trust has already been verified on the returned Credential
      */
-    public boolean isTrustedCredential();
+    boolean isTrustedCredential();
 
     /**
      * Get how the certificates were referenced
      * @return how the certificates were referenced
      */
-    public REFERENCE_TYPE getCertificatesReferenceType();
+    REFERENCE_TYPE getCertificatesReferenceType();
     
 }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/transform/STRTransform.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/transform/STRTransform.java?rev=1336054&r1=1336053&r2=1336054&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/transform/STRTransform.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/transform/STRTransform.java Wed May  9 10:20:05 2012
@@ -85,7 +85,7 @@ public class STRTransform extends Transf
             throw new ClassCastException
                 ("context must be of type DOMCryptoContext");
         }
-        if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+        if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
             throw new ClassCastException("parent must be of type DOMStructure");
         }
         transformElement = (Element) 
@@ -98,7 +98,7 @@ public class STRTransform extends Transf
             throw new ClassCastException
                 ("context must be of type DOMCryptoContext");
         }
-        if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+        if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
             throw new ClassCastException("parent must be of type DOMStructure");
         }
         Element transformElement2 = (Element) 
@@ -245,7 +245,7 @@ public class STRTransform extends Transf
             //
             // Find start and end of first element <....>, this is the Apex node
             //
-            int gt = bf1.indexOf(">");
+            int gt = bf1.indexOf('>');
             //
             // Lookup the default namespace
             //
@@ -256,7 +256,7 @@ public class STRTransform extends Transf
             // correct place according to c14n specification)
             //
             if (idx < 0 || idx > gt) {
-                idx = bf1.indexOf(" ");
+                idx = bf1.indexOf(' ');
                 bf.insert(idx + 1, "xmlns=\"\" ");
                 bf1 = bf.toString();
             }



Mime
View raw message