Skip to content

Commit

Permalink
Fix SAT warning about hashCode implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
  • Loading branch information
jlaur committed Nov 14, 2022
1 parent 85c64ee commit 18892b8
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package org.openhab.persistence.jdbc.dto;

import java.io.Serializable;
import java.util.Objects;

/**
* Represents the table naming data.
Expand Down Expand Up @@ -96,11 +97,7 @@ public void setJdbcUriDatabaseName(String jdbcUriDatabaseName) {
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((itemName == null) ? 0 : itemName.hashCode());
result = prime * result + (itemId ^ (itemId >>> 32));
return result;
return Objects.hash(itemName, itemId);
}

/*
Expand Down

0 comments on commit 18892b8

Please sign in to comment.