-
Notifications
You must be signed in to change notification settings - Fork 44
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
Code cleanup to correct issues reported by Sonar (Consistency) #2967
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
…lization https://rules.sonarsource.com/java/RSPEC-4544/ Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
…org.apache.commons.io.IOUtils Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
…lier Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
7 tasks
7 tasks
This is the first PR, others are coming |
EtienneLt
reviewed
Apr 12, 2024
commons/src/main/java/com/powsybl/commons/parameters/Parameter.java
Outdated
Show resolved
Hide resolved
7 tasks
Signed-off-by: Nicolas Rol <[email protected]>
olperr1
requested changes
Apr 23, 2024
...es-conversion/src/test/java/com/powsybl/cgmes/conversion/test/TransformerConversionTest.java
Outdated
Show resolved
Hide resolved
...es-conversion/src/test/java/com/powsybl/cgmes/conversion/test/TransformerConversionTest.java
Outdated
Show resolved
Hide resolved
...es-conversion/src/test/java/com/powsybl/cgmes/conversion/test/TransformerConversionTest.java
Outdated
Show resolved
Hide resolved
commons/src/main/java/com/powsybl/commons/config/ComponentDefaultConfig.java
Outdated
Show resolved
Hide resolved
commons/src/main/java/com/powsybl/commons/config/ComponentDefaultConfig.java
Outdated
Show resolved
Hide resolved
loadflow/loadflow-validation/src/main/java/com/powsybl/loadflow/validation/ValidationUtils.java
Outdated
Show resolved
Hide resolved
...tion/src/main/java/com/powsybl/loadflow/validation/io/AbstractValidationFormatterWriter.java
Outdated
Show resolved
Hide resolved
time-series/time-series-api/src/main/java/com/powsybl/timeseries/TimeSeriesMetadata.java
Show resolved
Hide resolved
psse/psse-converter/src/main/java/com/powsybl/psse/converter/PsseExporter.java
Outdated
Show resolved
Hide resolved
...loadflow-validation/src/main/java/com/powsybl/loadflow/validation/CandidateComputations.java
Show resolved
Hide resolved
Signed-off-by: Nicolas Rol <[email protected]>
# Conflicts: # cgmes/cgmes-conversion/src/test/java/com/powsybl/cgmes/conversion/test/TransformerConversionTest.java
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
olperr1
requested changes
Apr 24, 2024
commons/src/main/java/com/powsybl/commons/exceptions/UncheckedInvocationTargetException.java
Outdated
Show resolved
Hide resolved
commons/src/main/java/com/powsybl/commons/exceptions/UncheckedNoSuchMethodException.java
Outdated
Show resolved
Hide resolved
commons/src/test/java/com/powsybl/commons/config/ComponentDefaultConfigTest.java
Outdated
Show resolved
Hide resolved
commons/src/test/java/com/powsybl/commons/util/StringToIntMapperTest.java
Outdated
Show resolved
Hide resolved
commons/src/test/java/com/powsybl/commons/util/StringToIntMapperTest.java
Outdated
Show resolved
Hide resolved
commons/src/test/java/com/powsybl/commons/util/StringToIntMapperTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
|
olperr1
approved these changes
Apr 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?
Bug fixes mainly for issues identified as Consistency + Security Hotspot + Reliability
What is the current behavior?
Many issues are raised by Sonar.
What is the new behavior (if this is a feature change)?
Many issues are now gone.
Some methods deprecated since versions strictly older than 5.0 have been deleted (only those I stumbled upon during this PR)
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)
To avoid unsafe Jackson deserialization (see https://rules.sonarsource.com/java/RSPEC-4544/ ), classes implementing the interface
BusRef
now have to add the Jackson annotation@JsonTypeName(".<ClassName>")
(with<ClassName>
replaced by the class name. Note the presence of the.
before the class name.).For instance
IdBasedBusRef
is annotated with@JsonTypeName(".IdBasedBusRef")
.Following deprecated methods have been deleted:
PlatformConfig.setDefaultConfig
PlatformConfig.moduleExists
PlatformConfig.getModuleConfig
PlatformConfigNamedProvider.findBackwardsCompatible
PlatformConfigNamedProvider.findDefaultBackwardsCompatible
StandbyAutomaton.getHighVoltageSetPoint
StandbyAutomaton.setHighVoltageSetPoint
StandbyAutomaton.getLowVoltageSetPoint
StandbyAutomaton.setLowVoltageSetPoint
StandbyAutomatonAdder.withHighVoltageSetPoint
StandbyAutomatonAdder.withLowVoltageSetPoint
UndirectedGraph.getMaxVertex
(If you override this method, rename it asgetVertexCapacity()
.)Because of the
PlatformConfigNamedProvider. ...BackwardsCompatible
methods' deprecation,"default"
keyword will not be supported anymore in configuration files. Thus check that you use"default-impl-name"
instead of"default"
in your configuration, especially inload-flow
anddynamic-simulation
sections.The list returned by
CandidateComputations.getComputationsNames()
is now immutable.Other information: