Skip to content

Commit

Permalink
Code Style: StringBuilder has fluent API
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarg committed Dec 22, 2024
1 parent 4766cb2 commit 8314822
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/Variant.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,14 @@ public boolean equals(final Object obj) {

@Override
public String toString() {
StringBuilder sb = new StringBuilder("Variant[mediaType=");
sb.append(mediaType);
sb.append(", language=");
sb.append(language);
sb.append(", encoding=");
sb.append(encoding);
sb.append(']');
return sb.toString();
return new StringBuilder("Variant[mediaType=")
.append(mediaType)
.append(", language=")
.append(language)
.append(", encoding=")
.append(encoding)
.append(']')
.toString();
}

/**
Expand Down

0 comments on commit 8314822

Please sign in to comment.