From 1e4cbf367e121aefaec96111e68a038c850f11dc Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 27 Jun 2019 16:21:28 +0800 Subject: [PATCH] up --- app/build.gradle | 7 +- .../com/jayway/jsonpath/Configuration.java | 257 ------- .../java/com/jayway/jsonpath/Criteria.java | 513 ------------- .../com/jayway/jsonpath/DocumentContext.java | 18 - .../jayway/jsonpath/EvaluationListener.java | 63 -- .../main/java/com/jayway/jsonpath/Filter.java | 184 ----- .../jsonpath/InvalidCriteriaException.java | 33 - .../jayway/jsonpath/InvalidJsonException.java | 58 -- .../InvalidModificationException.java | 21 - .../jayway/jsonpath/InvalidPathException.java | 34 - .../java/com/jayway/jsonpath/JsonPath.java | 695 ------------------ .../jayway/jsonpath/JsonPathException.java | 33 - .../java/com/jayway/jsonpath/MapFunction.java | 23 - .../main/java/com/jayway/jsonpath/Option.java | 88 --- .../com/jayway/jsonpath/ParseContext.java | 39 - .../jsonpath/PathNotFoundException.java | 33 - .../java/com/jayway/jsonpath/Predicate.java | 53 -- .../java/com/jayway/jsonpath/ReadContext.java | 124 ---- .../java/com/jayway/jsonpath/TypeRef.java | 54 -- .../jsonpath/ValueCompareException.java | 40 - .../com/jayway/jsonpath/WriteContext.java | 168 ----- .../jsonpath/internal/CharacterIndex.java | 318 -------- .../jsonpath/internal/DefaultsImpl.java | 37 - .../internal/EvaluationAbortException.java | 13 - .../jsonpath/internal/EvaluationContext.java | 73 -- .../jayway/jsonpath/internal/JsonContext.java | 216 ------ .../jsonpath/internal/JsonFormatter.java | 116 --- .../jsonpath/internal/ParseContextImpl.java | 83 --- .../com/jayway/jsonpath/internal/Path.java | 64 -- .../com/jayway/jsonpath/internal/PathRef.java | 333 --------- .../com/jayway/jsonpath/internal/Utils.java | 406 ---------- .../jsonpath/internal/filter/Evaluator.java | 7 - .../internal/filter/EvaluatorFactory.java | 376 ---------- .../internal/filter/ExpressionNode.java | 24 - .../internal/filter/FilterCompiler.java | 417 ----------- .../filter/LogicalExpressionNode.java | 88 --- .../internal/filter/LogicalOperator.java | 32 - .../jsonpath/internal/filter/PatternFlag.java | 48 -- .../filter/RelationalExpressionNode.java | 42 -- .../internal/filter/RelationalOperator.java | 56 -- .../jsonpath/internal/filter/ValueNode.java | 216 ------ .../jsonpath/internal/filter/ValueNodes.java | 656 ----------------- .../jsonpath/internal/function/ParamType.java | 9 - .../jsonpath/internal/function/Parameter.java | 131 ---- .../function/PassthruPathFunction.java | 19 - .../internal/function/PathFunction.java | 36 - .../function/PathFunctionFactory.java | 78 -- .../internal/function/json/Append.java | 31 - .../latebinding/ILateBindingValue.java | 31 - .../latebinding/JsonLateBindingValue.java | 43 -- .../latebinding/PathLateBindingValue.java | 46 -- .../function/numeric/AbstractAggregation.java | 61 -- .../internal/function/numeric/Average.java | 26 - .../internal/function/numeric/Max.java | 22 - .../internal/function/numeric/Min.java | 22 - .../function/numeric/StandardDeviation.java | 24 - .../internal/function/numeric/Sum.java | 20 - .../internal/function/text/Concatenate.java | 34 - .../internal/function/text/Length.java | 26 - .../internal/path/ArrayIndexOperation.java | 66 -- .../internal/path/ArrayIndexToken.java | 52 -- .../internal/path/ArrayPathToken.java | 50 -- .../internal/path/ArraySliceOperation.java | 86 --- .../internal/path/ArraySliceToken.java | 104 --- .../jsonpath/internal/path/CompiledPath.java | 116 --- .../internal/path/EvaluationContextImpl.java | 194 ----- .../internal/path/FunctionPathToken.java | 87 --- .../jsonpath/internal/path/PathCompiler.java | 623 ---------------- .../jsonpath/internal/path/PathToken.java | 221 ------ .../internal/path/PathTokenAppender.java | 5 - .../internal/path/PathTokenFactory.java | 52 -- .../internal/path/PredicateContextImpl.java | 77 -- .../internal/path/PredicatePathToken.java | 108 --- .../internal/path/PropertyPathToken.java | 105 --- .../jsonpath/internal/path/RootPathToken.java | 83 --- .../jsonpath/internal/path/ScanPathToken.java | 206 ------ .../internal/path/WildcardPathToken.java | 62 -- .../com/jayway/jsonpath/spi/cache/Cache.java | 22 - .../jsonpath/spi/cache/CacheProvider.java | 37 - .../jayway/jsonpath/spi/cache/LRUCache.java | 112 --- .../jayway/jsonpath/spi/cache/NOOPCache.java | 15 - .../spi/json/AbstractJsonProvider.java | 178 ----- .../jsonpath/spi/json/GsonJsonProvider.java | 280 ------- .../jsonpath/spi/json/JsonProvider.java | 166 ----- .../spi/json/JsonSmartJsonProvider.java | 94 --- .../spi/mapper/GsonMappingProvider.java | 82 --- .../spi/mapper/JsonSmartMappingProvider.java | 263 ------- .../jsonpath/spi/mapper/MappingException.java | 28 - .../jsonpath/spi/mapper/MappingProvider.java | 45 -- 89 files changed, 3 insertions(+), 10434 deletions(-) delete mode 100644 app/src/main/java/com/jayway/jsonpath/Configuration.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/Criteria.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/DocumentContext.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/EvaluationListener.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/Filter.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/InvalidCriteriaException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/InvalidJsonException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/InvalidModificationException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/InvalidPathException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/JsonPath.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/JsonPathException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/MapFunction.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/Option.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/ParseContext.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/PathNotFoundException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/Predicate.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/ReadContext.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/TypeRef.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/ValueCompareException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/WriteContext.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/CharacterIndex.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/DefaultsImpl.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/EvaluationAbortException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/EvaluationContext.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/JsonContext.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/JsonFormatter.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/ParseContextImpl.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/Path.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/PathRef.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/Utils.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/Evaluator.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/EvaluatorFactory.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/ExpressionNode.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/FilterCompiler.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/LogicalExpressionNode.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/LogicalOperator.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/PatternFlag.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/RelationalExpressionNode.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/RelationalOperator.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/ValueNode.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/filter/ValueNodes.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/ParamType.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/Parameter.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/PassthruPathFunction.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/PathFunction.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/PathFunctionFactory.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/json/Append.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/latebinding/ILateBindingValue.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/latebinding/JsonLateBindingValue.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/latebinding/PathLateBindingValue.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/numeric/AbstractAggregation.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/numeric/Average.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/numeric/Max.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/numeric/Min.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/numeric/StandardDeviation.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/numeric/Sum.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/text/Concatenate.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/function/text/Length.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/ArrayIndexOperation.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/ArrayIndexToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/ArrayPathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/ArraySliceOperation.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/ArraySliceToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/CompiledPath.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/EvaluationContextImpl.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/FunctionPathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/PathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/PathTokenAppender.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/PathTokenFactory.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/PredicateContextImpl.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/PredicatePathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/PropertyPathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/RootPathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/ScanPathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/internal/path/WildcardPathToken.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/cache/Cache.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/cache/CacheProvider.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/cache/LRUCache.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/cache/NOOPCache.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/json/GsonJsonProvider.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/json/JsonProvider.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/json/JsonSmartJsonProvider.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/mapper/GsonMappingProvider.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/mapper/JsonSmartMappingProvider.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/mapper/MappingException.java delete mode 100644 app/src/main/java/com/jayway/jsonpath/spi/mapper/MappingProvider.java diff --git a/app/build.gradle b/app/build.gradle index 97efb735b..328471180 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -82,7 +82,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.2.0-alpha02' implementation 'androidx.appcompat:appcompat:1.1.0-beta01' implementation 'androidx.preference:preference:1.1.0-beta01' - implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2' implementation 'com.google.android.material:material:1.1.0-alpha07' implementation 'com.google.android:flexbox:1.1.0' @@ -92,7 +92,7 @@ dependencies { kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" //room - def room_version = '2.0.0' + def room_version = '2.1.0' implementation "androidx.room:room-runtime:$room_version" kapt "androidx.room:room-compiler:$room_version" @@ -118,8 +118,7 @@ dependencies { implementation 'cn.wanghaomiao:JsoupXpath:2.3.2' // implementation 'org.apache.commons:commons-text:1.6' // Default json parser for jsonpath - implementation 'net.minidev:json-smart:2.3' - // implementation 'com.jayway.jsonpath:json-path:2.4.0' + implementation 'com.jayway.jsonpath:json-path:2.4.0' //JS implementation 'com.github.gedoor:rhino-android:1.3' diff --git a/app/src/main/java/com/jayway/jsonpath/Configuration.java b/app/src/main/java/com/jayway/jsonpath/Configuration.java deleted file mode 100644 index dd59fd708..000000000 --- a/app/src/main/java/com/jayway/jsonpath/Configuration.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright 2011 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.jayway.jsonpath; - -import com.jayway.jsonpath.internal.DefaultsImpl; -import com.jayway.jsonpath.spi.json.JsonProvider; -import com.jayway.jsonpath.spi.mapper.MappingProvider; - -import java.util.*; - -import static com.jayway.jsonpath.internal.Utils.notNull; -import static java.util.Arrays.asList; - -/** - * Immutable configuration object - */ -public class Configuration { - - private static Defaults DEFAULTS = null; - - /** - * Set Default configuration - * @param defaults default configuration settings - */ - public static synchronized void setDefaults(Defaults defaults){ - DEFAULTS = defaults; - } - - private static Defaults getEffectiveDefaults(){ - if (DEFAULTS == null) { - return DefaultsImpl.INSTANCE; - } else { - return DEFAULTS; - } - } - - private final JsonProvider jsonProvider; - private final MappingProvider mappingProvider; - private final Set