Skip to content

Commit

Permalink
Display targetConstellation in constellationRelation's toString() if …
Browse files Browse the repository at this point in the history
…no content
  • Loading branch information
glassjoseph committed Dec 13, 2021
1 parent c1fa1ea commit a7f2503
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/datamodel-1.2.1.jar
asset_name: datamodel-1.2.1.jar
asset_path: ./target/datamodel-1.2.2.jar
asset_name: datamodel-1.2.2.jar
asset_content_type: application/java-archive
- name: Publish package
run: mvn --batch-mode deploy
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.snaccooperative</groupId>
<artifactId>datamodel</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,12 @@ public String getNote()
* @return string A human-readable summary string of this object
*/
public String toString() {
return "Relation: " + (this.type != null ? this.type.getTerm() + " " : "") + this.content;
if (this.content != null) {
return "Relation: " + (this.type != null ? this.type.getTerm() + " " : "") + this.content;
}
else {
return "Relation: " + (this.type != null ? this.type.getTerm() + " " : "") + this.targetConstellation;
}
}

/**
Expand Down

0 comments on commit a7f2503

Please sign in to comment.