From 752bf043b7b26d5e89f6c907bddcec8bd12cd34e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 19 Feb 2013 20:16:37 +0100 Subject: [PATCH] Create modifiable map. --- .../java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java b/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java index 55266af..9d42572 100644 --- a/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java +++ b/src/main/java/net/pterodactylus/rhynodge/triggers/NewEpisodeTrigger.java @@ -37,6 +37,7 @@ import org.apache.commons.lang3.StringEscapeUtils; import com.google.common.base.Function; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; @@ -72,13 +73,13 @@ public class NewEpisodeTrigger implements Trigger { newEpisodes.clear(); changedEpisodes.clear(); this.allEpisodes.clear(); - Map allEpisodes = FluentIterable.from(((EpisodeState) previousState).episodes()).toMap(new Function() { + Map allEpisodes = Maps.newHashMap(FluentIterable.from(((EpisodeState) previousState).episodes()).toMap(new Function() { @Override public Episode apply(Episode episode) { return episode; } - }); + })); for (Episode episode : ((EpisodeState) currentState).episodes()) { if (!allEpisodes.containsKey(episode)) { allEpisodes.put(episode, episode); -- 2.7.4