Skip to content

Commit

Permalink
avoid using for each loops
Browse files Browse the repository at this point in the history
  • Loading branch information
arturobernalg committed Sep 29, 2024
1 parent c679083 commit e48a227
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ public String toString() {
if (this.params != null) {
buf.append("; ");
boolean first = true;
for (final NameValuePair param : params) {
for (int i = 0; i < params.length; i++) {
final NameValuePair param = params[i];
if (!first) {
buf.append("; ");
}
Expand All @@ -344,6 +345,7 @@ public String toString() {
BasicHeaderValueFormatter.INSTANCE.formatNameValuePair(buf, param, false);
first = false;
}

} else if (this.charset != null && !implicitCharset) {
// Append charset only if it's not one of the types that shouldn't have charset
buf.append("; charset=");
Expand Down

0 comments on commit e48a227

Please sign in to comment.