Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
Attempts to create a federation execution with a null for the FOM modules parameter failed with a NullPointerException, and with an empty FOM modules array caused an IndexOutOfBoundsException.
A few places in the code caused this, depending on which version/method signature of the createFederationExecution method is invoked, but they all basically came down to an assumption that the fomModules parameter is never a null or empty array. These are...
Attempts to create a federation execution with a null for the FOM modules parameter failed with a
NullPointerException
, and with an empty FOM modules array caused anIndexOutOfBoundsException
.A few places in the code caused this, depending on which version/method signature of the
createFederationExecution
method is invoked, but they all basically came down to an assumption that thefomModules
parameter is never a null or empty array. These are...org.portico.lrc.services.federation.msg.CreateFederation
:null
URL (or URLs) in 3 constructor variants before processing to avoidNullPointerException
org.portico.impl.hla1516e.Rti1516eAmbassador#createFederationExecution( String federationName, URL[] fomModules, URL mimModule )
:fomModules
array before processing to avoidNullPointerException
org.portico.lrc.model.ModelMerger#mergeModels( List<ObjectModel> models )
:List
before processing to avoidIndexOutOfBoundsException
Two unit tests have also been added to cover the above situations and validate that behaviour is correct.
Tested with
release
build and all tests pass.