Skip to content

Make the PreFilter annotation support filtering of an immutable list. #64

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

Closed
wants to merge 1 commit into from

Conversation

Krijger
Copy link

@Krijger Krijger commented Dec 16, 2013

I'm working on a web application where I have a service method

@PreFilter("@securityAccessRightsBean.doesHaveDeleteRights(filterObject)")
public List<String> removeObjects(List<String> objectIds) {
    // impl here
}

and a controller that handles special flow for single objects, result ing in the use of the java.lang utility method

Collections.singletonList(singleObjectId)

which eventually becomes the filterObject. However, that results in an UnsupportedOperationException, due to the filterObject being mutated. I vote to support filtering immutable lists (see that added unit test) with this pull request.

Note I only ran the core modules unit tests.

…(e.g. when Collection.singletonList is used)
@Krijger
Copy link
Author

Krijger commented Jan 20, 2014

Would anyone mind to have a look at this?

@Krijger
Copy link
Author

Krijger commented Feb 3, 2014

Ping

@rwinch
Copy link
Member

rwinch commented Mar 7, 2014

For those looking at this issue refer to the discussion on JIRA https://jira.springsource.org/browse/SEC-2488

@rwinch
Copy link
Member

rwinch commented Mar 7, 2014

I had thought this was a duplicate, but somehow did not find it initially. Duplicate of SEC-2083 w/ PR #19 Please refer to those for tacking

@rwinch rwinch closed this Mar 7, 2014
@rwinch rwinch removed the status: waiting-for-feedback We need additional information before we can continue label Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants