question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ConstructorProperties` in Delomboked code.

See original GitHub issue

Short description

Say I have a class

@RequiredArgsConstructor
@Getter
public class BookDto {
    private final String name;
}

then I expect a constructor to be generated, by default without @ConstructorProperties (as the default for lombok.anyConstructor.addConstructorProperties is false). However, the @ConstructorProperties is always being shown.

Expected behavior

Delombok constructors should add @ConstructorProperties if and only if this setting is enabled, as per lombok.anyConstructor.addConstructorProperties in lombok.config.

Version information

  • IDEA Version: IntelliJ IDEA 2018.3.3 (Community Edition) Build #IC-183.5153.38, built on January 9, 2019 JRE: 1.8.0_152-release-1343-b26 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.19.15-300.fc29.x86_64
  • JDK Version: openjdk version “11.0.1” 2018-10-16 OpenJDK Runtime Environment 18.9 (build 11.0.1+13) OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode, sharing)
  • OS Type & Version: I’m on Fedora 29.
  • Lombok Plugin Version: v0.23-2018.3
  • Lombok Dependency Version: 1.18.4

Steps to reproduce

What steps do we need to take to reproduce this issue?

  1. Add @RequiredArgsConstructor on a class with final members.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mplushnikovcommented, Feb 6, 2019

@bric3 I would prefer to have separate issues or PRs for this. Smaller PR are easier to check and to integrate as a big one:)

0reactions
tangqiuyangcommented, Jul 1, 2019

very good

Read more comments on GitHub >

github_iconTop Results From Across the Web

[project lombok] @ConstructorProperties - Google Groups
ConstructorProperties. My class which is written in Lombok enabled Java is delomboked and then compiled by GWT (Google Web Toolkit) into javascript.
Read more >
How to get Jackson to ignore constructorproperties
ConstructorProperties({"value"}) . Based on your delombok it seems that you have a set of annotations that will prevent default constructor to ...
Read more >
Delombok - Project Lombok
Yang Bo has written an sbt plugin for delomboking your source code. Limitations. Delombok tries to preserve your code as much as it...
Read more >
Lombok @AllArgsConstructor examples - Java Tutorials
Lombok @AllArgsConstructor generates a constructor with one parameter for each field in your class, by default generated constructor will be ...
Read more >
Lombok Configuration System | Baeldung
This file can leave at the root of our project, source code, ... ConstructorProperties annotation to all constructors with arguments.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found