Browse Source

`StringBuilder` can be replaced with String concatenation.

In this case the usage of `StringBuilder` has no additional benefit, since it is not inside a loop where the JVM may have problems detecting String concatenation that can be optimized. The usage of "simple" String concatenation makes the code more readable and the code will be automatically optimised by the compiler.

Original pull request #1173
pull/1187/head
Diego Krupitza 4 years ago committed by Jens Schauder
parent
commit
b7afc380e1
No known key found for this signature in database
GPG Key ID: 45CC872F17423DBF
  1. 3
      spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AssignValue.java

3
spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AssignValue.java

@ -72,7 +72,6 @@ public class AssignValue extends AbstractSegment implements Assignment {
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); return this.column + " = " + this.value;
return builder.append(this.column).append(" = ").append(this.value).toString();
} }
} }

Loading…
Cancel
Save