From 7c8a84f9680be9d08942e592e3b290eb945ce4e5 Mon Sep 17 00:00:00 2001 From: Diger Date: Sat, 21 Sep 2024 15:59:58 +0900 Subject: [PATCH] style: regexList naming --- .../output/web/avocado/parser/AvocadoOriginMapIdParser.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piikii-output-web/avocado/src/main/kotlin/com/piikii/output/web/avocado/parser/AvocadoOriginMapIdParser.kt b/piikii-output-web/avocado/src/main/kotlin/com/piikii/output/web/avocado/parser/AvocadoOriginMapIdParser.kt index 4621590b..87633911 100644 --- a/piikii-output-web/avocado/src/main/kotlin/com/piikii/output/web/avocado/parser/AvocadoOriginMapIdParser.kt +++ b/piikii-output-web/avocado/src/main/kotlin/com/piikii/output/web/avocado/parser/AvocadoOriginMapIdParser.kt @@ -59,7 +59,7 @@ class ShareUrlIdParser( properties: AvocadoProperties, ) : AvocadoOriginMapIdParser { private val regex: Regex = properties.url.regex.share.toRegex() - private val operateRegexList: List = + private val mapIdRegexList: List = mutableListOf( "place/(\\d+)".toRegex(), "id=(\\d+)".toRegex(), @@ -75,7 +75,7 @@ class ShareUrlIdParser( .retrieve() .toEntity(Map::class.java) if (response.statusCode.is3xxRedirection && response.headers.location != null) { - return operateRegexList.firstNotNullOfOrNull { regex -> + return mapIdRegexList.firstNotNullOfOrNull { regex -> regex.find(response.headers.location.toString()) ?.groupValues?.getOrNull(1)?.let { OriginMapId(it) } }