Skip to content
Snippets Groups Projects
Commit 6f403f3d authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

avoid possible NPE

parent a365eee5
No related branches found
Tags débutBE
1 merge request!11Resolve "complete validation by NSD"
......@@ -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 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment