You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2015/04/26 06:39:18 UTC
logging-log4j2 git commit: Try to correct file name ecoding problem
Repository: logging-log4j2
Updated Branches:
refs/heads/master 7dabcd0a3 -> e04d64041
Try to correct file name ecoding problem
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e04d6404
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e04d6404
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e04d6404
Branch: refs/heads/master
Commit: e04d64041bfba84836108fe9c9a985c348e0b565
Parents: 7dabcd0
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sat Apr 25 21:38:51 2015 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sat Apr 25 21:38:51 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/logging/log4j/core/util/FileUtilsTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e04d6404/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
index 9ef7fac..ded08e9 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
@@ -20,6 +20,7 @@ package org.apache.logging.log4j.core.util;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URLEncoder;
import org.junit.Test;
@@ -33,7 +34,7 @@ public class FileUtilsTest {
@Test
public void testFileFromUriWithPlusCharactersInName() throws Exception {
final String config = "target/test-classes/log4j+config+with+plus+characters.xml";
- final URI uri = new URI(config);
+ final URI uri = new URI(URLEncoder.encode(config, Constants.UTF_8.name()));
final File file = FileUtils.fileFromUri(uri);
assertEquals("log4j+config+with+plus+characters.xml", file.getName());
assertTrue("file exists", file.exists());