@Ceki Gulcu, now I understand that this is not an issue for logback, but current implementation is not predictable unfortunately. ch.qos.logback.core.joran.util.beans.BeanDescriptionFactory creates BeanDescription based on output of
Method[] methods = clazz.getMethods();
And according to java documentation:
The elements in the returned array are not sorted and are not in any particular order.
So, BeanDescription could be as:
{nestedField=public void ClassA.addNestedField(java.lang.String)}
{nestedField=public void ClassB.addNestedField(java.lang.Integer)}
Maybe it makes sense to implement ch.qos.logback.core.joran.util.beans.BeanDescriptionFactory#create with predictable output. What do you think? (For example as I proposed to take method definition from leaf element of classes hierarchy or only from parent one and ignore leaves)
|