On 28.1.15 8:10 , Johannes Birgmeier wrote:
=== REPORT 1 ===
In GlobPattern.java, in equals(), somebody wrote:

  return nodePath.equals(other.nodePath) &&
                     (restriction == null) ? other.restriction == null :
restriction.equals(other.restriction);

However, the ternary operator has lower precedence than &&, and thus the
hashCode/equals contract might be violated here. What you probably want is

  return nodePath.equals(other.nodePath) &&
                     ((restriction == null) ? other.restriction == null :
restriction.equals(other.restriction));

See https://issues.apache.org/jira/browse/JCR-3847

Michael

Reply via email to