jkesselm    00/12/15 13:28:54

  Modified:    java/src/org/apache/xpath Arg.java
  Log:
  equals() methods never used, seemed to be intended to be
  equivalent to getQName().equals(). Removed for now.
  
  Revision  Changes    Path
  1.5       +0 -70     xml-xalan/java/src/org/apache/xpath/Arg.java
  
  Index: Arg.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/Arg.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Arg.java  2000/12/15 20:55:30     1.4
  +++ Arg.java  2000/12/15 21:28:54     1.5
  @@ -220,74 +220,4 @@
       m_isParamVar = isParamVar;
       m_expression = null;
     }
  -
  -  /**
  -   * Override equals and agree that we're equal if
  -   * the passed object is a QName which matches
  -   * the name of the arg.
  -   * <P>
  -   * TODO: Should we accept strings too, as QName.equals can?
  -   * <p>
  -   * NEEDSDOC: Why doesn't this invoke QName.equals?
  -   * Why doesn't it hand off to this.equals((QName)Obj)?
  -   * <P>
  -   * TODO: Does this work as currently written? 
  -   * It starts with m_qname.equals(qname.getLocalPart()), which looks
  -   * like it will always return false. Note that this does not match
  -   * the behavior of the version which explicitly accepts a QName parameter.
  -   * I suspect this is both erroneous and dead code.
  -   *
  -   * @param obj Object to be compared against.
  -   * @return True if obj is a QName with the same value as our QName,
  -   * false if it's a QName with a different value.
  -   * @exception ClassCastException if the object is not a QName.
  -   */
  -  public boolean equals(Object obj)
  -  {
  -
  -    try
  -    {
  -      if (m_qname != null)
  -      {
  -        QName qname = (QName) obj;
  -             
  -        return m_qname.equals(qname.getLocalPart()) && 
  -                        ((null != m_qname.getNamespace()) && (null != 
qname.getNamespace()))
  -                 ? m_qname.getNamespace().equals(qname.getNamespace())
  -                 : ((null == m_qname.getNamespace()) && (null == 
qname.getNamespace()));
  -      }
  -    }
  -    catch (ClassCastException cce){}
  -
  -    return false;
  -  }
  -
  -  /**
  -   * Override equals and agree that we're equal if
  -   * the passed object is a QName which matches
  -   * the name of the arg. This makes searching for the
  -   * desired parameter a bit more elegant. 
  -   * <P>
  -   * TODO: Why doesn't this invoke QName.equals?
  -   * <P>
  -   * TODO: Should we accept strings too, as QName.equals can?
  -   *
  -   * @param qname QName to be compared against.
  -   * @return True if obj is a QName with the same value as our QName,
  -   * false if it's a QName with a different value.
  -   */
  -  public boolean equals(QName qname)
  -  {
  -
  -    if (m_qname != null)
  -    {
  -      return m_qname.getLocalPart().equals(qname.getLocalPart())
  -             && (((null != m_qname.getNamespace()) && (null != 
qname.getNamespace()))
  -                 ? m_qname.getNamespace().equals(qname.getNamespace())
  -                 : ((null == m_qname.getNamespace())
  -                    && (null == qname.getNamespace())));
  -    }
  -
  -    return false;
  -  }
   }
  
  
  

Reply via email to