Creating a Federation Execution with a `null` or empty FOM array throws NullPointerException/IndexOutOfBoundsException
adlaws opened this issue · comments
Attempts to create a federation execution with a null for the FOM modules parameter fail with a NullPointerException
.
There are a few places in the code which cause this, depending on which version/method signature of the createFederationExecution
method is invoked, but they all basically come down to an assumption that the fomModules
parameter is non-null. These are...
org.portico.lrc.services.federation.msg.CreateFederation
:
- 3 of the constructors need to check for a
null
URL (or URLs) in before processing to avoidNullPointerException
org.portico.impl.hla1516e.Rti1516eAmbassador#createFederationExecution( String federationName, URL[] fomModules, URL mimModule )
:
- needs to check for null
fomModules
array before processing to avoidNullPointerException
org.portico.lrc.model.ModelMerger#mergeModels( List<ObjectModel> models )
:
- needs to check for zero length
List
before processing to avoidIndexOutOfBoundsException
See pull request #287 for proposed fix.