# HG changeset patch # User jlaskey # Date 1358433219 14400 # Node ID 5b8bcfd712d34d82d1387f76de6f9cd3835d5234 # Parent 2704dd3b2691bc296cdae5597f4683c94d63ce3f 8006517: PropertyHashMap.Element.equals() compares to Property Reviewed-by: sundar Contributed-by: james.laskey@oracle.com diff -r 2704dd3b2691 -r 5b8bcfd712d3 nashorn/src/jdk/nashorn/internal/runtime/PropertyHashMap.java --- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyHashMap.java Wed Jan 16 21:26:55 2013 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyHashMap.java Thu Jan 17 10:33:39 2013 -0400 @@ -606,7 +606,7 @@ @Override public boolean equals(final Object other) { assert property != null && other != null; - return other instanceof Property && property.equals(other); + return other instanceof Element && property.equals(((Element)other).property); } @Override