fixed null pointer exception

This commit is contained in:
Konstantinos Spyrou 2023-01-19 12:15:30 +02:00
parent 40b20b1122
commit d5327aedea
1 changed files with 2 additions and 2 deletions

View File

@ -641,7 +641,7 @@ public class RepositoryServiceImpl implements RepositoryService {
emailUtils.sendAdminRegisterInterfaceEmail(e, comment, repositoryInterface, authentication);
emailUtils.sendUserRegisterInterfaceEmail(e, comment, repositoryInterface, authentication);
if (desiredCompatibilityLevel != null && !repositoryInterface.getCompatibility().equals(desiredCompatibilityLevel)) {
if (desiredCompatibilityLevel != null && (repositoryInterface.getCompatibility() == null || !repositoryInterface.getCompatibility().equals(desiredCompatibilityLevel))) {
InterfaceComplianceRequest request = new InterfaceComplianceRequest(repoId, repositoryInterface.getId(), desiredCompatibilityLevel);
interfaceComplianceService.create(request);
}
@ -664,7 +664,7 @@ public class RepositoryServiceImpl implements RepositoryService {
emailUtils.sendAdminUpdateInterfaceEmail(repository, comment, repositoryInterface, authentication);
emailUtils.sendUserUpdateInterfaceEmail(repository, comment, repositoryInterface, authentication);
if (desiredCompatibilityLevel != null && !repositoryInterface.getCompatibility().equals(desiredCompatibilityLevel)) {
if (desiredCompatibilityLevel != null && (repositoryInterface.getCompatibility() == null || !repositoryInterface.getCompatibility().equals(desiredCompatibilityLevel))) {
InterfaceComplianceRequest request = new InterfaceComplianceRequest(repoId, repositoryInterface.getId(), desiredCompatibilityLevel);
interfaceComplianceService.create(request);
}