Skip to content

Configuration inheritance fails on rebuild with JDK 19 #3

@marriesvdh

Description

@marriesvdh

Issue:

The initial build works fine. However after changing a beanknife config class (adding a space is enough) and building again, two problems occur:

  1. For the edited config class, the inherited annotations are ignored in the build.
  2. The generated Meta class only contains the edited class.

Problem 1 occurs when building with JDK 19.0.2, but not with JDK 1.8.0_42
Problem 2 occurs with both SDKs

Steps to reproduce:

  • See https://github.com/marriesvdh/beanknife-inheritance-bug for a sample project
  • Build the project
    • The BeanView and BeanView2 classes are generated correctly (@ViewSetters(Access.PUBLIC) is inherited correctly, so BeanView contains a setter)
    • BeanMeta contains a reference to both views
  • Touch BeanViewConfig by adding a space
  • Build the project again (without clean)
    • The setter is not present anymore in the generated BeanView class.
    • The generated BeanMeta class only contains a reference to BeanView (and not BeanView2)

(After performing mvn clean, the first build is correct again)

Temporary workaround?

I assume the problem lies in the incremental compilation feature of Beanknife. Is it possible to disable this feature and rebuild all Beanknife classes everytime? As a temporary fix.

For now, cleaning before each build solves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions