adaptation du projet library en java8
Some checks failed
Java CI with Maven / build (push) Has been cancelled
Some checks failed
Java CI with Maven / build (push) Has been cancelled
This commit is contained in:
@@ -200,7 +200,7 @@ public class PDFValidator extends Validator {
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
Node item = nodes.item(i);
|
||||
String textContent = item.getTextContent();
|
||||
if (textContent != null && Set.of("INVOICE", "ORDER", "ORDER_RESPONSE", "ORDER_CHANGE").contains(textContent)) {
|
||||
if (textContent != null && new HashSet<>(Arrays.asList("INVOICE", "ORDER", "ORDER_RESPONSE", "ORDER_CHANGE").contains(textContent)) {
|
||||
documentTypeValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public class XMLValidator extends Validator {
|
||||
if (isBasicWithoutLines) {
|
||||
isBasic = false;// basicwl also contains the string basic...
|
||||
}
|
||||
isEN16931 = Set.of(
|
||||
isEN16931 = new HashSet<>(Arrays.asList(
|
||||
"urn:cen.eu:en16931:2017:compliant:factur-x.eu:1p0:en16931",
|
||||
"urn:cen.eu:en16931:2017"
|
||||
)
|
||||
@@ -297,7 +297,7 @@ public class XMLValidator extends Validator {
|
||||
//validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "ZF_211/EN16931/FACTUR-X_EN16931.xsd", 18, EPart.fx);
|
||||
String xrVersion = contextProfile.substring(contextProfile.length() - 3).replace(".", "");
|
||||
|
||||
Set<String> supportedVersions = Set.of("12", "20", "21", "22", "23", "30");
|
||||
Set<String> supportedVersions = new HashSet<>(Arrays.asList("12", "20", "21", "22", "23", "30");
|
||||
if (!supportedVersions.contains(xrVersion)) {
|
||||
throw new Exception("Unsupported XR version");
|
||||
}
|
||||
@@ -311,7 +311,7 @@ public class XMLValidator extends Validator {
|
||||
} else if ("CrossIndustryDocument".equalsIgnoreCase(rootLocalName)) { // ZUGFeRD 1.0
|
||||
context.setGeneration("1");
|
||||
//
|
||||
Set<String> validZF1Profiles = Set.of(
|
||||
Set<String> validZF1Profiles = new HashSet<>(Arrays.asList(
|
||||
"urn:ferd:CrossIndustryDocument:invoice:1p0:basic",
|
||||
"urn:ferd:CrossIndustryDocument:invoice:1p0:comfort",
|
||||
"urn:ferd:CrossIndustryDocument:invoice:1p0:extended"
|
||||
@@ -329,7 +329,7 @@ public class XMLValidator extends Validator {
|
||||
if ("CII".equals(context.getFormat())) {
|
||||
|
||||
if ("2".equals(context.getGeneration())) {
|
||||
Set<String> validZF2Profiles = Set.of(
|
||||
Set<String> validZF2Profiles = new HashSet<>(Arrays.asList(
|
||||
"urn:factur-x.eu:1p0:minimum",
|
||||
"urn:zugferd.de:2p0:minimum",
|
||||
"urn:factur-x.eu:1p0:basicwl",
|
||||
@@ -346,7 +346,7 @@ public class XMLValidator extends Validator {
|
||||
} else /** v1 */ {
|
||||
if (isOrderX) {
|
||||
//order-x 1.0
|
||||
if(Set.of(
|
||||
if(new HashSet<>(Arrays.asList(
|
||||
"urn:order-x.eu:1p0:basic",
|
||||
"urn:order-x.eu:1p0:comfort",
|
||||
"urn:order-x.eu:1p0:extended"
|
||||
@@ -354,7 +354,7 @@ public class XMLValidator extends Validator {
|
||||
addUnsupportedProfileResultItem();
|
||||
}
|
||||
|
||||
} else if (Set.of(
|
||||
} else if (new HashSet<>(Arrays.asList(
|
||||
"urn:ferd:CrossIndustryDocument:invoice:1p0:basic",
|
||||
"urn:ferd:CrossIndustryDocument:invoice:1p0:comfort",
|
||||
"urn:ferd:CrossIndustryDocument:invoice:1p0:extended"
|
||||
|
||||
Reference in New Issue
Block a user