ProviderManager should have a varargs constructor

- Added varargs constructor to ProviderManager.
- Added check for null values in AuthenticationProvider list.
- Updated ProviderManagerTests to test for null values using both constructors.

Fixes gh-7713
This commit is contained in:
Thomas Vitale
2020-01-30 19:26:13 +01:00
committed by Josh Cummings
parent df8feb8919
commit 5ce60022d3
2 changed files with 15 additions and 2 deletions

View File

@@ -95,8 +95,13 @@ public class ProviderManagerTests {
}
@Test(expected = IllegalArgumentException.class)
public void testStartupFailsIfProvidersNotSet() {
new ProviderManager(null);
public void testStartupFailsIfProvidersNotSetAsList() {
new ProviderManager((List<AuthenticationProvider>) null);
}
@Test(expected = IllegalArgumentException.class)
public void testStartupFailsIfProvidersNotSetAsVarargs() {
new ProviderManager((AuthenticationProvider) null);
}
@Test