MCPcopy Create free account
hub / github.com/apache/tomcat / getClassLoader

Method getClassLoader

java/org/apache/naming/ContextBindings.java:252–262  ·  view source on GitHub ↗

Retrieves the naming context bound to a class loader. @return the naming context bound to current class loader or one of its parents @throws NamingException If no naming context was bound

()

Source from the content-addressed store, hash-verified

250 * @throws NamingException If no naming context was bound
251 */
252 public static Context getClassLoader() throws NamingException {
253 ClassLoader cl = Thread.currentThread().getContextClassLoader();
254 Context context;
255 do {
256 context = clBindings.get(cl);
257 if (context != null) {
258 return context;
259 }
260 } while ((cl = cl.getParent()) != null);
261 throw new NamingException(sm.getString("contextBindings.noContextBoundToCL"));
262 }
263
264
265 /**

Callers 4

getBoundContextMethod · 0.95
cleanUpMethod · 0.95
getUserDatabaseMethod · 0.95
openMethod · 0.95

Calls 3

getMethod · 0.65
getParentMethod · 0.65
getStringMethod · 0.65

Tested by

no test coverage detected