From 6605157acdc150a9c2920c9c069daa92809dec2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Egyed=20=C3=81rp=C3=A1d?= Date: Tue, 25 May 2021 12:49:20 +0200 Subject: [PATCH 1/3] Java version set to 1.8, regex fix in MrzEncoder --- pom.xml | 54 +++++++++---------- .../digg/dgc/transliteration/MrzEncoder.java | 4 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index fc0f731..589ed7c 100755 --- a/pom.xml +++ b/pom.xml @@ -11,14 +11,14 @@ DIGG :: Digital Green Certificate :: DGC Java Schema representation, issuance and validation of Digital Green Certificates https://github.com/diggsweden/dgc-java - + MIT License http://www.opensource.org/licenses/mit-license.php repo - + scm:https://github.com/diggsweden/dgc-java.git @@ -40,67 +40,67 @@ extern.henric.norlander@digg.se - + ossrh https://s01.oss.sonatype.org/content/groups/staging/ - + UTF-8 UTF-8 - 11 + 1.8 2.11.4 1.7.30 4.13.1 - + - + - + org.slf4j slf4j-api ${slf4j.version} - + javax.validation validation-api 2.0.1.Final - + com.fasterxml.jackson.core jackson-databind ${jackson.version} - + com.fasterxml.jackson.dataformat jackson-dataformat-cbor ${jackson.version} - + com.fasterxml.jackson.datatype jackson-datatype-jsr310 ${jackson.version} - + com.upokecenter cbor 4.4.1 - + junit @@ -108,20 +108,20 @@ ${junit.version} test - + org.slf4j slf4j-nop ${slf4j.version} test - + - + - + org.slf4j slf4j-api @@ -132,7 +132,7 @@ junit junit - + org.slf4j slf4j-nop @@ -141,7 +141,7 @@ - + @@ -189,11 +189,11 @@ - + - + @@ -213,10 +213,10 @@ ossrh https://s01.oss.sonatype.org/ false - @@ -285,7 +285,7 @@ - + schema create-validate diff --git a/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java b/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java index 30c03dc..7d11eb9 100644 --- a/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java +++ b/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java @@ -59,7 +59,7 @@ public class MrzEncoder { */ public static String encode(final String input) { - final StringBuffer sb = new StringBuffer(); + final StringBuilder sb = new StringBuilder(); for (int i = 0; i < input.trim().length(); i++) { final char c = input.charAt(i); @@ -82,7 +82,7 @@ else if (Character.isWhitespace(c)) { .normalize(sb.toString(), Normalizer.Form.NFD) .replaceAll("[^\\p{ASCII}]", "") .toUpperCase() - .replaceAll("[^<[A-Z][0-9]]", "<"); + .replaceAll("[^ Date: Sat, 12 Jun 2021 10:06:26 +0200 Subject: [PATCH 2/3] whitespace fix --- pom.xml | 53 ++++++++++--------- .../digg/dgc/transliteration/MrzEncoder.java | 2 +- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index b38310c..19b6084 100755 --- a/pom.xml +++ b/pom.xml @@ -11,14 +11,14 @@ DIGG :: EU Digital Covid Certificate :: DCC Java Schema representation, issuance and validation of EU Digital Covid Certificates https://github.com/diggsweden/dgc-java - + MIT License http://www.opensource.org/licenses/mit-license.php repo - + scm:https://github.com/diggsweden/dgc-java.git @@ -40,65 +40,66 @@ extern.henric.norlander@digg.se - + ossrh https://s01.oss.sonatype.org/content/groups/staging/ - + UTF-8 UTF-8 + 2.11.4 1.7.30 4.13.1 - + - + - + org.slf4j slf4j-api ${slf4j.version} - + javax.validation validation-api 2.0.1.Final - + com.fasterxml.jackson.core jackson-databind ${jackson.version} - + com.fasterxml.jackson.dataformat jackson-dataformat-cbor ${jackson.version} - + com.fasterxml.jackson.datatype jackson-datatype-jsr310 ${jackson.version} - + com.upokecenter cbor 4.4.1 - + junit @@ -106,20 +107,20 @@ ${junit.version} test - + org.slf4j slf4j-nop ${slf4j.version} test - + - + - + org.slf4j slf4j-api @@ -130,7 +131,7 @@ junit junit - + org.slf4j slf4j-nop @@ -147,7 +148,7 @@ - + @@ -195,11 +196,11 @@ - + - + @@ -243,10 +244,10 @@ ossrh https://s01.oss.sonatype.org/ false - @@ -315,7 +316,7 @@ - + schema create-validate diff --git a/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java b/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java index 4cfa842..d6c2a5b 100644 --- a/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java +++ b/schema/src/main/java/se/digg/dgc/transliteration/MrzEncoder.java @@ -94,7 +94,7 @@ else if (Character.isWhitespace(c)) { mrz = mrz.substring(0, LENGTH_RESTRICTION); if (mrz.endsWith("<")) { // OK, now it gets tricky. We can't end with a delimitter, and the rules - // are rather complex. Let's just remove the `<`. It's not entirely correct, + // are rather complex. Let's just remove the `<`. It's not entirely correct, // but ... mrz = mrz.substring(0, LENGTH_RESTRICTION - 1); } From fd938a2bb43641abf21e6f2cc8c8b0748c35f2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rp=C3=A1d=20Egyed?= Date: Sat, 12 Jun 2021 10:20:36 +0200 Subject: [PATCH 3/3] Add classifier to java8 jars --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index 19b6084..4b4dffa 100755 --- a/pom.xml +++ b/pom.xml @@ -223,6 +223,15 @@ ${project.artifactId}-java8-${project.version} + + + org.apache.maven.plugins + maven-jar-plugin + + java8 + + +