-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
@ajlopez Could you, please, merge latest develop into your branch and push it. We had an issues with tests, now tests are fixed. |
d1d7d22
to
30786ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Just small fix and I will merge it.
} | ||
|
||
private static Boolean interpret(String arg) { | ||
if ("on".equals(arg) || "true".equals(arg) || "yes".equals(arg)) return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you replace both lines in favor of BooleanUtils.toBooleanObject(String) with throwing error when null returned. I guess it would be safer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add something like
if (resetFlag == null) {
throw new Error(String.format("Can't interpret DB reset arguments: %s %s", arg, reset));
}
You've lost this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, good catch... done
30786ea
to
3785290
Compare
Some refactors, suggested by a linter (Sonar):
I think it could be improved. For example, to have a class that processes an array of arguments, and returns a map of key values... and separate the apply of those key values to SystemProperties. In this way, we could have tests with expected behavior and better code coverage