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

SEC-2083: Created a class that allows filtering of immutable collections... #19

Closed
wants to merge 1 commit into from

Conversation

matsev
Copy link
Contributor

@matsev matsev commented Dec 17, 2012

This is a suggestion on how the suggestion in https://jira.springsource.org/browse/SEC-2083 can be implemented. I was hesitating whether or not to extend the DefaultMethodSecurityExpressionHandler for this use case, or refactor it to form an AbstractMethodSecurityExpressionHandler that could be extended. Personally, I prefer the latter, but with the provided solution no existing code is changed.

@pivotal-issuemaster
Copy link

@matsev Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@matsev Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

bclozel added a commit to bclozel/spring-security that referenced this pull request Jan 4, 2017
…ecation-warnings

Upgrade github-pages gem to fix deprecation warnings
final MethodSecurityExpressionOperations rootObject = (MethodSecurityExpressionOperations) ctx.getRootObject().getValue();
final boolean debug = logger.isDebugEnabled();
List retainList = new ArrayList(filterTarget.size());
if (debug) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this tow ifs could be combined:
if(debug){

  •        logger.debug("Filtering with expression: " + filterExpression.getExpressionString());
    
  •        logger.debug("Filtering collection with " + filterTarget.size() + " elements");
    
  •    }
    

@eleftherias eleftherias self-assigned this Oct 18, 2019
@pivotal-issuemaster
Copy link

@matsev Thank you for signing the Contributor License Agreement!

@eleftherias
Copy link
Contributor

@matsev I'm moving the discussion from gh-2316 to this thread for better visibility.

Thanks for the submission. I think I would prefer a strategy style pattern rather than inheritance. This would allow handling of custom types. One issue I see w/ the pull request is it does not seem to consider that some users may use specific types of collections. For example, if the method signature were a LinkedList this solution does not look like it would work since LinkedList is a List and the solution would use an ArrayList. A PR that would be merged would certainly need some tests to demonstrate these use cases working.

Let us know if you are interested in modifying the PR according to the comment above.

@eleftherias eleftherias added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 18, 2019
@matsev
Copy link
Contributor Author

matsev commented Oct 18, 2019

@eleftherias I am sorry, but I have no intention of updating the PR.

After reading back, I recall the the problem I had back then, but I changed projects a long time ago. Supporting immutable collections still seems like good idea though, feel free to modify the PR in any way you find suitable.

@eleftherias eleftherias removed their assignment May 14, 2020
@rwinch rwinch closed this Apr 26, 2021
@rwinch rwinch deleted the branch spring-projects:master April 26, 2021 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants