BIND 10 #410: RRset::getRdataIterator returns object in invalid state

BIND 10 Development do-not-reply at isc.org
Fri Nov 12 22:56:12 UTC 2010


#410: RRset::getRdataIterator returns object in invalid state
--------------------------------+-------------------------------------------
      Reporter:  vorner         |        Owner:  jinmei
          Type:  defect         |       Status:  new   
      Priority:  minor          |    Milestone:        
     Component:  DNSPacket API  |   Resolution:        
      Keywords:                 |    Sensitive:  0     
Estimatedhours:  0.0            |        Hours:  0     
      Billable:  1              |   Totalhours:  0     
      Internal:  0              |  
--------------------------------+-------------------------------------------

Comment(by vorner):

 Well, this iterator is java-like one (for reasons described in
 documentation, creating C++-like one would be hard if it was to be
 abstract class and copyable), so it already acts different than normal C++
 iterators. But as java iterator does not have the first() method, it must
 point to the first item when it is created, so it does not act fully as
 java one either.

 I too thought it would point to the first element, before reading the code
 and realizing it points to invalid position. That's what I mean by
 counter-intuitive.

 And I doubt the performance reasons, now one more virtual call must happen
 when initializing it (it is useless otherwise). If it was called from the
 constructor, it would be called non-virtually and should be faster than
 this situation.

-- 
Ticket URL: <http://bind10.isc.org/ticket/410#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list