Skip to content

Commit

Permalink
util-validator: Unmangling more names in ScalaValidator
Browse files Browse the repository at this point in the history
Problem

When merging in Felix's upgrade patch, I broke a unit test by trying
to unmangle in a too-narrow way, and missed it through negligence.

Solution

Unmangle appropriately, the way the original commit worked!

JIRA Issues: CSL-11030

Differential Revision: https://phabricator.twitter.biz/D684906
  • Loading branch information
mosesn authored and jenkins committed Jun 9, 2021
1 parent e04b0a0 commit d22f657
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -860,15 +860,15 @@ class ScalaValidator private[validation] (
val results = new mutable.ListBuffer[ConstraintViolation[T]]()
val parameters: Array[Parameter] = executableDescriptor.executable.getParameters
val parameterNamesList: Array[String] =
parameterNames match {
(parameterNames match {
case Some(names) =>
names
case _ =>
getExecutableParameterNames(executableDescriptor.executable).map { maybeMangled =>
DescriptorFactory.unmangleName(
maybeMangled
) // parameter names are encoded since Scala 2.13.5
}
getExecutableParameterNames(executableDescriptor.executable)
}).map { maybeMangled =>
DescriptorFactory.unmangleName(
maybeMangled
) // parameter names are encoded since Scala 2.13.5
}

// executable parameter constraints
Expand Down

0 comments on commit d22f657

Please sign in to comment.