olabusayoT commented on code in PR #1515:
URL: https://github.com/apache/daffodil/pull/1515#discussion_r2243356380
##########
daffodil-cli/src/main/scala/org/apache/daffodil/cli/Main.scala:
##########
@@ -184,21 +180,21 @@ class CLIConf(arguments: Array[String], stdout:
PrintStream, stderr: PrintStream
s match {
case DefaultArgPattern(name, arg) if Validators.isRegistered(name) =>
- if (doesNotSupportReloadableParsers(name)) {
- null
+ if (Seq(".conf", ".properties").exists(arg.endsWith)) {
+ val is = new FileInputStream(arg)
+ props.load(is)
} else {
- if (Seq(".conf", ".properties").exists(arg.endsWith)) {
- val is = new FileInputStream(arg)
- props.load(is)
- } else {
- val uss = fileResourceToURI(arg)
- props.setProperty(name, uss.uri.toString)
- }
- Validators.get(name).make(props)
+ val uss = fileResourceToURI(arg)
+ props.setProperty(name, uss.uri.toString)
}
+ Validators.get(name).make(props)
case NoArgsPattern(name) if Validators.isRegistered(name) =>
- if (doesNotSupportReloadableParsers(name)) {
- null
+ val missingRequiredSchema =
+ parser.isDefined && !Seq("limited", "off").exists(_.contains(name))
+ if (missingRequiredSchema) {
+ throw new Exception(
+ "To use full validation with a saved parser, the validating
schema must be provided ex: xerces=/path/to/schema.xsd"
Review Comment:
Ok changes to "To use validation", but is it ok that it's not differentiated
from limited or off?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]