[wildfly-dev] Adding attributes where the default value is different from the legacy implied behaviour

Darran Lofthouse darran.lofthouse at jboss.com
Wed Nov 13 11:44:08 EST 2013


I had a similar new attribute with different default behaviour that I 
wanted to add to WildFly, I think the only way Brian let it in in the 
end was: -
  - Define the attribute with the default to match the old behaviour.
  - Update the config to reflect the desired new behaviour.

In the past I think I updated the parser to assume the attribute was set 
with the old value when parsing older schemas but I think there was 
still a problem with that as it would affect any scripts not setting the 
attribute.

Regards,
Darran Lofthouse.


On 13/11/13 16:33, Kabir Khan wrote:
> The https://github.com/wildfly/wildfly/pull/5460 (and the linked PR within) below illustrates the ‘problem’. Although Infinispan is where this popped up, this is bound to have happened in other places as well.
>
> The latest version of the infinispan subsystem adds a boolean ‘statistics’ which allows us to turn off statistics gathering in the infinispan subsystem. Previously this was always on, i.e. ’true’. We want the user to have to explicitly turn it on, so its default value is ‘false’.
>
> However, in the old parsers, it struck me that they do not expose this attribute in their versions of the xsd, and so they before https://github.com/wildfly/wildfly/pull/5460 would have ended up always not setting the attribute, which means ‘false’. This is different behaviour than running the old xml in an older version of AS where this would have resulted in ‘true’, hence this fix.
>
>
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>


More information about the wildfly-dev mailing list