From 0f4a1328071b61c643d626191ef37b78fcb9c5f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Wed, 21 Aug 2013 13:57:50 -0700 Subject: [PATCH] address code review --- .../druid/realtime/firehose/WikipediaIrcDecoder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/WikipediaIrcDecoder.java b/realtime/src/main/java/com/metamx/druid/realtime/firehose/WikipediaIrcDecoder.java index 4d1c15ce125..72e4022294e 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/WikipediaIrcDecoder.java +++ b/realtime/src/main/java/com/metamx/druid/realtime/firehose/WikipediaIrcDecoder.java @@ -21,6 +21,7 @@ package com.metamx.druid.realtime.firehose; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.maxmind.geoip2.DatabaseReader; @@ -79,7 +80,9 @@ class WikipediaIrcDecoder implements IrcDecoder public WikipediaIrcDecoder(@JsonProperty("namespaces") Map> namespaces, @JsonProperty("geoIpDatabase") String geoIpDatabase) { - if(namespaces == null) namespaces = Maps.newHashMap(); + if(namespaces == null) { + namespaces = Maps.newHashMap(); + } this.namespaces = namespaces; @@ -195,7 +198,7 @@ class WikipediaIrcDecoder implements IrcDecoder @Override public List getDimension(String dimension) { - return Lists.newArrayList(dimensions.get(dimension)); + return ImmutableList.of(dimensions.get(dimension)); } @Override