mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8222369: ExecutableElement.getReceiverType returns null instead of NOTYPE
Reviewed-by: jjg
This commit is contained in:
parent
31249c3c09
commit
51cf24fcc0
3 changed files with 127 additions and 2 deletions
|
@ -409,7 +409,7 @@ public class ElementStructureTest {
|
|||
for (VariableElement param : e.getParameters()) {
|
||||
visit(param, p);
|
||||
}
|
||||
out.write(String.valueOf(e.getReceiverType()));
|
||||
out.write(String.valueOf(typeMirrorTranslate(e.getReceiverType())));
|
||||
write(e.getReturnType());
|
||||
out.write(e.getSimpleName().toString());
|
||||
writeTypes(e.getThrownTypes());
|
||||
|
@ -425,6 +425,18 @@ public class ElementStructureTest {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Original implementation of getReceiverType returned null
|
||||
* for many cases where TypeKind.NONE was specified; translate
|
||||
* back to null to compare against old hashes.
|
||||
*/
|
||||
private TypeMirror typeMirrorTranslate(TypeMirror type) {
|
||||
if (type.getKind() == javax.lang.model.type.TypeKind.NONE)
|
||||
return null;
|
||||
else
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitPackage(PackageElement e, Void p) {
|
||||
List<Element> types = new ArrayList<>(e.getEnclosedElements());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue