Skip to content

Commit

Permalink
Single modification
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sylvainhalle committed Sep 11, 2018
1 parent 7ac9b94 commit 22cafd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Source/Core/src/ca/uqac/lif/xml/XPathExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;

/**
Expand Down Expand Up @@ -361,7 +360,7 @@ public String toString()
*/
protected static Collection<XmlElement> getNewCollection()
{
return new HashSet<XmlElement>();
return new ArrayList<XmlElement>();
}

/**
Expand All @@ -372,7 +371,7 @@ protected static Collection<XmlElement> getNewCollection()
*/
protected static Collection<String> getNewStringCollection()
{
return new HashSet<String>();
return new ArrayList<String>();
}

/**
Expand All @@ -383,7 +382,7 @@ protected static Collection<String> getNewStringCollection()
*/
protected static Collection<Number> getNewNumberCollection()
{
return new HashSet<Number>();
return new ArrayList<Number>();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<name>xml-lif</name>

<!-- The project's version -->
<version>1.2.1</version>
<version>1.2.2</version>

<!-- JAR filename -->
<jar>
Expand Down

0 comments on commit 22cafd6

Please sign in to comment.