ModeShape/modeshape — pull request #439 by rhauch (2012-07-12 16:03:13+00:00)
Title: MODE-1406 Corrected validation of shareable node creation

When a shareable node is created, the validation logic assures that the new shared node will have the correct node type. If the parent node type's associated child node definition is restrictive of the allowed child node type, this validation logic may fail because it was incorrectly resolving the shared node (e.g., the primary type of the child was thought to be "mode:share", an internal node type used in the shareable nodes feature, rather than the actual primary type of the shareable node.

The fix was simply using "originalNode()" rather than "proxyNode()" to obtain the original shared node.

A new test case replicates the problem and error, and after the fix runs successfull.