From ee33659c928bf66d3f3c012dcbaf641b9cddf28e Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 14 Oct 2020 21:52:51 +0800 Subject: [PATCH] update log --- .../io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt index 1cc90b89e..40fed86e0 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt @@ -36,9 +36,9 @@ class AnalyzeByJSonPath { if (rules.size == 1) { if (!rule.contains("{$.")) { ctx?.let { - try { + result = try { val ob = it.read(rule) - result = if (ob is List<*>) { + if (ob is List<*>) { val builder = StringBuilder() for (o in ob) { builder.append(o).append("\n") @@ -48,8 +48,8 @@ class AnalyzeByJSonPath { ob.toString() } } catch (ignored: Exception) { + rule } - } return result } else { @@ -108,8 +108,8 @@ class AnalyzeByJSonPath { result.add(obj.toString()) } } catch (ignored: Exception) { + result.add(rule) } - return result } else { val matcher = jsonRulePattern.matcher(rule)