< prev index next >

src/jdk.jextract/share/classes/com/sun/tools/jextract/TypeDictionary.java

Print this page

        

@@ -64,10 +64,13 @@
 
     private String recordOwnerClass(Type t) {
         try {
             //try resolve globally
             Path p = t.getDeclarationCursor().getSourceLocation().getFileLocation().path();
+            if (p == null) {
+                p = Context.getBuiltinHeaderFile();
+            }
             HeaderFile hf = resolver.headerFor(p);
             return Utils.toInternalName(hf.pkgName, hf.headerClsName);
         } catch (Throwable ex) {
             //fallback: resolve locally. This can happen for two reasons: (i) the symbol to be resolved is a builtin
             //symbol (e.g. no header file has its definition), or (ii) when the declaration cursor points to an header file
< prev index next >