1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Use Supplier variants of Assert methods

This commit is contained in:
Christoph Dreis
2018-03-26 22:57:52 +02:00
committed by Rob Winch
parent 7d4e7bf42d
commit d07cfe655d
32 changed files with 69 additions and 66 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ public abstract class AbstractLdapAuthenticationProvider
public Authentication authenticate(Authentication authentication)
throws AuthenticationException {
Assert.isInstanceOf(UsernamePasswordAuthenticationToken.class, authentication,
this.messages.getMessage("LdapAuthenticationProvider.onlySupports",
() -> this.messages.getMessage("LdapAuthenticationProvider.onlySupports",
"Only UsernamePasswordAuthenticationToken is supported"));
final UsernamePasswordAuthenticationToken userToken = (UsernamePasswordAuthenticationToken) authentication;