Skip to content

Commit d059c28

Browse files
Divaev-AMDivaev-AM
authored andcommitted
[MyTeam] [BIQ-12345] fixes
1 parent 0ece53b commit d059c28

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/ru/javaops/docjava/Commands.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.springframework.shell.standard.ShellMethod;
55
import org.springframework.shell.standard.ShellOption;
66
import org.xml.sax.SAXException;
7+
import ru.javaops.docjava.xml.xsd.SchemaUtil;
78

89
import java.io.File;
910
import java.io.IOException;
@@ -15,6 +16,7 @@ public class Commands {
1516
@ShellMethod(key = "xsd", value = "Validate XML file against XSD (XML Schema)")
1617
public void xsdValidate(@ShellOption(value = {"input", "-i"}, help = "Input file") File inputFile,
1718
@ShellOption(value = {"schema", "-s"}, help = "XSD schema file") File xsdSchema) throws IOException, SAXException {
19+
SchemaUtil.validate(inputFile, xsdSchema);
1820
}
1921

2022
@ShellMethod(key = "say", value = "Say hello to user", group = "Math")

src/main/java/ru/javaops/docjava/xml/xsd/SchemaUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static void validate(File inputFile, File xsdSchema) throws IOException,
1616
try (Reader reader = Files.newBufferedReader(inputFile.toPath())) {
1717
Schemas.validate(reader, Schemas.of(xsdSchema));
1818
}
19-
System.out.println(inputFile.getAbsolutePath() + "is valid");
19+
System.out.println(inputFile.getAbsolutePath() + " is valid");
2020
}
2121

2222
}

0 commit comments

Comments
 (0)