Project

Profile

Help

Bug #2727

format-date, AIOOB

Added by Christian Grün over 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Low
Category:
XPath conformance
Sprint/Milestone:
Start date:
2016-04-27
Due date:
% Done:

100%

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

Description

Here’s another bug, maybe related to the last one I posted. The following query…

format-date(current-date(), '[D01]', '')

…raises an exception:

java.lang.ArrayIndexOutOfBoundsException: 3
        at net.sf.saxon.functions.FormatDate.call(FormatDate.java:755)
        at net.sf.saxon.functions.FormatDate.call(FormatDate.java:37)
        at EE_main_0100498640.process(file:/c:/Users/user/Desktop/x.xq:1)
        at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:69)
        at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:408)
        at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:370)
        at net.sf.saxon.Query.runQuery(Query.java:900)
        at net.sf.saxon.Query.doQuery(Query.java:442)
        at net.sf.saxon.Query.main(Query.java:111)

History

#1 Updated by O'Neil Delpratt over 4 years ago

  • Assignee set to Debbie Lockett
  • Applies to branch 9.7 added

#2 Updated by Debbie Lockett over 4 years ago

  • Category set to XPath conformance
  • Status changed from New to Resolved
  • Applies to branch 9.8 added
  • Fix Committed on Branch 9.7, 9.8 added

Date/time formatting functions registrations in StandardFunctions updated to only allow exactly 2 or 5 arguments (rather than between 2 and 5).

Also dead code in FormatDate (i.e. checkArguments method) which achieved this check under the old (pre 9.7) mechanism for function calls has been removed.

Patch committed to 9.7 and dev 9.8 branches.

Tests also added to QT3 test suite (format-date-inpt-er4, format-dateTime-inpt-er4, format-time-inpt-er4).

#3 Updated by O'Neil Delpratt over 4 years ago

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

Bug fix applied in the Saxon 9.7.0.5 maintenance release.

#4 Updated by O'Neil Delpratt over 4 years ago

  • Sprint/Milestone set to 9.7.0.5

#5 Updated by O'Neil Delpratt about 3 years ago

  • Applies to branch trunk added
  • Applies to branch deleted (9.8)

#6 Updated by O'Neil Delpratt about 3 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)

Please register to edit this issue

Also available in: Atom PDF