You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/03/13 01:17:53 UTC

[GitHub] [accumulo] keith-turner commented on a diff in pull request #3229: Remove some deprecated items

keith-turner commented on code in PR #3229:
URL: https://github.com/apache/accumulo/pull/3229#discussion_r1133361506


##########
core/src/main/java/org/apache/accumulo/core/spi/scan/ScanDispatcher.java:
##########
@@ -115,13 +90,7 @@ public interface DispatchParameters {
    *
    * @since 2.1.0
    */
-
   default ScanDispatch dispatch(DispatchParameters params) {
-    String executor = dispatch((DispatchParmaters) params);
-    if (executor.equals(DefaultScanDispatch.DEFAULT_SCAN_DISPATCH.getExecutorName())) {
-      return DefaultScanDispatch.DEFAULT_SCAN_DISPATCH;
-    }
-
-    return ScanDispatch.builder().setExecutorName(executor).build();
+    return DefaultScanDispatch.DEFAULT_SCAN_DISPATCH;

Review Comment:
   The default method only existed for deprecation and compatibility purposes.  If the interface were created from scratch without this history, then the interface method would have no default implementation because that method must be implemented.  If someone wants some sort of default behavior then they should use the default implementation of this interface.  Not sure about the compatibility aspects, but the cleanest form of this method would be the method declaration with no default implementation, that clearly informs people at compile time that they need to implement the method.  @ctubbsii my suggestion would be to remove the default method body from the interface.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org