Skip to content
Snippets Groups Projects
Commit 9fdb526e authored by OZGCloud's avatar OZGCloud
Browse files

minor cleanus

parent 698658b3
No related branches found
No related tags found
No related merge requests found
...@@ -60,8 +60,8 @@ public class PostfachMailController { ...@@ -60,8 +60,8 @@ public class PostfachMailController {
return Optional.ofNullable(vorgang.getEingang().getAntragsteller()).map(Antragsteller::getPostfachId).map(StringUtils::trimToNull); return Optional.ofNullable(vorgang.getEingang().getAntragsteller()).map(Antragsteller::getPostfachId).map(StringUtils::trimToNull);
} }
private Stream<PostfachMail> sort(Stream<PostfachMail> vorgaenge) { private Stream<PostfachMail> sort(Stream<PostfachMail> nachrichten) {
return vorgaenge.sorted(new PostfachNachrichtComparator().reversed()); return nachrichten.sorted(new PostfachNachrichtComparator().reversed());
} }
public boolean isPostfachConfigured() { public boolean isPostfachConfigured() {
......
...@@ -6,6 +6,7 @@ import java.util.Optional; ...@@ -6,6 +6,7 @@ import java.util.Optional;
import java.util.function.Predicate; import java.util.function.Predicate;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;
import org.springframework.hateoas.CollectionModel; import org.springframework.hateoas.CollectionModel;
import org.springframework.hateoas.EntityModel; import org.springframework.hateoas.EntityModel;
...@@ -31,7 +32,7 @@ class PostfachMailModelAssembler implements RepresentationModelAssembler<Postfac ...@@ -31,7 +32,7 @@ class PostfachMailModelAssembler implements RepresentationModelAssembler<Postfac
static final String REL_CREATED_BY = "createdBy"; static final String REL_CREATED_BY = "createdBy";
private static final Predicate<PostfachMail> SENT_FAILED = postfachMail -> BooleanUtils.isFalse(postfachMail.getSentSuccessful()); private static final Predicate<PostfachMail> SENT_FAILED = postfachMail -> BooleanUtils.isFalse(postfachMail.getSentSuccessful());
private static final Predicate<PostfachMail> HAS_ATTACHMENTS = nachricht -> !nachricht.getAttachments().isEmpty(); private static final Predicate<PostfachMail> HAS_ATTACHMENTS = nachricht -> CollectionUtils.isNotEmpty(nachricht.getAttachments());
static final String SYSTEM_USER_IDENTIFIER = "system"; static final String SYSTEM_USER_IDENTIFIER = "system";
private static final Predicate<PostfachMail> SENT_BY_CLIENT_USER = postfachNachricht -> Optional.ofNullable(postfachNachricht.getCreatedBy()) private static final Predicate<PostfachMail> SENT_BY_CLIENT_USER = postfachNachricht -> Optional.ofNullable(postfachNachricht.getCreatedBy())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment