Browse Source

removing unused import - fixing 2nd call to get() to avoid recomputation

pull/335/head
mattg 8 years ago
parent
commit
925fb7d6c3
  1. 1
      json-path/src/main/java/com/jayway/jsonpath/internal/JsonContext.java
  2. 6
      json-path/src/main/java/com/jayway/jsonpath/internal/function/numeric/AbstractAggregation.java

1
json-path/src/main/java/com/jayway/jsonpath/internal/JsonContext.java

@ -26,7 +26,6 @@ import com.jayway.jsonpath.ReadContext;
import com.jayway.jsonpath.TypeRef;
import com.jayway.jsonpath.spi.cache.Cache;
import com.jayway.jsonpath.spi.cache.CacheProvider;
import com.jayway.jsonpath.spi.cache.LRUCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

6
json-path/src/main/java/com/jayway/jsonpath/internal/function/numeric/AbstractAggregation.java

@ -49,10 +49,10 @@ public abstract class AbstractAggregation implements PathFunction {
}
if (parameters != null) {
for (Parameter param : parameters) {
if (param.getValue() instanceof Number) {
Number value = (Number)param.getValue();
Object value = param.getValue();
if (null != value && value instanceof Number) {
count++;
next(value);
next((Number)value);
}
}
}

Loading…
Cancel
Save