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

Nick Dimiduk commented on HBASE-16002:
--------------------------------------

I believe my original intent was to only expose constructors where a caller 
must provide their own parameters; everywhere else there are static constants 
available. The idea being to help callers avoid accidental excessive 
construction of these things. However, it makes for an inconsistent API, which 
becomes a bit of a burden for someone who wants to generate instances 
dynamically.

I'm coming around to the idea of keeping your improvement, retain the public 
constructors everywhere. For me, the argument for consistency is stronger than 
the argument of "protecting" the caller. [~Jan Hentschel] what do you think?

> Many DataType constructors are not public
> -----------------------------------------
>
>                 Key: HBASE-16002
>                 URL: https://issues.apache.org/jira/browse/HBASE-16002
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Nick Dimiduk
>            Assignee: Jan Hentschel
>            Priority: Major
>         Attachments: HBASE-16002.master.001.patch
>
>
> Using the {{Struct}} class to build a rowkey, I noticed than many of the 
> provided {{DataType}} implementations' constructors are protected. They 
> should be public in most (all?) cases.



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

Reply via email to