Skip to content

Some types are not found when invoking JavacInfo.getTypeMirror for type identifiers #38

@OscarRodriguezPrieto

Description

@OscarRodriguezPrieto

For some projects and some specific classes (some second classes in comp units), JavacInfo.getTypeMirror invocations throw
Caused by: java.lang.NullPointerException: Cannot invoke "com.sun.source.util.TreePath.getLeaf()" because "path" is null
when trying to add the type of (an array, isntanceof, cast...) to the dependency graph by invoking addClassIdentifier(JavacInfo.getTypeMirror(x.getType())

The solution is applying instanceof and cast to directly retrieve the type of the type identifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions