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

Issue 1360 - Support header map and query map #1361

Merged
merged 4 commits into from
Jan 10, 2017
Merged

Issue 1360 - Support header map and query map #1361

merged 4 commits into from
Jan 10, 2017

Conversation

asarkar
Copy link
Contributor

@asarkar asarkar commented Sep 25, 2016

@pivotal-issuemaster
Copy link

@abhijitsarkar 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

@abhijitsarkar Thank you for signing the Contributor License Agreement!

@codecov-io
Copy link

codecov-io commented Sep 25, 2016

Current coverage is 73.75% (diff: 70.00%)

Merging #1361 into master will decrease coverage by 0.90%

@@             master      #1361   diff @@
==========================================
  Files           187        184     -3   
  Lines          5751       5659    -92   
  Methods           0          0          
  Messages          0          0          
  Branches        864        862     -2   
==========================================
- Hits           4294       4174   -120   
- Misses         1149       1182    +33   
+ Partials        308        303     -5   

Powered by Codecov. Last update 139ab95...b7498ae

Copy link
Contributor

@ryanjbaxter ryanjbaxter left a comment

Choose a reason for hiding this comment

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

@spencergibb will probably have to take a look at this as well, but it looks good to me. Do you think we should add some documentation as well? Or since we are using Spring MVC annotations it should be obvious this is supported?

@asarkar
Copy link
Contributor Author

asarkar commented Sep 25, 2016

@ryanjbaxter I'd think one of the benefits of using the Spring annotations is that people are already familiar with those and don't need further guidance. The behavior I implemented is already documented:

RequestHeader doc:

If the method parameter is Map<String, String>, MultiValueMap<String, String>, or HttpHeaders then the map is populated with all header names and values.

RequestParam doc:

If the method parameter is Map<String, String> or MultiValueMap<String, String> and a parameter name is not specified, then the map parameter is populated with all request parameter names and values.

@ryanjbaxter
Copy link
Contributor

@abhijitsarkar I agree, just making sure we are all on the same page, thanks!

@asarkar
Copy link
Contributor Author

asarkar commented Sep 29, 2016

@spencergibb @ryanjbaxter Do you need anything else from me? If not, when can I expect this PR to be merged?

@ryanjbaxter
Copy link
Contributor

Just waiting for @spencergibb to take a look

@asarkar
Copy link
Contributor Author

asarkar commented Sep 30, 2016

@ryanjbaxter Can someone else take a look? It's not much of a community driven project if one person becomes a bottleneck. There're other PRs open for months, neither accepted, nor rejected.

@spencergibb
Copy link
Member

@abhijitsarkar No need to get testy. Half of the team is on leave, the other half is traveling for a conference. I'll look at it early next week.

@ryanjbaxter
Copy link
Contributor

I am not trying to make anyone a bottleneck, I am the "new guy" on the team so I am a little more cautious merging commits in code I am not too familiar with. Sorry for the inconvenience.

* @param method the method that contains the annotation
* @return whether the parameter is http
*/
boolean processArgument(AnnotatedParameterContext context, Annotation annotation, Method method);
Copy link
Member

Choose a reason for hiding this comment

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

Formatting: we use tabs, not spaces

Copy link
Member

@spencergibb spencergibb Oct 3, 2016

Choose a reason for hiding this comment

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

Since this is not a backward compatible change on a public interface, I'm hesitant to make this change in a bugfix release. I've been bitten by this too often.

@asarkar
Copy link
Contributor Author

asarkar commented Oct 4, 2016

@spencergibb

  1. I can make the changes backward compatible by extending from the AnnotatedParameterProcessor instead of modifying it. That'll create 4 more files, which I intend to name Enhanced*. SpringMvcContract will use the new files by default and if there's anyone passing in custom AnnotatedParameterProcessor (I doubt it), their code won't break. What do you think?
  2. I used the Eclipse code formatter plugin as instructed in the Code Conventions and Housekeeping, and of course, the CI build also didn't complain. How was I supposed to know that you use tabs, not spaces, if the build doesn't enforce it (using Checkstyle or something like that) and not documented either?

@spencergibb
Copy link
Member

RE: 1) Do it, deprecate the originals and in the next release we will remove as for 2) the formatter should and I just told you.

@asarkar
Copy link
Contributor Author

asarkar commented Oct 5, 2016

@spencergibb Requested changes in. Please review.

@asarkar
Copy link
Contributor Author

asarkar commented Oct 7, 2016

Is there something else I can do to help this get merged?

@asarkar
Copy link
Contributor Author

asarkar commented Oct 13, 2016

Following up to see what's the hold up and if anything if needed from me.

@spencergibb
Copy link
Member

@abhijitsarkar I think I made a mistake in having you split the interface to try and make it backward compatible. It's too messy. If you're willing, I'd like to go back to the single interface for the next major version.

@asarkar
Copy link
Contributor Author

asarkar commented Oct 19, 2016

@spencergibb I've reverted my changes on my branch and the PR seems to have picked it up. Feel free to merge at will.

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.

5 participants