The GitHub Actions job "Stage release candidate" on 
pekko-http.git/x2.0.0-M3-RC0 has failed.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
7dad8c29dc75e9ac24e65770748444d0c246ef9d / PJ Fanning 
<[email protected]>
accept Iterable<? extends HttpHeader> in Java API header parameters (#1379)

* accept Iterable<? extends HttpHeader> in Java API header parameters

Motivation:
Java generics are invariant, so a caller holding a List<RawHeader> could
not pass it to Java API methods that take Iterable<HttpHeader>.

Modification:
Widen the headers parameter to Iterable<? extends HttpHeader> in
HttpMessage.MessageTransformations.addHeaders/withHeaders (and the
scaladsl HttpMessage implementations), the RouteDirectives.complete
overloads, and Marshaller.entityToResponse/entityToOKResponse. Add MiMa
excludes for the generic-signature-only changes.

Result:
Java callers can pass collections of any HttpHeader subtype. The erased
signatures are unchanged.

Tests:
- sbt "http-core/Test/testOnly ...HttpMessageTest" "http-tests/Test/testOnly 
...RouteDirectivesTest" - passed on Scala 2.13 and 3.3.8
- sbt http-core/mimaReportBinaryIssues http/mimaReportBinaryIssues - passed

References:
Refs #1378

* test header Iterable parameters with non-List Iterables

Motivation:
The new Iterable<? extends HttpHeader> parameters should accept any
java.lang.Iterable, not just Lists.

Modification:
Run addHeaders/withHeaders and every complete/entityToResponse overload
with the same headers as an ArrayList, LinkedHashSet, ArrayDeque,
unmodifiable Collection and a non-Collection Iterable. Add tests that the
Iterable is traversed once, that withHeaders of an empty Iterable clears
the headers, and that different header types keep their order.

Result:
The Java API header parameters are tested with several Iterable shapes.

Tests:
- sbt "http-core/Test/testOnly ...HttpMessageTest" "http-tests/Test/testOnly 
...RouteDirectivesTest" - passed

References:
Refs #1378

Report URL: https://github.com/apache/pekko-http/actions/runs/40578542622

With regards,
GitHub Actions via GitBox


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

Reply via email to