From da1e07af21a1e819fade3037c2e879edef41f943 Mon Sep 17 00:00:00 2001 From: Matthieu Chase Heimer Date: Mon, 19 Dec 2016 13:25:10 -0600 Subject: [PATCH] Update DefaultGenerator.java to call close() Need to call out.close() after IOUtils.copy(in, out); when writing supporting files. --- .../src/main/java/io/swagger/codegen/DefaultGenerator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java index 5f11f99d99..228be1a3ef 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java @@ -526,6 +526,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { if (in != null) { LOGGER.info("writing file " + outputFile); IOUtils.copy(in, out); + out.close(); } else { LOGGER.error("can't open " + templateFile + " for input"); }