diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2024-06-18 15:42:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 15:42:51 +0200 |
commit | 6b9254296a5b3b323c2e103db40865c01ffad005 (patch) | |
tree | a02e7adfe7c44ab01feaf94cd26689f9e09bfc62 /src/main/java/org/uic/barcode/ticket | |
parent | Merge pull request #81 from UnionInternationalCheminsdeFer/fix_test_for_year_with_feb29 (diff) | |
parent | Create MAVticketTest.java (diff) | |
download | UIC-barcode-6b9254296a5b3b323c2e103db40865c01ffad005.tar UIC-barcode-6b9254296a5b3b323c2e103db40865c01ffad005.tar.gz UIC-barcode-6b9254296a5b3b323c2e103db40865c01ffad005.tar.bz2 UIC-barcode-6b9254296a5b3b323c2e103db40865c01ffad005.tar.lz UIC-barcode-6b9254296a5b3b323c2e103db40865c01ffad005.tar.xz UIC-barcode-6b9254296a5b3b323c2e103db40865c01ffad005.tar.zst UIC-barcode-6b9254296a5b3b323c2e103db40865c01ffad005.zip |
Diffstat (limited to '')
40 files changed, 79 insertions, 86 deletions
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java index 6729d08..a55b619 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java @@ -33,7 +33,6 @@ import org.uic.barcode.asn1.datatypes.IntRange; import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5;
-import org.uic.barcode.ticket.api.asn.omv1.SequenceOfCarrierNum;
import org.uic.barcode.ticket.api.utils.DateTimeUtils;
@@ -232,7 +231,7 @@ public class CarCarriageReservationData extends Object { public Long getBeginLoadingTime() {
- if (beginLoadingTime == null) return new Long(0);
+ if (beginLoadingTime == null) return Long.valueOf(0);
return beginLoadingTime;
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java index 0d8bdcd..ae9d513 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java @@ -244,8 +244,8 @@ public class CustomerCardData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf(fromCal.get(Calendar.DAY_OF_YEAR));
if (untilDate == null) return;
@@ -256,8 +256,8 @@ public class CustomerCardData extends Object { int untildays = untilCal.get(Calendar.DAY_OF_YEAR);
int yearDiff = untilCal.get(Calendar.YEAR) - fromCal.get(Calendar.YEAR);
- this.validUntilYear = new Long( yearDiff);
- this.validUntilDay = new Long (untildays);
+ this.validUntilYear = Long.valueOf( yearDiff);
+ this.validUntilDay = Long.valueOf (untildays);
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java index a3df48b..32e6c97 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java @@ -282,11 +282,11 @@ public class DelayConfirmation extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.plannedArrivalYear = new Long( cal.get(Calendar.YEAR));
- this.plannedArrivalDay = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.plannedArrivalYear = Long.valueOf( cal.get(Calendar.YEAR));
+ this.plannedArrivalDay = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
if (time > 0) {
- this.plannedArrivalTime = new Long (time );
+ this.plannedArrivalTime = Long.valueOf (time );
}
}
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 5a150dc..4c3a5ff 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 @@ -184,7 +184,7 @@ public class IssuingData extends Object { public Long getCurrencyFract() {
if (currencyFract == null) {
- return new Long(2);
+ return Long.valueOf(2);
}
return this.currencyFract;
}
@@ -323,11 +323,11 @@ public class IssuingData extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.issuingYear = new Long( cal.get(Calendar.YEAR));
- this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.issuingYear = Long.valueOf( cal.get(Calendar.YEAR));
+ this.issuingDay = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
if (time >= 0) {
- this.issuingTime = new Long (time );
+ this.issuingTime = Long.valueOf (time );
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java index 04f4309..86f75d9 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java @@ -54,7 +54,7 @@ public class LuggageRestrictionType extends Object { public Long getMaxHandLuggagePieces() {
if (maxHandLuggagePieces == null) {
- return new Long(3);
+ return Long.valueOf(3);
}
return this.maxHandLuggagePieces;
@@ -63,7 +63,7 @@ public class LuggageRestrictionType extends Object { public Long getMaxNonHandLuggagePieces() {
if (maxNonHandLuggagePieces == null) {
- return new Long(1);
+ return Long.valueOf(1);
}
return this.maxNonHandLuggagePieces;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java index b1b2be4..d60dee1 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java @@ -314,7 +314,7 @@ public class ReservationData extends Object { public Long getArrivalDate() {
if (arrivalDate == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.arrivalDate;
@@ -397,7 +397,7 @@ public class ReservationData extends Object { public Long getTypeOfSupplement() {
if (typeOfSupplement == null){
- return new Long(0);
+ return Long.valueOf(0);
}
@@ -407,7 +407,7 @@ public class ReservationData extends Object { public Long getNumberOfSupplements() {
if (numberOfSupplements == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.numberOfSupplements;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java index 2d1eebd..775d145 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java @@ -14,7 +14,7 @@ public class SequenceOfActivatedDays extends Asn1SequenceOf<Long> { public SequenceOfActivatedDays(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java index 9d75e83..8d8d708 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java @@ -15,7 +15,7 @@ public class SequenceOfCarrierNum extends Asn1SequenceOf<Long> { public SequenceOfCarrierNum(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
public static SequenceOfCarrierNum getSequence(List<Long> numList) {
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java index e6dd46b..ea3213c 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java @@ -15,7 +15,7 @@ public class SequenceOfCountries extends Asn1SequenceOf<Long> { public SequenceOfCountries(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java index c8ec7ce..07d7950 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java @@ -16,7 +16,7 @@ public class SequenceOfPlaceNum extends Asn1SequenceOf<Long> { public SequenceOfPlaceNum(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java index 3edd7fb..e8fde5a 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java @@ -15,7 +15,7 @@ public class SequenceOfServiceBrands extends Asn1SequenceOf<Long> { public SequenceOfServiceBrands(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java index 3a1b1ec..b1d61ba 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java @@ -14,7 +14,7 @@ public class SequenceOfTravelerId extends Asn1SequenceOf<Long> { public SequenceOfTravelerId(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java index 66cb399..6927416 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java @@ -82,7 +82,7 @@ public class TariffType extends Object { public Long getNumberOfPassengers() {
if (numberOfPassengers == null) {
- return new Long(1);
+ return Long.valueOf(1);
}
return this.numberOfPassengers;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java index 7a86d56..b137f4c 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java @@ -24,8 +24,6 @@ package org.uic.barcode.ticket.api.asn.omv1; import org.uic.barcode.asn1.datatypes.Choice;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
-import org.uic.barcode.ticket.api.asn.omv1.DelayConfirmation;
-import org.uic.barcode.ticket.api.asn.omv1.ExtensionData;
@Choice
@HasExtensionMarker
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java index 6cc1c42..9bd4fe4 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java @@ -43,7 +43,7 @@ public class TrainLinkType extends Object { @Asn1Optional public String trainIA5;
@FieldOrder(order = 2)
- @IntRange(minValue=0,maxValue=370)
+ @IntRange(minValue=-1,maxValue=370)
public Long travelDate;
@FieldOrder(order = 3)
@@ -168,7 +168,7 @@ public class TrainLinkType extends Object { public void setDepartureTimeZone(Date dateLocal, Date dateUTC ) {
// -- (UTC = local + offset * 15 Minutes)
- this.departureUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
+ this.departureUTCOffset = Long.valueOf(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
}
public Date getDepartureDate(Date issuingDate){
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java index 7f512fc..f9663c5 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java @@ -295,8 +295,8 @@ public class TravelerType extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.yearOfBirth = new Long( cal.get(Calendar.YEAR));
- this.dayOfBirth = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.yearOfBirth = Long.valueOf ( cal.get(Calendar.YEAR));
+ this.dayOfBirth = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java index a72d55b..e9a0ce8 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java @@ -62,7 +62,7 @@ public class ValidityPeriodType extends Object { public Long getValidFromDay() {
if (validFromDay == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.validFromDay;
@@ -76,7 +76,7 @@ public class ValidityPeriodType extends Object { public Long getValidUntilDay() {
if (validUntilDay == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.validUntilDay;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java index 521f32a..796e15e 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java @@ -241,8 +241,8 @@ public class VoucherData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf (fromCal.get(Calendar.DAY_OF_YEAR));
if (untilDate == null) return;
@@ -250,8 +250,8 @@ public class VoucherData extends Object { untilCal.clear();
untilCal.setTime(untilDate);
- this.validUntilYear = new Long( untilCal.get(Calendar.YEAR));
- this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR));
+ this.validUntilYear = Long.valueOf( untilCal.get(Calendar.YEAR));
+ this.validUntilDay = Long.valueOf(untilCal.get(Calendar.DAY_OF_YEAR));
}
@@ -264,8 +264,8 @@ public class VoucherData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf(fromCal.get(Calendar.DAY_OF_YEAR));
}
@@ -277,8 +277,8 @@ public class VoucherData extends Object { untilCal.clear();
untilCal.setTime(untilDate);
- this.validUntilYear = new Long( untilCal.get(Calendar.YEAR));
- this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR));
+ this.validUntilYear = Long.valueOf( untilCal.get(Calendar.YEAR));
+ this.validUntilDay = Long.valueOf (untilCal.get(Calendar.DAY_OF_YEAR));
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java index 4e0bb5f..5a3af74 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java @@ -231,7 +231,7 @@ public class CarCarriageReservationData extends Object { public Long getBeginLoadingTime() {
- if (beginLoadingTime == null) return new Long(0);
+ if (beginLoadingTime == null) return Long.valueOf(0);
return beginLoadingTime;
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java index 5d8603f..161106d 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java @@ -242,8 +242,8 @@ public class CustomerCardData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf (fromCal.get(Calendar.DAY_OF_YEAR));
if (untilDate == null) return;
@@ -255,8 +255,8 @@ public class CustomerCardData extends Object { int yearDiff = untilCal.get(Calendar.YEAR) - fromCal.get(Calendar.YEAR);
- this.validUntilYear = new Long( yearDiff);
- this.validUntilDay = new Long (untildays);
+ this.validUntilYear = Long.valueOf( yearDiff);
+ this.validUntilDay = Long.valueOf (untildays);
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java index acf99d5..0fe13c4 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java @@ -281,11 +281,11 @@ public class DelayConfirmation extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.plannedArrivalYear = new Long( cal.get(Calendar.YEAR));
- this.plannedArrivalDay = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.plannedArrivalYear = Long.valueOf( cal.get(Calendar.YEAR));
+ this.plannedArrivalDay = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
if (time > 0) {
- this.plannedArrivalTime = new Long (time );
+ this.plannedArrivalTime = Long.valueOf (time );
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java index 4cfe708..3a301d1 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java @@ -385,12 +385,12 @@ public class IncludedOpenTicketType extends Object { public void setValidFromTimeZone(Date dateLocal, Date dateUTC ) {
// -- (UTC = local + offset * 15 Minutes)
- this.validFromUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
+ this.validFromUTCOffset = Long.valueOf(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
}
public void setValidUntilTimeZone(Date dateLocal, Date dateUTC ) {
// -- (UTC = local + offset * 15 Minutes)
- this.validUntilUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
+ this.validUntilUTCOffset = Long.valueOf(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
if (this.validFromUTCOffset.longValue() == this.validUntilUTCOffset.longValue()) {
this.validUntilUTCOffset = null;
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 74c516c..82e3d69 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 @@ -184,7 +184,7 @@ public class IssuingData extends Object { public Long getCurrencyFract() {
if (currencyFract == null) {
- return new Long(2);
+ return Long.valueOf(2);
}
return this.currencyFract;
}
@@ -323,11 +323,11 @@ public class IssuingData extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.issuingYear = new Long( cal.get(Calendar.YEAR));
- this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.issuingYear = Long.valueOf( cal.get(Calendar.YEAR));
+ this.issuingDay = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
if (time >= 0) {
- this.issuingTime = new Long (time );
+ this.issuingTime = Long.valueOf (time );
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java index caa1caa..403afc0 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java @@ -54,7 +54,7 @@ public class LuggageRestrictionType extends Object { public Long getMaxHandLuggagePieces() {
if (maxHandLuggagePieces == null) {
- return new Long(3);
+ return Long.valueOf(3);
}
return this.maxHandLuggagePieces;
@@ -63,7 +63,7 @@ public class LuggageRestrictionType extends Object { public Long getMaxNonHandLuggagePieces() {
if (maxNonHandLuggagePieces == null) {
- return new Long(1);
+ return Long.valueOf(1);
}
return this.maxNonHandLuggagePieces;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java index 3b5ae99..f69155e 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java @@ -35,7 +35,6 @@ import org.uic.barcode.asn1.datatypes.RestrictedString; import org.uic.barcode.asn1.datatypes.Sequence;
import org.uic.barcode.asn1.datatypes.SizeRange;
import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5;
-import org.uic.barcode.ticket.api.asn.omv2.SequenceOfActivatedDays;
import org.uic.barcode.ticket.api.utils.DateTimeUtils;
@Sequence
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java index 3a8c3b1..ab86564 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java @@ -34,7 +34,6 @@ import org.uic.barcode.asn1.datatypes.IntRange; import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5;
-import org.uic.barcode.ticket.api.asn.omv2.SequenceOfActivatedDays;
import org.uic.barcode.ticket.api.utils.DateTimeUtils;
@Sequence
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java index a42a3e1..604717f 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java @@ -314,7 +314,7 @@ public class ReservationData extends Object { public Long getArrivalDate() {
if (arrivalDate == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.arrivalDate;
@@ -397,7 +397,7 @@ public class ReservationData extends Object { public Long getTypeOfSupplement() {
if (typeOfSupplement == null){
- return new Long(0);
+ return Long.valueOf(0);
}
@@ -407,7 +407,7 @@ public class ReservationData extends Object { public Long getNumberOfSupplements() {
if (numberOfSupplements == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.numberOfSupplements;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java index 776c774..7b632bb 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java @@ -14,7 +14,7 @@ public class SequenceOfActivatedDays extends Asn1SequenceOf<Long> { public SequenceOfActivatedDays(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java index 53417c2..09f1861 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java @@ -15,7 +15,7 @@ public class SequenceOfCarrierNum extends Asn1SequenceOf<Long> { public SequenceOfCarrierNum(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
public static SequenceOfCarrierNum getSequence(List<Long> numList) {
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java index 2dca27a..a4ee40b 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java @@ -15,7 +15,7 @@ public class SequenceOfCountries extends Asn1SequenceOf<Long> { public SequenceOfCountries(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java index 3cc6471..9b8afcb 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java @@ -16,7 +16,7 @@ public class SequenceOfPlaceNum extends Asn1SequenceOf<Long> { public SequenceOfPlaceNum(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java index 4eb829b..30a2d48 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java @@ -15,7 +15,7 @@ public class SequenceOfServiceBrands extends Asn1SequenceOf<Long> { public SequenceOfServiceBrands(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java index b8e2b64..19b4b2b 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java @@ -15,7 +15,7 @@ public class SequenceOfTransportTypes extends Asn1SequenceOf<Long> { public SequenceOfTransportTypes(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java index eb9c3e2..16c57ce 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java @@ -14,7 +14,7 @@ public class SequenceOfTravelerId extends Asn1SequenceOf<Long> { public SequenceOfTravelerId(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java index efc5d3b..2834b4e 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java @@ -81,7 +81,7 @@ public class TariffType extends Object { public Long getNumberOfPassengers() {
if (numberOfPassengers == null) {
- return new Long(1);
+ return Long.valueOf(1);
}
return this.numberOfPassengers;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java index 47c48da..9e54a20 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java @@ -24,8 +24,6 @@ package org.uic.barcode.ticket.api.asn.omv2; import org.uic.barcode.asn1.datatypes.Choice;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
-import org.uic.barcode.ticket.api.asn.omv2.DelayConfirmation;
-import org.uic.barcode.ticket.api.asn.omv2.ExtensionData;
@Choice
@HasExtensionMarker
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java index 4724db6..ed2ee12 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java @@ -168,7 +168,7 @@ public class TrainLinkType extends Object { public void setDepartureTimeZone(Date dateLocal, Date dateUTC ) {
// -- (UTC = local + offset * 15 Minutes)
- this.departureUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
+ this.departureUTCOffset = Long.valueOf(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
}
public Date getDepartureDate(Date issuingDate){
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 2522355..8c3ba01 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 @@ -305,9 +305,9 @@ public class TravelerType extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.yearOfBirth = new Long( cal.get(Calendar.YEAR));
- this.monthOfBirth = new Long(cal.get(Calendar.MONTH) + 1);
- this.dayOfBirth = new Long (cal.get(Calendar.DAY_OF_MONTH));
+ this.yearOfBirth = Long.valueOf( cal.get(Calendar.YEAR));
+ this.monthOfBirth = Long.valueOf(cal.get(Calendar.MONTH) + 1);
+ this.dayOfBirth = Long.valueOf(cal.get(Calendar.DAY_OF_MONTH));
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java index e22cf3b..392da59 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java @@ -62,7 +62,7 @@ public class ValidityPeriodType extends Object { public Long getValidFromDay() {
if (validFromDay == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.validFromDay;
@@ -76,7 +76,7 @@ public class ValidityPeriodType extends Object { public Long getValidUntilDay() {
if (validUntilDay == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.validUntilDay;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java index 1395976..a4b3328 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java @@ -239,8 +239,8 @@ public class VoucherData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf(fromCal.get(Calendar.DAY_OF_YEAR));
if (untilDate == null) return;
@@ -248,8 +248,8 @@ public class VoucherData extends Object { untilCal.clear();
untilCal.setTime(untilDate);
- this.validUntilYear = new Long( untilCal.get(Calendar.YEAR));
- this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR));
+ this.validUntilYear = Long.valueOf( untilCal.get(Calendar.YEAR));
+ this.validUntilDay = Long.valueOf(untilCal.get(Calendar.DAY_OF_YEAR));
}
@@ -262,8 +262,8 @@ public class VoucherData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf(fromCal.get(Calendar.DAY_OF_YEAR));
}
@@ -275,8 +275,8 @@ public class VoucherData extends Object { untilCal.clear();
untilCal.setTime(untilDate);
- this.validUntilYear = new Long( untilCal.get(Calendar.YEAR));
- this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR));
+ this.validUntilYear = Long.valueOf( untilCal.get(Calendar.YEAR));
+ this.validUntilDay = Long.valueOf(untilCal.get(Calendar.DAY_OF_YEAR));
}
|