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

Commit 3090bb7

Browse files
Fixes a bug that defaults the relationship interaction style to Synchronous, when it's specifically set to null.
1 parent 7290394 commit 3090bb7

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ subprojects { proj ->
1414

1515
description = 'Structurizr'
1616
group = 'com.structurizr'
17-
version = '1.4.0'
17+
version = '1.4.1'
1818

1919
repositories {
2020
mavenCentral()

docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.4.1 (14th June 2020)
4+
5+
Fixes a bug that defaults the relationship interaction style to Synchronous, when it's specifically set to null.
6+
37
## 1.4.0 (5th June 2020)
48

59
- Added a "Component" element shape.

structurizr-core/src/com/structurizr/model/Relationship.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public final class Relationship extends ModelItem {
1818
private String destinationId;
1919
private String description;
2020
private String technology;
21-
private InteractionStyle interactionStyle = InteractionStyle.Synchronous;
21+
private InteractionStyle interactionStyle;
2222
private String url;
2323

2424
private String linkedRelationshipId;
@@ -37,7 +37,7 @@ public final class Relationship extends ModelItem {
3737

3838
if (interactionStyle == InteractionStyle.Synchronous) {
3939
addTags(Tags.SYNCHRONOUS);
40-
} else {
40+
} else if (interactionStyle == InteractionStyle.Asynchronous) {
4141
addTags(Tags.ASYNCHRONOUS);
4242
}
4343
}

structurizr-core/test/unit/com/structurizr/model/RelationshipTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,13 @@ public void test_setUrl_DoesNothing_WhenAnEmptyUrlIsSpecified() {
105105
assertNull(relationship.getUrl());
106106
}
107107

108+
@Test
109+
public void test_interactionStyle_CanBeSetToNull() {
110+
Relationship relationship = softwareSystem1.uses(softwareSystem2, "Uses 1", "Technology", null);
111+
112+
assertNull(relationship.getInteractionStyle());
113+
assertFalse(relationship.getTagsAsSet().contains(Tags.ASYNCHRONOUS));
114+
assertFalse(relationship.getTagsAsSet().contains(Tags.SYNCHRONOUS));
115+
}
116+
108117
}

0 commit comments

Comments
 (0)