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

Gary Helmling commented on HBASE-4032:
--------------------------------------

{quote}
Returning null from a method that used to return a valid object is a no no. 
Substituting something that produces the same result but is more expensive is 
acceptable.
{quote}

I agree.  I would much rather have the deprecated method result in a expensive 
call which we can provide a javadoc warning for.

Returning null forces any users to deal with a runtime issue with no warning 
due to the change.  I would rather even see us make a one-time exception to the 
deprecation rule and remove the the method entirely.  At least then it could be 
dealt with as a compile time issue.

But would be best if we can keep the functionality in place as deprecated, even 
if it's a bit ugly and expensive.  Then we can remove on next release.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return 
> {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the 
> method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to