refactor/Remove default disabled versions from getDisabledVersions; replace scala.jdk.CollectionConverters with scala.collection.JavaConverters for compatibility

This commit is contained in:
hongwei 2025-12-12 10:41:03 +01:00
parent 5e61fd5dee
commit 354918936f
2 changed files with 2 additions and 3 deletions

View File

@ -2679,8 +2679,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{
}
def getDisabledVersions() : List[String] = {
val defaultDisabledVersions = "OBPv1.2.1,OBPv1.3.0,OBPv1.4.0,OBPv2.0.0,OBPv2.1.0,OBPv2.2.0,OBPv3.0.0,OBPv3.1.0,OBPv4.0.0,OBPv5.0.0"
val disabledVersions = APIUtil.getPropsValue("api_disabled_versions").getOrElse(defaultDisabledVersions).replace("[", "").replace("]", "").split(",").toList.filter(_.nonEmpty)
val disabledVersions = APIUtil.getPropsValue("api_disabled_versions").getOrElse("").replace("[", "").replace("]", "").split(",").toList.filter(_.nonEmpty)
if (disabledVersions.nonEmpty) {
logger.info(s"Disabled API versions: ${disabledVersions.mkString(", ")}")
}

View File

@ -65,7 +65,7 @@ import scala.collection.immutable.{List, Nil}
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.jdk.CollectionConverters._
import scala.collection.JavaConverters._
import scala.util.Random