${taskforce.name} Avatar
  1. OMG Task Force

DDS-PSM-JAVA 1.1 RTF — All Issues

Open Closed All
All Issues

Issues Summary

Issues Descriptions

DataReader.read should return an Iterable collection, not an Iterator

  • Status: open  
  • Source: Real-Time Innovations ( Mr. Alejandro Campos)
  • Summary:

    The current signature of read() (and take) is:

    public Sample.Iterator<TYPE> read();
    

    This operation should return an Interable collection, to be aligned with the C++PSM:

    public LoanedSamples<T> read();
    

    An Iterable collection can be used in a foreach loop, and it can be managed by a try-with-resources block to return the loan automatically. An Iterator doesn't take advantage of these features.

  • Reported: DDS-Java 1.0b2 — Wed, 24 Apr 2019 21:36 GMT
  • Updated: Wed, 24 Apr 2019 21:38 GMT