|
|
|
@ -18,9 +18,6 @@ import com.jayway.jsonpath.internal.DefaultsImpl;
|
|
|
|
|
import com.jayway.jsonpath.spi.json.JsonProvider; |
|
|
|
|
import com.jayway.jsonpath.spi.mapper.MappingProvider; |
|
|
|
|
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Collection; |
|
|
|
@ -36,8 +33,6 @@ import static java.util.Arrays.asList;
|
|
|
|
|
*/ |
|
|
|
|
public class Configuration { |
|
|
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(Configuration.class); |
|
|
|
|
|
|
|
|
|
private static Defaults DEFAULTS = null; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -230,13 +225,15 @@ public class Configuration {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Configuration build() { |
|
|
|
|
Defaults defaults = getEffectiveDefaults(); |
|
|
|
|
if (jsonProvider == null || mappingProvider == null) { |
|
|
|
|
final Defaults defaults = getEffectiveDefaults(); |
|
|
|
|
if (jsonProvider == null) { |
|
|
|
|
jsonProvider = defaults.jsonProvider(); |
|
|
|
|
} |
|
|
|
|
if(mappingProvider == null){ |
|
|
|
|
if (mappingProvider == null){ |
|
|
|
|
mappingProvider = defaults.mappingProvider(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return new Configuration(jsonProvider, mappingProvider, options, evaluationListener); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|