in validation/src/main/scala/com/twitter/finatra/validation/constraints/NotEmptyConstraintValidator.scala [19:36]
override def isValid(
obj: Any,
constraintValidatorContext: ConstraintValidatorContext
): Boolean = obj match {
case arrayValue: Array[_] =>
handleInvalid(arrayValue.nonEmpty, constraintValidatorContext)
case map: Map[_, _] =>
handleInvalid(map.nonEmpty, constraintValidatorContext)
case traversableValue: Iterable[_] =>
handleInvalid(traversableValue.nonEmpty, constraintValidatorContext)
case iterableWrapper: java.util.Collection[_] =>
handleInvalid(iterableWrapper.asScala.nonEmpty, constraintValidatorContext)
case stringValue: String =>
handleInvalid(stringValue.nonEmpty, constraintValidatorContext)
case _ =>
throw new UnexpectedTypeException(
s"Class [${obj.getClass.getName}] is not supported by ${this.getClass.getName}")
}