Use lambda expressions for lazy instantiation (#1911)

Issue: SPR-17074
This commit is contained in:
Сергей Цыпанов
2018-07-31 14:03:18 +03:00
committed by Sam Brannen
parent 487e14d549
commit f8340838b3
11 changed files with 11 additions and 11 deletions

View File

@@ -90,7 +90,7 @@ public interface ServerWebExchange {
@SuppressWarnings("unchecked")
default <T> T getRequiredAttribute(String name) {
T value = getAttribute(name);
Assert.notNull(value, "Required attribute '" + name + "' is missing.");
Assert.notNull(value, () -> "Required attribute '" + name + "' is missing.");
return value;
}

View File

@@ -71,7 +71,7 @@ public interface WebSession {
@SuppressWarnings("unchecked")
default <T> T getRequiredAttribute(String name) {
T value = getAttribute(name);
Assert.notNull(value, "Required attribute '" + name + "' is missing.");
Assert.notNull(value, () -> "Required attribute '" + name + "' is missing.");
return value;
}