Arsnael commented on code in PR #2824:
URL: https://github.com/apache/james-project/pull/2824#discussion_r2415554632


##########
server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/tasks/TaskFromRequestRegistry.java:
##########
@@ -171,10 +175,8 @@ public TaskHandler fromRequest(Request request) throws 
Exception {
                 + ". " + supportedValueMessage()));
     }
 
-    @Override
-    public Route asRoute(TaskManager taskManager) {
-        return new MultiTaskRoute(this, taskManager); //temporary, to test...
-        // TODO: need something to differentiate a normal task route from a 
multi one... need the request? or need a dedicated TaskFromRequestRegistry?
+    public Route asMultiRoute(TaskManager taskManager) {
+        return new MultiTaskRoute(this, taskManager);

Review Comment:
   Honestly I think (but I could be wrong) that the design is wrong from the 
start here... I feel like all the routes are being built with the inherited 
asRoute method from TaskFromRequest in TaskFromRequestRegistry class. I don't 
feel like the TaskRegistration asRoute gets ever called... Which is a problem 
IMO
   
   So I could not find anything better than adding asMultiRoute and also add 
extra methods in the builder of TaskFromRequestRegistry. Seems to work but not 
a good solution IMO... Might be ok temporarily



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to