Skip to content

Commit

Permalink
gh-2447 Fixed GraphSerialisable equals.
Browse files Browse the repository at this point in the history
  • Loading branch information
GCHQDev404 committed Oct 27, 2022
1 parent d5326d8 commit ecfeffe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import java.io.InputStream;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Properties;

import static java.util.Objects.isNull;
Expand Down Expand Up @@ -124,9 +125,9 @@ public boolean equals(final Object obj) {
} else {
final GraphSerialisable that = (GraphSerialisable) obj;
rtn = new EqualsBuilder()
.append(this.getConfig(), that.getConfig())
.append(this.getSchema(), that.getSchema())
.append(this.getStoreProperties(), that.getStoreProperties())
.appendSuper(Arrays.equals(this.getSerialisedConfig(), that.getSerialisedConfig()))
.appendSuper(Arrays.equals(this.getSerialisedSchema(), that.getSerialisedSchema()))
.appendSuper(Arrays.equals(this.getSerialisedProperties(), that.getSerialisedProperties()))
.build();
}
return rtn;
Expand All @@ -144,9 +145,9 @@ public String toString() {
@Override
public int hashCode() {
return new HashCodeBuilder(13, 31)
.append(this.getConfig())
.append(this.getSchema())
.append(this.getStoreProperties().getProperties())
.append(this.getSerialisedConfig())
.append(this.getSerialisedSchema())
.append(this.getSerialisedProperties())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public class FederatedGraphStorage {
public static final String ACCESS_IS_NULL = "Can not put graph into storage without a FederatedAccess key.";
public static final String GRAPH_IDS_NOT_VISIBLE = "The following graphIds are not visible or do not exist: %s";
private static final Logger LOGGER = LoggerFactory.getLogger(FederatedGraphStorage.class);
private final Map<FederatedAccess, Set<Graph>> storage = new HashMap<>();
private final FederatedStoreCache federatedStoreCache;
private Boolean isCacheEnabled = false;
private GraphLibrary graphLibrary;
Expand Down

0 comments on commit ecfeffe

Please sign in to comment.