[MGNLUI-663] ClassCastException in AbstractFieldBuilder.getOrCreateProperty(..) Created: 15/Feb/13 Updated: 18/Feb/13 Resolved: 15/Feb/13 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Federico Grilli | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Description |
|
When trying to build fields using plain Vaadin BeanItem I get
java.lang.ClassCastException: com.vaadin.data.util.MethodProperty cannot be cast to info.magnolia.ui.vaadin.integration.jcr.DefaultProperty
at info.magnolia.ui.admincentral.field.builder.AbstractFieldBuilder.getOrCreateProperty(AbstractFieldBuilder.java:142)
at info.magnolia.ui.admincentral.field.builder.AbstractFieldBuilder.getField(AbstractFieldBuilder.java:99)
at info.magnolia.ui.admincentral.form.builder.FormBuilder.buildForm(FormBuilder.java:87)
...
Looking at source, it seems there is no need for casting to info.magnolia.ui.vaadin.integration.jcr.DefaultProperty. Indeed without that cast my code works just fine and so the existing junit tests. |