ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée (JIRA) <j...@apache.org>
Subject [jira] Resolved: (IVY-815) SFTPRepository incorrectly calculates last modified time for resources
Date Thu, 08 May 2008 08:50:57 GMT

     [ https://issues.apache.org/jira/browse/IVY-815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nicolas Lalevée resolved IVY-815.
---------------------------------

    Resolution: Fixed
      Assignee: Nicolas Lalevée

Good catch David, and thanks for contributing !



> SFTPRepository incorrectly calculates last modified time for resources
> ----------------------------------------------------------------------
>
>                 Key: IVY-815
>                 URL: https://issues.apache.org/jira/browse/IVY-815
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-2
>         Environment: Pretty sure this is irrelevant but anyway...
> Ivy client running on Windows XP
> SFTP repository running on OpenSuse Linux
>            Reporter: David Maplesden
>            Assignee: Nicolas Lalevée
>             Fix For: 2.0-RC1
>
>         Attachments: SFTPRepository.diff
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> When the {{org.apache.ivy.plugins.repository.sftp.SFTPRepository}} implementation calculates
the last modified time for the resources it returns it uses an {{int}} constant {{MILLIS_PER_SECOND}}
to multiply the {{int}} value returned by {{attrs.getMTime()}}.   
> This means the calculation is done using integer arithmetic but the result is virtually
always too big for an {{int}} value and so it overflows, returning a negative number.
> This can easily be fixed by changing the {{MILLIS_PER_SECOND}} constant to {{long}},
the multiplication is then done using longs and the result does not overflow.

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