We're updating the issue view to help you get more done. 

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

Acceptance Test - Entry

None

Activity

Show:
csh
February 11, 2020, 12:58 PM
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?

csh
February 11, 2020, 2:57 PM

Thanks, would be nice, of coure

Fixed

Assignee

csh

Reporter

csh

Labels

None

Expected Effort

None

Ignite Forum URL

None

Fix versions

Affects versions

Priority

Major
Configure