fixed null pointer exception

This commit is contained in:
Konstantinos Spyrou 2023-01-19 12:15:30 +02:00
parent 7c5020c205
commit 0674a3c031
1 changed files with 2 additions and 2 deletions

View File

@ -614,7 +614,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);
}
@ -637,7 +637,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);
}