Skip to content

Commit

Permalink
document that attributes need to be sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Aug 31, 2023
1 parent 98c0775 commit eab524e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ private static void writeScopeNameAndVersion(
private static void writeAttributePairs(
Writer writer, boolean initialComma, Attributes attributes) throws IOException {
try {
// This logic handles colliding attribute keys by joining the values,
// separated by a semicolon. It relies on the attributes being sorted, so that
// colliding attribute keys are in subsequent iterations of the for loop.
attributes.forEach(
new BiConsumer<AttributeKey<?>, Object>() {
boolean initialAttribute = true;
Expand Down

0 comments on commit eab524e

Please sign in to comment.