simonbence commented on code in PR #7017:
URL: https://github.com/apache/nifi/pull/7017#discussion_r1129758652


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/FlowDifferenceFilters.java:
##########
@@ -192,22 +193,13 @@ public static boolean 
isIgnorableVersionedFlowCoordinateChange(final FlowDiffere
                 final VersionedFlowCoordinates coordinatesB = 
versionedProcessGroupB.getVersionedFlowCoordinates();
 
                 if (coordinatesA != null && coordinatesB != null) {
-                    String registryUrlA = coordinatesA.getRegistryUrl();
-                    String registryUrlB = coordinatesB.getRegistryUrl();
-
-                    if (registryUrlA != null && registryUrlB != null && 
!registryUrlA.equals(registryUrlB)) {
-                        if (registryUrlA.endsWith("/")) {
-                            registryUrlA = registryUrlA.substring(0, 
registryUrlA.length() - 1);
-                        }
-
-                        if (registryUrlB.endsWith("/")) {
-                            registryUrlB = registryUrlB.substring(0, 
registryUrlB.length() - 1);
-                        }
-
-                        if (registryUrlA.equals(registryUrlB)) {
-                            return true;
-                        }
+                    if (coordinatesA.getStorageLocation() != null || 
coordinatesB.getStorageLocation() != null) {
+                        return false;
                     }
+
+                    return  
!FlowDifferenceUtil.areRegistryStrictlyEqual(coordinatesA, coordinatesB)
+                            && 
FlowDifferenceUtil.areRegistryUrlsEqual(coordinatesA, coordinatesB)

Review Comment:
   My first approach and assumption was that, but with that, test 
`TestFlowDifferenceFilter#testFilterIgnorableVersionCoordinateDifferenceWithNonIgnorableDifference`has
 broken and after careful check, it turned out this distinction in the original 
code is deliberate. Our considerations might changed since but removing that 
would bring in a potential regression



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