summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_moa-sig/src/main/java/at
diff options
context:
space:
mode:
authorThomas <>2021-04-14 14:53:57 +0200
committerThomas <>2021-04-14 14:53:57 +0200
commit7ba6fecaf1bc00c3e21102d6ba5fb6c6fc5f3398 (patch)
treef08da6cd1e56f1fb3ba68da0fb4a69da32b857ed /eaaf_modules/eaaf_module_moa-sig/src/main/java/at
parent458817bd97058c5a975006dca45cdfe6eead07b5 (diff)
downloadEAAF-Components-7ba6fecaf1bc00c3e21102d6ba5fb6c6fc5f3398.tar.gz
EAAF-Components-7ba6fecaf1bc00c3e21102d6ba5fb6c6fc5f3398.tar.bz2
EAAF-Components-7ba6fecaf1bc00c3e21102d6ba5fb6c6fc5f3398.zip
some code optimization to reduce memory consumption
Diffstat (limited to 'eaaf_modules/eaaf_module_moa-sig/src/main/java/at')
-rw-r--r--eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java
index 28501c54..6006b731 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java
@@ -3,6 +3,7 @@ package at.gv.egiz.eaaf.modules.sigverify.moasig.impl.data;
import java.io.Serializable;
import java.security.cert.CertificateException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Date;
import java.util.List;
@@ -54,7 +55,7 @@ public class GenericSignatureVerificationResponse
private ExtendedCertificateValidation extendedCertificateValidation;
- private List<ExtendedResult> formValidationResults = new ArrayList<>();
+ private List<ExtendedResult> formValidationResults = null;
@Override
public Date getSigningDateTime() {
@@ -105,6 +106,17 @@ public class GenericSignatureVerificationResponse
}
+ @Override
+ public List<ExtendedResult> getFormValidationResults() {
+ if (formValidationResults == null) {
+ return Collections.emptyList();
+
+ } else {
+ return formValidationResults;
+
+ }
+ }
+
/**
* Set signature creation timestramp.
*
@@ -161,7 +173,13 @@ public class GenericSignatureVerificationResponse
if (formCheckResult != null) {
for (Object elObj : formCheckResult) {
if (elObj instanceof AdESFormResults) {
- AdESFormResults el = (AdESFormResults)elObj;
+ AdESFormResults el = (AdESFormResults)elObj;
+
+ if (formValidationResults == null) {
+ formValidationResults = new ArrayList<>();
+
+ }
+
formValidationResults.add(ExtendedResult.builder()
.code(el.getCode())
.info(el.getName())