abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Calavera (JIRA)" <j...@apache.org>
Subject [jira] Closed: (ABDERA-200) IRI: NumberFormatException for IRIs like http://www.example.org:/
Date Thu, 18 Sep 2008 14:28:44 GMT

     [ 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.


Mime
View raw message