jtuglu-netflix commented on code in PR #18149:
URL: https://github.com/apache/druid/pull/18149#discussion_r2153013814


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:
##########
@@ -223,30 +223,27 @@ public Response specGetAll(
                               .withDetailedState(theState.get().toString())
                               .withHealthy(theState.get().isHealthy());
                   }
-                  if (includeFull) {
-                    Optional<SupervisorSpec> theSpec = 
manager.getSupervisorSpec(x);
-                    if (theSpec.isPresent()) {
-                      theBuilder.withSpec(theSpec.get())
-                          
.withDataSource(theSpec.get().getDataSources().stream().findFirst().orElse(null));
+                  Optional<SupervisorSpec> theSpec = 
manager.getSupervisorSpec(x);

Review Comment:
   This fixes the issue mentioned 
[here](https://github.com/apache/druid/pull/18082#discussion_r2152698994) and 
also simplifies the logic a bit more (removes one layer of nested conditionals).



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