Skip to content

Commit b7afc38

Browse files
DiegoKrupitzaschauder
authored andcommitted
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
1 parent 0240b64 commit b7afc38

File tree

1 file changed

+1
-2
lines changed
  • spring-data-relational/src/main/java/org/springframework/data/relational/core/sql

1 file changed

+1
-2
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public Expression getValue() {
7272
@Override
7373
public String toString() {
7474

75-
StringBuilder builder = new StringBuilder();
76-
return builder.append(this.column).append(" = ").append(this.value).toString();
75+
return this.column + " = " + this.value;
7776
}
7877
}

0 commit comments

Comments
 (0)