Commit 6f403f3d authored by Dominique Marcadet's avatar Dominique Marcadet

avoid possible NPE

parent a365eee5
......@@ -47,19 +47,25 @@ public class NsdEObjectValidator implements EValidator {
}
public void initializeValidationData() {
this.anyLNValidatorMap = this.nsdResourceSet.getLNClassStream()
this.anyLNValidatorMap =
nsdResourceSet
.getLNClassStream()
.map( lnClass -> generateAnyLNValidators( lnClass ) )
.reduce( ( a, b ) -> {
a.putAll( b );
return a;
} ).get();
} )
.orElse( new HashMap<>() );
this.lNodeTypeValidatorMap = this.nsdResourceSet.getLNClassStream()
this.lNodeTypeValidatorMap =
nsdResourceSet
.getLNClassStream()
.map( lnClass -> generateLNodeTypeValidators( lnClass ) )
.reduce( ( a, b ) -> {
a.putAll( b );
return a;
} ).get();
} )
.orElse( new HashMap<>() );
}
private HashMap< String, AnyLNValidator > generateAnyLNValidators( LNClass lnClass ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment