From: David ‘Bombe’ Roden <bombe@pterodactylus.net>
Date: Thu, 14 Oct 2010 15:49:12 +0000 (+0200)
Subject: Store all added Sones in the Sone cache.
X-Git-Tag: 0.1-RC1~368
X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=25279f00b65d2373eb957dcbc6bc2e6c34a68c3a;p=Sone.git

Store all added Sones in the Sone cache.
---

diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java
index 211a76e..a300c66 100644
--- a/src/main/java/net/pterodactylus/sone/core/Core.java
+++ b/src/main/java/net/pterodactylus/sone/core/Core.java
@@ -147,6 +147,7 @@ public class Core extends AbstractService {
 	 */
 	public void addSone(Sone sone) {
 		if (localSones.add(sone)) {
+			soneCache.put(sone.getId(), sone);
 			SoneInserter soneInserter = new SoneInserter(freenetInterface, sone);
 			soneInserter.start();
 			soneInserters.put(sone, soneInserter);