diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/BundleUtils.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/BundleUtils.java index 1ace91b498ff..17e128ebf49e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/BundleUtils.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/BundleUtils.java @@ -40,11 +40,11 @@ static Optional findOptionalBundleForType(final ExtensionManag // All NARs that are packaged with NiFi will have the same bundle coordinate as the NiFi framework bundle. // During an upgrade, it's fairly common to have two versions of a NAR: the version shipped with NiFi and another version, perhaps to maintain // backward compatibility to because the new version behaves some different way and the user wants the old behavior in some instances, etc. - // In this case, the user may have two versions. For example, version 2.2.0 and 2.4.0 while NiFi is at version 2.4.0. - // Now, during upgrade to 2.4.1, there will no longer be a 2.4.0 available. We want to be smart enough to realize that those extension using version - // 2.2.0 stay there but those using 2.4.0 upgrade to 2.4.1. - // To do this, we always first match on the exact version but this method is called when there's no exact match. So those marked 2.2.0 won't arrive here. - // But for those extensions that were using 2.4.0, we want to now look for version 2.4.1 - I.e., the one with the same version as the framework. If we + // In this case, the user may have two versions. For example, version 1.26.0 and 1.27.0 while NiFi is at version 1.27.0. + // Now, during upgrade to 1.27.1, there will no longer be a 1.27.0 available. We want to be smart enough to realize that those extension using version + // 1.26.0 stay there but those using 1.27.0 upgrade to 1.27.1. + // To do this, we always first match on the exact version but this method is called when there's no exact match. So those marked 1.26.0 won't arrive here. + // But for those extensions that were using 1.27.0, we want to now look for version 1.27.1 - i.e., the one with the same version as the framework. If we // find that version, then we want to use it. This helps to smooth out the upgrade process even when users have multiple versions of a given NAR. final String frameworkVersion = frameworkBundle.getBundleDetails().getCoordinate().getVersion(); for (final Bundle bundle : bundles) {