Skip to content

Multi-ranges with mismatching limits should be illegal #47

Description

@finkn

There is no way to make sense of a multi-range definition that has differing numbers of min and max limits. InPUT4j should check for this and throw an explicit exception (or take some other appropriate and decisive action).

Right now, missing min limits immediately cause an ArrayIndexOutOfBoundsException. While the error message isn't helpful, at least InPUT4j refuses to use the configuration and fails early. However, missing max limits fail late and completely at random. It is possible to use the configuration, but an (unhelpful) ArrayIndexOutOfBoundsException may or may not be thrown based on chance.

See https://github.com/finkn/InPUTspec/blob/master/main/src/net/finkn/inputspec/v050/MultiRangeMismatchTest.java for details.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions