We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc8be65 commit 496f198Copy full SHA for 496f198
src/main/java/org/scijava/script/ScriptModule.java
@@ -197,19 +197,17 @@ public void run() {
197
setOutput(name, typed);
198
}
199
200
- if (output != null) try {
201
- output.flush();
202
- } catch (IOException e) {
203
- if (error == null) {
204
- log.error(e);
205
- } else {
206
- e.printStackTrace(errorPrinter);
+ // flush output and error streams
+ if (output != null) {
+ try {
+ output.flush();
+ }
+ catch (final IOException e) {
+ if (error == null) log.error(e);
207
+ else e.printStackTrace(errorPrinter);
208
209
-
210
- if (errorPrinter != null) {
211
- errorPrinter.flush();
212
- }
+ if (errorPrinter != null) errorPrinter.flush();
213
214
215
// -- Contextual methods --
0 commit comments