FileStoreSpaceAttributeView#readAttributes("totalSpace") does not return totalSpace
Rajendra Gutupalli
Rajendra.Gutupalli at Sun.COM
Thu Sep 4 01:32:42 PDT 2008
Rémi Forax wrote:
> Rajendra Gutupalli a écrit :
>> Hi Alan,
>>
>> Spec for FileStoreSpaceAttributeView#readAttributes says
>> "totalSpace/usableSpace/unallocatedSpace" can be retrieved by passing
>> the respective string parameter, but it does not return as expected.
>> I just saw the code to see what happening for this input I think
>> comparison might be like this.
>>
>> -- if (attribute.equals("total")) {
>> ++ if (attribute.equals("totalSapce")
>>
>> Could you please tell me if this is correct.
>>
>> Thanks
>> Rajendra.
> it's not correct, you made a typo :)
> totalSapce <=> totalSpace
Thanks Rémi , it was typo in my mail but actually I was referring to
following code at line#77
http://hg.openjdk.java.net/nio/nio/jdk/file/be2cbe9f2701/src/share/classes/sun/nio/fs/AbstractFileStoreSpaceAttributeView.java
where it should be attribute.equals("totalSpace") instead of
attribute.equals("total") according to spec.
Thanks
Rajendra.
>
> by the way using String here is really error prone.
>
> Rémi
>
More information about the nio-dev
mailing list