SystemProperty should load classes with Thread.getContextClassloader as fallback

Description

The new class SystemProperty causes issues, when loading classes which are contained in a plugin.

In our specific case we have a custom LockOutProvider implementation in a plugin and set this class:

The class cannot be found, because SystemProperty is loaded by the App ClassLoader, which doesn't see plugin classes, because Class.forName() only checks the SystemProperty's classloader.

This is a regression, earlier versions of LockoutManager used the ClassUtils to load LockoutProviders.

The fix is trivial: SystemProperty should use ClassUtils.forName() instead of Class.forName(), so that Thread.getContextClassLoader() is used as fallback.

Environment

None

Activity

Show:
csh
February 11, 2020, 2:57 PM

Thanks, would be nice, of coure

Greg Thomas
February 11, 2020, 2:03 PM

Thanks - I've merged this PR - do you need in in the 4.5.x branch too?

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

csh

Reporter

csh