1. 24 Feb, 2021 1 commit
    • Contract test for end-position-out-of-range case · d8b5a1d7
      Assert that an exception is not thrown from DataSource.open
      if the DataSpec's start position is valid but its end position
      extends beyond the end of the data.
      
      HTTP based DataSource implementations have no good way of
      knowing when this is the case, so it makes sense to make this
      the required behaviour, rather than requiring an exception to
      be thrown or allowing both.
      
      There are also use cases where the caller may want to use the
      end position as an upper bound, without knowing for sure how
      long the content is. An example of this use case is wanting to
      pre-cache the first N bytes of a stream. This implies that any
      exception should be thrown after reading to the end of the
      data, rather than preemptively in open.
      
      Issue: #7326
      PiperOrigin-RevId: 359063721
      olly committed
  2. 23 Feb, 2021 15 commits
  3. 22 Feb, 2021 6 commits
  4. 19 Feb, 2021 18 commits