When an erroneous element is passed to Elements.getFileObjectOf, there's a NPE:
```
Caused by: java.lang.NullPointerException: Cannot read field "classfile" because the return value of "com.sun.tools.javac.code.Symbol.enclClass()" is null
at jdk.compiler/com.sun.tools.javac.model.JavacElements.getFileObjectOf(JavacElements.java:803)
at TestFileObjectOf$PrintFiles.handleDeclaration(TestFileObjectOf.java:329)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2718)
```
```
Caused by: java.lang.NullPointerException: Cannot read field "classfile" because the return value of "com.sun.tools.javac.code.Symbol.enclClass()" is null
at jdk.compiler/com.sun.tools.javac.model.JavacElements.getFileObjectOf(JavacElements.java:803)
at TestFileObjectOf$PrintFiles.handleDeclaration(TestFileObjectOf.java:329)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2718)
```
- links to
-
Review(master) openjdk/jdk/26836