frankframework / frank-doc

Frank!Doc
https://frankdoc.frankframework.org
Apache License 2.0
4 stars 5 forks source link

Opportunity for code cleanup in FrankDocModel.createAttributes() #178

Open mhdirkse opened 7 months ago

mhdirkse commented 7 months ago

Two tasks of this method can be removed:

  1. Currently, a getter that accompanies an attribute setter is used for type checking. The return type of the getter is compared with the argument type of the setter. This check becomes irrelevant because getters may be hidden. Getters that are done with Lombok @Getter will not be visible when the de-lombok step is out of the F!F build.
  2. Attributes of an enum type will always have the enum as argument type. The check for getXxxEnum() to find the enum type will become irrelevant and can be removed.

See https://github.com/frankframework/frankframework/issues/6344.

jkosternl commented 7 months ago

A lot of information is lost if we don't delombok our code, because the Javadoc tool does not use the lombok plugin to do annotation processing. The XSD diff which I tested only on the core module code had about 500 lines of differences. The current solution is in the PR, keeping the delombok step.

If number 2 (enum attributes) does not make sense anymore, feel free to do that activity. Please compare the output XSD on the master, to see if no (real) differences are there.

jkosternl commented 7 months ago

Just discussed with Niels: number 2 is OK to perform, so if you have some time for that, that's ok. 👍🏻 Number 1 should stay.