Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integer settings validation improvements #83

Open
ndushay opened this issue May 24, 2017 · 0 comments
Open

integer settings validation improvements #83

ndushay opened this issue May 24, 2017 · 0 comments

Comments

@ndushay
Copy link
Contributor

ndushay commented May 24, 2017

All of the below should give invalid message/error if:

  • they are not positive integers

Also, if there is no value, they should be set to ... -1?

This will avoid code like the following in calling methods:

   Integer myInteger = IntegerValidator.getInstance().validate(settings.jobId());
   int jobId = myInteger.intValue();

which instead should be as "easy" as:

int jobId = Integer.parseInt(settings.jobId());

... or settings should return int values directly ...

affected settings:

  • collectionId
  • jobId
  • accountId
  • jobIdLowerBound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant