[ClassLoader] tiny refactoring
merged branch Tobion/classloader-refactor (PR #8134)

This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] tiny refactoring

test pass: yes
bc break: no

Commits
-------

6394a5b [ClassLoader] tiny refactoring