jaxp/src/com/sun/org/apache/xpath/internal/Arg.java

Print this page

        

*** 22,31 **** --- 22,32 ---- */ package com.sun.org.apache.xpath.internal; import com.sun.org.apache.xml.internal.utils.QName; import com.sun.org.apache.xpath.internal.objects.XObject; + import java.util.Objects; /** * This class holds an instance of an argument on * the stack. The value of the argument can be either an * XObject or a String containing an expression.
*** 180,190 **** */ public Arg() { m_qname = new QName(""); ! ; // so that string compares can be done. m_val = null; m_expression = null; m_isVisible = true; m_isFromWithParam = false; } --- 181,191 ---- */ public Arg() { m_qname = new QName(""); ! // so that string compares can be done. m_val = null; m_expression = null; m_isVisible = true; m_isFromWithParam = false; }
*** 221,238 **** --- 222,245 ---- m_isVisible = true; m_isFromWithParam = false; m_expression = null; } + @Override + public int hashCode() { + return Objects.hashCode(this.m_qname); + } + /** * Equality function specialized for the variable name. If the argument * is not a qname, it will deligate to the super class. * * @param obj the reference object with which to compare. * @return <code>true</code> if this object is the same as the obj * argument; <code>false</code> otherwise. */ + @Override public boolean equals(Object obj) { if(obj instanceof QName) { return m_qname.equals(obj);