Uploaded image for project: 'Spring Data REST'
  1. Spring Data REST
  2. DATAREST-1274

Patching a collection element at a position greater than 9 fails

    Details

    • Sprint:
      Lovelace RC1

      Description

      When applying a json/patch operation to replace an attribute of an entity in an indexed collection through Spring Data Rest, the operation fails if the collection element is at index 10 or greater.

      The issue appears to arise in method

      SpelPath.TypedSpelPath.verifyPath(String path, Class<?> type)

      and it appears to be in this part of the path source filtering expression:

      ...
      .filter(it -> !it.matches("\\d")) // no digits
      ...

      The fix that seems to resolve the issue is:

      ...
      .filter(it -> !it.matches("\\d+")) // no digits
      ...

       

        Attachments

          Activity

            People

            • Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              brodziakm brodziakm
              Last updater:
              Oliver Drotbohm
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: