protected void computeDiff()

in src/main/java/org/apache/sling/feature/diff/impl/ExtensionsComparator.java [43:61]


    protected void computeDiff(Extensions previousExtensions, Extensions currentExtensions, Feature target) {
        for (Extension previousExtension : previousExtensions) {
            Extension currentExtension = currentExtensions.getByName(previousExtension.getName());

            if (currentExtension == null) {
                target.getPrototype().getExtensionRemovals().add(previousExtension.getName());
            } else {
                computeDiff(previousExtension, currentExtension, target);
            }
        }

        for (Extension currentExtension : currentExtensions) {
            Extension previousConfiguration = previousExtensions.getByName(currentExtension.getName());

            if (previousConfiguration == null) {
                target.getExtensions().add(currentExtension);
            }
        }
    }