Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
2.2.0
-
None
-
3
-
Tiger Sprint 134, Tiger Sprint 135, Tiger Sprint 139
Description
In the case a getter method in a Bean that was generated by the Beanwriter is changed manually, we should prevent that the Beanwriter overrides that method when the Bean for some reason is generated again. At the moment removing the @HippoEssentialsGenerated annotation is an effective way to prevent overwriting. But the Beanwriter will add the method again (because it thinks it is not there), so the Bean class gets duplicate methods and will not compile.
We can support this use case better by making it possible to add some marker that tells the Beanwriter not to override the method.
Suggestion: add an extra attribute to the @HippoEssentialsGenerated annotation, e.g
@HippoEssentialsGenerated(internalName = "myhippoproject:source", overwrite = false)
That attribute should not be required and by default be true. When the Beanwriter encounters such a flag, it must report with a warning in the Essentials dashboard "WARNING Will not override method X in class Y due to its annotation".
Attachments
Issue Links
- relates to
-
ESSENTIALS-1051 Support @HippoEssentialsGenerated allowsModification=false at class level
- Closed