Skip to content

Commit

Permalink
feat(specification-validation) implement Invalid Indicator validation
Browse files Browse the repository at this point in the history
- Fix sonar issue

Closes: MRSPECS-45
  • Loading branch information
viacheslavpoliakov committed Aug 12, 2024
1 parent c99a938 commit 8ab9b5e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class InvalidIndicatorRuleValidator extends AbstractIndicatorRuleValidator {

@Override
public List<ValidationError> validate(MarcField marcField, SpecificationFieldDto field) {
if (marcField instanceof MarcDataField) {
var indicators = ((MarcDataField) marcField).indicators();
if (marcField instanceof MarcDataField marcDataField) {
var indicators = marcDataField.indicators();
if (indicators != null) {
return indicators.stream()
.filter(marcIndicator -> !TagsMatcher.matchesIndicator(marcIndicator.value().toString()))
Expand Down

0 comments on commit 8ab9b5e

Please sign in to comment.