You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Igor Fedorenko (JIRA)" <ji...@codehaus.org> on 2008/05/24 15:40:21 UTC

[jira] Created: (MARTIFACT-18) NumberFormatException parsing certain versions

NumberFormatException parsing certain versions
----------------------------------------------

                 Key: MARTIFACT-18
                 URL: http://jira.codehaus.org/browse/MARTIFACT-18
             Project: Maven Artifact
          Issue Type: Bug
    Affects Versions: 3.0
            Reporter: Igor Fedorenko
            Priority: Critical
         Attachments: martifact-parse-version.diff

ComparableVersion.parseVersion chokes on versions that have substrings that look like numbers but are too big to fit into int value. For example, 1.2.3.200705301630.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MARTIFACT-18) NumberFormatException parsing certain versions

Posted by "Igor Fedorenko (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MARTIFACT-18?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Fedorenko updated MARTIFACT-18:
------------------------------------

    Attachment: martifact-parse-version-2.diff

Updated patch that uses BigInteger to compare integer version parts.

> NumberFormatException parsing certain versions
> ----------------------------------------------
>
>                 Key: MARTIFACT-18
>                 URL: http://jira.codehaus.org/browse/MARTIFACT-18
>             Project: Maven Artifact
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Igor Fedorenko
>            Priority: Critical
>         Attachments: martifact-parse-version-2.diff, martifact-parse-version.diff
>
>
> ComparableVersion.parseVersion chokes on versions that have substrings that look like numbers but are too big to fit into int value. For example, 1.2.3.200705301630.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MARTIFACT-18) NumberFormatException parsing certain versions

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MARTIFACT-18?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed MARTIFACT-18.
-------------------------------

         Assignee: John Casey
       Resolution: Fixed
    Fix Version/s: 3.0-alpha-1

applied, thanks.

> NumberFormatException parsing certain versions
> ----------------------------------------------
>
>                 Key: MARTIFACT-18
>                 URL: http://jira.codehaus.org/browse/MARTIFACT-18
>             Project: Maven Artifact
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Igor Fedorenko
>            Assignee: John Casey
>            Priority: Critical
>             Fix For: 3.0-alpha-1
>
>         Attachments: martifact-parse-version-2.diff, martifact-parse-version.diff
>
>
> ComparableVersion.parseVersion chokes on versions that have substrings that look like numbers but are too big to fit into int value. For example, 1.2.3.200705301630.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MARTIFACT-18) NumberFormatException parsing certain versions

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MARTIFACT-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136021#action_136021 ] 

Benjamin Bentmann commented on MARTIFACT-18:
--------------------------------------------

Maybe this needs some more rethought: As far as I read, the [Ordering Algo|http://docs.codehaus.org/display/MAVEN/Versioning#Versioning-Orderingalgorithm] makes a significant difference when comparing integers or strings: "Integer is newer [than String]". I haven't actually tried, but from this I would assume that "x.(MAX_INT)" > "x.(MAX_INT + 1)" which would be odd. An alternative approach could be to use {{java.math.BigInteger}} for the numerical components.

> NumberFormatException parsing certain versions
> ----------------------------------------------
>
>                 Key: MARTIFACT-18
>                 URL: http://jira.codehaus.org/browse/MARTIFACT-18
>             Project: Maven Artifact
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Igor Fedorenko
>            Priority: Critical
>         Attachments: martifact-parse-version.diff
>
>
> ComparableVersion.parseVersion chokes on versions that have substrings that look like numbers but are too big to fit into int value. For example, 1.2.3.200705301630.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira