Skip to content

Commit

Permalink
PDFBOX-5660: use StringJoiner
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1921714 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Oct 31, 2024
1 parent 9926bad commit 25e3359
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.StringJoiner;

/**
*
Expand Down Expand Up @@ -122,17 +123,12 @@ public int size()
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
StringJoiner sj = new StringJoiner("; ", "{", "}");
for (int i = 0; i < this.getObjects().size(); i++)
{
if (i > 0)
{
sb.append("; ");
}
sb.append("object=").append(this.getObjects().get(i))
.append(", revisionNumber=").append(this.getRevisionNumber(i));
sj.add("object=" + this.getObjects().get(i) + ", revisionNumber=" + this.getRevisionNumber(i));
}
return sb.toString();
return sj.toString();
}

}

0 comments on commit 25e3359

Please sign in to comment.