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

in Java default port is -1 #84

Open
SiKing opened this issue Oct 18, 2017 · 1 comment
Open

in Java default port is -1 #84

SiKing opened this issue Oct 18, 2017 · 1 comment

Comments

@SiKing
Copy link

SiKing commented Oct 18, 2017

In Java8:

URIBuilder uri = new URIBuilder("http://www.google.com/one/two?a=1#frag");
Assert.assertEquals(80, uri.getPort());

Produces:

java.lang.AssertionError: expected:<80> but was:<-1>

Am I missing something?

@SiKing
Copy link
Author

SiKing commented Oct 18, 2017

The example code here https://github.com/jgritman/httpbuilder/wiki/URIBuilder indirectly suggests this should be possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant