ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Maplesden (JIRA)" <>
Subject [jira] Updated: (IVY-815) SFTPRepository incorrectly calculates last modified time for resources
Date Wed, 07 May 2008 20:29:57 GMT


David Maplesden updated IVY-815:

    Attachment: SFTPRepository.diff

Unified diff file for SFTPRepository

> SFTPRepository incorrectly calculates last modified time for resources
> ----------------------------------------------------------------------
>                 Key: IVY-815
>                 URL:
>             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
>             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.

View raw message