Skip to content
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

Support conversion between scaladsl.Uri and javadsl.Uri #1950

Merged

Conversation

ennru
Copy link
Member

@ennru ennru commented Mar 19, 2018

Adds javadsl.model.Uri.asScala()
Adds static javadsl.model.Uri.create(scaladsl.model.Uri)
Removes the internal conversion method from akka.http.impl.util.Util.

Fixes #1949

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR that is currently being validated by Jenkins labels Mar 19, 2018
@akka-ci
Copy link

akka-ci commented Mar 19, 2018

Test FAILed.

@ennru
Copy link
Member Author

ennru commented Mar 19, 2018

The new method is marked as possible incompatibility
abstract method asScala()akka.http.scaladsl.model.Uri in class akka.http.javadsl.model.Uri is present only in current version

Ok to add to create 10.1.0.backwards.excludes with it?

@ktoso
Copy link
Member

ktoso commented Mar 19, 2018

Yes it's fine to add since the model is assumed "we may add methods there, do not inherit from it"

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR that is currently being validated by Jenkins labels Mar 19, 2018
@akka-ci
Copy link

akka-ci commented Mar 19, 2018

Test PASSed.

@@ -186,6 +192,13 @@ public static Uri create(String uri) {
return new JavaUri(akka.http.scaladsl.model.Uri.apply(uri));
}

/**
* Returns an Uri wrapping the scaladsl representation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't explain the implementation details :-)
"Returns the Java DSL representation of an Scala DSL Uri" :)

@@ -171,6 +171,12 @@
*/
public abstract String getPathString();

/**
* Returns the scaladsl view of this instance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as bellow, explain that it mirrors the APIs, no impl details in such methods pls

Copy link
Member

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small change in docs requested

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Mar 19, 2018
@akka-ci
Copy link

akka-ci commented Mar 19, 2018

Test PASSed.

Copy link
Member

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ktoso ktoso merged commit 526365b into akka:master Mar 19, 2018
@ennru ennru deleted the ennru_Uri-conversion-between-scaladsl-and-javadsl branch March 19, 2018 16:26
ktoso pushed a commit to ktoso/akka-http that referenced this pull request Mar 22, 2018
* Support conversion between scaladsl.Uri and javadsl.Uri

* Exclude javadsl.moduel.Uri.asScala from MiMa

* Rephrase method documentation
ktoso pushed a commit that referenced this pull request Mar 22, 2018
* Support conversion between scaladsl.Uri and javadsl.Uri

* Exclude javadsl.moduel.Uri.asScala from MiMa

* Rephrase method documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support conversion between scaladsl.Uri and javadsl.Uri
4 participants