You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hiroshi Ikeda (JIRA)" <ji...@apache.org> on 2016/05/12 01:37:13 UTC
[jira] [Commented] (HADOOP-10230) GSetByHashMap breaks contract of
GSet
[ 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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org