sfc-gh-mpayne commented on code in PR #10811:
URL: https://github.com/apache/nifi/pull/10811#discussion_r2729034172
##########
nifi-commons/nifi-connector-utils/src/main/java/org/apache/nifi/components/connector/util/VersionedFlowUtils.java:
##########
@@ -390,189 +389,26 @@ public static void updateToLatestBundles(final
VersionedProcessGroup processGrou
/**
* Updates the given processor to use the latest available bundle version.
- * See {@link #getLatest(List)} for details on how version comparison is
performed.
+ * See {@link ComponentBundleLookup#getLatestBundle(String)} for details
on how version comparison is performed.
*
* @param processor the processor to update
* @param componentBundleLookup the lookup used to find available bundles
for the processor type
*/
public static void updateToLatestBundle(final VersionedProcessor
processor, final ComponentBundleLookup componentBundleLookup) {
- final Bundle latest = getLatestBundle(processor,
componentBundleLookup);
+ final Bundle latest =
componentBundleLookup.getLatestBundle(processor.getType());
processor.setBundle(latest);
}
/**
* Updates the given controller service to use the latest available bundle
version.
- * See {@link #getLatest(List)} for details on how version comparison is
performed.
+ * See {@link ComponentBundleLookup#getLatestBundle(String)} for details
on how version comparison is performed.
*
* @param service the controller service to update
* @param componentBundleLookup the lookup used to find available bundles
for the service type
*/
public static void updateToLatestBundle(final VersionedControllerService
service, final ComponentBundleLookup componentBundleLookup) {
- final Bundle latest = getLatestBundle(service, componentBundleLookup);
+ final Bundle latest =
componentBundleLookup.getLatestBundle(service.getType());
Review Comment:
Yeah, that's a good catch. We shouldn't be setting the bundle to `null`. So
if doesn't have a bundle, we should just keep whatever is already set. Will
update.
--
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]