pjfanning opened a new pull request, #1383:
URL: https://github.com/apache/pekko-http/pull/1383

   ### Motivation
   #1374 added `java.lang.Iterable` overloads to `Trailer.addHeaders` / 
`withHeaders`, but its tests only passed `List`s. The overloads should accept 
any `java.lang.Iterable`.
   
   ### Modification
   Test-only change to `TrailerTest`:
   - `addHeaders` / `withHeaders` with the same headers as an `ArrayList`, 
`LinkedHashSet`, `ArrayDeque`, unmodifiable `Collection` and a non-`Collection` 
`Iterable` (`items::iterator`)
   - a one-shot `Iterable` that fails on a second traversal, so the conversion 
must iterate only once
   - `withHeaders` of an empty `Iterable` removes all headers
   
   ### Result
   The `Trailer` Java API overloads are tested with several `Iterable` shapes, 
not just `List`.
   
   ### Tests
   - `sbt "http-core/Test/testOnly 
org.apache.pekko.http.javadsl.model.TrailerTest"`: passed (7 tests)
   - `sbt http-core/Test/javafmtCheck` (JDK 17): passed
   
   ### References
   Refs #1374, Refs #1378
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to