Skip to content

Commit

Permalink
Add attributionText to snippets
Browse files Browse the repository at this point in the history
Closes #62

Signed-off-by: Gary O'Neall <[email protected]>
  • Loading branch information
goneall committed Aug 14, 2024
1 parent d30ad65 commit 8ee1e84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/spdx/tag/CommonCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,14 @@ private static void printSnippet(SpdxSnippet spdxSnippet, PrintWriter out,
println(out, constants.getProperty("PROP_SNIPPET_NAME") +
name.get());
}
// snippet attribution text
if (!spdxSnippet.getAttributionText().isEmpty()) {
spdxSnippet.getAttributionText().forEach(s -> {
println(out, constants.getProperty("PROP_SNIPPET_ATTRIBUTION_TEXT")
+ constants.getProperty("PROP_BEGIN_TEXT")
+ s + constants.getProperty("PROP_END_TEXT"));
});
}
println(out, "");
}

Expand Down

0 comments on commit 8ee1e84

Please sign in to comment.