kwin commented on a change in pull request #25:
URL:
https://github.com/apache/sling-org-apache-sling-feature/pull/25#discussion_r646289119
##########
File path:
src/main/java/org/apache/sling/feature/io/artifacts/spi/ArtifactProvider.java
##########
@@ -43,8 +44,20 @@
/**
* Shutdown the provider.
+ * @deprecated Use {@link #close()} instead.
*/
- void shutdown();
+ @Deprecated
+ default void shutdown() {
+
Review comment:
The ArtifactManager is treating IOExceptions differently than other
unchecked exceptions
(https://github.com/apache/sling-org-apache-sling-feature/pull/25/files#diff-36fc363deea378f4f1f538a997cebb80f6aca64974b2aef836f91371c44e06ecR114
and
https://github.com/apache/sling-org-apache-sling-feature/pull/25/files#diff-36fc363deea378f4f1f538a997cebb80f6aca64974b2aef836f91371c44e06ecR143)
to not hide the original exception/still close the other providers. Also since
all File based operations might throw IOE in Java otherwise the provider would
need to wrap it in a RuntimeException (if implementing shutdown).
In certain cases it might make sense to retry calling close() as some
IOExceptions are transient....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]