logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1566201 - /logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java
Date Sun, 09 Feb 2014 03:38:33 GMT
Author: ggregory
Date: Sun Feb  9 03:38:32 2014
New Revision: 1566201

URL: http://svn.apache.org/r1566201
Log:
Fix formating.

Modified:
    logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java

Modified: logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java?rev=1566201&r1=1566200&r2=1566201&view=diff
==============================================================================
--- logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java
(original)
+++ logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rolling/helper/FileRenameAction.java
Sun Feb  9 03:38:32 2014
@@ -19,64 +19,60 @@ package org.apache.log4j.rolling.helper;
 
 import java.io.File;
 
-
 /**
  * File rename action.
  *
  * @author Curt Arnold
  */
 public final class FileRenameAction extends ActionBase {
-  /**
-   * Source.
-   */
-  private final File source;
-
-  /**
-   * Destination.
-   */
-  private final File destination;
-
-  /**
-   * If true, rename empty files, otherwise delete empty files.
-   */
-  private final boolean renameEmptyFiles;
-
-  /**
-   * Creates an FileRenameAction.
-   *
-   * @param src current file name.
-   * @param dst new file name.
-   * @param renameEmptyFiles if true, rename file even if empty, otherwise delete empty files.
-   */
-  public FileRenameAction(
-    final File src, final File dst, boolean renameEmptyFiles) {
-    source = src;
-    destination = dst;
-    this.renameEmptyFiles = renameEmptyFiles;
-  }
-
-  /**
-   * Rename file.
-   *
-   * @return true if successfully renamed.
-   */
-  public boolean execute() {
-    return execute(source, destination, renameEmptyFiles);
-  }
-
-  /**
-   * Rename file.
-   * @param source current file name.
-   * @param destination new file name.
-   * @param renameEmptyFiles if true, rename file even if empty, otherwise delete empty files.
-   * @return true if successfully renamed.
-   */
-  public static boolean execute(
-    final File source, final File destination, boolean renameEmptyFiles) {
-    if (renameEmptyFiles || source.length() > 0) {
-      return source.renameTo(destination);
+    /**
+     * Source.
+     */
+    private final File source;
+
+    /**
+     * Destination.
+     */
+    private final File destination;
+
+    /**
+     * If true, rename empty files, otherwise delete empty files.
+     */
+    private final boolean renameEmptyFiles;
+
+    /**
+     * Creates an FileRenameAction.
+     *
+     * @param src current file name.
+     * @param dst new file name.
+     * @param renameEmptyFiles if true, rename file even if empty, otherwise delete empty
files.
+     */
+    public FileRenameAction(final File src, final File dst, boolean renameEmptyFiles) {
+        source = src;
+        destination = dst;
+        this.renameEmptyFiles = renameEmptyFiles;
+    }
+
+    /**
+     * Rename file.
+     *
+     * @return true if successfully renamed.
+     */
+    public boolean execute() {
+        return execute(source, destination, renameEmptyFiles);
     }
 
-    return source.delete();
-  }
+    /**
+     * Rename file.
+     * @param source current file name.
+     * @param destination new file name.
+     * @param renameEmptyFiles if true, rename file even if empty, otherwise delete empty
files.
+     * @return true if successfully renamed.
+     */
+    public static boolean execute(final File source, final File destination, boolean renameEmptyFiles)
{
+        if (renameEmptyFiles || source.length() > 0) {
+            return source.renameTo(destination);
+        }
+        return source.delete();
+    }
 }



Mime
View raw message