mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 08:18:29 +00:00
[tests] Fix CustomLog tests
This commit is contained in:
1 parent
6165941f79
commit
54ea7c1c6b
2 files changed
+5
-28
No files matched your search
@@ -2470,18 +2470,7 @@ public class EclipseHandlerUtil {
|
||||
}
|
||||
|
||||
public static NameReference createNameReference(String name, Annotation source) {
|
||||
int pS = source.sourceStart, pE = source.sourceEnd;
|
||||
long p = (long)pS << 32 | pE;
|
||||
|
||||
char[][] nameTokens = fromQualifiedName(name);
|
||||
long[] pos = new long[nameTokens.length];
|
||||
Arrays.fill(pos, p);
|
||||
|
||||
QualifiedNameReference nameReference = new QualifiedNameReference(nameTokens, pos, pS, pE);
|
||||
nameReference.statementEnd = pE;
|
||||
|
||||
setGeneratedBy(nameReference, source);
|
||||
return nameReference;
|
||||
return generateQualifiedNameRef(source, fromQualifiedName(name));
|
||||
}
|
||||
|
||||
private static long[] copy(long[] array) {
|
||||
@@ -2635,4 +2624,8 @@ public class EclipseHandlerUtil {
|
||||
setGeneratedBy(ref, source);
|
||||
return ref;
|
||||
}
|
||||
|
||||
public static TypeReference createTypeReference(String typeName, ASTNode source) {
|
||||
return generateQualifiedTypeRef(source, fromQualifiedName(typeName));
|
||||
}
|
||||
}
|
||||
@@ -22,11 +22,9 @@
|
||||
package lombok.eclipse.handlers;
|
||||
|
||||
import static lombok.core.handlers.HandlerUtil.handleFlagUsage;
|
||||
import static lombok.eclipse.Eclipse.fromQualifiedName;
|
||||
import static lombok.eclipse.handlers.EclipseHandlerUtil.*;
|
||||
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jdt.internal.compiler.ast.Annotation;
|
||||
@@ -35,7 +33,6 @@ import org.eclipse.jdt.internal.compiler.ast.Expression;
|
||||
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
|
||||
import org.eclipse.jdt.internal.compiler.ast.MessageSend;
|
||||
import org.eclipse.jdt.internal.compiler.ast.NullLiteral;
|
||||
import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
|
||||
import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
|
||||
import org.eclipse.jdt.internal.compiler.ast.StringLiteral;
|
||||
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
|
||||
@@ -156,19 +153,6 @@ public class HandleLog {
|
||||
return fieldDecl;
|
||||
}
|
||||
|
||||
public static TypeReference createTypeReference(String typeName, Annotation source) {
|
||||
int pS = source.sourceStart, pE = source.sourceEnd;
|
||||
long p = (long) pS << 32 | pE;
|
||||
|
||||
char[][] typeNameTokens = fromQualifiedName(typeName);
|
||||
long[] pos = new long[typeNameTokens.length];
|
||||
Arrays.fill(pos, p);
|
||||
|
||||
TypeReference typeReference = new QualifiedTypeReference(typeNameTokens, pos);
|
||||
setGeneratedBy(typeReference, source);
|
||||
return typeReference;
|
||||
}
|
||||
|
||||
private static final Expression[] createFactoryParameters(ClassLiteralAccess loggingType, Annotation source, List<LogFactoryParameter> parameters, Expression loggerTopic) {
|
||||
Expression[] expressions = new Expression[parameters.size()];
|
||||
int pS = source.sourceStart, pE = source.sourceEnd;
|
||||
|
||||
Reference in new issue
Block a user