powsybl-diagram icon indicating copy to clipboard operation
powsybl-diagram copied to clipboard

Null network in diagram style provider

Open flo-dup opened this issue 4 years ago • 0 comments

  • Do you want to request a feature or report a bug? Bug

  • What is the current behavior? Network can be null in AbstractBaseVoltageDiagramStyleProvider, leading to NullPointerExceptions.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

    • Provide a null network in TopologicalStyleProvider or NominalVoltageDiagramStyleProvider
    • Do not disable highlightLineState in LayoutParameters
    • Enable addNodesInfos: LayoutParameters.setAddNodesInfos(true)
  • What is the expected behavior? No NPE. Or exception when creating DiagramStyleProvider, but I think some users which don't handle a network still need a NominalVoltageDiagramStyleProvider (see this spectrum question).

  • What is the motivation / use case for changing the behavior? Avoid NPE.

flo-dup avatar Oct 20 '20 11:10 flo-dup