Skip to content

Commit

Permalink
Merge remote-tracking branch 'Simon/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hongwei1 committed Nov 23, 2023
2 parents 1ba8024 + 92e12f1 commit 9081358
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions obp-api/src/main/scala/code/util/Helper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -485,22 +485,22 @@ object Helper extends Loggable {
result.asInstanceOf[Box[String]].filter(APIUtil.checkMediumString(_)==SILENCE_IS_GOLDEN)
}
if(resultAfterChecked.isEmpty) {
logger.debug(s"ObpS.${methodName} validation failed. The input key is: ${if (args.length>0)args.apply(0) else ""}, value is:$result")
logger.debug(s"ObpS.${methodName} validation failed. (resultAfterChecked.isEmpty A) The input key is: ${if (args.length>0)args.apply(0) else ""}, value is:$result")
}
resultAfterChecked
} else if (methodName.equals("uri") && result.isInstanceOf[String]){
val resultAfterChecked = Full(result.asInstanceOf[String]).filter(APIUtil.basicUriAndQueryStringValidation(_))
if(resultAfterChecked.isDefined) {
resultAfterChecked.head
}else{
logger.debug(s"ObpS.${methodName} validation failed. The value is:$result")
logger.debug(s"ObpS.${methodName} validation failed (NOT resultAfterChecked.isDefined). The value is:$result")
resultAfterChecked.getOrElse("")
}
} else if (methodName.equals("uriAndQueryString") && result.isInstanceOf[Box[String]] && result.asInstanceOf[Box[String]].isDefined ||
methodName.equals("queryString") && result.isInstanceOf[Box[String]]&&result.asInstanceOf[Box[String]].isDefined){
val resultAfterChecked = result.asInstanceOf[Box[String]].filter(APIUtil.basicUriAndQueryStringValidation(_))
if(resultAfterChecked.isEmpty) {
logger.debug(s"ObpS.${methodName} validation failed. The value is:$result")
logger.debug(s"ObpS.${methodName} validation failed. (resultAfterChecked.isEmpty B) The value is:$result")
}
resultAfterChecked
} else {
Expand Down

0 comments on commit 9081358

Please sign in to comment.