boolean (Map<String, Consent> defaults, Map<String, ConfirmedConsent> confirmed) { for (Consent defConsent : defaults.values()) { if (defConsent.isDeleted()) { continue; } final ConfirmedConsent confirmedConsent = confirmed.get(defConsent.getId()); if (confirmedConsent == null) { return true; } final String consentId = getProductConsentKind(myProductCode, defConsent.getId()); if (consentId != null && PER_PRODUCT_CONSENTS.contains(consentId)) { // require confirmation if at least one of installed plugins does not have its own consent for (String pluginCode : myPluginCodes) { final ConfirmedConsent pluginConfirmedConsent = confirmed.get(consentId + "." + pluginCode); if (pluginConfirmedConsent == null) { return true; } } } final Version confirmedVersion = confirmedConsent.getVersion(); final Version defaultVersion = defConsent.getVersion(); // consider only major version differences if (confirmedVersion.isOlder(defaultVersion) && confirmedVersion.getMajor() != defaultVersion.getMajor()) { return true; } } return false; }