Commit 1f21347d authored by Ulrich Scheller's avatar Ulrich Scheller
Browse files

Release 1.8.5

parent b8307a3f
# Release 1.8.5
- Bug fix
This update includes a bugfix related to the import of vaccination certificates.
# Release 1.8.4
- Bug fix
......
......@@ -10,8 +10,8 @@ android {
applicationId "de.culture4life.luca"
minSdkVersion 21
targetSdkVersion 30
versionCode 72
versionName "1.8.4"
versionCode 73
versionName "1.8.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
......
......@@ -3,6 +3,8 @@ package de.culture4life.luca.document.provider;
import de.culture4life.luca.document.DocumentVerificationException;
import de.culture4life.luca.registration.RegistrationData;
import javax.annotation.Nonnull;
import androidx.annotation.NonNull;
import io.reactivex.rxjava3.core.Completable;
import io.reactivex.rxjava3.core.Single;
......@@ -28,12 +30,15 @@ public abstract class DocumentProvider<DocumentType extends ProvidedDocument> {
public Completable validate(@NonNull DocumentType document, @NonNull RegistrationData registrationData) {
return Completable.fromAction(() -> {
if (!registrationData.getFirstName().equalsIgnoreCase(document.getDocument().getFirstName())) {
throw new DocumentVerificationException(NAME_MISMATCH);
} else if (!registrationData.getLastName().equalsIgnoreCase(document.getDocument().getLastName())) {
throw new DocumentVerificationException(NAME_MISMATCH);
}
compareTrimmedAndIgnoreCase(registrationData.getFirstName(), document.getDocument().getFirstName());
compareTrimmedAndIgnoreCase(registrationData.getLastName(), document.getDocument().getLastName());
});
}
private void compareTrimmedAndIgnoreCase(@NonNull String s1, @Nonnull String s2) throws DocumentVerificationException {
if (!s1.trim().equalsIgnoreCase(s2.trim())) {
throw new DocumentVerificationException(NAME_MISMATCH);
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment