Skip to content

Why Double for file size? #6

@ntalbs

Description

@ntalbs

The size of File is represented by int:

But in LessThanOperator and GreaterThanOperator convert the values to Double.

return Double.compare(attributeValue.doubleValue(), expectedValue.doubleValue()) > 0;

return Double.compare(attributeValue.doubleValue(), expectedValue.doubleValue()) < 0;

Why not just use Number.intValue() and Integer.compare()? Ideally, those should be long in my opinion, as the file size is represented as long in java.io.File class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions