File tree Expand file tree Collapse file tree
src/main/java/it/aboutbits/springboot/emailservice/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 - uses : actions/checkout@v7
1515 - uses : aboutbits/github-actions-java/setup-with-maven@v4
1616 with :
17- java-version : 26
17+ java-version : 25
1818 - name : Test
1919 env :
2020 GITHUB_USER_NAME : ${{ github.actor }}
Original file line number Diff line number Diff line change 1919 - uses : aboutbits/github-actions-base/git-setup@v2
2020 - uses : aboutbits/github-actions-java/setup-with-maven@v4
2121 with :
22- java-version : 26
22+ java-version : 25
2323 - uses : aboutbits/github-actions-java/set-version-with-maven@v4
2424 with :
2525 version : " ${{ github.event.inputs.version }}"
Original file line number Diff line number Diff line change 1616 <description >Spring Boot Email Service</description >
1717
1818 <properties >
19- <java .version>26 </java .version>
19+ <java .version>25 </java .version>
2020 <mapstruct .version>1.6.3</mapstruct .version>
2121 </properties >
2222
Original file line number Diff line number Diff line change 11package it .aboutbits .springboot .emailservice .lib ;
22
3- import org .springframework . lang .Nullable ;
3+ import org .jspecify . annotations .Nullable ;
44
55import java .time .OffsetDateTime ;
66import java .util .List ;
Original file line number Diff line number Diff line change 33import jakarta .validation .constraints .NotBlank ;
44import jakarta .validation .constraints .NotEmpty ;
55import lombok .Builder ;
6- import lombok .NonNull ;
76import lombok .Singular ;
8- import org .springframework . lang .Nullable ;
7+ import org .jspecify . annotations .Nullable ;
98
109import java .io .InputStream ;
1110import java .time .OffsetDateTime ;
1413
1514@ Builder
1615public record EmailParameter (
17- @ NonNull
1816 OffsetDateTime scheduledAt ,
19- @ NonNull
2017 Email email
2118) {
2219
2320 @ Builder
2421 public record Email (
25- @ NonNull
2622 @ NotBlank
2723 String subject ,
2824
2925 @ Singular
30- @ NonNull
3126 @ NotEmpty
3227 List <String > recipients ,
3328
34- @ NonNull String textBody ,
35- @ NonNull String htmlBody ,
29+ String textBody ,
30+ String htmlBody ,
3631
37- @ NonNull
3832 @ NotBlank
3933 String fromAddress ,
40- @ NonNull
4134 @ NotBlank
4235 String fromName ,
4336
@@ -47,17 +40,13 @@ public record Email(
4740 String replyToName ,
4841
4942 @ Singular
50- @ NonNull
5143 Set <Attachment > attachments
5244 ) {
5345 @ Builder
5446 public record Attachment (
55- @ NonNull
5647 InputStream payload ,
57- @ NonNull
5848 @ NotBlank
5949 String fileName ,
60- @ NonNull
6150 @ NotBlank
6251 String contentType
6352 ) {
Original file line number Diff line number Diff line change 1111import it .aboutbits .springboot .emailservice .lib .model .EmailAttachment ;
1212import jakarta .mail .MessagingException ;
1313import jakarta .validation .Valid ;
14- import lombok .NonNull ;
1514import lombok .extern .slf4j .Slf4j ;
1615import org .springframework .core .io .ByteArrayResource ;
17- import org .springframework . lang .Nullable ;
16+ import org .jspecify . annotations .Nullable ;
1817import org .springframework .mail .MailException ;
1918import org .springframework .mail .javamail .JavaMailSender ;
2019import org .springframework .mail .javamail .MimeMessageHelper ;
@@ -48,7 +47,7 @@ public ManageEmail(
4847 this .emailMapper = emailMapper ;
4948 }
5049
51- public EmailDto schedule (@ NonNull @ Valid EmailParameter parameter ) throws EmailException {
50+ public EmailDto schedule (@ Valid EmailParameter parameter ) throws EmailException {
5251 Email email ;
5352 try {
5453 email = fromParameter (parameter );
@@ -61,7 +60,7 @@ public EmailDto schedule(@NonNull @Valid EmailParameter parameter) throws EmailE
6160 return emailMapper .toDto (savedEmail );
6261 }
6362
64- public EmailDto sendOrFail (@ NonNull @ Valid EmailParameter parameter ) throws EmailException {
63+ public EmailDto sendOrFail (@ Valid EmailParameter parameter ) throws EmailException {
6564 Email email ;
6665 try {
6766 email = fromParameter (parameter );
Original file line number Diff line number Diff line change 1- @ NonNullApi
2- @ NonNullFields
1+ @ NullMarked
32package it .aboutbits .springboot .emailservice .lib .application ;
43
5- import org .springframework .lang .NonNullApi ;
6- import org .springframework .lang .NonNullFields ;
4+ import org .jspecify .annotations .NullMarked ;
Original file line number Diff line number Diff line change 33
44import it .aboutbits .springboot .emailservice .lib .EmailState ;
55import it .aboutbits .springboot .emailservice .lib .model .Email ;
6+ import org .jspecify .annotations .NonNull ;
67import org .springframework .data .domain .Page ;
78import org .springframework .data .domain .PageRequest ;
89import org .springframework .data .jpa .repository .EntityGraph ;
910import org .springframework .data .jpa .repository .JpaRepository ;
10- import org .springframework .lang .NonNull ;
1111
1212import java .util .Collection ;
1313import java .util .List ;
Original file line number Diff line number Diff line change 2121import org .hibernate .annotations .JdbcTypeCode ;
2222import org .hibernate .annotations .UpdateTimestamp ;
2323import org .hibernate .type .SqlTypes ;
24- import org .springframework . lang .Nullable ;
24+ import org .jspecify . annotations .Nullable ;
2525
2626import java .time .OffsetDateTime ;
2727import java .util .List ;
You can’t perform that action at this time.
0 commit comments