avisi-cloud / structurizr-site-generatr

Static site generator for architecture models created with Structurizr DSL
https://avisi-cloud.github.io/structurizr-site-generatr/
Apache License 2.0
230 stars 36 forks source link

Bug: NPE in relationship table generation if a relation's technology is null #630

Closed zhelyan closed 1 month ago

zhelyan commented 1 month ago

The site generation fails here with java.lang.NullPointerException: getTechnology(...) must not be null if a relationship doesn't have a technology.

jenspav commented 1 month ago

Thanks for the report. Are you able to create a PR that addresses this issue?

jenspav commented 1 month ago

Actually, I tried to reproduce this, but I couldn't. Viewing our example, https://avisi-cloud.github.io/structurizr-site-generatr/main/internet-banking-system/dependencies/ , there are already relationships without technology (https://github.com/avisi-cloud/structurizr-site-generatr/blob/main/docs/example/workspace.dsl#L68). Do you a simple model or a modification to our example that triggers the NPE?

zhelyan commented 1 month ago

yeah, admittedly this is an edge case - I am using structurizr for Java which does allow technology to be null, whilst the dsl sets it explicitly to an empty string.

This is not an issue for the current use case ( parse a dsl workspace ) but would have been if the tool was published as a library ( i.e a SDK you interact with )

jenspav commented 1 month ago

Thanks for the clarification. I would consider this out of scope for our tool here. Feel free to reopen if you think otherwise.