boolean (@Nullable String currentVersion, @Nullable String availableVersion) { if (availableVersion == null) { return false; } if (currentVersion == null) { return true; } PackageManagementService service = myPackageManagementService; if (service != null) { return service.compareVersions(currentVersion, availableVersion) < 0; } return PackageVersionComparator.VERSION_COMPARATOR.compare(currentVersion, availableVersion) < 0; }