This is the definition of java.lang.ClassLoader.resolveClass(Class) in OpenJDK 20+10:
protected final void resolveClass(Class<?> c) {
if (c == null) {
throw new NullPointerException();
}
}
It appears to be doing nothing except checking that the argument is non-null. And yet, the doc comment claims:
/**
* Links the specified class. This (misleadingly named) method may be
* used by a class loader to link a class. If the class {@code c} has
* already been linked, then this method simply returns. Otherwise, the
* class is linked as described in the "Execution" chapter of
* <cite>The Java Language Specification</cite>.
Does calling this method actually do anything useful? Since it is final, subclasses cannot override it to make it do anything different. Is it literally a does-nothing-except-null-check method, or does the JVM somehow magically intercept its invocation and do something more?