Bug #4787
closed![Author: John Lumley](https://www.gravatar.com/avatar/a396403554bf8f2c9d1d59fd085d7d5f?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Debbie Lockett](https://www.gravatar.com/avatar/9c2ec304a5bec55af709863d87d5f6b7?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
Map failures with temporal keys using timezones under advanced closure compilation.
100%
Description
When maps are merged with keys involving timezone-adjusted values, under advanced closure compiler optimisation, duplicate key errors can be raised, which are not under simple optimisation (i.e. SaxonJS2.debug.js). map-size-014
is an example.
The issue is in HashTrie/stdOptions/sameKey#41
:
return ("timezoneOffset" in n) && n.timezoneOffset !== null;
where under CC advanced optimisation the property timezoneOffset
has been renamed, and thus the "timezoneOffset" in n
check fails. The intention seems to be to only check if there is a timezoneOffset
defined, and it is not null.
Simply changing to
timezoneOffset.n && n.timezoneOffset !== null;
corrects these faults but introduces three others, in same-key-02[67]
and MapConstructor-042
.
This might be rather tricky without 'reserving' the timezoneOffset
property - trying to determine the existence of renamed properties.
Updated by John Lumley almost 4 years ago
Should be
n.timezoneOffset && n.timezoneOffset !== null;
Updated by Michael Kay almost 4 years ago
The potential gotcha here is when timezoneOffset is present but equal to zero.
Updated by Debbie Lockett over 3 years ago
- Category set to XPath Conformance
- Status changed from In Progress to Resolved
- Assignee set to Debbie Lockett
- Applies to JS Branch 2.0 added
- Fix Committed on JS Branch 2.0 added
Code fix was committed on 2021-02-03 to pass the tests (but I hadn't actually realised this bug existed):
n.timezoneOffset !== undefined && n.timezoneOffset !== null;
Updated by Community Admin over 3 years ago
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
2.0)
Updated by Community Admin over 3 years ago
- Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
2.0)
Updated by Debbie Lockett over 3 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 2.1
Bug fix applied in the Saxon-JS 2.1 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page