Commit 8f4631d2 authored by Guillaume Surrel's avatar Guillaume Surrel
Browse files

Avoid using equalsWithNull with primitive types.

parent f9fb38bf
......@@ -175,10 +175,9 @@ public class MessageWTO extends BaseWTO {
MessageWTO obj = (MessageWTO) anObj;
boolean eq = equalsWithNull(this.id, obj.id) && equalsWithNull(this.expiration, obj.expiration)
&& equalsWithNull(this.timestamp, obj.timestamp)
&& equalsWithNull(this.deliveryCount, obj.deliveryCount)
&& equalsWithNull(this.priority, obj.priority) && equalsWithNull(this.priority, obj.priority)
boolean eq = equalsWithNull(this.id, obj.id) && this.expiration == obj.expiration
&& this.timestamp == obj.timestamp && this.deliveryCount == obj.deliveryCount
&& this.priority == obj.priority && this.priority == obj.priority
&& equalsWithNull(this.properties, obj.properties);
return eq;
......
......@@ -320,16 +320,14 @@ public class QueueWTO extends BaseWTO {
boolean eq = equalsWithNull(this.id, obj.id) && equalsWithNull(this.creationDate, obj.creationDate)
&& equalsWithNull(this.DMQId, obj.DMQId) && equalsWithNull(this.destinationId, obj.destinationId)
&& equalsWithNull(this.nbMsgsDeliverSinceCreation, obj.nbMsgsDeliverSinceCreation)
&& equalsWithNull(this.nbMsgsReceiveSinceCreation, obj.nbMsgsReceiveSinceCreation)
&& equalsWithNull(this.nbMsgsSentToDMQSinceCreation, obj.nbMsgsSentToDMQSinceCreation)
&& equalsWithNull(this.period, obj.period) && Arrays.equals(this.rights, obj.rights)
&& equalsWithNull(this.freeReading, obj.freeReading)
&& equalsWithNull(this.freeWriting, obj.freeWriting) && equalsWithNull(this.threshold, obj.threshold)
&& equalsWithNull(this.waitingRequestCount, obj.waitingRequestCount)
&& equalsWithNull(this.pendingMessageCount, obj.pendingMessageCount)
&& equalsWithNull(this.deliveredMessageCount, obj.deliveredMessageCount)
&& equalsWithNull(this.nbMaxMsg, obj.nbMaxMsg);
&& this.nbMsgsDeliverSinceCreation == obj.nbMsgsDeliverSinceCreation
&& this.nbMsgsReceiveSinceCreation == obj.nbMsgsReceiveSinceCreation
&& this.nbMsgsSentToDMQSinceCreation == obj.nbMsgsSentToDMQSinceCreation && this.period == obj.period
&& Arrays.equals(this.rights, obj.rights) && this.freeReading == obj.freeReading
&& this.freeWriting == obj.freeWriting && this.threshold == obj.threshold
&& this.waitingRequestCount == obj.waitingRequestCount
&& this.pendingMessageCount == obj.pendingMessageCount
&& this.deliveredMessageCount == obj.deliveredMessageCount && this.nbMaxMsg == obj.nbMaxMsg;
return eq;
......
......@@ -237,12 +237,12 @@ public class SubscriptionWTO extends BaseWTO {
SubscriptionWTO obj = (SubscriptionWTO) anObj;
boolean eq = equalsWithNull(this.id, obj.id) && equalsWithNull(this.userName, obj.userName)
&& equalsWithNull(this.active, obj.active) && equalsWithNull(this.durable, obj.durable)
&& equalsWithNull(this.nbMaxMsg, obj.nbMaxMsg) && equalsWithNull(this.contextId, obj.contextId)
&& equalsWithNull(this.nbMsgsDeliveredSinceCreation, obj.nbMsgsDeliveredSinceCreation)
&& equalsWithNull(this.nbMsgsSentToDMQSinceCreation, obj.nbMsgsSentToDMQSinceCreation)
&& equalsWithNull(this.pendingMessageCount, obj.pendingMessageCount)
&& equalsWithNull(this.selector, obj.selector) && equalsWithNull(this.subRequestId, obj.subRequestId);
&& this.active == obj.active && this.durable == obj.durable && this.nbMaxMsg == obj.nbMaxMsg
&& this.contextId == obj.contextId
&& this.nbMsgsDeliveredSinceCreation == obj.nbMsgsDeliveredSinceCreation
&& this.nbMsgsSentToDMQSinceCreation == obj.nbMsgsSentToDMQSinceCreation
&& this.pendingMessageCount == obj.pendingMessageCount && equalsWithNull(this.selector, obj.selector)
&& this.subRequestId == obj.subRequestId;
return eq;
......
......@@ -217,16 +217,14 @@ public class TopicWTO extends BaseWTO {
TopicWTO obj = (TopicWTO) anObj;
boolean eq = equalsWithNull(this.id, obj.id)
&& equalsWithNull(this.creationDate, obj.creationDate)
&& Arrays.equals(this.subscriberIds, obj.subscriberIds)
&& equalsWithNull(this.DMQId, obj.DMQId) && equalsWithNull(this.destinationId, obj.destinationId)
&& equalsWithNull(this.nbMsgsDeliverSinceCreation, obj.nbMsgsDeliverSinceCreation)
&& equalsWithNull(this.nbMsgsReceiveSinceCreation, obj.nbMsgsReceiveSinceCreation)
&& equalsWithNull(this.nbMsgsSentToDMQSinceCreation, obj.nbMsgsSentToDMQSinceCreation)
&& equalsWithNull(this.period, obj.period) && Arrays.equals(this.rights, obj.rights)
&& equalsWithNull(this.freeReading, obj.freeReading)
&& equalsWithNull(this.freeWriting, obj.freeWriting);
boolean eq = equalsWithNull(this.id, obj.id) && equalsWithNull(this.creationDate, obj.creationDate)
&& Arrays.equals(this.subscriberIds, obj.subscriberIds) && equalsWithNull(this.DMQId, obj.DMQId)
&& equalsWithNull(this.destinationId, obj.destinationId)
&& this.nbMsgsDeliverSinceCreation == obj.nbMsgsDeliverSinceCreation
&& this.nbMsgsReceiveSinceCreation == obj.nbMsgsReceiveSinceCreation
&& this.nbMsgsSentToDMQSinceCreation == obj.nbMsgsSentToDMQSinceCreation && this.period == obj.period
&& Arrays.equals(this.rights, obj.rights) && this.freeReading == obj.freeReading
&& this.freeWriting == obj.freeWriting;
return eq;
......
......@@ -138,9 +138,8 @@ public class UserWTO extends BaseWTO {
UserWTO obj = (UserWTO) anObj;
boolean eq = equalsWithNull(this.id, obj.id)
&& equalsWithNull(this.period, obj.period)
&& equalsWithNull(this.nbMsgsSentToDMQSinceCreation, obj.nbMsgsSentToDMQSinceCreation)
boolean eq = equalsWithNull(this.id, obj.id) && this.period == obj.period
&& this.nbMsgsSentToDMQSinceCreation == obj.nbMsgsSentToDMQSinceCreation
&& Arrays.equals(subscriptionNames, obj.subscriptionNames);
return eq;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment