Skip to content

Commit

Permalink
DSS-3014 : fix enum declaration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bsanchezb committed Jun 2, 2023
1 parent cf0fc25 commit be459e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ protected void initChain() {
TrustedServiceWrapper selectedTrustService = !filteredServices.isEmpty() ? filteredServices.get(0) : null;

// 7. Trusted certificate matches the trust service properties ?
item = item.setNextItem(isTrustedCertificateMatchTrustService(selectedTrustService));
if (selectedTrustService != null) {
item = item.setNextItem(isTrustedCertificateMatchTrustService(selectedTrustService));
}

// Keep only CA/QC and granted for further status determination
if (!caqcServices.contains(selectedTrustService) || !grantedServices.contains(selectedTrustService)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ public enum TrustedServiceStatus {
DEPRECATED_BY_NATIONAL_LAW("deprecated by national law", "http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/deprecatedbynationallaw", true, false),

/** After eIDAS 'deprecatedatnationallevel' status */
DEPRECATED_AT_NATIONAL_LEVEL("deprecated at national level", "http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/deprecatedatnationallevel", true, false),
;
DEPRECATED_AT_NATIONAL_LEVEL("deprecated at national level", "http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/deprecatedatnationallevel", true, false);

/** Identifier label */
private final String shortName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public boolean isConsistent(TrustedServiceWrapper trustedService) {
Date startDate = trustedService.getStartDate();
if (EIDASUtils.isPreEIDAS(startDate)) {
String status = trustedService.getStatus();
return !TrustedServiceStatus.GRANTED.equals(status) && !TrustedServiceStatus.WITHDRAWN.equals(status);
return !TrustedServiceStatus.GRANTED.getUri().equals(status) &&
!TrustedServiceStatus.WITHDRAWN.getUri().equals(status);
}
return true;
}
Expand Down

0 comments on commit be459e7

Please sign in to comment.