frankframework / frank-doc

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

Setting a '@Default' annotation on an overridden method does not always work #140

Closed gvanbrakel closed 1 year ago

gvanbrakel commented 1 year ago

The @Default annotation set on an overridden setter does not always provide the expected result. See https://frankdoc.frankframework.org/#!/Listeners/MessageStoreListener. The attribute tableName has the right default, but that has also a '@Optional' annotation. attributes keyField and messageField do not have the right default displayed.

mhdirkse commented 1 year ago

I have investigated method MessageStoreListener.setKeyField(). This method is overridden from JdbcListener.setKeyField(). That method has an @IbisDoc annotation that has as its value an array of three strings. The last element of the value array is the default value. This inherited @IbisDoc annotation is more important then the @Default annotation on MessageStoreListener.setKeyField().

I propose that you remove all @IbisDoc and @IbisDocRef annotations in the F!F sources. This will make things a lot easier to understand. There are alternative JavaDoc tags and Java annotations now. We have @Default, @ff.default and @ff.ref (undocumented right now). I will check whether @ff.ref is tested by our unit tests and I will document it.

mhdirkse commented 1 year ago

Documentation of @ff.ref in iaf project is in the following PR: https://github.com/ibissource/iaf/pull/4082

mhdirkse commented 1 year ago

Documentation of @ff.ref in frank-doc project: https://github.com/ibissource/frank-doc/pull/141.