redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.07k stars 430 forks source link

java.io.IOException: Buffer is closed at org.eclipse.jdt.internal.core.CompilationUnit.getContents(CompilationUnit.java:695) #1740

Open anthonyvdotbe opened 3 years ago

anthonyvdotbe commented 3 years ago

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
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

Inkedsnip_LI

Expected Result

No errors.

Additional Informations
katorly commented 1 year ago

I've just encountered the same issue. I was coding a java program on my computer inside vscode that has many classes for about 3 hours, and vscode suddenly popped out this. Reloading the vscode will make everything normal again.

im using JDK 17, Windows 10.

thisisrajneel commented 1 year ago

thanks for this @katorly