Note This issue is fixed with IntelliJ 2021.3.2
** Note-2 ** This issue still exists with inner classes, not with fields only.
demo project to demonstrate compilation failure with ecj incl. annotation processing
Having a small project which is easy to import and compile with IntelliJ to demonstrate the failure.
First, clone the project
git clone git@github.com:mbauhardt/ecj-filer-exception.git
Open the folder ecj-filer-exception
with IntelliJ. Click Rebuild Project
. Open the file Coffee.java
and hit Recompile 'Coffee.java'
.
You should see the warning [AutoValueCouldNotWrite] Could not write generated class org.example.AutoValue_Coffee: javax.annotation.processing.FilerException: Source file already exists : org.example.AutoValue_Coffee
.
Normally, this shouldn't be the case like with javac
.
Using the script compile.sh
to compile the project with the eclipse compiler without any warnings.