Commit 27eb2f0e authored by Claus Nagel's avatar Claus Nagel
Browse files

even more flexible support for JAXB plugins

parent 2069595d
......@@ -27,6 +27,9 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
......@@ -89,4 +92,24 @@ public class Util {
return md5.xor(new BigInteger(1, md5sum));
}
public static class URLClassLoader extends java.net.URLClassLoader {
protected URLClassLoader() {
super(new URL[]{}, Util.class.getClassLoader());
}
@Override
protected void addURL(URL url) {
super.addURL(url);
}
protected void addPath(Path path) {
try {
super.addURL(path.toUri().toURL());
} catch (MalformedURLException e) {
//
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment