Skip to content

jploski/epic-ide

testing
Switch branches/tags
Code

Latest commit

* In case of a broken pipe, not necessarily all data of the current buffer used by "inputWriter" has been flushed, so a later call to "close" tries to flush the left data and again runs into the problem that the underlying pipe has already been closed. Because "close" flushes first as per documented contract of Writer.close and there doesn't seem to be some public API to empty the current buffer before closing, the easiest solution is to simply "close" directly within the try block.

The following stacktrace is printed in my case, which clearly states that the call to "close" is the root problem:

java.io.IOException: Die Pipe wird gerade geschlossen
	at java.io.FileOutputStream.writeBytes(Native Method)
	at java.io.FileOutputStream.write(FileOutputStream.java:326)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
	at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
	at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)
	at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
	at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
	at org.epic.core.util.ProcessExecutor.execute(ProcessExecutor.java:187)
	at org.epic.core.util.ProcessExecutor.execute(ProcessExecutor.java:71)
	at org.epic.core.util.PerlExecutor.execute(PerlExecutor.java:147)
	at org.epic.perleditor.editors.util.PerlValidatorBase.runPerl(PerlValidatorBase.java:326)
	at org.epic.perleditor.editors.util.PerlValidatorBase.validate(PerlValidatorBase.java:69)
	at org.epic.perleditor.editors.util.PerlValidator.validate(PerlValidator.java:1)
	at org.epic.perleditor.editors.PerlSyntaxValidationThread.runImpl(PerlSyntaxValidationThread.java:84)
	at org.epic.perleditor.editors.PerlSyntaxValidationThread.run(PerlSyntaxValidationThread.java:67)

* Some additional comments why to not close "externally".
53db8ab

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time