diff options
author | shrikantawachar <shrikant.awachar@amdocs.com> | 2018-10-03 19:41:52 +0530 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-10-09 06:17:59 +0000 |
commit | 11c2543fbc1f52ab5d3019d3ee0cb4ea7bc6f97d (patch) | |
tree | f42465b9414e2aafd90e65b93e76323f739fdf3f /openecomp-be/lib | |
parent | 48528e9da9e241c59f1628ffda9020a981f939f6 (diff) |
Use lombok
Use lombok to remove getters, equals , hashcode
Change-Id: If8edfc6cb59db2219ba323ecfe22c5102dee170e
Issue-ID: SDC-1816
Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-be/lib')
3 files changed, 16 insertions, 51 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml index 5d7251e950..fa71265624 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml @@ -37,5 +37,13 @@ <artifactId>onap-configuration-management-api</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + </dependency> </dependencies> </project> diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.java index a9a01fe6dd..64ff886b24 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.java @@ -23,12 +23,16 @@ package org.openecomp.sdc.datatypes.configuration; import org.onap.config.api.Config; import java.util.Map; +import lombok.Getter; +import lombok.Setter; /** * @author shiria * @since November 30, 2016. */ @Config(key = "") +@Getter +@Setter public class ImplementationConfiguration { @Config(key = "enable") Boolean enable = true; @@ -40,24 +44,4 @@ public class ImplementationConfiguration { public Boolean isEnable() { return enable; } - - public void setEnable(Boolean enable) { - this.enable = enable; - } - - public String getImplementationClass() { - return implementationClass; - } - - public void setImplementationClass(String implementationClass) { - this.implementationClass = implementationClass; - } - - public Map<String, Object> getProperties() { - return properties; - } - - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } } diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java index 3ec5f8436b..2c88e9d61a 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java @@ -25,8 +25,11 @@ import org.apache.commons.collections4.CollectionUtils; import java.util.ArrayList; import java.util.List; import java.util.Map; +import lombok.Getter; +import lombok.EqualsAndHashCode; - +@Getter +@EqualsAndHashCode public class ErrorMessage { private final ErrorLevel level; private final String message; @@ -36,36 +39,6 @@ public class ErrorMessage { this.message = message; } - public ErrorLevel getLevel() { - return level; - } - - public String getMessage() { - return message; - } - - @Override - public int hashCode() { - int result = level.hashCode(); - result = 31 * result + message.hashCode(); - return result; - } - - @Override - public boolean equals(Object object) { - if (this == object) { - return true; - } - if (object == null || getClass() != object.getClass()) { - return false; - } - - ErrorMessage that = (ErrorMessage) object; - - return level == that.level && message.equals(that.message); - - } - public static class ErrorMessageUtil { /** |