diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-05-03 15:45:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 15:45:01 +0200 |
commit | 8db6a836bd88c93b033e8671dc3ac3a5659d8411 (patch) | |
tree | 1a2ab9db922fb5ea6f99359ca80d930caff7f60c /src/main/java/org/uic/barcode/ticket/api/asn | |
parent | Merge pull request #46 from UnionInternationalCheminsdeFer/1.3.1 (diff) | |
parent | version number increased (diff) | |
download | UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.gz UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.bz2 UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.lz UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.xz UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.zst UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java | 14 | ||||
-rw-r--r-- | src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java | 1 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java index fff4499..ffe19a3 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java @@ -127,8 +127,11 @@ public class LineType extends Object { }
public byte[] getBinaryZoneId() {
-
- return binaryZoneId.toByteArray();
+ if (binaryZoneId != null && binaryZoneId.size() > 0) {
+ return binaryZoneId.toByteArray();
+ } else {
+ return null;
+ }
}
public void setCarrierNum(Long carrierNum) {
@@ -177,8 +180,11 @@ public class LineType extends Object { }
public void setBinaryZoneId(byte[] binaryZoneId) {
-
- this.binaryZoneId = new OctetString(binaryZoneId);
+ if (binaryZoneId != null && binaryZoneId.length > 0) {
+ this.binaryZoneId = new OctetString(binaryZoneId);
+ } else {
+ this.binaryZoneId = null;
+ }
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java index 30a7dfc..2522355 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java @@ -314,6 +314,7 @@ public class TravelerType extends Object { public Date getDateOfBirth() {
if (this.yearOfBirth == null) return null;
+ if (this.monthOfBirth == null) return null;
if (this.dayOfBirth == null) return null;
Calendar cal = Calendar.getInstance();
|