From cc75b8a793bf949dce030e61eb071fde1a5ffe2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 22 Dec 2009 21:27:45 +0100 Subject: [PATCH] Whitespace and formatting fixes. --- .../util/freenet/fcp2/ClientPutComplexDir.java | 23 ++++++++++++++-------- src/de/todesbaum/util/freenet/fcp2/Connection.java | 4 ++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/de/todesbaum/util/freenet/fcp2/ClientPutComplexDir.java b/src/de/todesbaum/util/freenet/fcp2/ClientPutComplexDir.java index 1f6a43b..7b9115d 100644 --- a/src/de/todesbaum/util/freenet/fcp2/ClientPutComplexDir.java +++ b/src/de/todesbaum/util/freenet/fcp2/ClientPutComplexDir.java @@ -32,8 +32,8 @@ import java.util.List; import de.todesbaum.util.io.Closer; /** - * Implementation of the ClientPutComplexDir command. This - * command can be used to insert directories that do not exist on disk. + * Implementation of the ClientPutComplexDir command. This command + * can be used to insert directories that do not exist on disk. * * @author David Roden <droden@gmail.com> * @version $Id$ @@ -56,9 +56,13 @@ public class ClientPutComplexDir extends ClientPutDir { private final String tempDirectory; /** - * Creates a new ClientPutComplexDir command with the specified identifier and URI. - * @param identifier The identifier of the command - * @param uri The URI of the command + * Creates a new ClientPutComplexDir command with the specified + * identifier and URI. + * + * @param identifier + * The identifier of the command + * @param uri + * The URI of the command */ public ClientPutComplexDir(String identifier, String uri) { this(identifier, uri, null); @@ -83,15 +87,18 @@ public class ClientPutComplexDir extends ClientPutDir { /** * Adds a file to the directory inserted by this request. - * @param fileEntry The file entry to add to the directory + * + * @param fileEntry + * The file entry to add to the directory */ public void addFileEntry(FileEntry fileEntry) { if (fileEntry instanceof DirectFileEntry) { - if (payloadFile == null){ + if (payloadFile == null) { try { payloadFile = File.createTempFile("payload", ".dat", (tempDirectory != null) ? new File(tempDirectory) : null); payloadFile.deleteOnExit(); } catch (IOException e) { + /* ignore. */ } } if (payloadFile != null) { @@ -125,7 +132,7 @@ public class ClientPutComplexDir extends ClientPutDir { protected void write(Writer writer) throws IOException { super.write(writer); int fileIndex = 0; - for (FileEntry fileEntry: fileEntries) { + for (FileEntry fileEntry : fileEntries) { writer.write("Files." + fileIndex + ".Name=" + fileEntry.getFilename() + LINEFEED); if (fileEntry.getContentType() != null) { writer.write("Files." + fileIndex + ".Metadata.ContentType=" + fileEntry.getContentType() + LINEFEED); diff --git a/src/de/todesbaum/util/freenet/fcp2/Connection.java b/src/de/todesbaum/util/freenet/fcp2/Connection.java index 951b534..3fd39f6 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Connection.java +++ b/src/de/todesbaum/util/freenet/fcp2/Connection.java @@ -116,7 +116,7 @@ public class Connection { * The received message */ protected void fireMessageReceived(Message message) { - for (ConnectionListener connectionListener: connectionListeners) { + for (ConnectionListener connectionListener : connectionListeners) { connectionListener.messageReceived(this, message); } } @@ -125,7 +125,7 @@ public class Connection { * Notifies listeners about the loss of the connection. */ protected void fireConnectionTerminated() { - for (ConnectionListener connectionListener: connectionListeners) { + for (ConnectionListener connectionListener : connectionListeners) { connectionListener.connectionTerminated(this); } } -- 2.7.4