Merge branch 'master' into code-quality-enhancements
This commit is contained in:
@@ -225,13 +225,7 @@ public class XMLValidator extends Validator {
|
||||
isExtended = context.getProfile().contains("extended");
|
||||
validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "OX_10/comfort/SCRDMCCBDACIOMessageStructure_100pD20B.xsd", 99, EPart.ox);
|
||||
xsltFilename = "/xslt/OX_10/comfort/SCRDMCCBDACIOMessageStructure_100pD20B_COMFORT.xslt";
|
||||
|
||||
} else if (root.getLocalName().equalsIgnoreCase("SCRDMCCBDACIOMessageStructure")) {
|
||||
context.setGeneration("1");
|
||||
isOrderX = true;
|
||||
validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "OX_10/comfort/SCRDMCCBDACIOMessageStructure_100pD20B.xsd", 99, EPart.ox);
|
||||
xsltFilename = "/xslt/OX_10/comfort/SCRDMCCBDACIOMessageStructure_100pD20B_COMFORT.xslt";
|
||||
|
||||
|
||||
} else if (root.getLocalName().equalsIgnoreCase("CrossIndustryInvoice")) { // ZUGFeRD 2.0 or Factur-X
|
||||
context.setGeneration("2");
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@ public class ResourceCase extends TestCase {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ResourceCase.class.getCanonicalName()); // log output is
|
||||
|
||||
public static File getResourceAsFile(String resourcePath) {
|
||||
try {
|
||||
InputStream in = ClassLoader.getSystemClassLoader().getResourceAsStream(resourcePath);
|
||||
try(InputStream in = ClassLoader.getSystemClassLoader().getResourceAsStream(resourcePath)) {
|
||||
if (in == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -42,8 +41,7 @@ public class ResourceCase extends TestCase {
|
||||
}
|
||||
|
||||
public static byte[] getResourceAsByteArray(String resourcePath) {
|
||||
try {
|
||||
InputStream in = ClassLoader.getSystemClassLoader().getResourceAsStream(resourcePath);
|
||||
try(InputStream in = ClassLoader.getSystemClassLoader().getResourceAsStream(resourcePath)) {
|
||||
if (in == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user