in src/main/java/org/apache/commons/configuration2/io/DefaultFileSystem.java [196:220]
public String getPath(final File file, final URL url, final String basePath, final String fileName) {
String path = null;
// if resource was loaded from jar file may be null
if (file != null) {
path = file.getAbsolutePath();
}
// try to see if file was loaded from a jar
if (path == null) {
if (url != null) {
path = url.getPath();
} else {
try {
path = getURL(basePath, fileName).getPath();
} catch (final Exception e) {
// simply ignore it and return null
if (getLogger().isDebugEnabled()) {
getLogger().debug(String.format("Could not determine URL for " + "basePath = %s, fileName = %s: %s", basePath, fileName, e));
}
}
}
}
return path;
}