You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2012/05/01 23:54:51 UTC

[jira] [Created] (CXF-4280) case insensitive MetadataMap keyset

Romain Manni-Bucau created CXF-4280:
---------------------------------------

             Summary: case insensitive MetadataMap keyset
                 Key: CXF-4280
                 URL: https://issues.apache.org/jira/browse/CXF-4280
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.5.3
            Reporter: Romain Manni-Bucau


while working on TCK for openejb/tomee we needed to do it:

public class PatchedMetadataMap extends MetadataMap<String, String> {
    public PatchedMetadataMap(Map<String, List<String>> store, boolean ro, boolean ci) {
        super(store, ro, ci);
    }

    public Set<String> keySet() {
        Set<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
        set.addAll(super.keySet());
        return set;
    }
}

any way to merge it in cxf?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4280) case insensitive MetadataMap keyset

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266601#comment-13266601 ] 

Romain Manni-Bucau commented on CXF-4280:
-----------------------------------------

if i remind correctly if the header key is tested in lowercase it fails because it is stored with some upper case ("Content-Type").
                
> case insensitive MetadataMap keyset
> -----------------------------------
>
>                 Key: CXF-4280
>                 URL: https://issues.apache.org/jira/browse/CXF-4280
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.3
>            Reporter: Romain Manni-Bucau
>
> while working on TCK for openejb/tomee we needed to do it:
> public class PatchedMetadataMap extends MetadataMap<String, String> {
>     public PatchedMetadataMap(Map<String, List<String>> store, boolean ro, boolean ci) {
>         super(store, ro, ci);
>     }
>     public Set<String> keySet() {
>         Set<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
>         set.addAll(super.keySet());
>         return set;
>     }
> }
> any way to merge it in cxf?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4280) case insensitive MetadataMap keyset

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266842#comment-13266842 ] 

Romain Manni-Bucau commented on CXF-4280:
-----------------------------------------

ok reproduced it your test is good for our failing one. We use keyset().


                
> case insensitive MetadataMap keyset
> -----------------------------------
>
>                 Key: CXF-4280
>                 URL: https://issues.apache.org/jira/browse/CXF-4280
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.3
>            Reporter: Romain Manni-Bucau
>
> while working on TCK for openejb/tomee we needed to do it:
> public class PatchedMetadataMap extends MetadataMap<String, String> {
>     public PatchedMetadataMap(Map<String, List<String>> store, boolean ro, boolean ci) {
>         super(store, ro, ci);
>     }
>     public Set<String> keySet() {
>         Set<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
>         set.addAll(super.keySet());
>         return set;
>     }
> }
> any way to merge it in cxf?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-4280) case insensitive MetadataMap keyset

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-4280.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.11
                   2.4.8
                   2.5.4
                   2.6.1
         Assignee: Sergey Beryozkin
    
> case insensitive MetadataMap keyset
> -----------------------------------
>
>                 Key: CXF-4280
>                 URL: https://issues.apache.org/jira/browse/CXF-4280
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.3
>            Reporter: Romain Manni-Bucau
>            Assignee: Sergey Beryozkin
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>
> while working on TCK for openejb/tomee we needed to do it:
> public class PatchedMetadataMap extends MetadataMap<String, String> {
>     public PatchedMetadataMap(Map<String, List<String>> store, boolean ro, boolean ci) {
>         super(store, ro, ci);
>     }
>     public Set<String> keySet() {
>         Set<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
>         set.addAll(super.keySet());
>         return set;
>     }
> }
> any way to merge it in cxf?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4280) case insensitive MetadataMap keyset

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266581#comment-13266581 ] 

Sergey Beryozkin commented on CXF-4280:
---------------------------------------

Hi, sure, can you please type some test code here which exposes the issue this fix will address ?
I'm trying to fail one of the existing MetadataTests by using different map operations and can not :-)

I can only think of the following:
{code:java}
 // create a case-insensitive map
 MetadataMap<String, Object> m = new MetadataMap<String, Object>(false, true);
 m.add("Baz", "bar");
 assertEquals("bar", m.getFirst("Baz"));
 assertEquals("bar", m.getFirst("baz"));

 // checks the key set itself
 Set<String> keys = m.keySet();
 assertEquals(1, keys.size());
 assertTrue(keys.contains("Baz"));
 // this one currently fails
 assertTrue(keys.contains("baz")); 
{code}

Do you test the key set itself or do you get some application test due to the keySet() not use a case insensitive order on the trunk ?
                
> case insensitive MetadataMap keyset
> -----------------------------------
>
>                 Key: CXF-4280
>                 URL: https://issues.apache.org/jira/browse/CXF-4280
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.3
>            Reporter: Romain Manni-Bucau
>
> while working on TCK for openejb/tomee we needed to do it:
> public class PatchedMetadataMap extends MetadataMap<String, String> {
>     public PatchedMetadataMap(Map<String, List<String>> store, boolean ro, boolean ci) {
>         super(store, ro, ci);
>     }
>     public Set<String> keySet() {
>         Set<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
>         set.addAll(super.keySet());
>         return set;
>     }
> }
> any way to merge it in cxf?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4280) case insensitive MetadataMap keyset

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266623#comment-13266623 ] 

Sergey Beryozkin commented on CXF-4280:
---------------------------------------

Hi Romain, any chance you can offer a link to the code ? I have a couple of tests retrieving HttpHeader parameters in a case-insensitive way and it does seem to work. I think MetadataMap does need to be enhanced but I think it is only required on certain paths and I'm trying identify them with a failing test :-)
                
> case insensitive MetadataMap keyset
> -----------------------------------
>
>                 Key: CXF-4280
>                 URL: https://issues.apache.org/jira/browse/CXF-4280
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.3
>            Reporter: Romain Manni-Bucau
>
> while working on TCK for openejb/tomee we needed to do it:
> public class PatchedMetadataMap extends MetadataMap<String, String> {
>     public PatchedMetadataMap(Map<String, List<String>> store, boolean ro, boolean ci) {
>         super(store, ro, ci);
>     }
>     public Set<String> keySet() {
>         Set<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
>         set.addAll(super.keySet());
>         return set;
>     }
> }
> any way to merge it in cxf?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira