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

SortHanderMethodArgumentResolver fails to resolve comma-only sort parameter [DATACMNS-379] #849

spring-projects-issues opened this issue Oct 8, 2013 · 2 comments
type: bug


Copy link

@spring-projects-issues spring-projects-issues commented Oct 8, 2013

Kazuki Shimizu opened DATACMNS-379 and commented

If specified ","(comma only) in parameter value of sort, occurred the ArrayIndexOutOfBoundsException.

I expected that IllegalArgumentException occurs.
Other patterns is occurred IllegalArgumentException.

Affects: 1.6.1

Issue Links:

  • DATACMNS-408 Guard against invalid values when resolving pagination and sorting parameters from web requests

Backported to: 1.6.3 (Babbage SR2)

1 votes, 1 watchers

Copy link

@spring-projects-issues spring-projects-issues commented Oct 8, 2013

Kazuki Shimizu commented

Maybe, should be modified following in SortHandlerMethodArgumentResolver#parseParameterIntoSort(L.245):

[current implementation]
String[] elements = part.split(delimiter);
[modified implementation]
// number of property is unlimited.
String[] elements = part.split(delimiter,-1);


//  n is limit number of properties.
String[] elements = part.split(delimiter,n);

Copy link

@spring-projects-issues spring-projects-issues commented Dec 5, 2013

Kazuki Shimizu commented

When is this going to be fixed ?
If possible, i hope that fix this issue in ver 1.6.3.

I think this issue is related issue of DATACMNS-408.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
type: bug
None yet

No branches or pull requests

2 participants