Skip to content

Commit 24e4887

Browse files
authored
Remember extraneous Painless code (#126057)
This removes some leftover remnants from using StringBuilder as part of String concatenation. Since we no longer support JDK 8, this code can be safely removed.
1 parent 5c9cdee commit 24e4887

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

modules/lang-painless/src/main/java/org/elasticsearch/painless/phase/DefaultUserTreeToIRTreePhase.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.elasticsearch.painless.Location;
1616
import org.elasticsearch.painless.MethodWriter;
1717
import org.elasticsearch.painless.Operation;
18-
import org.elasticsearch.painless.WriterConstants;
1918
import org.elasticsearch.painless.api.ValueIterator;
2019
import org.elasticsearch.painless.ir.BinaryImplNode;
2120
import org.elasticsearch.painless.ir.BinaryMathNode;
@@ -913,10 +912,6 @@ public void visitAssignment(EAssignment userAssignmentNode, ScriptScope scriptSc
913912
stringConcatenationNode.attachDecoration(new IRDExpressionType(String.class));
914913
irCompoundNode = stringConcatenationNode;
915914

916-
// must handle the StringBuilder case for java version <= 8
917-
if (irLoadNode instanceof BinaryImplNode bin && WriterConstants.STRING_CONCAT_BOOTSTRAP_HANDLE == null) {
918-
bin.getLeftNode().attachDecoration(new IRDDepth(1));
919-
}
920915
// handles when the operation is mathematical
921916
} else {
922917
BinaryMathNode irBinaryMathNode = new BinaryMathNode(irStoreNode.getLocation());

0 commit comments

Comments
 (0)