diff options
author | 2021-04-07 17:28:50 +0200 | |
---|---|---|
committer | 2021-04-12 16:02:59 +0200 | |
commit | 78ebc9a64fac6231e3e594200b9335a4c6372ed1 (patch) | |
tree | 4e48966a35f6cceaac4c00b705e640830e34c634 /src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java | |
parent | 8a00d4324ea7621df1a1febb8936df2807cbc443 (diff) |
First sonar issues review
Issue-ID: DMAAP-1585
Change-Id: I5dc4d3d4cab75f5fabcc8d4f351eac4d3ea50d17
Signed-off-by: sliard <samuel.liard@gmail.com>
Diffstat (limited to 'src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java')
-rw-r--r-- | src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java b/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java index 8936bea..91e10e0 100644 --- a/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java +++ b/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java @@ -42,6 +42,7 @@ import org.onap.dmaap.mr.client.impl.MRSimplerBatchPublisher; */ public class MRClientBuilders { + private final static String ILLEGAL_ARGUMENT_MESSAGE = "You must provide at least one host and a topic name."; /** * Instantiates MRClientBuilders. @@ -56,10 +57,6 @@ public class MRClientBuilders */ public static class ConsumerBuilder { - /** - * Construct a consumer builder. - */ - public ConsumerBuilder () {} /** * Set the host list @@ -151,7 +148,7 @@ public class MRClientBuilders { if ( fHosts == null || fHosts.isEmpty() || fTopic == null ) { - throw new IllegalArgumentException ( "You must provide at least one host and a topic name." ); + throw new IllegalArgumentException ( ILLEGAL_ARGUMENT_MESSAGE ); } if ( fGroup == null ) @@ -194,7 +191,6 @@ public class MRClientBuilders */ public static class PublisherBuilder { - public PublisherBuilder () {} /** * Set the MR/UEB host(s) to use @@ -298,7 +294,7 @@ public class MRClientBuilders { if ( fHosts == null || fHosts.isEmpty() || fTopic == null ) { - throw new IllegalArgumentException ( "You must provide at least one host and a topic name." ); + throw new IllegalArgumentException ( ILLEGAL_ARGUMENT_MESSAGE ); } if ( sfPublisherMock != null ) return sfPublisherMock; @@ -331,10 +327,6 @@ public class MRClientBuilders */ public static class IdentityManagerBuilder extends AbstractAuthenticatedManagerBuilder<MRIdentityManager> { - /** - * Construct an identity manager builder. - */ - public IdentityManagerBuilder () {} @Override protected MRIdentityManager constructClient ( Collection<String> hosts ) { try { @@ -350,10 +342,6 @@ public class MRClientBuilders */ public static class TopicManagerBuilder extends AbstractAuthenticatedManagerBuilder<MRTopicManager> { - /** - * Construct an topic manager builder. - */ - public TopicManagerBuilder () {} @Override protected MRTopicManager constructClient ( Collection<String> hosts ) { try { @@ -434,7 +422,7 @@ public class MRClientBuilders { if ( fHosts.isEmpty() ) { - throw new IllegalArgumentException ( "You must provide at least one host and a topic name." ); + throw new IllegalArgumentException ( ILLEGAL_ARGUMENT_MESSAGE ); } final T mgr = constructClient ( fHosts ); |