This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-io.git
The following commit(s) were added to refs/heads/master by this push:
new 252c549 Make ArtifactManager AutoCloseable
252c549 is described below
commit 252c549909aade093291756046d67656e800798b
Author: Karl Pauls <[email protected]>
AuthorDate: Tue Aug 28 22:44:48 2018 +0200
Make ArtifactManager AutoCloseable
---
src/main/java/org/apache/sling/feature/io/ArtifactManager.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/feature/io/ArtifactManager.java
b/src/main/java/org/apache/sling/feature/io/ArtifactManager.java
index 41e19f0..d60448f 100644
--- a/src/main/java/org/apache/sling/feature/io/ArtifactManager.java
+++ b/src/main/java/org/apache/sling/feature/io/ArtifactManager.java
@@ -42,7 +42,7 @@ import java.util.ServiceLoader;
* It uses {@link ArtifactProvider}s to get artifacts. The
* providers are loaded using the service loader.
*/
-public class ArtifactManager {
+public class ArtifactManager implements AutoCloseable {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -103,6 +103,12 @@ public class ArtifactManager {
this.providers.clear();
}
+ @Override
+ public void close()
+ {
+ shutdown();
+ }
+
private final File getArtifactFromProviders(final String url, final String
relativeCachePath) throws IOException {
final int pos = url.indexOf(":");
final String scheme = url.substring(0, pos);