Closed annetill closed 4 months ago
Failed conditions 3.5% Duplication on New Code (required ≤ 3%)
To avoid the duplication we could easily introduce an AbstractTapChangerAdderImpl class.
Issues
2 New issues
0 Accepted issues
Measures
0 Security Hotspots
91.7% Coverage on New Code
0.0% Duplication on New Code
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Quality / Feature
What is the current behavior?
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
The
ValidationUtil
utility class was reworked to ensure that the validation is well performed using a validation level. The impacts are the following:Except the
validate(…)
method, all the methods havingboolean throwException
as a parameter are no more accessible. Instead, you should use the method taking the parametersValidationLevel validation, ReportNode reportNode
. The validation level (which generally corresponds to the network's minimal validation level) will determine if, in case of error, it should be reported inreportNode
or if an exception should be thrown. Furthermore, methods having only theValidationLevel validationLevel
parameter now takeReportNode reportNode
as an additional parameter.For instance, you could not use the following methods anymore:
checkActivePowerSetpoint(Validable validable, double activePowerSetpoint, boolean throwException)
checkActivePowerSetpoint(Validable validable, double activePowerSetpoint, ValidationLevel validationLevel)
Instead, you should use:
checkActivePowerSetpoint(Validable validable, double activePowerSetpoint, ValidationLevel validationLevel, ReportNode reportNode)
In addition, the following methods were removed or are no more accessible:
throwExceptionOrLogError(…)
checkConnected(…)
checkTemporaryLimits(…)
Other information: