Polish "Use Assert.state() with Supplier where possible"

Closes gh-10658
This commit is contained in:
Stephane Nicoll
2017-10-17 15:36:51 +02:00
parent 3b71393e0a
commit 2eba1c5f62
4 changed files with 8 additions and 7 deletions

View File

@@ -109,8 +109,8 @@ class DefinitionsParser {
private void addDefinition(AnnotatedElement element, Definition definition,
String type) {
boolean isNewDefinition = this.definitions.add(definition);
Assert.state(isNewDefinition,
() -> "Duplicate " + type + " definition " + definition);
Assert.state(isNewDefinition, () ->
"Duplicate " + type + " definition " + definition);
if (element instanceof Field) {
Field field = (Field) element;
this.definitionFields.put(definition, field);