You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2024/11/15 12:53:59 UTC
[PR] Get string representation of javadsl Content and Media Type [pekko-http]
mdedetrich opened a new pull request, #630:
URL: https://github.com/apache/pekko-http/pull/630
Currently in the javadsl its not possible to get the string representation of the `Content-Type`/`Media-Type` because its only the scaladsl that implements the `value` function (via the `ValueRenderable` trait). This PR adds the `value` method to the core Java interfaces (the `render` method is anyways implemented in the subclasses hence why this PR is compiling without any additional changes)
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844210638
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
I think this should be getValue. More Java API like. Other existing methods seem to be getters.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503467945
@pjfanning Can you re-review this PR given @raboof 's comments?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1860372702
##########
http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes:
##########
@@ -0,0 +1,2 @@
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.ContentType.value")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.MediaType.value")
Review Comment:
No thats fair, I thought you were talking about `ValueRenderable` but that wouldn't make sense its already marked as `@InternalApi`.
We can remove and also fix the Java namings (i.e. `value` should be `getValue`) as well as removing `@DoNotInherit` in 2.x.x
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503880929
> I think I missed why we'd want to delay this merge - this PR as it now stands seems like a regular backwards-compatible change (assuming nobody inherited from `ContentType` or `MediaType`, which seems like a reasonable assumption)?
So actually, the reason for putting it in 1.2.0 is that while its not a breaking compatible change it is a forwards breaking change (hence the MiMa changes) which is allowed by semver in minor version bumps (its only backwards compatibility thats disallowed, this has to be done in a major patch update).
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844599162
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
Let me check because this isn't consistent, i.e. there is `getCharsetOption` but then there is also `mediaType` (which if it was consistent would be `getMediaType`)
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503579594
> @pjfanning Can you re-review this PR given @raboof 's comments?
The changes look ok. We still need to block the merge until we have the 1.1.x branch and related CI builds.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "jxnu-liguobin (via GitHub)" <gi...@apache.org>.
jxnu-liguobin commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844930158
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
You're right, the type is always String, toString is more in line with Java.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503654417
> > > We still need to block the merge until we have the 1.1.x branch and related CI builds.
> >
> > I think I missed why we'd want to delay this merge - this PR as it now stands seems like a regular backwards-compatible change (assuming nobody inherited from `ContentType` or `MediaType`, which seems like a reasonable assumption)?
>
> The PR currently has `@since 1.2.0`. If these change to `@since 1.1.1` then we don't need to start preparing for 1.2.0 snapshots.
Aah, gotcha. This begs the question whether those `@since` annotations are really worth having. I can easily imagine situations where it isn't clear yet whether the next release will be a minor, patch or major one. Should/have we discuss(ed) this on the mailinglist?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844918494
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
Maybe just override the `toString` method?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844938976
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
toString would have the useful side effect that we would be ok to merge this to v1.1.x patch line
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844985809
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
So fyi, changing it to `.getValue()` is more contrived than initially anticipated. Naively you would do something like
```scala
def getValue: String = value
```
However the `org.apache.pekko.http.javadsl.model.ContentType` has no visibility for the `value` method within the `ValueRenderable` trait (after all this is the exact issue we are dealing with). In order to make this work `org.apache.pekko.http.javadsl.model.ContentType` would have to extend `ValueRenderable` which would also expose the `value` method since its public i.e.
```
/**
* INTERNAL API
*
* An entity that has a rendered value (like an HttpHeader)
*/
@InternalApi
private[http] trait ValueRenderable extends ToStringRenderable {
def value: String = toString
}
```
which means the trait would both have `value` and `getValue` methods, far from ideal (note that even though the trait is marked as `private[http]`, this is only visible to the Scala compiler, Java has no concept of it and hence it only sees it as a standard interface with a public method).
I think this discussion is revealing of what appears to be an overlooked design misdecision, which is that we should be having 2 `ValueRenderable` traits, one for Java api and one for Scala api and only the respective implementations extending those traits.
I can go ahead and do this change but its obviously going to be more work. Thankfully `ValueRenderable` trait is marked as internal/private which means I only need to take care that a public `def value: String = toString` exists for the Scala api.
Wdyt?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2501950052
We should probably edit `CustomMediaTypesExampleTest` to use the new `.value()` instead of the current `.toString()`.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843729039
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
I would add 1.2.0 because its technically a new method in order to follow semver?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843726152
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
can you add `@since 1.1.1` to the 2 new public functions?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844985809
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
So fyi, changing it to `.getValue()` is more contrived than initially anticipated. Naively you would do something like
```scala
def getValue: String = value // value comes from `ValueRenderable`
```
However the `org.apache.pekko.http.javadsl.model.ContentType` has no visibility for the `value` method within the `ValueRenderable` trait (after all this is the exact issue we are dealing with). In order to make this work `org.apache.pekko.http.javadsl.model.ContentType` would have to extend `ValueRenderable` which would also expose the `value` method since its public i.e.
```scala
/**
* INTERNAL API
*
* An entity that has a rendered value (like an HttpHeader)
*/
@InternalApi
private[http] trait ValueRenderable extends ToStringRenderable {
def value: String = toString
}
```
which means the trait would both have `value` and `getValue` methods, far from ideal (note that even though the trait is marked as `private[http]`, this is only visible to the Scala compiler, Java has no concept of it and hence it only sees it as a standard interface with a public method).
I think this discussion is revealing of what appears to be an overlooked design misdecision, which is that we should be having 2 `ValueRenderable` traits, one for Java api and one for Scala api and only the respective implementations extending those traits.
I can go ahead and do this change but its obviously going to be more work. Thankfully `ValueRenderable` trait is marked as internal/private which means I only need to take care that a public `def value: String = toString` exists for the Scala api.
Wdyt?
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
So fyi, changing it to `.getValue()` is more contrived than initially anticipated. Naively you would do something like
```scala
def getValue: String = value // value method comes from `ValueRenderable`
```
However the `org.apache.pekko.http.javadsl.model.ContentType` has no visibility for the `value` method within the `ValueRenderable` trait (after all this is the exact issue we are dealing with). In order to make this work `org.apache.pekko.http.javadsl.model.ContentType` would have to extend `ValueRenderable` which would also expose the `value` method since its public i.e.
```scala
/**
* INTERNAL API
*
* An entity that has a rendered value (like an HttpHeader)
*/
@InternalApi
private[http] trait ValueRenderable extends ToStringRenderable {
def value: String = toString
}
```
which means the trait would both have `value` and `getValue` methods, far from ideal (note that even though the trait is marked as `private[http]`, this is only visible to the Scala compiler, Java has no concept of it and hence it only sees it as a standard interface with a public method).
I think this discussion is revealing of what appears to be an overlooked design misdecision, which is that we should be having 2 `ValueRenderable` traits, one for Java api and one for Scala api and only the respective implementations extending those traits.
I can go ahead and do this change but its obviously going to be more work. Thankfully `ValueRenderable` trait is marked as internal/private which means I only need to take care that a public `def value: String = toString` exists for the Scala api.
Wdyt?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843768464
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
I think it is too disruptive to release a 1.2.0 release just for 2 new functions. It would be better to wait a few months to see if we gather a few changes.
I am flexible about adding small API changes that have low impact in a patch release. The only users who would be seriously affected by this are users who subclass the 2 affected classes.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503777648
> > > > We still need to block the merge until we have the 1.1.x branch and related CI builds.
> > >
> > >
> > > I think I missed why we'd want to delay this merge - this PR as it now stands seems like a regular backwards-compatible change (assuming nobody inherited from `ContentType` or `MediaType`, which seems like a reasonable assumption)?
> >
> >
> > The PR currently has `@since 1.2.0`. If these change to `@since 1.1.1` then we don't need to start preparing for 1.2.0 snapshots.
>
> Aah, gotcha. This begs the question whether those `@since` annotations are really worth having. I can easily imagine situations where it isn't clear yet whether the next release will be a minor, patch or major one. Should/have we discuss(ed) this on the mailinglist?
I guess we can discuss the philosophies around using since annotations on the mailing list - I would strongly argue that we can't change the established approach in a patch release.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844988631
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
> If leaving this as `def value = ???` is easier, I am ok with that. It seems like the Java API is already inconsistent stylistically.
I personally would like to avoid that, I think that leaving unimplemented methods is taking it a bridge too far. @raboof what are your thoughts on this? I don't have an issue with doing this properly, this PR is slated for 1.2.0 anyways.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2478980613
> > lgtm - the 1.1.x branch exists now so this is safe to merge but I would appreciate a delay on the merge until we get #631 merged
>
> I would wait for 1.2.x, there is a workaround and since we are adding methods to an interface we should be bumping the minor version
* we use 'main' branch for the development version and 1.2.0 is becoming the development version
* future 1.1.x patch releases will be built using the '1.1.x' branch
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503867626
> > > > > We still need to block the merge until we have the 1.1.x branch and related CI builds.
> > > >
> > > >
> > > > I think I missed why we'd want to delay this merge - this PR as it now stands seems like a regular backwards-compatible change (assuming nobody inherited from `ContentType` or `MediaType`, which seems like a reasonable assumption)?
> > >
> > >
> > > The PR currently has `@since 1.2.0`. If these change to `@since 1.1.1` then we don't need to start preparing for 1.2.0 snapshots.
> >
> >
> > Aah, gotcha. This begs the question whether those `@since` annotations are really worth having. I can easily imagine situations where it isn't clear yet whether the next release will be a minor, patch or major one. Should/have we discuss(ed) this on the mailinglist?
>
> I guess we can discuss the philosophies around using since annotations on the mailing list
OK, I can start that thread.
> I would strongly argue that we can't change the established approach in a patch release.
OK. AFAICS the 1.1.x branch has already been created, meaning the `@since 1.2.0` is correct, right? Is there anything that still needs to be done before #631 can be un-drafted and merged?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich merged PR #630:
URL: https://github.com/apache/pekko-http/pull/630
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843768464
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
I think it is too disruptive to release a 1.2.0 release just for 2 new functions. It would be better to wait a few months to see if we gather a few changes.
I am flexible about adding small API changes that have low impact in a patch release. The only users who would be seriously affected by this are users who subclass the 2 affected traits.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843771119
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
if we do go the 1.2.0 route, we will need to delay this PR merge until we get to create the 1.1.x branch and the CI jobs related to 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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844662691
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
reasonable point - it does seem like the existing code can't decide on getter style versus field name style.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844972150
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
I don't think putting `toString` on the interface is a good idea, its something that should concretely be implemented by its sub types.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843729039
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
I would add 1.2.0 because its technically a new method?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843779331
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
Thats fine, its not urgent
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844918758
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
In Spring-web, there is a `MimeTypeUtils#toString`, for me this method should be `getValue` or just override the `toString` method.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2478966600
> lgtm - the 1.1.x branch exists now so this is safe to merge but I would appreciate a delay on the merge until we get #631 merged
I would wait for 1.2.x, there is a workaround and since we are adding methods to an interface we should be bumping the minor version
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1844988342
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
If leaving this as `def value = ???` is easier, I am ok with that. It seems like the Java API is already inconsistent stylistically.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1860381573
##########
http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes:
##########
@@ -0,0 +1,2 @@
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.ContentType.value")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.MediaType.value")
Review Comment:
Resolved and pushed.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503642076
> > We still need to block the merge until we have the 1.1.x branch and related CI builds.
>
> I think I missed why we'd want to delay this merge - this PR as it now stands seems like a regular backwards-compatible change (assuming nobody inherited from `ContentType` or `MediaType`, which seems like a reasonable assumption)?
The PR currently has `@since 1.2.0`. If these change to `@since 1.1.1` then we don't need to start preparing for 1.2.0 snapshots.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503405333
> CustomMediaTypesExampleTest
Done
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503635840
> We still need to block the merge until we have the 1.1.x branch and related CI builds.
I think I missed why we'd want to delay this merge - this PR as it now stands seems like a regular backwards-compatible change (assuming nobody inherited from `ContentType` or `MediaType`, which seems like a reasonable assumption)?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1859229782
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
I think it would make sense to keep this as `def value: String`. I don't think we need the `= ???` as all implementations of this trait have an implementation for this value, right?
Indeed 'getValue' would be more Java-esque, but since we already have `mediaType` this seems fine.
##########
http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes:
##########
@@ -0,0 +1,2 @@
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.ContentType.value")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.MediaType.value")
Review Comment:
This is only justified if there are no user types extending from these classes (or their subclasses), i.e. if these traits are marked `@DoNotInherit`. The traits are not marked `@DoNotInherit`, so naively you'd say this change is not allowed. However, I think you can make the argument that the fact that `@DoNotInherit` is missing from this trait is an oversight, and it was never intended to be user-extended. It would be good to add the `@DoNotInherit` now, then?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1860366353
##########
http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes:
##########
@@ -0,0 +1,2 @@
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.ContentType.value")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.MediaType.value")
Review Comment:
Yes, that's what I meant - or do you think that's being too strict?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #630:
URL: https://github.com/apache/pekko-http/pull/630#issuecomment-2503970062
Thanks, I will go ahead and merge 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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1860382384
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,10 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ * @since 1.2.0
+ */
+ def value: String
}
Review Comment:
Okay fair, I will mark this as resolved (if someone still disagrees then unresolve conversation).
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1860334092
##########
http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes:
##########
@@ -0,0 +1,2 @@
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.ContentType.value")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.MediaType.value")
Review Comment:
Do you mean putting `@DoNotInherit` on `ContentType`/`MediaType` traits themselves?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Get string representation of javadsl Content and Media Type [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #630:
URL: https://github.com/apache/pekko-http/pull/630#discussion_r1843787556
##########
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala:
##########
@@ -61,4 +61,9 @@ trait ContentType {
* Returns the charset if this ContentType is non-binary.
*/
def getCharsetOption: Optional[HttpCharset]
+
+ /**
+ * Returns the string representation of this ContentType
+ */
Review Comment:
* ok - let's go the 1.2.0 route
* I'll try to set up the CI builds over the next few days
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org