Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.13.0
Description
Hello, community.
I found FlinkUserCodeClassLoader is wrapping by
SafetyNetWrapperClassLoader, but it cut getURL invoking chain.
ClassLoaderUtil.getUserCodeClassLoaderInfo:
public static String getUserCodeClassLoaderInfo(ClassLoader loader) { if (loader instanceof URLClassLoader) { URLClassLoader cl = (URLClassLoader) loader; try { StringBuilder bld = new StringBuilder(); if (cl == ClassLoader.getSystemClassLoader()) { bld.append("System ClassLoader: "); } else { bld.append("URL ClassLoader:"); } for (URL url : cl.getURLs()) { } }
SafetyNetWrapperClassLoader(FlinkUserCodeClassLoader inner, ClassLoader parent) { super(new URL[0], parent); this.inner = inner; }
The constructor passed an empty array to super class, SafetyNetWrapperClassLoader.getURL should dispatch this invocation.
@Override public URL[] getURLs() { return inner.getURLs(); }
Otherwise,
ClassLoaderUtil.getUserCodeClassLoaderInfo(theJarClassLoader);
will print empty, like below:
URL ClassLoader:
Attachments
Issue Links
- links to