Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-672

Incorrect logic in RepositoryNodeTypeManager.findPropertyDefinition(...) fails to find usable property definition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 1.0.0.Beta1
    • JCR
    • None

    Description

      The RepositoryNodeTypeManager.findPropertyDefinition(Name, List<Name>, Name, Value, boolean, boolean) method does not appear to be properly handling some specific cases. In particular, after the method looks for an acceptable property definition in the primary type, it looks in the mixin types. However, while looking in the mixin types, if the method finds a property definition with the same name as the graph property, the method looks to see if the value has a type that works with the property definition. If not, the method returns null from the method without considering any remaining property definitions on the mixin type or any remaining mixin types or any residual property definitions. This appears to be an error.

      Consider the case where the node is of type 'nt:unstructured' (and thus we should ultimately always find the residual property definitions should nothing else match), but it also has several mixin types, including one that does have a property definition with a matching name but a type that doesn't match (e.g., the definition has a LONG type, but the property value is a STRING).

      With the current method implementation, the method will not find anything with a matching name in the 'nt:unstructured' node type, and will find the property definition with the matching name in the mixin type. But when the types fail to match, the method will immediately return null (meaning no property definition is found).

      Attachments

        Issue Links

          Activity

            People

              rhauch Randall Hauch (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: