Use local Sone in Sone inserter.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 3 Dec 2014 06:13:40 +0000 (07:13 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 3 Dec 2014 06:13:40 +0000 (07:13 +0100)
src/main/java/net/pterodactylus/sone/core/SoneInserter.java

index 4f74fe5..5ae2f73 100644 (file)
@@ -215,12 +215,12 @@ public class SoneInserter extends AbstractService {
                                sleep(delay);
 
                                if (soneModificationDetector.isEligibleForInsert()) {
-                                       Optional<Sone> soneOptional = core.getSone(soneId);
+                                       Optional<LocalSone> soneOptional = core.getLocalSone(soneId);
                                        if (!soneOptional.isPresent()) {
                                                logger.log(Level.WARNING, format("Sone %s has disappeared, exiting inserter.", soneId));
                                                return;
                                        }
-                                       Sone sone = soneOptional.get();
+                                       LocalSone sone = soneOptional.get();
                                        InsertInformation insertInformation = new InsertInformation(sone);
                                        logger.log(Level.INFO, String.format("Inserting Sone “%s”…", sone.getName()));