vert.x icon indicating copy to clipboard operation
vert.x copied to clipboard

Issue 2096: queryString key should be case sensitive

Open jsight opened this issue 8 years ago • 6 comments

Relates to: https://github.com/eclipse/vert.x/issues/2096

jsight avatar Sep 12 '17 04:09 jsight

this should have the same implementation than CaseInsensitiveHeaders and only change the equality check somehow.

vietj avatar Sep 12 '17 05:09 vietj

@vietj - That is basically what it does, just without a refactoring job to share the common bits of the code. If that approach is basically right, though, I will fix that. :)

jsight avatar Sep 12 '17 05:09 jsight

@vietj - I have refactored it a bit to completely share all of the code, other than the equality checks. This is really what I had intended to send the first time.

jsight avatar Sep 13 '17 03:09 jsight

despite my comments, i believe we should not use inheritance for this and a simple boolean on the original class that say wether it's sensitive or not is enough.

vietj avatar Oct 03 '17 05:10 vietj

It will have to be renamed in that case, IMO. What name do you suggest?

On Oct 3, 2017 1:13 AM, "Julien Viet" [email protected] wrote:

despite my comments, i believe we should not use inheritance for this and a simple boolean on the original class that say wether it's sensitive or not is enough.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/vert.x/pull/2125#issuecomment-333740953, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIHbSnjj3Cc2RboDt_4kwvZWSirJx4Zks5socJtgaJpZM4PUGL8 .

jsight avatar Oct 03 '17 05:10 jsight

I think we cannot rename the existing class, so here is what we should do:

1/ make the base class MultiMapBase with all the logic overridable 2/ make CaseInsensitiveMultiMap extends it and override the hash/eq logic to be insensitive

Add a static create method in MultiMap#multimap() that returns the base implementation and is a general purpose case sensitive multimap.

vietj avatar Oct 03 '17 06:10 vietj