redhat-developer / redhat-developer/vscode-java
java.io.IOException: Buffer is closed at org.eclipse.jdt.internal.core.CompilationUnit.getContents(CompilationUnit.java:695)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I've had the following exception occur in a package-info.java file. Most likely this was due to formatting the Java sources outside VS Code. There was no way to make the errors go away, except restarting VS Code.
java.io.IOException: Buffer is closed at org.eclipse.jdt.internal.core.CompilationUnit.getContents(CompilationUnit.java:695)
Environment
- Operating System: Windows 10
- JDK version: 15.0.1
- Visual Studio Code version: 1.52.0
- Java extension version: v0.72.0
Steps To Reproduce
I don't have ready-made reproducible steps, but it should be reproducible by just editing Java sources outside of VS Code.
Current Result

Expected Result
No errors.
Additional Informations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the reported package-info.java failure and the stack-trace location CompilationUnit.getContents(CompilationUnit.java:695); attempt reproduction by editing Java sources outside VS Code on the listed Windows, JDK, and extension versions. Use the linked troubleshooting and logging guidance to capture the failure, with completion meaning the buffer-closed error no longer leaves errors that require restarting VS Code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100