Details
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/ChargebackJson.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/ChargebackJson.java
index 29a85e3..ab01f91 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/ChargebackJson.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/ChargebackJson.java
@@ -87,7 +87,8 @@ public class ChargebackJson {
if (chargebackAmount != null ? !chargebackAmount.equals(that.chargebackAmount) : that.chargebackAmount != null) {
return false;
}
- if (effectiveDate != null ? !effectiveDate.equals(that.effectiveDate) : that.effectiveDate != null) {
+ if (!((effectiveDate == null && that.effectiveDate == null) ||
+ (effectiveDate != null && that.effectiveDate != null && effectiveDate.compareTo(that.effectiveDate) == 0))) {
return false;
}
if (paymentId != null ? !paymentId.equals(that.paymentId) : that.paymentId != null) {
@@ -96,7 +97,8 @@ public class ChargebackJson {
if (reason != null ? !reason.equals(that.reason) : that.reason != null) {
return false;
}
- if (requestedDate != null ? !requestedDate.equals(that.requestedDate) : that.requestedDate != null) {
+ if (!((requestedDate == null && that.requestedDate == null) ||
+ (requestedDate != null && that.requestedDate != null && requestedDate.compareTo(that.requestedDate) == 0))) {
return false;
}
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CreditJson.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CreditJson.java
index 4ec1ad7..0788cea 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CreditJson.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/CreditJson.java
@@ -96,7 +96,8 @@ public class CreditJson {
if (creditAmount != null ? !creditAmount.equals(that.creditAmount) : that.creditAmount != null) {
return false;
}
- if (effectiveDate != null ? !effectiveDate.equals(that.effectiveDate) : that.effectiveDate != null) {
+ if (!((effectiveDate == null && that.effectiveDate == null) ||
+ (effectiveDate != null && that.effectiveDate != null && effectiveDate.compareTo(that.effectiveDate) == 0))) {
return false;
}
if (invoiceId != null ? !invoiceId.equals(that.invoiceId) : that.invoiceId != null) {
@@ -108,7 +109,8 @@ public class CreditJson {
if (reason != null ? !reason.equals(that.reason) : that.reason != null) {
return false;
}
- if (requestedDate != null ? !requestedDate.equals(that.requestedDate) : that.requestedDate != null) {
+ if (!((requestedDate == null && that.requestedDate == null) ||
+ (requestedDate != null && that.requestedDate != null && requestedDate.compareTo(that.requestedDate) == 0))) {
return false;
}
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceItemJsonSimple.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceItemJsonSimple.java
index cad2d8b..58ed819 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceItemJsonSimple.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceItemJsonSimple.java
@@ -138,7 +138,8 @@ public class InvoiceItemJsonSimple {
if (description != null ? !description.equals(that.description) : that.description != null) {
return false;
}
- if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) {
+ if (!((endDate == null && that.endDate == null) ||
+ (endDate != null && that.endDate != null && endDate.compareTo(that.endDate) == 0))) {
return false;
}
if (invoiceId != null ? !invoiceId.equals(that.invoiceId) : that.invoiceId != null) {
@@ -150,7 +151,8 @@ public class InvoiceItemJsonSimple {
if (planName != null ? !planName.equals(that.planName) : that.planName != null) {
return false;
}
- if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) {
+ if (!((startDate == null && that.startDate == null) ||
+ (startDate != null && that.startDate != null && startDate.compareTo(that.startDate) == 0))) {
return false;
}
if (subscriptionId != null ? !subscriptionId.equals(that.subscriptionId) : that.subscriptionId != null) {
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceJsonSimple.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceJsonSimple.java
index 0c50fda..815a4e5 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceJsonSimple.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/InvoiceJsonSimple.java
@@ -118,7 +118,8 @@ public class InvoiceJsonSimple {
if (credit != null ? !credit.equals(that.credit) : that.credit != null) {
return false;
}
- if (invoiceDate != null ? !invoiceDate.equals(that.invoiceDate) : that.invoiceDate != null) {
+ if (!((invoiceDate == null && that.invoiceDate == null) ||
+ (invoiceDate != null && that.invoiceDate != null && invoiceDate.compareTo(that.invoiceDate) == 0))) {
return false;
}
if (invoiceId != null ? !invoiceId.equals(that.invoiceId) : that.invoiceId != null) {
@@ -127,7 +128,8 @@ public class InvoiceJsonSimple {
if (invoiceNumber != null ? !invoiceNumber.equals(that.invoiceNumber) : that.invoiceNumber != null) {
return false;
}
- if (targetDate != null ? !targetDate.equals(that.targetDate) : that.targetDate != null) {
+ if (!((targetDate == null && that.targetDate == null) ||
+ (targetDate != null && that.targetDate != null && targetDate.compareTo(that.targetDate) == 0))) {
return false;
}
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/PaymentJsonSimple.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/PaymentJsonSimple.java
index 86b8efd..3c58740 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/PaymentJsonSimple.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/PaymentJsonSimple.java
@@ -143,7 +143,8 @@ public class PaymentJsonSimple {
if (currency != null ? !currency.equals(that.currency) : that.currency != null) {
return false;
}
- if (effectiveDate != null ? !effectiveDate.equals(that.effectiveDate) : that.effectiveDate != null) {
+ if (!((effectiveDate == null && that.effectiveDate == null) ||
+ (effectiveDate != null && that.effectiveDate != null && effectiveDate.compareTo(that.effectiveDate) == 0))) {
return false;
}
if (invoiceId != null ? !invoiceId.equals(that.invoiceId) : that.invoiceId != null) {
@@ -155,7 +156,8 @@ public class PaymentJsonSimple {
if (paymentId != null ? !paymentId.equals(that.paymentId) : that.paymentId != null) {
return false;
}
- if (requestedDate != null ? !requestedDate.equals(that.requestedDate) : that.requestedDate != null) {
+ if (!((requestedDate == null && that.requestedDate == null) ||
+ (requestedDate != null && that.requestedDate != null && requestedDate.compareTo(that.requestedDate) == 0))) {
return false;
}
if (retryCount != null ? !retryCount.equals(that.retryCount) : that.retryCount != null) {
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/SubscriptionJsonNoEvents.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/SubscriptionJsonNoEvents.java
index 27c6dc9..c6f0930 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/json/SubscriptionJsonNoEvents.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/json/SubscriptionJsonNoEvents.java
@@ -137,7 +137,8 @@ public class SubscriptionJsonNoEvents extends SubscriptionJsonSimple {
if (bundleId != null ? !bundleId.equals(that.bundleId) : that.bundleId != null) {
return false;
}
- if (chargedThroughDate != null ? !chargedThroughDate.equals(that.chargedThroughDate) : that.chargedThroughDate != null) {
+ if (!((chargedThroughDate == null && that.chargedThroughDate == null) ||
+ (chargedThroughDate != null && that.chargedThroughDate != null && chargedThroughDate.compareTo(that.chargedThroughDate) == 0))) {
return false;
}
if (priceList != null ? !priceList.equals(that.priceList) : that.priceList != null) {
@@ -149,7 +150,8 @@ public class SubscriptionJsonNoEvents extends SubscriptionJsonSimple {
if (productName != null ? !productName.equals(that.productName) : that.productName != null) {
return false;
}
- if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) {
+ if (!((startDate == null && that.startDate == null) ||
+ (startDate != null && that.startDate != null && startDate.compareTo(that.startDate) == 0))) {
return false;
}