Skip to content

Commit

Permalink
Removing powermock dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
aaime committed Sep 19, 2016
1 parent 1129cfb commit ecf1499
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 193 deletions.
13 changes: 0 additions & 13 deletions modules/library/xml/pom.xml
Expand Up @@ -135,19 +135,6 @@
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.5.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.5.6</version>
<scope>test</scope>
</dependency>

</dependencies>


Expand Down
Expand Up @@ -165,7 +165,12 @@ public static Object getInstance(InputStream is, Map<String,Object> hints, Level
* Convenience method to create an instance of a SAXParser if it is null.
*/
private static SAXParser getParser(Map<String,Object> hints) throws SAXException {
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParserFactory spf = null;
if(hints != null && hints.containsKey(XMLHandlerHints.SAX_PARSER_FACTORY)) {
spf = (SAXParserFactory) hints.get(XMLHandlerHints.SAX_PARSER_FACTORY);
} else {
spf = SAXParserFactory.newInstance();
}
spf.setNamespaceAware(true);
spf.setValidating(false);
try {
Expand Down
Expand Up @@ -46,6 +46,9 @@ public class XMLHandlerHints implements Map<String,Object> {
public static final String FILTER_COMPLIANCE_STRICTNESS = "org.geotools.xml.filter.FILTER_COMPLIANCE_STRICTNESS";
/** Supplied {@link EntityResolver} for Schema and/or DTD validation */
public final static String ENTITY_RESOLVER ="org.xml.sax.EntityResolver";
/** Supplied {@link SaxParserFactory} */
public final static String SAX_PARSER_FACTORY ="javax.xml.parsers.SAXParserFactory";

/**
* The value so that the parser will encode all Geotools filters with no modifications.
*/
Expand Down

0 comments on commit ecf1499

Please sign in to comment.