From: David ‘Bombe’ Roden Date: Fri, 8 Apr 2011 15:24:49 +0000 (+0200) Subject: Unify field name generation. X-Git-Tag: 0.6.5^2~39^2~22 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1155e00836b6d71915c13d849cb48f264c07a9d8;p=Sone.git Unify field name generation. --- diff --git a/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java b/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java index fccb6f2..6473e4d 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java @@ -139,11 +139,11 @@ public abstract class AbstractSoneCommand extends AbstractCommand { int soneIndex = 0; soneBuilder.put(prefix + "Count", sones.size()); for (Sone sone : sones) { - String sonePrefix = prefix + soneIndex++; - soneBuilder.put(sonePrefix + ".ID", sone.getId()); - soneBuilder.put(sonePrefix + ".Name", sone.getName()); - soneBuilder.put(sonePrefix + ".NiceName", SoneAccessor.getNiceName(sone)); - soneBuilder.put(sonePrefix + ".Time", sone.getTime()); + String sonePrefix = prefix + soneIndex++ + "."; + soneBuilder.put(sonePrefix + "ID", sone.getId()); + soneBuilder.put(sonePrefix + "Name", sone.getName()); + soneBuilder.put(sonePrefix + "NiceName", SoneAccessor.getNiceName(sone)); + soneBuilder.put(sonePrefix + "Time", sone.getTime()); } return soneBuilder.get(); @@ -226,11 +226,11 @@ public abstract class AbstractSoneCommand extends AbstractCommand { int replyIndex = 0; replyBuilder.put(prefix + "Replies.Count", replies.size()); for (Reply reply : replies) { - String replyPrefix = prefix + "Replies." + replyIndex++; - replyBuilder.put(replyPrefix + ".ID", reply.getId()); - replyBuilder.put(replyPrefix + ".Sone", reply.getSone().getId()); - replyBuilder.put(replyPrefix + ".Time", reply.getTime()); - replyBuilder.put(replyPrefix + ".Text", reply.getText()); + String replyPrefix = prefix + "Replies." + replyIndex++ + "."; + replyBuilder.put(replyPrefix + "ID", reply.getId()); + replyBuilder.put(replyPrefix + "Sone", reply.getSone().getId()); + replyBuilder.put(replyPrefix + "Time", reply.getTime()); + replyBuilder.put(replyPrefix + "Text", reply.getText()); } return replyBuilder.get();