Skip to content

Commit

Permalink
improve codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSebastian committed May 27, 2024
1 parent 3552f8a commit 546ac5b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import de.muenchen.oss.wahllokalsystem.wahlvorbereitungservice.exception.ExceptionConstants;
import de.muenchen.oss.wahllokalsystem.wahlvorbereitungservice.exception.ExceptionFactory;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

@Component
Expand All @@ -18,8 +19,8 @@ public void validWahlbezirkIDOrThrow(final String wahlbezirkID) {
}

public void validModelToSetOrThrow(final UrnenwahlvorbereitungModel modelToValidate) {
if (modelToValidate == null || modelToValidate.wahlbezirkID() == null || modelToValidate.wahlbezirkID()
.isEmpty() || modelToValidate.urnenAnzahl().isEmpty()) { //urnenanzahl cannot be null because of the records constructor
if (modelToValidate == null || StringUtils.isEmpty(modelToValidate.wahlbezirkID()) || modelToValidate.urnenAnzahl()
.isEmpty()) { //urnenanzahl cannot be null because of the records constructor
throw exceptionFactory.createFachlicheWlsException(ExceptionConstants.PARAMS_UNVOLLSTAENDIG);
}
}
Expand Down

0 comments on commit 546ac5b

Please sign in to comment.