ome / ome-model

OME model (specification, code generator, implementation)
Other
13 stars 26 forks source link

OMEModelImpl: Do not permit the addition of null references #125

Closed rleigh-codelibre closed 3 years ago

rleigh-codelibre commented 3 years ago

This is a small fix I was going to make for OME Files (see MR !116). It prevents the addition of null references to the model which would cause problems later on when traversing the model data after the initial import. Should not be seen in normal use, but it protects against unintentional incorrect use. Returns a failure status as for other failure scenarios, so the caller will be notified the addition failed should they care to check.

dgault commented 3 years ago

Makes sense to return a failed status rather than allow the addition. Happy for this to be merged, there should be no negative impact or regressions from this addition.