diff options
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java')
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java index 1d4fc8d8..b39d0055 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java +++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-management * ================================================================================ - * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,9 +22,9 @@ package org.onap.policy.drools.protocol.configuration; import java.util.HashMap; import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import lombok.ToString; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; import org.onap.policy.common.gson.annotation.GsonJsonAnyGetter; import org.onap.policy.common.gson.annotation.GsonJsonAnySetter; import org.onap.policy.common.gson.annotation.GsonJsonIgnore; @@ -35,8 +35,12 @@ import org.onap.policy.common.gson.annotation.GsonJsonProperty; * */ @ToString +@EqualsAndHashCode +@NoArgsConstructor public class DroolsConfiguration { + protected static final Object NOT_FOUND_VALUE = new Object(); + /** * Maven Artifact ID * (Required). @@ -64,15 +68,6 @@ public class DroolsConfiguration { @GsonJsonIgnore private Map<String, Object> additionalProperties = new HashMap<>(); - protected static final Object NOT_FOUND_VALUE = new Object(); - - /** - * No args constructor for use in serialization. - * - */ - public DroolsConfiguration() { - // Empty - } /** * Constructor. @@ -262,26 +257,6 @@ public class DroolsConfiguration { return this; } - @Override - public int hashCode() { - return new HashCodeBuilder().append(artifactId).append(groupId).append(version).append(additionalProperties) - .toHashCode(); - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if (!(other instanceof DroolsConfiguration)) { - return false; - } - DroolsConfiguration rhs = ((DroolsConfiguration) other); - return new EqualsBuilder().append(artifactId, rhs.artifactId) - .append(groupId, rhs.groupId).append(version, rhs.version) - .append(additionalProperties, rhs.additionalProperties).isEquals(); - } - /** * Call set artifact id. * |