I have moved from automatic run-time enhancement to explicit post-compile enhancement in an Ant build.xml in a NetBeans web app, and sometimes on editing a file that performs a generic for loop over an @entity type I get a generics error. The generic for loop is:
for (Steel s: this.steelMaterials.getL_Steel().getEls()) { .. }
Where getEls() here gives:
List<Steel>
This sometimes (only, I don't understand the circumstances) gives this error:
incompatible types found: java.lang.Object required: com.example.entity.Steel for (Steel s: this.steelMaterials.getL_Steel().getEls()) {
The workaround is to simply clean and build the entire project, which is quite tedious and time-consuming.
I appreciate any feedback on how to address this to improve my development cycle, which is compromised by this.