Skip to content

Commit 521be03

Browse files
Rawi01rspilker
authored andcommitted
Remove unused string literal code
This code was never used because StringLiteralConcatenation and ExtendedStringLiteral extend StringLiterals and get handled a few lines above. We might need to add it back and fix it if we want to copy annotations like @annotation("a" + "b") without transforming them to @annotation("ab")
1 parent 3b20b70 commit 521be03

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java

+2-17
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
package lombok.eclipse.handlers;
2323

2424
import static lombok.core.handlers.HandlerUtil.*;
25-
import static lombok.eclipse.Eclipse.*;
2625
import static lombok.eclipse.EcjAugments.*;
26+
import static lombok.eclipse.Eclipse.*;
2727
import static lombok.eclipse.handlers.EclipseHandlerUtil.EclipseReflectiveMembers.*;
2828

2929
import java.lang.reflect.Array;
@@ -60,7 +60,6 @@
6060
import org.eclipse.jdt.internal.compiler.ast.DoubleLiteral;
6161
import org.eclipse.jdt.internal.compiler.ast.EqualExpression;
6262
import org.eclipse.jdt.internal.compiler.ast.Expression;
63-
import org.eclipse.jdt.internal.compiler.ast.ExtendedStringLiteral;
6463
import org.eclipse.jdt.internal.compiler.ast.FalseLiteral;
6564
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
6665
import org.eclipse.jdt.internal.compiler.ast.FieldReference;
@@ -86,7 +85,6 @@
8685
import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
8786
import org.eclipse.jdt.internal.compiler.ast.Statement;
8887
import org.eclipse.jdt.internal.compiler.ast.StringLiteral;
89-
import org.eclipse.jdt.internal.compiler.ast.StringLiteralConcatenation;
9088
import org.eclipse.jdt.internal.compiler.ast.ThisReference;
9189
import org.eclipse.jdt.internal.compiler.ast.ThrowStatement;
9290
import org.eclipse.jdt.internal.compiler.ast.TrueLiteral;
@@ -123,6 +121,7 @@
123121
import lombok.core.debug.ProblemReporter;
124122
import lombok.core.handlers.HandlerUtil;
125123
import lombok.core.handlers.HandlerUtil.FieldAccess;
124+
import lombok.core.handlers.HandlerUtil.JavadocTag;
126125
import lombok.eclipse.EcjAugments;
127126
import lombok.eclipse.Eclipse;
128127
import lombok.eclipse.EclipseAST;
@@ -416,20 +415,6 @@ private static Expression copyAnnotationMemberValue0(Expression in) {
416415
if (in instanceof LongLiteral) return LongLiteral.buildLongLiteral(((Literal) in).source(), s, e);
417416

418417
if (in instanceof StringLiteral) return new StringLiteral(((Literal) in).source(), s, e, reflectInt(STRING_LITERAL__LINE_NUMBER, in) + 1);
419-
if (in instanceof ExtendedStringLiteral) {
420-
StringLiteral str = new StringLiteral(((Literal) in).source(), s, e, reflectInt(STRING_LITERAL__LINE_NUMBER, in) + 1);
421-
StringLiteral empty = new StringLiteral(new char[0], s, e, reflectInt(STRING_LITERAL__LINE_NUMBER, in) + 1);
422-
return new ExtendedStringLiteral(str, empty);
423-
}
424-
if (in instanceof StringLiteralConcatenation) {
425-
Expression[] literals = ((StringLiteralConcatenation) in).literals;
426-
// 0 and 1 len shouldn't happen.
427-
if (literals.length == 0) return new StringLiteral(new char[0], s, e, 0);
428-
if (literals.length == 1) return copyAnnotationMemberValue0(literals[0]);
429-
StringLiteralConcatenation c = new StringLiteralConcatenation((StringLiteral) literals[0], (StringLiteral) literals[1]);
430-
for (int i = 2; i < literals.length; i++) c = c.extendsWith((StringLiteral) literals[i]);
431-
return c;
432-
}
433418

434419
// enums and field accesses (as long as those are references to compile time constant literals that's also acceptable)
435420

0 commit comments

Comments
 (0)