Skip to content

Commit 9b572bb

Browse files
committed
Reload a typeElement with its canonical name to avoid the eclipse bug.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=544288
1 parent 276bf59 commit 9b572bb

File tree

1 file changed

+6
-1
lines changed
  • doma-processor/src/main/java/org/seasar/doma/internal/apt

1 file changed

+6
-1
lines changed

doma-processor/src/main/java/org/seasar/doma/internal/apt/MoreTypes.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ public TypeElement toTypeElement(TypeMirror typeMirror) {
160160
if (element == null) {
161161
return null;
162162
}
163-
return ctx.getMoreElements().toTypeElement(element);
163+
TypeElement typeElement = ctx.getMoreElements().toTypeElement(element);
164+
if (typeElement == null) {
165+
return null;
166+
}
167+
// workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=544288
168+
return ctx.getMoreElements().getTypeElement(typeElement.getQualifiedName());
164169
}
165170

166171
public DeclaredType toDeclaredType(TypeMirror typeMirror) {

0 commit comments

Comments
 (0)