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

Small changes for PR #56. #58

Merged
merged 1 commit into from
Apr 22, 2018
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 @@ -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