This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push: new 839e3a3941c Like in camel-core project 839e3a3941c is described below commit 839e3a3941cd68e58bb7be895ed8cc6ea64beda2 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sat Jun 18 10:30:26 2022 +0200 Like in camel-core project --- .../springboot/catalog/SpringBootRuntimeProvider.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java b/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java index 3d866c39d05..c35fe5bc071 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java +++ b/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java @@ -24,7 +24,6 @@ import java.util.List; import org.apache.camel.catalog.CamelCatalog; import org.apache.camel.catalog.RuntimeProvider; import org.apache.camel.catalog.impl.CatalogHelper; -import org.apache.camel.util.IOHelper; /** * A Spring Boot based {@link RuntimeProvider} which only includes the supported Camel components, data formats, and languages @@ -110,15 +109,16 @@ public class SpringBootRuntimeProvider implements RuntimeProvider { private List<String> findNames(String pathToPropertyCatalogDescriptor) { List<String> names = new ArrayList<>(); - InputStream is = camelCatalog.getVersionManager().getResourceAsStream(pathToPropertyCatalogDescriptor); - if (is != null) { - try { - CatalogHelper.loadLines(is, names); - } catch (IOException e) { - // ignore - } finally { - IOHelper.close(is); + try (InputStream is = camelCatalog.getVersionManager().getResourceAsStream(pathToPropertyCatalogDescriptor)) { + if (is != null) { + try { + CatalogHelper.loadLines(is, names); + } catch (IOException e) { + // ignore + } } + } catch (IOException e1) { + // ignore } return names; }