Skip to content

Commit faa36b5

Browse files
committed
Refine Lombok configuration.
1 parent 239adba commit faa36b5

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

lombok.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
lombok.addLombokGeneratedAnnotation = true
22
lombok.fieldDefaults.defaultPrivate = true
3+
lombok.fielddefaults.defaultfinal = true

src/main/java/com/github/hrytsenko/jsondata/springboot/error/ExceptionAdvices.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.github.hrytsenko.jsondata.springboot.web.ValidateRequestException;
2121
import com.github.hrytsenko.jsondata.springboot.web.ValidateResponseException;
2222
import lombok.AllArgsConstructor;
23-
import lombok.experimental.FieldDefaults;
2423
import lombok.experimental.UtilityClass;
2524
import lombok.extern.slf4j.Slf4j;
2625
import org.springframework.core.Ordered;
@@ -39,7 +38,6 @@ class ExceptionAdvices {
3938
@RequestMapping(produces = MediaType.APPLICATION_JSON_VALUE)
4039
@Slf4j
4140
@AllArgsConstructor
42-
@FieldDefaults(makeFinal = true)
4341
static class InternalExceptionAdvice {
4442

4543
CorrelationSource correlationSource;
@@ -58,7 +56,6 @@ public ErrorResponse onInternalError(Exception exception) {
5856
@Order(Ordered.HIGHEST_PRECEDENCE)
5957
@Slf4j
6058
@AllArgsConstructor
61-
@FieldDefaults(makeFinal = true)
6259
static class ServiceExceptionAdvice {
6360

6461
CorrelationSource correlationSource;
@@ -112,7 +109,6 @@ public ErrorResponse onServiceUnavailable(ServiceException.ServiceUnavailable ex
112109
@Order(Ordered.HIGHEST_PRECEDENCE)
113110
@Slf4j
114111
@AllArgsConstructor
115-
@FieldDefaults(makeFinal = true)
116112
static class ValidateExceptionAdvice {
117113

118114
CorrelationSource correlationSource;

src/main/java/com/github/hrytsenko/jsondata/springboot/error/ServiceException.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
package com.github.hrytsenko.jsondata.springboot.error;
1717

1818
import lombok.Getter;
19-
import lombok.experimental.FieldDefaults;
2019

21-
@FieldDefaults(makeFinal = true)
2220
public class ServiceException extends RuntimeException {
2321

2422
@Getter

src/main/java/com/github/hrytsenko/jsondata/springboot/web/JacksonConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public Jackson2ObjectMapperBuilderCustomizer jsonEntityJacksonCustomizer() {
5353
@AllArgsConstructor
5454
static class JsonEntityDeserializer extends JsonDeserializer<JsonEntity<?>> {
5555

56-
private Class<?> entityClass;
56+
Class<?> entityClass;
5757

5858
@SneakyThrows
5959
@Override

src/test/lombok.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lombok.fieldDefaults.defaultFinal = false

0 commit comments

Comments
 (0)