From f4ec2edb968de3c8d3202fddeb6452b10af40014 Mon Sep 17 00:00:00 2001 From: Driptaroop Das Date: Mon, 21 Jan 2019 14:31:32 +0530 Subject: bugfix: hashcode() implementation Implemented hashCode() as equals() is already implemented Issue-ID: AAI-2093 Change-Id: Ib393a339fd69a7c2e161f36339ccce5d627e4ab4 Signed-off-by: Driptaroop Das --- .../src/main/java/org/onap/aai/champcore/model/ChampSchema.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/champ-lib/champ-core/src/main/java/org/onap/aai/champcore/model/ChampSchema.java b/champ-lib/champ-core/src/main/java/org/onap/aai/champcore/model/ChampSchema.java index b91b5da..e4f3feb 100644 --- a/champ-lib/champ-core/src/main/java/org/onap/aai/champcore/model/ChampSchema.java +++ b/champ-lib/champ-core/src/main/java/org/onap/aai/champcore/model/ChampSchema.java @@ -4,6 +4,7 @@ * =================================================================== * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. * Copyright © 2017-2018 Amdocs + * Copyright © 2019 IBM * =================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +24,7 @@ package org.onap.aai.champcore.model; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.Objects; import java.util.Optional; import org.onap.aai.champcore.model.fluent.schema.CreateChampSchemable; @@ -134,6 +136,11 @@ public final class ChampSchema { return false; } + @Override + public int hashCode() { + return Objects.hash(objectConstraints, relationshipConstraints); + } + @Override public String toString() { return "{objectConstraints: " + getObjectConstraints() + -- cgit 1.2.3-korg