Skip to content

Migration guide v6.4.0

Olivier Perrin edited this page May 14, 2024 · 30 revisions

Breaking Change Breaking changes for all users

Ref interface

Starting from this release the Ref interface and its implementations RefObj and RefChain are now in powsybl-commons artifact, in com.powsybl.commons.ref package.

The Ref interface was an internal utility class of powsybl-iidm-impl but its visibility was nonetheless public. If you were using this interface or one of its implementation, you need to replace the import clauses (e.g. the import com.powsybl.iidm.network.impl.util.RefObj; with com.powsybl.commons.ref.RefObj;), and include powsybl-commons artifact in your pom.xml file.

Code cleanup

In this release, an effort was made to reduce the project's technical debt. This work introduced some breaking changes.

Jackson

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").

Removal of deprecated methods, and its impact

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 as getVertexCapacity().)

⚠️ 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 in load-flow and dynamic-simulation sections.

Behavior changes

The list returned by CandidateComputations.getComputationsNames() is now immutable.

Test methods renamed

Following methods were renamed in ComparisonUtils:

  • compareBytes to assertBytesEquals;
  • compareTxt to assertTxtEquals;
  • compareXml to assertXmlEquals.

This allows Sonar to detect these methods as assertions in the unit tests.


Custom IIDM Impl Breaking changes for custom IIDM implementations maintainers

TODO

Clone this wiki locally