diff options
author | 2018-09-06 15:38:19 +0530 | |
---|---|---|
committer | 2018-09-06 15:38:27 +0530 | |
commit | 8249014ebb2befb8a57689b57fa1a1774464a623 (patch) | |
tree | 7a0bdaf39aaeb79d3be495dedf62881cf16b5881 /src/main/java/com | |
parent | 64605542cc49e3d8e0829782b8b304a5c1f39c9d (diff) |
MemoryConsumerFactory.java: Fixed sonar issues
Fixed sonar code-smells/issues across this file.
Issue-ID: DMAAP-745
Change-Id: Ieefda5f0b36ca23ff2406cf298690a1376fedf06
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/att/dmf/mr/backends/memory/MemoryConsumerFactory.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/com/att/dmf/mr/backends/memory/MemoryConsumerFactory.java b/src/main/java/com/att/dmf/mr/backends/memory/MemoryConsumerFactory.java index 0c34bfd..237cac8 100644 --- a/src/main/java/com/att/dmf/mr/backends/memory/MemoryConsumerFactory.java +++ b/src/main/java/com/att/dmf/mr/backends/memory/MemoryConsumerFactory.java @@ -35,6 +35,9 @@ import com.att.dmf.mr.backends.ConsumerFactory; */ public class MemoryConsumerFactory implements ConsumerFactory { + + private final MemoryQueue fQueue; + /** * * Initializing constructor @@ -59,8 +62,6 @@ public class MemoryConsumerFactory implements ConsumerFactory return new MemoryConsumer ( topic, consumerGroupId ); } - private final MemoryQueue fQueue; - /** * * Define nested inner class @@ -68,6 +69,12 @@ public class MemoryConsumerFactory implements ConsumerFactory */ private class MemoryConsumer implements Consumer { + + private final String fTopic; + private final String fConsumer; + private final long fCreateMs; + private long fLastAccessMs; + /** * * Initializing MemoryConsumer constructor @@ -93,11 +100,6 @@ public class MemoryConsumerFactory implements ConsumerFactory return fQueue.get ( fTopic, fConsumer ); } - private final String fTopic; - private final String fConsumer; - private final long fCreateMs; - private long fLastAccessMs; - @Override public boolean close() { //Nothing to close/clean up. @@ -168,7 +170,7 @@ public class MemoryConsumerFactory implements ConsumerFactory */ public Collection<? extends Consumer> getConsumers () { - return new ArrayList<MemoryConsumer> (); + return new ArrayList<> (); } @Override |