[
https://issues.apache.org/jira/browse/TAP5-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15865540#comment-15865540
]
Jochen Kemnade commented on TAP5-2572:
--
The {{isBar}} property is added by the Scala property detection algorithm.
> Duplicate properties in bean model
> --
>
> Key: TAP5-2572
> URL: https://issues.apache.org/jira/browse/TAP5-2572
> Project: Tapestry 5
> Issue Type: Bug
> Components: beanmodel
>Affects Versions: 5.4.1
>Reporter: Jochen Kemnade
>
> If you create a BeanModel for a class with a private field that has the same
> name as a getter method, you end up with two properties:
> {code:java}
> package org.example;
> import java.util.Collections;
> import java.util.Locale;
> import org.apache.tapestry5.beaneditor.BeanModel;
> import org.apache.tapestry5.beaneditor.BeanModelSourceBuilder;
> import org.apache.tapestry5.internal.services.MapMessages;
> import org.apache.tapestry5.services.BeanModelSource;
> public class Foo {
> private boolean isBar;
> public boolean isBar() {
> return isBar;
> }
> public static void main(final String[] args) {
> BeanModelSource bms = new BeanModelSourceBuilder().build();
> BeanModel model = bms.createDisplayModel(Foo.class, new
> MapMessages(Locale.US, Collections.emptyMap()));
> System.out.println(model.getPropertyNames());
> }
> }
> {code}
> The output is {{ [bar, isBar] }}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)