Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching a collection element at a position greater than 9 fails [DATAREST-1274] #1636

spring-projects-issues opened this issue Aug 8, 2018 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Aug 8, 2018

brodziakm opened DATAREST-1274 and commented

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


Affects: 3.1 RC1 (Lovelace), 2.6.14 (Ingalls SR14), 3.0.9 (Kay SR9)

Referenced from: commits ad2c635, 88b73de, 3eb0e15

Backported to: 3.0.10 (Kay SR10), 2.6.15 (Ingalls SR15)

Copy link

@spring-projects-issues spring-projects-issues commented Aug 8, 2018

Oliver Drotbohm commented

Good catch, that's fixed! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants