Skip to content

Commit

Permalink
Small changes for PR #56.
Browse files Browse the repository at this point in the history
  • Loading branch information
sumlin committed Apr 22, 2018
1 parent 4ec5d13 commit 1cf5db1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import eu.chargetime.ocpp.model.Confirmation;

import javax.xml.bind.annotation.XmlRootElement;
import java.util.Objects;

/**
* Sent by the Charge Point to the Central System in response to an {@link DiagnosticsStatusNotificationRequest}.
Expand All @@ -52,7 +53,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return 5;
return Objects.hash(DiagnosticsStatusNotificationConfirmation.class);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Objects;

/**
* Sent by the Charge Point to the Central System in response to an {@link FirmwareStatusNotificationRequest}.
Expand All @@ -53,7 +54,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return 6;
return Objects.hash(FirmwareStatusNotificationConfirmation.class);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Objects;

/**
* Sent by the Charge Point to the Central System in response to an {@link UpdateFirmwareRequest}.
Expand All @@ -53,7 +54,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return 7;
return Objects.hash(UpdateFirmwareConfirmation.class);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class UpdateFirmwareRequest implements Request {
private String location;
private Integer retries;
private Calendar retrieveDate;
private int retryInterval;
private Integer retryInterval;

public UpdateFirmwareRequest() {}

Expand Down Expand Up @@ -131,7 +131,7 @@ public void setRetrieveDate(Calendar retrieveDate) {
*
* @return int, retry interval.
*/
public int getRetryInterval() {
public Integer getRetryInterval() {
return retryInterval;
}

Expand All @@ -145,7 +145,7 @@ public int getRetryInterval() {
*
*/
@XmlElement
public void setRetryInterval(int retryInterval) throws PropertyConstraintException {
public void setRetryInterval(Integer retryInterval) throws PropertyConstraintException {
if (retryInterval <= 0)
throw new PropertyConstraintException("retryInterval", retryInterval);

Expand All @@ -162,7 +162,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UpdateFirmwareRequest that = (UpdateFirmwareRequest) o;
return retryInterval == that.retryInterval &&
return retryInterval.equals(that.retryInterval) &&
Objects.equals(location, that.location) &&
Objects.equals(retries, that.retries) &&
Objects.equals(retrieveDate, that.retrieveDate);
Expand Down

0 comments on commit 1cf5db1

Please sign in to comment.