From fee08b20dbdb512f7ca4a0184e50a22d93f72934 Mon Sep 17 00:00:00 2001 From: Ninglin Du Date: Tue, 27 Feb 2024 19:51:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiaomi/duckling/dimension/time/helper/HolidayProvider.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/helper/HolidayProvider.scala b/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/helper/HolidayProvider.scala index 7c44030..1ca869b 100644 --- a/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/helper/HolidayProvider.scala +++ b/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/helper/HolidayProvider.scala @@ -280,7 +280,7 @@ class LocalHolidayProvider extends HolidayProvider { val builder = Maps.newTreeMap[String, String]() normalMap.foreach{ case (pt, normalSet) => normalSet.foreach(normal => - if (pt == normal && normal.contains(pt) || !normal.contains(pt)) { + if (!builder.containsKey(pt) || builder.containsKey(pt) && pt == normal) { builder.put(pt, normal) } )