We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have class
@Getter @EqualsAndHashCode @ToString @Builder @AllArgsConstructor @NoArgsConstructor public class Account { @NotEmpty private String id; private LocalDate dateOpened; private LocalDate dateClosed; } @Mapper(componentModel = "spring", nullValueCheckStrategy = ALWAYS) @NoArgsConstructor public abstract class AccountDataConverter { @Mapping(target = "dateOpened", dateFormat = "yyyy-MM-dd") @Mapping(target = "dateClosed", dateFormat = "yyyy-MM-dd") public abstract Account convert(AccountData accountData); } @Data public class AccountData { @Id private String id; private String dateOpened; private String dateClosed; }
When I run build with gradle 5.4.1-5.5.1 it's fails with: Property "dateClosed" has no write accessor Property "dateOpened" has no write accessor
But when I run buidl through IDEA converter compiles well:
@Generated( value = "org.mapstruct.ap.MappingProcessor", date = "2019-07-30T11:32:12+0300", comments = "version: 1.3.0.Final, compiler: javac, environment: Java 12.0.1 (AdoptOpenJDK)" ) @Component public class AccountDataConverterImpl extends AccountDataConverter { @Override public Account convert(AccountData accountData) { if ( accountData == null ) { return null; } AccountBuilder account = Account.builder(); if ( accountData.getId() != null ) { account.id( accountData.getId() ); } if ( accountData.getDateOpened() != null ) { account.dateOpened( LocalDate.parse( accountData.getDateOpened(), DateTimeFormatter.ofPattern( "yyyy-MM-dd" ) ) ); } if ( accountData.getDateClosed() != null ) { account.dateClosed( LocalDate.parse( accountData.getDateClosed(), DateTimeFormatter.ofPattern( "yyyy-MM-dd" ) ) ); }
Mapstruct 1.3.0.Final lombok 1.18.8 gradle 5.4.1-5.5.1
Update 1: Also @setters on the fields fixes build, but compilation result is same as in the gradle case without @setters. Weird
The text was updated successfully, but these errors were encountered:
@Guchman I think that this is the same as #1581 and is caused by projectlombok/lombok#1538.
Sorry, something went wrong.
Closing it in favour of #1581. If it is different then we can reopen it.
No branches or pull requests
I have class
When I run build with gradle 5.4.1-5.5.1 it's fails with:
Property "dateClosed" has no write accessor
Property "dateOpened" has no write accessor
But when I run buidl through IDEA converter compiles well:
Mapstruct 1.3.0.Final
lombok 1.18.8
gradle 5.4.1-5.5.1
Update 1:
Also @setters on the fields fixes build, but compilation result is same as in the gradle case without @setters. Weird
The text was updated successfully, but these errors were encountered: