From ecc787555ef8b3d5033a43682dcd082e57bfb1a0 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Thu, 19 Oct 2023 15:13:59 +0200 Subject: [PATCH] [doc] Added a note about future work that needs to consider the cases where the convert is doing nothing --- .../src/main/java/org/exist/xquery/UntypedValueCheck.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exist-core/src/main/java/org/exist/xquery/UntypedValueCheck.java b/exist-core/src/main/java/org/exist/xquery/UntypedValueCheck.java index 5e0775574f7..2f5e1b72a0b 100644 --- a/exist-core/src/main/java/org/exist/xquery/UntypedValueCheck.java +++ b/exist-core/src/main/java/org/exist/xquery/UntypedValueCheck.java @@ -110,6 +110,7 @@ public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathExc private Item convert(Item item) throws XPathException { if (atomize || item.getType() == Type.UNTYPED_ATOMIC || Type.hasMember(Type.NUMERIC, requiredType) && Type.subTypeOfUnion(item.getType(), Type.NUMERIC)) { +// if (atomize || item.getType() == Type.UNTYPED_ATOMIC || /*Type.hasMember(Type.NUMERIC, requiredType) &&*/ Type.subTypeOfUnion(item.getType(), Type.NUMERIC)) { try { if (Type.subTypeOf(item.getType(), requiredType)) { return item; @@ -130,6 +131,7 @@ private Item convert(Item item) throws XPathException { throw new XPathException(expression, e.getErrorCode(), error.toString()); } } + // TODO(AR) need to consider the cases where the convert is doing nothing... what is its purpose from OpNumeric then? return item; }