-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dynamic Simulation - Curve Configuration - Add some expert filter's criteria for Load and Generator and new operators IN, NOT_IN #78
Conversation
…riteria for Load and Generator
…ome_filter_expert_criteria
Kudos, SonarCloud Quality Gate passed! |
if (isMultipleCriteriaOperator(this.getOperator())) { // multiple values | ||
return this.getValues().stream().map(String::valueOf).collect(Collectors.joining(",")); | ||
} else { // single value or absence |
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.
Maybe return an empty string, null
or String.valueOf(Collections.<String>emptySet())
if this.values
is null ?
This is to prevent a NPE.
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.
Should manage at DTO level by a validator to do a cross validation between two fields. This will be corrected in another PR
if (isMultipleCriteriaOperator(this.getOperator())) { // multiple values | ||
return String.join(",", this.getValues()); | ||
} else { // single value or absence |
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.
Same here, throws a NPE if this.getValues() is null.
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.
Idem! Should manage at DTO level by a validator to do a cross validation between two fields. This will be corrected in another PR
case IN -> this.getValues().contains(identifiableValue); | ||
case NOT_IN -> !this.getValues().contains(identifiableValue); |
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.
Potential NPE
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.
Idem! Should manage at DTO level by a validator to do a cross validation between two fields. This will be corrected in another PR
case IN -> this.getValues().contains(identifiableValue); | ||
case NOT_IN -> !this.getValues().contains(identifiableValue); |
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.
Potential NPE
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.
Idem! Should manage at DTO level by a validator to do a cross validation between two fields. This will be corrected in another PR
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.
Tests OK, code OK and remarks will be adressed in another PR.
…er (#1658) This PR hasn't any functional evolution on curve configuration. The GUI is unchanged Related PRs: Back-end : gridsuite/study-server#476 gridsuite/network-map-server#147 gridsuite/filter-server#78
…lter and to get all countries of network (#476) Related PRs: Front-end : gridsuite/gridstudy-app#1658 (with demo) Back-end : gridsuite/network-map-server#147 gridsuite/filter-server#78
…ies of a network (#147) Related PRs: Front-end : gridsuite/gridstudy-app#1658 (with demo) Back-end : gridsuite/study-server#476 gridsuite/filter-server#78
…er (#1658) This PR hasn't any functional evolution on curve configuration. The GUI is unchanged Related PRs: Back-end : gridsuite/study-server#476 gridsuite/network-map-server#147 gridsuite/filter-server#78
Related PRs:
Front-end :
gridsuite/gridstudy-app#1658 (with demo)
Back-end :
gridsuite/study-server#476
gridsuite/network-map-server#147