Browse Source

Merge remote-tracking branch 'upstream/master' into use-slf4j

Conflicts:
	json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
	pom.xml
pull/32/head
Jochen Berger 11 years ago
parent
commit
c9c295d9aa
  1. 4
      json-path/pom.xml
  2. 8
      json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
  3. 5
      pom.xml

4
json-path/pom.xml

@ -34,10 +34,6 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>

8
json-path/src/main/java/com/jayway/jsonpath/JsonPath.java

@ -101,14 +101,14 @@ import static org.apache.commons.lang3.Validate.*;
*/
public class JsonPath {
private static final Logger LOG = LoggerFactory.getLogger(JsonPath.class.getName());
private static Pattern DEFINITE_PATH_PATTERN = Pattern.compile(".*(\\.\\.|\\*|\\[[\\\\/]|\\?|,|:\\s?]|\\[\\s?:|>|\\(|<|=|\\+).*");
private static Pattern INVALID_PATH_PATTERN = Pattern.compile("[^\\?\\+=\\-\\*/!]\\(");
private PathTokenizer tokenizer;
private LinkedList<Filter> filters;
private final Logger logger = LoggerFactory.getLogger(JsonPath.class);
private JsonPath(String jsonPath, Filter[] filters) {
@ -126,7 +126,9 @@ public class JsonPath {
this.tokenizer = new PathTokenizer(jsonPath);
logger.debug("New JsonPath:\n{}", this.tokenizer);
if(LOG.isDebugEnabled()){
LOG.debug("New JsonPath:\n{}", this.tokenizer.toString());
}
this.filters = new LinkedList<Filter>();
this.filters.addAll(asList(filters));

5
pom.xml

@ -261,7 +261,10 @@
Global dependencies
==================================
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!--
==================================

Loading…
Cancel
Save