From 4bff98feca6a3c49fcccf3bb4f40600eb45b91de Mon Sep 17 00:00:00 2001 From: Ian Koeppe Date: Fri, 28 Feb 2025 21:16:25 -0600 Subject: [PATCH 1/2] Ensure resources closed during resource model export. --- .../restli/tools/idlgen/RestLiResourceModelExporter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/restli-tools/src/main/java/com/linkedin/restli/tools/idlgen/RestLiResourceModelExporter.java b/restli-tools/src/main/java/com/linkedin/restli/tools/idlgen/RestLiResourceModelExporter.java index 10300cbf8a..83d5980101 100644 --- a/restli-tools/src/main/java/com/linkedin/restli/tools/idlgen/RestLiResourceModelExporter.java +++ b/restli-tools/src/main/java/com/linkedin/restli/tools/idlgen/RestLiResourceModelExporter.java @@ -325,7 +325,9 @@ private File writeIDLFile(File outdirFile, log.debug("Writing file '" + fileName + '\''); final File file = new File(outdirFile, fileName); - _codec.writeResourceSchema(rootResourceNode, new FileOutputStream(file)); + try (FileOutputStream stream = new FileOutputStream(file)) { + _codec.writeResourceSchema(rootResourceNode, stream); + } return file; } } From 3050acb61d489d095d1387c99146c1da112b9b67 Mon Sep 17 00:00:00 2001 From: Ian V Koeppe Date: Fri, 28 Feb 2025 21:40:45 -0600 Subject: [PATCH 2/2] Ensure resources closed during resource model export. --- CHANGELOG.md | 6 +++++- gradle.properties | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71232ffb3d..23fa2d629a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ and what APIs have changed, if applicable. ## [Unreleased] +## [29.64.2] - 2025-02-28 +- Ensure resources closed during resource model export. + ## [29.64.1] - 2025-02-15 - Fix warmUp -- record service as used regardless of whether getClient succeeds @@ -5773,7 +5776,8 @@ patch operations can re-use these classes for generating patch messages. ## [0.14.1] -[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.64.1...master +[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.64.2...master +[29.64.2]: https://github.com/linkedin/rest.li/compare/v29.64.1...master [29.64.1]: https://github.com/linkedin/rest.li/compare/v29.64.0...v29.64.1 [29.64.0]: https://github.com/linkedin/rest.li/compare/v29.63.2...v29.64.0 [29.63.2]: https://github.com/linkedin/rest.li/compare/v29.63.1...v29.63.2 diff --git a/gradle.properties b/gradle.properties index f16dd8b2b2..55583be378 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=29.64.1 +version=29.64.2 group=com.linkedin.pegasus org.gradle.configureondemand=true org.gradle.parallel=true