Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-2894

MultiPut exposes public fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Won't Fix
    • 0.89.20100621
    • None
    • Client
    • None

    Description

      MultiPut.java
      public class MultiPut implements Writable {
        public HServerAddress address; // client code ONLY                                              
              
        // map of regions to lists of puts for that region.                                             
        public Map<byte[], List<Put> > puts = new TreeMap<byte[], List<Put>>(Bytes.BYTES_COMPARATOR);
      [...]
      

      I don't see any reason for those fields to be public. Let's make sure this doesn't leak to a stable release, otherwise it becomes part of the API.

      Fixing this issue may be pointless if this ever happens: http://su.pr/1SG7fB

      edit: Similarly, MultiPutResponse has two fields that are protected, but need not to be:

      MultiPutResponse.java
      public class MultiPutResponse implements Writable {
                      
        protected MultiPut request; // used in client code ONLY
                        
        protected Map<byte[], Integer> answers = new TreeMap<byte[], Integer>(Bytes.BYTES_COMPARATOR);
      [...]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tsuna Benoit Sigoure
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: