Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really allow zero interval + fix integer comparisons #120

Merged
merged 2 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public Integer getInterval() {
*/
@XmlElement
public void setInterval(Integer interval) {
if (interval <= 0) {
if (interval < 0) {
throw new PropertyConstraintException(interval, "interval be a positive value");
}

Expand Down Expand Up @@ -172,7 +172,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BootNotificationConfirmation that = (BootNotificationConfirmation) o;
return interval == that.interval
return Objects.equals(interval, that.interval)
&& Objects.equals(currentTime, that.currentTime)
&& status == that.status;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ChangeAvailabilityRequest that = (ChangeAvailabilityRequest) o;
return connectorId == that.connectorId && type == that.type;
return Objects.equals(connectorId, that.connectorId) && type == that.type;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MeterValuesRequest that = (MeterValuesRequest) o;
return connectorId == that.connectorId
&& transactionId == that.transactionId
return Objects.equals(connectorId, that.connectorId)
&& Objects.equals(transactionId, that.transactionId)
&& Arrays.equals(meterValue, that.meterValue);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GetDiagnosticsRequest that = (GetDiagnosticsRequest) o;
return retries == that.retries
&& retryInterval == that.retryInterval
return Objects.equals(retries, that.retries)
&& Objects.equals(retryInterval, that.retryInterval)
&& Objects.equals(location, that.location)
&& Objects.equals(startTime, that.startTime)
&& Objects.equals(stopTime, that.stopTime);
Expand Down