nwdiag peer network with multiple groups bug?

0 votes
asked Oct 8, 2021 in Bug by Sean

Defining two groups with a peer network like below results in a java.lang.illegalStateException. Removing either group will successfully render the diagram, but obviously with only a single group defined.

@startuml
nwdiag {
  group group01 {
    a01;
  }
  group group02 {
    a02;
  }
  network net01 {
    a01;
  }
  a01 -- a02;
  network net02 {
    a02;
  }
}
@enduml

Results in the following output:

Removing group02 like so successfully renders:

@startuml
nwdiag {
  group group01 {
    a01;
  }
  network net01 {
    a01;
  }
  a01 -- a02;
  network net02 {
    a02;
  }
}
@enduml

1 Answer

0 votes
answered Oct 10, 2021 by plantuml (277,100 points)

Thanks for the report: it has just been fixed in last beta http://beta.plantuml.net/plantuml.jar and on the online server.

commented Oct 11, 2021 by Sean
Awesome, thanks for the quick fix!
commented Oct 11, 2021 by The-Lu (46,400 points)

Hello PlantUML team,

Could you have a look to this example, when we declared group at the end, as:

@startuml
nwdiag {
  network net01 {
    a01;
  }
  a01 -- a02;
  network net02 {
    a02;
  }
  group group01 {
    a01;
  }
  group group02 {
    a02;
  }
}
@enduml

Regards,
Th.

commented Oct 12, 2021 by Sean

In addition to The-Lu's report, here is another exception that occurs in the beta by adding an additional element 'b01' to the previously diagram.

@startuml
title fixed
nwdiag {
  group group01 {
    a01;
    b01;
  }
  group group02 {
    a02;
  }
  network net01 {
    a01;
    b01;
  }
  a01 -- a02;
  network net02 {
    a02;
  }
}
@enduml

Results in:

...