From f9d904eea68bbc589e288116ddb5da8b6acb5a05 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 3 Sep 2019 10:45:53 +0800 Subject: [PATCH] up --- .../java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt | 2 +- .../java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 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 60a3510c2..e6eee96ed 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 @@ -132,7 +132,7 @@ class AnalyzeByJSonPath { } if (results.size > 0) { if ("%" == elementsType) { - for (i in 0 until results[0].size) { + for (i in results[0].indices) { for (temp in results) { if (i < temp.size) { result.add(temp[i]) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt index 42e6bd9f6..4293837c7 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt @@ -63,7 +63,7 @@ class AnalyzeByXPath { } if (results.size > 0) { if ("%" == elementsType) { - for (i in 0 until results[0].size) { + for (i in results[0].indices) { for (temp in results) { if (i < temp.size) { jxNodes.add(temp[i]) @@ -120,7 +120,7 @@ class AnalyzeByXPath { } if (results.size > 0) { if ("%" == elementsType) { - for (i in 0 until results[0].size) { + for (i in results[0].indices) { for (temp in results) { if (i < temp.size) { result.add(temp[i])