-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get string representation of javadsl Content and Media Type #630
Get string representation of javadsl Content and Media Type #630
Conversation
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala
Show resolved
Hide resolved
bb3e7b4
to
125cc72
Compare
125cc72
to
e810ad7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
|
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala
Show resolved
Hide resolved
http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala
Show resolved
Hide resolved
...ain/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes
Show resolved
Hide resolved
We should probably edit |
Done |
e810ad7
to
1046b5d
Compare
1046b5d
to
6e2888c
Compare
@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. |
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 |
The PR currently has |
Aah, gotcha. This begs the question whether those |
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. |
OK, I can start that thread.
OK. AFAICS the 1.1.x branch has already been created, meaning the |
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 and not patch (its only backwards compatibility thats disallowed, this has to be done in a major patch update). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved for main branch merge - now that main branch is repurposed for v1.2 dev
Thanks, I will go ahead and merge it. |
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 thevalue
function (via theValueRenderable
trait). This PR adds thevalue
method to the core Java interfaces (therender
method is anyways implemented in the subclasses hence why this PR is compiling without any additional changes)As a workaround I currently have to do this (its in kotlin but should be understandable)
This works because it just so happens that every javdsl
ContentType
is also a scaladslContentType