Skip to content

Commit

Permalink
Optimize thread safe code and replace the synchronized class "StringB…
Browse files Browse the repository at this point in the history
…uffer" by an unsynchronized one "StringBuilder". (#2704)
  • Loading branch information
igor-suhorukov authored and ryanjbaxter committed Feb 5, 2018
1 parent 07411bb commit 076df77
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public int hashCode() {

@Override
public String toString() {
final StringBuffer sb = new StringBuffer("EurekaDashboardProperties{");
final StringBuilder sb = new StringBuilder("EurekaDashboardProperties{");
sb.append("path='").append(path).append('\'');
sb.append(", enabled=").append(enabled);
sb.append('}');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public String getScheme() {

@Override
public String toString() {
final StringBuffer sb = new StringBuffer("RibbonServer{");
final StringBuilder sb = new StringBuilder("RibbonServer{");
sb.append("serviceId='").append(serviceId).append('\'');
sb.append(", server=").append(server);
sb.append(", secure=").append(secure);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public int hashCode() {

@Override
public String toString() {
final StringBuffer sb = new StringBuffer("RibbonCommandContext{");
final StringBuilder sb = new StringBuilder("RibbonCommandContext{");
sb.append("serviceId='").append(serviceId).append('\'');
sb.append(", method='").append(method).append('\'');
sb.append(", uri='").append(uri).append('\'');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public int hashCode() {

@Override
public String toString() {
final StringBuffer sb = new StringBuffer("Host{");
final StringBuilder sb = new StringBuilder("Host{");
sb.append("maxTotalConnections=").append(maxTotalConnections);
sb.append(", maxPerRouteConnections=").append(maxPerRouteConnections);
sb.append(", socketTimeoutMillis=").append(socketTimeoutMillis);
Expand Down Expand Up @@ -576,7 +576,7 @@ public int hashCode() {

@Override
public String toString() {
final StringBuffer sb = new StringBuffer("HystrixSemaphore{");
final StringBuilder sb = new StringBuilder("HystrixSemaphore{");
sb.append("maxSemaphores=").append(maxSemaphores);
sb.append('}');
return sb.toString();
Expand Down

0 comments on commit 076df77

Please sign in to comment.