powsybl-diagram
powsybl-diagram copied to clipboard
Null network in diagram style provider
-
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
orNominalVoltageDiagramStyleProvider
- Do not disable highlightLineState in
LayoutParameters
- Enable addNodesInfos:
LayoutParameters.setAddNodesInfos(true)
- Provide a null network in
-
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.