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

Josh Elser commented on HBASE-21243:
------------------------------------

{quote}Should I remove the {{@return}} statement or add detailed description 
for return?
{quote}
My opinion is that if the {{@return}} doesn't add anything that the method 
description doesn't already state, just drop the {{@return}}.

> Correct java-doc for the method RpcServer.getRemoteAddress()
> ------------------------------------------------------------
>
>                 Key: HBASE-21243
>                 URL: https://issues.apache.org/jira/browse/HBASE-21243
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 3.0.0, 2.0.0
>            Reporter: Nihal Jain
>            Assignee: Nihal Jain
>            Priority: Trivial
>              Labels: beginner, beginners, documentaion
>             Fix For: 3.0.0
>
>         Attachments: HBASE-21243.master.001.patch
>
>
> Correct the java-doc for the method {{RpcServer.getRemoteAddress()}}.
>  Currently it look like as below:
> {code:java}
>   /**
>    * @return Address of remote client if a request is ongoing, else null
>    */
>   public static Optional<InetAddress> getRemoteAddress() {
>     return getCurrentCall().map(RpcCall::getRemoteAddress);
>   }
> {code}
> Contrary to the doc the method will never return null. Rather it may return 
> an empty Optional.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to