Bug #5625
closed
DoubleValue cannot be cast to class net.sf.saxon.value.BigDecimalValue with Saxon PE
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
Description
If I transform the following XML with the XSL, with Saxon PE 11.3, I get an error:
"DoubleValue cannot be cast to class net.sf.saxon.value.BigDecimalValue"
With Saxon EE 11.3 works fine.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="root">
<xsl:if test="number(@level) = (1 to 7)"> test </xsl:if>
</xsl:template>
</xsl:stylesheet>
<root level="3"></root>
Reproduced (in PE 11.3, which I happened to have handy).
Confirmed that it doesn't happen in EE, even with -opt:0.
That probably means I'm going to have to build an IntelliJ project over the PE preprocessed source code for debugging, which I haven't done for a while (not since we switched to gradle).
I built a project using the PEJ preprocessed sources, and the test case runs fine.
This one could be tricky...
The problem appears to occur in 11.3 but not in 11.4. But I haven't tracked down a specific bug fix that clears it.
I think the bug probably went away as a side-effect of fixing bug #5483. But I suspect that merely takes this test case down a different code path: I'm not convinced it fixes the faulty code that caused this exception. There could be other test cases that still trigger it.
- Category set to Internals
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Applies to branch 11, trunk added
- Fix Committed on Branch 11, trunk added
- Platforms Java added
The failing code is in RangeIterator.compareEq()
. I strongly suspect that after the fix to #5483, this code is unreachable. However, I'm going to fix it anyway so that it handles a DoubleValue or FloatValue correctly. On the 12.x branch I will do some experiments to see if the code can be removed,
- Fixed in Maintenance Release 12.0 added
Bug issue fix applied in the Saxon 12.0 Major Release.
Leaving this bug marked as Resolved until fix applied on the Saxon 11 branch.
- Fixed in Maintenance Release 11.5 added
Bug applied in the Saxon 11.5 Maintenance release.
- Status changed from Resolved to Closed
Please register to edit this issue
Also available in: Atom
PDF