harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hindess <mark.hind...@googlemail.com>
Subject Re: [classlib][luni] File.canRead() returns false if File cannot be read
Date Thu, 24 May 2007 18:46:28 GMT

On 24 May 2007 at 22:10, "Alexei Zakharov" <alexei.zakharov@gmail.com> wrote:
> Hi all,
> 
> Today while working on HARMONY-517 I've added implementation for
> getPlatformIsWriteOnly() native method from "luni/windows/helpers.c".
> As a result we've got a small difference between our and RI's behavior
> in File.canRead().
> 
> This method now returns false on Harmony in Windows environment in
> case if file cannot be read indeed due to NTFS security restrictions
> or some other reason. RI returns true in all cases.
> 
> From the Javadoc spec for the canRead() method:
> "Returns: true if and only if the file specified by this abstract
> pathname exists and can be read by the application; false otherwise"
> 
> Looks like the Harmony behavior is correct and should not be fixed.
> I've created HARMONY-3960 to log this.
> 
> Comments, objections?

Agreed.  It think the Harmony behaviour is closer to the spec and closer
to what a user might expect.

-Mark.



Mime
View raw message