diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-04-11 09:39:35 +0200 |
---|---|---|
committer | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-04-11 09:39:35 +0200 |
commit | 44f3079ffeb5cdb6d5338b48f0a6460c24f2503e (patch) | |
tree | aa52633b1842e5750f53d9b63c131352d08de7aa /src/main/java/org | |
parent | nullpointer (diff) | |
download | UIC-barcode-44f3079ffeb5cdb6d5338b48f0a6460c24f2503e.tar UIC-barcode-44f3079ffeb5cdb6d5338b48f0a6460c24f2503e.tar.gz UIC-barcode-44f3079ffeb5cdb6d5338b48f0a6460c24f2503e.tar.bz2 UIC-barcode-44f3079ffeb5cdb6d5338b48f0a6460c24f2503e.tar.lz UIC-barcode-44f3079ffeb5cdb6d5338b48f0a6460c24f2503e.tar.xz UIC-barcode-44f3079ffeb5cdb6d5338b48f0a6460c24f2503e.tar.zst UIC-barcode-44f3079ffeb5cdb6d5338b48f0a6460c24f2503e.zip |
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java b/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java index ea90879..b49bcb9 100644 --- a/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java +++ b/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java @@ -57,21 +57,25 @@ public class DynamicContentCoder { private static SequenceOfExtension getAsnContentExtensions(UicDynamicContentDataFDC1 asn, List<IExtension> dynamicContentResponseList) throws EncodingFormatException {
- if (dynamicContentResponseList != null && !dynamicContentResponseList.isEmpty()){
+ if (dynamicContentResponseList == null || dynamicContentResponseList.isEmpty()){
+ return null;
+ }
- SequenceOfExtension asnList = asn.getExtensions();
- if (asnList == null) asnList = new SequenceOfExtension();
- for (IExtension extension : dynamicContentResponseList){
- ExtensionData asnExtension = getAsnExtension(extension);
- if (asnExtension!= null) {
- asnList.add(asnExtension);
- }
- }
- if (!asnList.isEmpty()){
- return asnList;
+ SequenceOfExtension asnList = asn.getExtensions();
+ if (asnList == null) {
+ asnList = new SequenceOfExtension();
+ }
+
+ for (IExtension extension : dynamicContentResponseList){
+ ExtensionData asnExtension = getAsnExtension(extension);
+ if (asnExtension!= null) {
+ asnList.add(asnExtension);
}
}
-
+ if (!asnList.isEmpty()){
+ return asnList;
+ }
+
return null;
}
|