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
This commit is contained in:
committed by
Jens Schauder
parent
9a42776381
commit
7868dff4b8
@@ -68,7 +68,6 @@ public class AssignValue extends AbstractSegment implements Assignment {
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
return builder.append(this.column).append(" = ").append(this.value).toString();
|
||||
return this.column + " = " + this.value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user