} else if ((receipt1.getReceiptId() instanceof Long) && (receipt1.getReceiptId() < 1)) {
// Throw IAE
throw new IllegalArgumentException(MessageFormat.format("receipt1.receiptId={0} is not valid.", receipt1.getReceiptId()));
- } else if (receipt1.getReceiptNumber() == null) {
- // Throw NPE
- throw new NullPointerException("receipt1.receiptNumber is null");
- } else if (receipt1.getReceiptNumber() < 1) {
- // Throw IAE
- throw new IllegalArgumentException(MessageFormat.format("receipt1.receiptNumber={0} is not valid", receipt1.getReceiptNumber()));
} else if (receipt1.getReceiptBranchOffice() == null) {
// Throw NPE
throw new NullPointerException("receipt1.receiptBranchOffice is null");
} else if (receipt1.getReceiptBranchOffice().getBranchId() < 1) {
// Throw NPE
throw new NullPointerException(MessageFormat.format("receipt1.receiptBranchOffice.branchId={0} is not valid", receipt1.getReceiptBranchOffice().getBranchId()));
+ } else if ((receipt1.getReceiptNumber() instanceof Long) && (receipt1.getReceiptNumber() < 1)) {
+ // Throw IAE
+ throw new IllegalArgumentException(MessageFormat.format("receipt1.receiptNumber={0} is not valid.", receipt1.getReceiptNumber()));
} else if (receipt1.getReceiptPaymentType()== null) {
// Throw NPE
throw new NullPointerException("receipt1.receiptPaymentType is null");
} else if ((receipt2.getReceiptId() instanceof Long) && (receipt2.getReceiptId() < 1)) {
// Throw IAE
throw new IllegalArgumentException(MessageFormat.format("receipt2.receiptId={0} is not valid.", receipt2.getReceiptId()));
- } else if (receipt2.getReceiptNumber() == null) {
- // Throw NPE
- throw new NullPointerException("receipt2.receiptNumber is null");
- } else if (receipt2.getReceiptNumber() < 1) {
- // Throw IAE
- throw new IllegalArgumentException(MessageFormat.format("receipt2.receiptNumber={0} is not valid", receipt2.getReceiptNumber()));
} else if (receipt2.getReceiptBranchOffice() == null) {
// Throw NPE
throw new NullPointerException("receipt2.receiptBranchOffice is null");
} else if (receipt2.getReceiptBranchOffice().getBranchId() < 1) {
// Throw NPE
throw new NullPointerException(MessageFormat.format("receipt2.receiptBranchOffice.branchId={0} is not valid", receipt2.getReceiptBranchOffice().getBranchId()));
+ } else if ((receipt2.getReceiptNumber() instanceof Long) && (receipt2.getReceiptNumber() < 1)) {
+ // Throw IAE
+ throw new IllegalArgumentException(MessageFormat.format("receipt2.receiptNumber={0} is not valid.", receipt2.getReceiptNumber()));
} else if (receipt2.getReceiptPaymentType()== null) {
// Throw NPE
throw new NullPointerException("receipt2.receiptPaymentType is null");