From 13d556ef9657fd8fca4f40f7265845c0cbc65088 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Tue, 2 Nov 2021 13:40:06 +0100 Subject: - fix on null pointer exception for tickets created ad midnight --- src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java | 2 +- src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java | 2 +- src/main/java/org/uic/barcode/ticket/api/asn/omv3/IssuingData.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java index 5f0e345..5a150dc 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java @@ -326,7 +326,7 @@ public class IssuingData extends Object { this.issuingYear = new Long( cal.get(Calendar.YEAR)); this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR)); int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE); - if (time > 0) { + if (time >= 0) { this.issuingTime = new Long (time ); } diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java index 2491d79..74c516c 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java @@ -326,7 +326,7 @@ public class IssuingData extends Object { this.issuingYear = new Long( cal.get(Calendar.YEAR)); this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR)); int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE); - if (time > 0) { + if (time >= 0) { this.issuingTime = new Long (time ); } diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IssuingData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IssuingData.java index 537a42a..f8e8477 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IssuingData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IssuingData.java @@ -326,7 +326,7 @@ public class IssuingData extends Object { this.issuingYear = new Long( cal.get(Calendar.YEAR)); this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR)); int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE); - if (time > 0) { + if (time >= 0) { this.issuingTime = new Long (time ); } -- cgit v1.2.3