pjfanning commented on code in PR #1380:
URL: https://github.com/apache/pekko-http/pull/1380#discussion_r4386037056


##########
http/src/main/scala/org/apache/pekko/http/javadsl/server/Rejections.scala:
##########
@@ -401,23 +401,26 @@ object Rejections {
     s.MalformedHeaderRejection(headerName, errorMsg, cause.toScala)
 
   def unsupportedRequestContentType(
-      supported: java.lang.Iterable[MediaType],
-      contentType: Optional[ContentType]): 
UnsupportedRequestContentTypeRejection =
+      supported: java.lang.Iterable[? <: MediaType],
+      contentType: Optional[? <: ContentType]): 
UnsupportedRequestContentTypeRejection =
     s.UnsupportedRequestContentTypeRejection(
       supported = supported.asScala.map((m: MediaType) => 
scaladsl.model.ContentTypeRange(m.asScala)).toSet,
       contentType = contentType.toScala.map((c: ContentType) => c.asScala))
 
   // for backwards compatibility
-  def unsupportedRequestContentType(supported: java.lang.Iterable[MediaType]): 
UnsupportedRequestContentTypeRejection =
+  def unsupportedRequestContentType(
+      supported: java.lang.Iterable[? <: MediaType]): 
UnsupportedRequestContentTypeRejection =

Review Comment:
   my AI assistant says that this extra widening doesn't help - I can add more 
test cases to prove it



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