[ http://opensource.atlassian.com/projects/spring/browse/RCP-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter De Bruycker resolved RCP-121.
-----------------------------------
Resolution: Fixed
fixed, the createColumnInfo call moved from the constructor to the setMessageSource() method
> Wrong BaseTableModel order creation causes java.lang.IllegalArgumentException in BeanTableModel
> -----------------------------------------------------------------------------------------------
>
> Key: RCP-121
> URL: http://opensource.atlassian.com/projects/spring/browse/RCP-121
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Environment: Fedora Core 3
> JDK 1.4.2_08
> Reporter: Mauro Ransolin
> Assignee: Peter De Bruycker
>
> The constructor:
> public BaseTableModel(List rows) {
> setRows(rows);
> createColumnInfo();
> }
> is creating the ColumnsInfo before BeanTableModel to set its message attribute, so BeanTableModel.createColumnNames() is thrown java.lang.IllegalArgumentException:
> java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it cannot be null
> at org.springframework.util.Assert.notNull(Assert.java:90)
> at org.springframework.util.Assert.notNull(Assert.java:102)
> at org.springframework.richclient.table.BeanTableModel.createColumnNames(BeanTableModel.java:85)
> at org.springframework.richclient.table.BaseTableModel.createColumnInfo(BaseTableModel.java:72)
> at org.springframework.richclient.table.BeanTableModel.createColumnInfo(BeanTableModel.java:77)
> at org.springframework.richclient.table.BaseTableModel.<init>(BaseTableModel.java:44)
> at org.springframework.richclient.table.BaseTableModel.<init>(BaseTableModel.java:39)
> at org.springframework.richclient.table.BeanTableModel.<init>(BeanTableModel.java:49)
> at com.wplex.common.client.ui.BaseTableModel.<init>(BaseTableModel.java:30)
> Some code:
> public abstract class BaseTableModel extends BeanTableModel
> {
> public BaseTableModel(ValueObject vo, MessageSource messageSource)
> {
> super(vo.getClass(), messageSource);
> }
> }
> public class CompanyTableModel extends BaseTableModel
> {
> /**
> * @param messageSource
> */
> public CompanyTableModel(MessageSource messageSource)
> {
> super(new CompanyVO(), messageSource);
> }
> }
> Startup:
> new CompanyTableModel((MessageSource) setApplicationContext().getBean("messageSource"))); //$NON-NLS-1$
> Where MessageSource is not null!
> The createColumnInfo() invocation should be removed from BaseTableModel(List rows) constructor and callers of this constructor should be reviewed to avoid possible bugs.
> Thanks,
> Mauro.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|