diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java index f852115347b53..46ec6daba4f57 100644 --- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java @@ -26,6 +26,7 @@ import java.util.Map; import java.util.Properties; import java.util.concurrent.atomic.AtomicInteger; +import javax.imageio.stream.FileImageOutputStream; import org.apache.camel.CamelContext; import org.apache.camel.StartupListener; @@ -435,7 +436,13 @@ protected Properties loadProperties() throws SchedulerException { answer.load(is); } catch (IOException e) { throw new SchedulerException("Error loading Quartz properties file from classpath: " + getPropertiesFile(), e); - } + } finally { + try { + is.close(); + } catch (IOException ex) { + LOG.warn("Error closing quartz.properties input stream"); + } + } } return answer; }