hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-2463) Various Bytes.* functions silently ignore invalid arguments
Date Sun, 18 Apr 2010 05:53:25 GMT

     [ https://issues.apache.org/jira/browse/HBASE-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

stack updated HBASE-2463:
-------------------------

           Status: Resolved  (was: Patch Available)
     Hadoop Flags: [Reviewed]
    Fix Version/s: 0.21.0
       Resolution: Fixed

Committed to TRUNK. Thanks for the patch BenoƮt

> Various Bytes.* functions silently ignore invalid arguments
> -----------------------------------------------------------
>
>                 Key: HBASE-2463
>                 URL: https://issues.apache.org/jira/browse/HBASE-2463
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: util
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>             Fix For: 0.21.0
>
>         Attachments: 0001-Don-t-silently-ignore-invalid-arguments-and-properly.patch
>
>
> Many functions in {{hbase.util.Bytes}} silently ignore invalid arguments.
> For instance, {{Bytes.toInt(null)}} deliberately returns {{-1}}.  There are tons of cases
like that.
> * All functions that are given a null pointer should throw an NPE.
> * All functions that are given otherwise invalid arguments should throw an {{IllegalArgumentException}}.
> Anyone relying on "special return values" such as {{-1}} for {{Bytes.toInt(null)}} is
guilty of writing broken code ({{-1}} is a valid return value for {{toInt}}!).

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

       

Mime
View raw message