Project

Profile

Help

Revision 8222a1b3

Added by Michael Kay over 12 years ago

Fix bug 2836584 Integrated Extension Functions with zero arguments

View differences:

latest9.2/hej/net/sf/saxon/functions/IntegratedFunctionCall.java
42 42
        checkArgumentCount(definition.getMinimumNumberOfArguments(), definition.getMaximumNumberOfArguments(), visitor);
43 43
        final int args = getNumberOfArguments();
44 44
        SequenceType[] declaredArgumentTypes = definition.getArgumentTypes();
45
        if (declaredArgumentTypes == null || declaredArgumentTypes.length == 0) {
45
        if (declaredArgumentTypes == null || (args != 0 && declaredArgumentTypes.length == 0)) {
46 46
            throw new XPathException("Integrated function " + getDisplayName() +
47 47
                    " failed to declare its argument types");
48 48
        }

Also available in: Unified diff