[jOOQ/jOOQ#10143] java.nio.file.InvalidPathException: Illegal char <*> when using FilePattern on module path

This commit is contained in:
Lukas Eder 2020-04-30 11:29:46 +02:00
parent d2f3ce261a
commit 25257fd8f0
2 changed files with 11 additions and 6 deletions

View File

@ -206,7 +206,16 @@ public final class FilePattern {
*/
public final void load(Loader loader) {
boolean loaded = false;
URL url = FilePattern.class.getResource(pattern);
URL url = null;
try {
url = FilePattern.class.getResource(pattern);
}
// [#10143] Starting with Java 7, and especially when running on the module path,
// there could be an InvalidPathException here.
catch (Exception ignore) {}
File file = null;
try {

View File

@ -52,7 +52,6 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
@ -409,10 +408,7 @@ public final class MiniJAXB {
return schema;
}
}
catch (MalformedURLException e) {
log.warn("Failed to load schema for namespace " + namespace, e);
}
catch (SAXException e) {
catch (Exception e) {
log.warn("Failed to load schema for namespace " + namespace, e);
}
return null;