From e9f7d903e628ee52c9d10a777b7ba7e44f06fbaf Mon Sep 17 00:00:00 2001 From: Michael Winsauer Date: Mon, 10 Dec 2018 22:01:30 +0100 Subject: [PATCH] Replace remaining getters & setters with Lombok annotations. --- .../configuration/Twitter4jProperties.java | 50 +++---------------- 1 file changed, 6 insertions(+), 44 deletions(-) diff --git a/service-twitter/src/main/java/at/aic18/g6t4/servicetwitter/configuration/Twitter4jProperties.java b/service-twitter/src/main/java/at/aic18/g6t4/servicetwitter/configuration/Twitter4jProperties.java index 3196f98..8e2ae24 100644 --- a/service-twitter/src/main/java/at/aic18/g6t4/servicetwitter/configuration/Twitter4jProperties.java +++ b/service-twitter/src/main/java/at/aic18/g6t4/servicetwitter/configuration/Twitter4jProperties.java @@ -1,5 +1,7 @@ package at.aic18.g6t4.servicetwitter.configuration; +import lombok.Getter; +import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.validation.annotation.Validated; @@ -8,23 +10,15 @@ import javax.validation.constraints.NotEmpty; @ConfigurationProperties(prefix = "twitter4j") @Validated +@Getter +@Setter public class Twitter4jProperties { @Valid private final OAuth oauth = new OAuth(); private boolean debug = false; - public OAuth getOauth() { - return oauth; - } - - public boolean isDebug() { - return debug; - } - - public void setDebug(boolean debug) { - this.debug = debug; - } - + @Getter + @Setter public static class OAuth { @NotEmpty private String consumerKey; @@ -32,38 +26,6 @@ public class Twitter4jProperties { @NotEmpty private String accessToken; @NotEmpty private String accessTokenSecret; - public String getConsumerKey() { - return consumerKey; - } - - public void setConsumerKey(String consumerKey) { - this.consumerKey = consumerKey; - } - - public String getConsumerSecret() { - return consumerSecret; - } - - public void setConsumerSecret(String consumerSecret) { - this.consumerSecret = consumerSecret; - } - - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public String getAccessTokenSecret() { - return accessTokenSecret; - } - - public void setAccessTokenSecret(String accessTokenSecret) { - this.accessTokenSecret = accessTokenSecret; - } - } } -- 2.43.0