You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by ra...@apache.org on 2005/04/02 20:54:20 UTC

cvs commit: xml-security/src/org/apache/xml/security/keys/content KeyValue.java

raul        2005/04/02 10:54:20

  Modified:    src/org/apache/xml/security/keys/content KeyValue.java
  Log:
  move binaryCompare funcionality to the class where this funcionality is needed.
  Use instanceOf instead of implementsInterface
  
  Revision  Changes    Path
  1.12      +4 -7      xml-security/src/org/apache/xml/security/keys/content/KeyValue.java
  
  Index: KeyValue.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/keys/content/KeyValue.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- KeyValue.java	24 Sep 2004 20:54:27 -0000	1.11
  +++ KeyValue.java	2 Apr 2005 18:54:20 -0000	1.12
  @@ -25,7 +25,6 @@
   import org.apache.xml.security.keys.content.keyvalues.DSAKeyValue;
   import org.apache.xml.security.keys.content.keyvalues.RSAKeyValue;
   import org.apache.xml.security.utils.Constants;
  -import org.apache.xml.security.utils.JavaUtils;
   import org.apache.xml.security.utils.SignatureElementProxy;
   import org.apache.xml.security.utils.XMLUtils;
   import org.w3c.dom.Document;
  @@ -104,14 +103,12 @@
   
         XMLUtils.addReturnToElement(this._constructionElement);
   
  -      if (JavaUtils.implementsInterface(
  -              pk, "java.security.interfaces.DSAPublicKey")) {
  +      if (pk instanceof java.security.interfaces.DSAPublicKey) {
            DSAKeyValue dsa = new DSAKeyValue(this._doc, pk);
   
            this._constructionElement.appendChild(dsa.getElement());
            XMLUtils.addReturnToElement(this._constructionElement);
  -      } else if (JavaUtils.implementsInterface(
  -              pk, "java.security.interfaces.RSAPublicKey")) {
  +      } else if (pk instanceof java.security.interfaces.RSAPublicKey) {
            RSAKeyValue rsa = new RSAKeyValue(this._doc, pk);
   
            this._constructionElement.appendChild(rsa.getElement());
  @@ -134,7 +131,7 @@
      /**
       * Method getPublicKey
       *
  -    * @return
  +    * @return the public key
       * @throws XMLSecurityException
       */
      public PublicKey getPublicKey() throws XMLSecurityException {