Skip to content

Commit cc03955

Browse files
committed
[bugfix] Empty In-memory NodeSet should have zero size
1 parent 266e17d commit cc03955

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

exist-core/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,7 @@
14161416
<include>src/main/java/org/exist/xquery/value/GYearMonthValue.java</include>
14171417
<include>src/main/java/org/exist/xquery/value/GYearValue.java</include>
14181418
<include>src/main/java/org/exist/xquery/value/IntegerValue.java</include>
1419+
<include>src/main/java/org/exist/xquery/value/MemoryNodeSet.java</include>
14191420
<include>src/main/java/org/exist/xquery/value/QNameValue.java</include>
14201421
<include>src/main/java/org/exist/xquery/value/SequenceType.java</include>
14211422
<include>src/main/java/org/exist/xquery/value/StringValue.java</include>
@@ -2232,6 +2233,7 @@
22322233
<exclude>src/main/java/org/exist/xquery/value/GYearValue.java</exclude>
22332234
<exclude>src/main/java/org/exist/xquery/value/IntegerValue.java</exclude>
22342235
<exclude>src/main/java/org/exist/xquery/value/ItemComparator.java</exclude>
2236+
<exclude>src/main/java/org/exist/xquery/value/MemoryNodeSet.java</exclude>
22352237
<exclude>src/main/java/org/exist/xquery/value/QNameValue.java</exclude>
22362238
<exclude>src/main/java/org/exist/xquery/value/SequenceComparator.java</exclude>
22372239
<exclude>src/main/java/org/exist/xquery/value/SequenceType.java</exclude>

exist-core/src/main/java/org/exist/xquery/value/MemoryNodeSet.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
/*
2+
* Elemental
3+
* Copyright (C) 2024, Evolved Binary Ltd
4+
*
5+
* admin@evolvedbinary.com
6+
* https://www.evolvedbinary.com | https://www.elemental.xyz
7+
*
8+
* This library is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU Lesser General Public
10+
* License as published by the Free Software Foundation; version 2.1.
11+
*
12+
* This library is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
* Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public
18+
* License along with this library; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+
*
21+
* NOTE: Parts of this file contain code from 'The eXist-db Authors'.
22+
* The original license header is included below.
23+
*
24+
* =====================================================================
25+
*
226
* eXist-db Open Source Native XML Database
327
* Copyright (C) 2001 The eXist-db Authors
428
*
@@ -28,7 +52,7 @@
2852

2953
public interface MemoryNodeSet extends Sequence {
3054

31-
MemoryNodeSet EMPTY = new ValueSequence(1);
55+
MemoryNodeSet EMPTY = new ValueSequence(0);
3256

3357
Sequence getAttributes(NodeTest test) throws XPathException;
3458

0 commit comments

Comments
 (0)