You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "Lars Heuer (JIRA)" <ji...@apache.org> on 2008/09/18 15:57:44 UTC
[jira] Created: (ABDERA-200) IRI: NumberFormatException for IRIs
like http://www.example.org:/
IRI: NumberFormatException for IRIs like http://www.example.org:/
-----------------------------------------------------------------
Key: ABDERA-200
URL: https://issues.apache.org/jira/browse/ABDERA-200
Project: Abdera
Issue Type: Bug
Affects Versions: 0.5.0
Reporter: Lars Heuer
NumberFormatException is thrown if the port delimiter is given but no port, like "http://www.example.org:/"
According to RFC 3987 this should be interpreted as default port (c.f. 5.3.3. Scheme-Based Normalization)
Solution:
Change
private static final Pattern AUTHORITYPATTERN =
Pattern.compile("^(?:(.*)?@)?((?:\\[.*\\])|(?:[^:]*))?(?::(\\d*))?");
to
private static final Pattern AUTHORITYPATTERN =
Pattern.compile("^(?:(.*)?@)?((?:\\[.*\\])|(?:[^:]*))?(?::(\\d+))?");
This is the change: (\\d*) --> (\\d+)
So, auth.group(3) in "parseAuthority()" becomes "null" if the port delimiter is given but no port is defined.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (ABDERA-200) IRI: NumberFormatException for IRIs
like http://www.example.org:/
Posted by "David Calavera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ABDERA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Calavera closed ABDERA-200.
---------------------------------
Resolution: Fixed
Assignee: David Calavera
> IRI: NumberFormatException for IRIs like http://www.example.org:/
> -----------------------------------------------------------------
>
> Key: ABDERA-200
> URL: https://issues.apache.org/jira/browse/ABDERA-200
> Project: Abdera
> Issue Type: Bug
> Affects Versions: 0.5.0
> Reporter: Lars Heuer
> Assignee: David Calavera
>
> NumberFormatException is thrown if the port delimiter is given but no port, like "http://www.example.org:/"
> According to RFC 3987 this should be interpreted as default port (c.f. 5.3.3. Scheme-Based Normalization)
> Solution:
> Change
> private static final Pattern AUTHORITYPATTERN =
> Pattern.compile("^(?:(.*)?@)?((?:\\[.*\\])|(?:[^:]*))?(?::(\\d*))?");
> to
> private static final Pattern AUTHORITYPATTERN =
> Pattern.compile("^(?:(.*)?@)?((?:\\[.*\\])|(?:[^:]*))?(?::(\\d+))?");
> This is the change: (\\d*) --> (\\d+)
> So, auth.group(3) in "parseAuthority()" becomes "null" if the port delimiter is given but no port is defined.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.