kwin commented on code in PR #357:
URL: https://github.com/apache/maven-resolver/pull/357#discussion_r1386901050
##########
maven-resolver-api/src/main/java/org/eclipse/aether/RepositorySystem.java:
##########
@@ -304,8 +314,26 @@ List<RemoteRepository> newResolutionRepositories(
* When shutdown happens, all the registered on-close handlers will be
invoked (even if some throws), and at end
* of operation a {@link MultiRuntimeException} may be thrown, signaling
that some handler(s) failed. This exception
* may be ignored, is at the discretion of caller.
+ * <p>
+ * Note: this method actually just calls {@link #close()}.
*
* @since 1.9.0
+ * @deprecated Use {@link #close()} instead.
*/
+ @Deprecated
void shutdown();
+
+ /**
+ * Signals to repository system to shut down. Shut down instance is not
usable anymore.
+ * <p>
+ * Repository system may perform some resource cleanup, if applicable. Not
using this method may cause leaks or
+ * unclean shutdown of some subsystem.
+ * <p>
+ * When shutdown happens, all the registered on-close handlers will be
invoked (even if some throws), and at end
+ * of operation a {@link MultiRuntimeException} may be thrown, signaling
that some handler(s) failed. This exception
+ * may be ignored, is at the discretion of caller.
+ *
+ * @since TBD
+ */
+ void close();
Review Comment:
Well IMHO it is more binary backwards incompatible to add a new method
without default impl to an interface which is exposed (and can potentially be
implemented by anyone). In reality the default impl almost never causes any
issues, for details refer to
https://docs.oracle.com/javase/specs/jls/se11/html/jls-13.html#jls-13.5.6.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]