You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2015/05/04 03:14:41 UTC
logging-log4j2 git commit: Tweaks per Ralph's comments on the dev ML.
Repository: logging-log4j2
Updated Branches:
refs/heads/master 7742c41c2 -> 875e1d41c
Tweaks per Ralph's comments on the dev ML.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/875e1d41
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/875e1d41
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/875e1d41
Branch: refs/heads/master
Commit: 875e1d41c995fc21c4a3c5151d77898c0b64fb94
Parents: 7742c41
Author: Gary Gregory <ga...@gmail.com>
Authored: Sun May 3 18:14:37 2015 -0700
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sun May 3 18:14:37 2015 -0700
----------------------------------------------------------------------
.../logging/log4j/core/util/FileUtils.java | 32 ++++++++------------
1 file changed, 13 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/875e1d41/log4j-core/src/main/java/org/apache/logging/log4j/core/util/FileUtils.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/FileUtils.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/FileUtils.java
index ea1619f..f846a0d 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/FileUtils.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/FileUtils.java
@@ -34,7 +34,7 @@ import org.apache.logging.log4j.status.StatusLogger;
*/
public final class FileUtils {
- /** Constant for the file URL protocol. */
+ /** Constant for the file URL protocol.*/
private static final String PROTOCOL_FILE = "file";
private static final String JBOSS_FILE = "vfsfile";
@@ -45,11 +45,11 @@ public final class FileUtils {
private FileUtils() {
}
- /**
- * Tries to convert the specified URL to a file object. If this fails, <b>null</b> is returned.
+ /**
+ * Tries to convert the specified URL to a file object. If this fails,
+ * <b>null</b> is returned.
*
- * @param uri
- * the URI
+ * @param uri the URI
* @return the resulting file object
*/
public static File fileFromUri(URI uri) {
@@ -101,21 +101,17 @@ public final class FileUtils {
/**
* Asserts that the given directory exists and creates it if necessary.
- *
- * @param dir
- * the directory that shall exist
- * @param createDirectoryIfNotExisting
- * specifies if the directory shall be created if it does not exist.
- * @throws java.io.IOException
- * thrown if the directory could not be created.
+ * @param dir the directory that shall exist
+ * @param createDirectoryIfNotExisting specifies if the directory shall be created if it does not exist.
+ * @throws java.io.IOException thrown if the directory could not be created.
*/
- public static void mkdir(final File dir, final boolean createDirectoryIfNotExisting) throws IOException {
+ public static void mkdir(final File dir, final boolean createDirectoryIfNotExisting ) throws IOException {
// commons io FileUtils.forceMkdir would be useful here, we just want to omit this dependency
if (!dir.exists()) {
- if (!createDirectoryIfNotExisting) {
+ if(!createDirectoryIfNotExisting) {
throw new IOException("The directory " + dir.getAbsolutePath() + " does not exist.");
}
- if (!dir.mkdirs()) {
+ if(!dir.mkdirs()) {
throw new IOException("Could not create directory " + dir.getAbsolutePath());
}
}
@@ -128,11 +124,9 @@ public final class FileUtils {
* Takes a given URI string which may contain backslashes (illegal in URIs) in it due to user input or variable
* substitution and returns a URI with the backslashes replaced with forward slashes.
*
- * @param uri
- * The URI string
+ * @param uri The URI string
* @return the URI.
- * @throws URISyntaxException
- * if instantiating the URI threw a {@code URISyntaxException}.
+ * @throws URISyntaxException if instantiating the URI threw a {@code URISyntaxException}.
*/
public static URI getCorrectedFilePathUri(final String uri) throws URISyntaxException {
return new URI(WINDOWS_DIRECTORY_SEPARATOR.matcher(uri).replaceAll("/"));