From 1155e00836b6d71915c13d849cb48f264c07a9d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 8 Apr 2011 17:24:49 +0200 Subject: [PATCH] Unify field name generation. --- .../pterodactylus/sone/fcp/AbstractSoneCommand.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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(); -- 2.7.4