[ 
https://issues.apache.org/jira/browse/TIKA-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16195303#comment-16195303
 ] 

Sergey Beryozkin commented on TIKA-2472:
----------------------------------------

I've got a bit of shock with this code:
{code:java}
@Test
    public void testIt() {
        Map<String, String[]> map1 = new HashMap<String, String[]>();
        map1.put("A", new String[] {"a"});
        Map<String, String[]> map2 = new HashMap<String, String[]>();
        map2.put("A", new String[] {"a"});
        
        System.out.println(map1.equals(map2));
        System.out.println(map1.hashCode() == map2.hashCode());
    }
{code}
Seeing 'false' printed in both cases which is obvious really given that 
'identity' situation for the arrays.
Eugene, you are right, thanks for being on top of these changes, you'll make me 
a Java champion soon :-)

Guys, should we update Metadata to use List of Strings ? (though it is a sep 
issue)

> Implement Metadata.hashCode
> ---------------------------
>
>                 Key: TIKA-2472
>                 URL: https://issues.apache.org/jira/browse/TIKA-2472
>             Project: Tika
>          Issue Type: Improvement
>    Affects Versions: 1.16
>            Reporter: Sergey Beryozkin
>            Assignee: Sergey Beryozkin
>            Priority: Trivial
>             Fix For: 1.17
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to