mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
javac ast indices: check type is primitive using TypeKind#isPrimitive (in jdk6 any type is instance of PrimitiveType, wow) IDEA-192651 IDEA-192717
This commit is contained in:
@@ -384,7 +384,8 @@ class JavacTreeRefScanner extends TreeScanner<Tree, JavacReferenceCollectorListe
|
||||
}
|
||||
|
||||
private static TypeElement asTypeElement(TypeMirror typeMirror, Types typeUtility) {
|
||||
if (typeMirror instanceof PrimitiveType) {
|
||||
// in jdk6 the line above isn't equivalent to <code>typeMirror instanceof PrimitiveType</code>
|
||||
if (typeMirror.getKind().isPrimitive()) {
|
||||
return typeUtility.boxedClass((PrimitiveType)typeMirror);
|
||||
}
|
||||
Element element = typeUtility.asElement(typeMirror);
|
||||
|
||||
Reference in New Issue
Block a user