Skip to content

Commit a7f2503

Browse files
committed
Display targetConstellation in constellationRelation's toString() if no content
1 parent c1fa1ea commit a7f2503

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ jobs:
4141
GITHUB_TOKEN: ${{ github.token }}
4242
with:
4343
upload_url: ${{ steps.create_release.outputs.upload_url }}
44-
asset_path: ./target/datamodel-1.2.1.jar
45-
asset_name: datamodel-1.2.1.jar
44+
asset_path: ./target/datamodel-1.2.2.jar
45+
asset_name: datamodel-1.2.2.jar
4646
asset_content_type: application/java-archive
4747
- name: Publish package
4848
run: mvn --batch-mode deploy

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>org.snaccooperative</groupId>
66
<artifactId>datamodel</artifactId>
7-
<version>1.2.1</version>
7+
<version>1.2.2</version>
88
<build>
99
<plugins>
1010
<plugin>

src/main/java/org/snaccooperative/data/ConstellationRelation.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,12 @@ public String getNote()
307307
* @return string A human-readable summary string of this object
308308
*/
309309
public String toString() {
310-
return "Relation: " + (this.type != null ? this.type.getTerm() + " " : "") + this.content;
310+
if (this.content != null) {
311+
return "Relation: " + (this.type != null ? this.type.getTerm() + " " : "") + this.content;
312+
}
313+
else {
314+
return "Relation: " + (this.type != null ? this.type.getTerm() + " " : "") + this.targetConstellation;
315+
}
311316
}
312317

313318
/**

0 commit comments

Comments
 (0)