ModeShape/modeshape — pull request #320 by rhauch (2012-03-06 18:36:01+00:00)
Title: MODE-1414 XMI model sequencer corrected to prevent NPEs

In certain cases, XMI models might contain references to the annotated objects not as XML attributes but as child elements. (This bifurcated design is considered a benefit to XMI, though not sure why.) Anyway, the problem appears to be that a virtual model contains an (empty) "annoation" for the physical model. It's not clear to me why the Designer would produce such an annotation.

Additional tests were added to reproduce the problem with the original models and VDB. After the fix, the tests pass as expected.

All unit and integration tests pass with these changes.