ndimiduk commented on a change in pull request #157: HBASE-16002 Made
constructors of DataType subclasses public
URL: https://github.com/apache/hbase/pull/157#discussion_r276892920
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/types/OrderedBlob.java
##########
@@ -32,7 +32,7 @@
public static final OrderedBlob ASCENDING = new OrderedBlob(Order.ASCENDING);
public static final OrderedBlob DESCENDING = new
OrderedBlob(Order.DESCENDING);
- protected OrderedBlob(Order order) {
+ public OrderedBlob(Order order) {
Review comment:
So that's precisely it. See my last comment on JIRA. The original design of
this part of the API was to try to prevent callers from needless allocations.
That couldn't be done uniformly, though, as some of these implementations
require explicit construction parameters. I myself filed a ticket wondering why
I had left some constructors private. I believe the uniformity of public
constructors across all concrete types is more consistent that having static
constants in most, but not all, places.
This is definitely a subjective area of the API design and I'd love to get
other opinions :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services