phet commented on code in PR #3857:
URL: https://github.com/apache/gobblin/pull/3857#discussion_r1450815488


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -276,8 +277,12 @@ protected void 
submitFlowToDagManagerHelper(DagActionStore.DagAction dagAction,
     try {
       URI flowUri = FlowSpec.Utils.createFlowSpecUri(flowId);
       spec = (FlowSpec) flowCatalog.getSpecs(flowUri);

Review Comment:
   if you're wondering how Java knows which to choose at runtime, since it's an 
@Override, per usual it's chosen dynamically based on the runtime type.but it 
gains more specific typing when that's actually guaranteed statically.
   to illustrate, these two are legal:
   URI uri = ...
   SpecCatalog sc = ...
   Spec s = sc.getSpecs(uri);
   and
   FlowSpecCatalog fsc = ...
   FlowSpec fs = fsc.getSpecs(uri);
   but this does NOT type-check:
   SpecCatalog sc = ...
   FlowSpec fs = sc.getSpecs(uri);
   make sense?



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

Reply via email to