From 917a3eeb8fd77bc495fff5a37282bbf6a74e3d61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 28 Oct 2010 20:28:01 +0200 Subject: [PATCH] Move default Sones to constant set at the beginning of the source file, update editions. --- src/main/java/net/pterodactylus/sone/core/Core.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index accfa1e..ab98316 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -56,6 +56,16 @@ import freenet.keys.FreenetURI; */ public class Core extends AbstractService { + /** The default Sones. */ + private static final Set defaultSones = new HashSet(); + + static { + /* Sone of Sone. */ + defaultSones.add("USK@eRHt0ceFsHjRZ11j6dd68RSdIvfd8f9YjJLZ9lnhEyo,iJWjIWh6TkMZm1NY8qBranKTIuwsCPkVPG6T6c6ft-I,AQACAAE/Sone/3"); + /* Sone of Bombe. */ + defaultSones.add("USK@RuW~uAO35Ipne896-1OmaVJNPuYE4ZIB5oZ5ziaU57A,7rV3uiyztXBDt03DCoRiNwiGjgFCJuznM9Okc1opURU,AQACAAE/Sone/24"); + } + /** * Enumeration for the possible states of a {@link Sone}. * @@ -715,10 +725,9 @@ public class Core extends AbstractService { * Adds some default Sones. */ private void addDefaultSones() { - /* Sone’s Sone. */ - loadSone("USK@eRHt0ceFsHjRZ11j6dd68RSdIvfd8f9YjJLZ9lnhEyo,iJWjIWh6TkMZm1NY8qBranKTIuwsCPkVPG6T6c6ft-I,AQACAAE/Sone/0"); - /* Bombe’s Sone. */ - loadSone("USK@RuW~uAO35Ipne896-1OmaVJNPuYE4ZIB5oZ5ziaU57A,7rV3uiyztXBDt03DCoRiNwiGjgFCJuznM9Okc1opURU,AQACAAE/Sone/15"); + for (String soneUri : defaultSones) { + loadSone(soneUri); + } } /** -- 2.7.4