git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
support
/
general
/
src
/
test
/
java
/
org
/
wamblee
/
io
/
FileSystemUtils.java
diff --git
a/support/general/src/test/java/org/wamblee/io/FileSystemUtils.java
b/support/general/src/test/java/org/wamblee/io/FileSystemUtils.java
index 4be787e791899be20eed098e532e1eab24fb341a..7145c7f8dcc5b604e34274470d4bfdaeb4a72b6e 100644
(file)
--- a/
support/general/src/test/java/org/wamblee/io/FileSystemUtils.java
+++ b/
support/general/src/test/java/org/wamblee/io/FileSystemUtils.java
@@
-15,12
+15,6
@@
*/
package org.wamblee.io;
*/
package org.wamblee.io;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@
-28,14
+22,16
@@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
-
import java.net.URL;
import java.net.URLDecoder;
import java.net.URL;
import java.net.URLDecoder;
-
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
-
import java.security.CodeSource;
import java.security.CodeSource;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
/**
* File system utilities.
/**
* File system utilities.
@@
-43,7
+39,7
@@
import java.security.CodeSource;
* @author Erik Brakkee
*/
public final class FileSystemUtils {
* @author Erik Brakkee
*/
public final class FileSystemUtils {
- private static final Log
LOG = LogFactory.getLog(FileSystemUtils.class
);
+ private static final Log
ger LOG = Logger.getLogger(FileSystemUtils.class.getName()
);
/**
* Test output directory relative to the sub project.
/**
* Test output directory relative to the sub project.
@@
-119,7
+115,7
@@
public final class FileSystemUtils {
CodeSource source = aTestClass.getProtectionDomain().getCodeSource();
if (source == null) {
CodeSource source = aTestClass.getProtectionDomain().getCodeSource();
if (source == null) {
- LOG.warn("Could not obtain path for '" + aRelativePath +
+ LOG.warn
ing
("Could not obtain path for '" + aRelativePath +
"' for class " + aTestClass + ", using relative path as is");
return new File(aRelativePath);
"' for class " + aTestClass + ", using relative path as is");
return new File(aRelativePath);
@@
-129,7
+125,7
@@
public final class FileSystemUtils {
String protocol = location.getProtocol();
if (!protocol.equals("file")) {
String protocol = location.getProtocol();
if (!protocol.equals("file")) {
- LOG.warn("protocol is not 'file': " + location);
+ LOG.warn
ing
("protocol is not 'file': " + location);
return new File(aRelativePath);
}
return new File(aRelativePath);
}
@@
-140,7
+136,7
@@
public final class FileSystemUtils {
path = URLDecoder.decode(location.getPath(), "UTF-8");
} catch (UnsupportedEncodingException e) {
// ignore it.. just don't decode
path = URLDecoder.decode(location.getPath(), "UTF-8");
} catch (UnsupportedEncodingException e) {
// ignore it.. just don't decode
- LOG.
warn(
"Decoding path failed: '" + location.getPath() + "'", e);
+ LOG.
log(Level.WARNING,
"Decoding path failed: '" + location.getPath() + "'", e);
}
return new File(new File(path).getParentFile(), aRelativePath);
}
return new File(new File(path).getParentFile(), aRelativePath);