Skip to content

Commit 22cafd6

Browse files
committed
Single modification
The evaluation of an XPath expression returns a list instead of a set. This is done to keep the multiplicity of the values in the output.
1 parent 7ac9b94 commit 22cafd6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Source/Core/src/ca/uqac/lif/xml/XPathExpression.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.text.ParseException;
2222
import java.util.ArrayList;
2323
import java.util.Collection;
24-
import java.util.HashSet;
2524
import java.util.List;
2625

2726
/**
@@ -361,7 +360,7 @@ public String toString()
361360
*/
362361
protected static Collection<XmlElement> getNewCollection()
363362
{
364-
return new HashSet<XmlElement>();
363+
return new ArrayList<XmlElement>();
365364
}
366365

367366
/**
@@ -372,7 +371,7 @@ protected static Collection<XmlElement> getNewCollection()
372371
*/
373372
protected static Collection<String> getNewStringCollection()
374373
{
375-
return new HashSet<String>();
374+
return new ArrayList<String>();
376375
}
377376

378377
/**
@@ -383,7 +382,7 @@ protected static Collection<String> getNewStringCollection()
383382
*/
384383
protected static Collection<Number> getNewNumberCollection()
385384
{
386-
return new HashSet<Number>();
385+
return new ArrayList<Number>();
387386
}
388387

389388
/**

config.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<name>xml-lif</name>
2727

2828
<!-- The project's version -->
29-
<version>1.2.1</version>
29+
<version>1.2.2</version>
3030

3131
<!-- JAR filename -->
3232
<jar>

0 commit comments

Comments
 (0)