Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5469

MockProperty does not maintain type of empty multi valued property

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Neutral
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: testing
    • Labels:
      None

      Description

      This test fails

      private void assertSetEmptyMultiValueProperty(Node node) throws RepositoryException {
          Property property = node.setProperty("test", new String[]{});
          assertEquals(PropertyType.STRING, property.getType());
      }
      

      Also info.magnolia.test.mock.jcr.MockProperty#getType throws ArrayIndexOutOfBoundsException.

      This behaviour appears to be broken already in org.apache.jackrabbit.commons.AbstractProperty, in fact Jackrabbit itself doesn't use this class.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tmattsson Tobias Mattsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: