Skip to content

Commit

Permalink
Fix quality
Browse files Browse the repository at this point in the history
  • Loading branch information
DKarim committed Aug 15, 2023
1 parent f32e76a commit a87363c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Properties;
Expand Down Expand Up @@ -190,7 +191,7 @@ private EmailDeliveryStatus sendWithoutAttachments(TransactionalEmail email) {

private List<MessageTag> getCustomTags(TransactionalEmail email) {
if (email.getTags() == null || email.getTags().isEmpty()) {
return null;
return Collections.emptyList();
}
return email.getTags().entrySet().stream()
.map(entry -> MessageTag.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import spock.lang.Specification
*/
@Ignore
@Remember(
value = '2023-06-01',
value = '2024-06-01',
description = 'Try to fix this test or remove this feature completely'
)
class LambdaEchoFunctionSpec extends Specification {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ class DefaultSimpleEmailService implements SimpleEmailService {
}

private List<MessageTag> getTags(TransactionalEmail email) {
if (!email.getTags()) {
return null
if (!email.tags) {
return []
}
return email.getTags().collect { entry ->
return email.tags.collect { entry ->
new MessageTag()
.withName(entry.getKey())
.withValue(entry.getValue())
.withName(entry.key)
.withValue(entry.value)
}
}

Expand Down

0 comments on commit a87363c

Please sign in to comment.