Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

Commit a734e98

Browse files
Ensures restricted mode setting is propagated to spawned parsers.
1 parent b6fd8cd commit a734e98

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

structurizr-dsl/src/main/java/com/structurizr/dsl/DslParserContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
final class DslParserContext extends DslContext {
66

7-
private boolean restricted;
8-
private File file;
7+
private final boolean restricted;
8+
private final File file;
99

1010
DslParserContext(File file, boolean restricted) {
1111
this.file = file;

structurizr-dsl/src/main/java/com/structurizr/dsl/WorkspaceParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Workspace parse(DslParserContext context, Tokens tokens) {
4646
} else {
4747
String dsl = content.getContent();
4848
StructurizrDslParser structurizrDslParser = new StructurizrDslParser();
49+
structurizrDslParser.setRestricted(context.isRestricted());
4950
structurizrDslParser.parse(context, dsl);
5051
workspace = structurizrDslParser.getWorkspace();
5152
}

0 commit comments

Comments
 (0)