Project

Profile

Help

Bug #2994

closed

XdmAtomicValue does not have a usable equals() method.

Added by Michael Kay over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
s9api API
Sprint/Milestone:
-
Start date:
2016-10-12
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Platforms:

Description

We allow conversion of an XDM map to a Java Map<XdmAtomicValue, XdmValue> using the method XdmItem.asMap().

However the resulting map is not useful because XdmAtomicValue lacks a usable equals() method; it simply inherits Object.equals(), whereby (new XdmAtomicValue(1).equals(new XdmAtomicValue(1)) returns false.

Actions #1

Updated by Michael Kay over 7 years ago

  • Status changed from New to Resolved
  • Applies to branch 9.7 added
  • Fix Committed on Branch 9.7 added

This had already been fixed on the 9.8 branch. Retrofitted the 9.8 equals() and hashCode() methods on XdmAtomicValue. The semantics are the semantics of the op:same-key() relationship defined for XPath 3.1 maps.

Actions #2

Updated by O'Neil Delpratt over 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.7.0.10 added

Bug fix applied in the Saxon 9.7.0.10 maintenance release

Please register to edit this issue

Also available in: Atom PDF