Skip to content

Commit

Permalink
clean up after review
Browse files Browse the repository at this point in the history
  • Loading branch information
daveotengo committed Aug 20, 2024
1 parent b90d09e commit 8100344
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.FieldConstraints;
import de.symeda.sormas.api.utils.ValidationException;
import de.symeda.sormas.api.audit.AuditedClass;

public class UserRoleDto extends EntityDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void passwordValidationCheck(View view) {
} else {
binding.actionPasswordStrength.setVisibility(view.getVisibility());
binding.actionPasswordStrength.setText(R.string.message_password_weak);
NotificationHelper.showNotification(binding, NotificationType.ERROR, R.string.additional_message_passord_weakk);
NotificationHelper.showNotification(binding, NotificationType.ERROR, R.string.additional_message_passord_weak);
binding.actionPasswordStrength.setTextColor(Color.parseColor(getString(R.color.errorBackground)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
import de.symeda.sormas.backend.vaccination.VaccinationService;
import de.symeda.sormas.backend.visit.VisitFacadeEjb.VisitFacadeEjbLocal;
import de.symeda.sormas.backend.visit.VisitService;

@ExtendWith(CdiTestJunitExtension.class)
@ExtendWith(MockitoExtension.class)
@MockitoSettings(strictness = Strictness.LENIENT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,10 @@ private void addValidators() {
}

private Date getEarliestPathogenTestDate() {
if (!isCreate) {
List<PathogenTestDto> pathogenTests = FacadeProvider.getPathogenTestFacade().getAllByEnvironmentSample(getValue().toReference());
if (pathogenTests.isEmpty()) {
return null;
}
return pathogenTests.stream().map(PathogenTestDto::getTestDateTime).filter(Objects::nonNull).min(Date::compareTo).orElseGet(() -> null);
} else {
List<PathogenTestDto> pathogenTests = FacadeProvider.getPathogenTestFacade().getAllByEnvironmentSample(getValue().toReference());
if (pathogenTests.isEmpty()) {
return null;
}
return pathogenTests.stream().map(PathogenTestDto::getTestDateTime).filter(Objects::nonNull).min(Date::compareTo).orElseGet(() -> null);
}
}

0 comments on commit 8100344

Please sign in to comment.