diff options
Diffstat (limited to 'src/main/java/org/uic')
-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;
}
|