[
https://issues.apache.org/jira/browse/HADOOP-10230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15281093#comment-15281093
]
Hiroshi Ikeda commented on HADOOP-10230:
----------------------------------------
GSetByHashMap internally uses HashMap, which supports null elements and doesn't
throw NPE from not only {{put}} but {{contains}}, {{get}}, and {{remove}}.
> GSetByHashMap breaks contract of GSet
> -------------------------------------
>
> Key: HADOOP-10230
> URL: https://issues.apache.org/jira/browse/HADOOP-10230
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Hiroshi Ikeda
> Assignee: Andres Perez
> Priority: Trivial
> Attachments: HADOOP-10230.001.patch
>
>
> The contract of GSet says it is ensured to throw NullPointerException if a
> given argument is null for many methods, but GSetByHashMap doesn't. I think
> just writing non-null preconditions for GSet are required.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]