jw3 commented on a change in pull request #431:
URL: https://github.com/apache/incubator-daffodil/pull/431#discussion_r504141930



##########
File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DataProcessor.scala
##########
@@ -702,10 +706,22 @@ class ParseResult(dp: DataProcessor, override val 
resultState: PState)
    */
   def validateResult(bytes: Array[Byte]): Unit = {
     Assert.usage(resultState.processorStatus eq Success)
-    val schemaURIStrings = 
resultState.infoset.asInstanceOf[InfosetElement].runtimeData.schemaURIStringsForFullValidation
+
+    val (v, args) = dp.validationMode match {
+      case ValidationMode.Custom(name, args) =>
+        Validators.find(name).getOrElse(
+          Assert.abort(s"Validator '$name' not found")
+        ) -> args
+      case _ => Validators.default -> Seq(Validator.Argument(
+        
resultState.infoset.asInstanceOf[InfosetElement].runtimeData.schemaURIStringsForFullValidation.mkString(",")
+      ))
+    }
+
+    Assert.usage(resultState.processorStatus eq Success)

Review comment:
       Looks like a dupe anyways with the first line.  Probably refactored a 
bit and missed it.  Ill remove this one.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to