Skip to content

Why Double for file size? #6

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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