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

JDK-8288207: Enhance MalformedURLException in Uri.parseCompat #9126

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -364,7 +364,8 @@ private void parseCompat(String uri) throws MalformedURLException {
+ (port == -1?"":(":" + port));
if (!auth.equals(hostport)) {
// throw if we have user info or regname
throw new MalformedURLException("unsupported authority: " + auth);
throw new MalformedURLException("Authority component is not server-based, " +
"or contains user info. Unsupported authority: " + auth);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks okay but you may have to split up the line to avoid adding a 150+ char line (most of the file seems to keep the lines under 100 or so).

} catch (URISyntaxException e) {
var mue = new MalformedURLException(e.getMessage());
Expand Down