[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Abstract Beans JBKERNEL-10
david.lloyd@jboss.com
do-not-reply at jboss.com
Mon Jul 27 15:51:59 EDT 2009
"marius.bogoevici" wrote :
| One issue I encountered is that metadata such as PropertyMetaData is stored in a Set in the BeanMetaData, yet PropertyMetaData does not implement equals() and hashCode().
|
| This leads to the possibility of writing definitions such as:
|
I ran into this as well. To add to the strangeness, the AbstractBeanMetaData.getProperty(String) method iterates the whole set looking for a matching property, incurring a O(n) overhead. BeanMetaDataBuilder does much the same (in this case, iterating the whole set to remove the duplicate-named property).
In my opinion, the backing structure (in both BMD and BMDB) should be changed to a LinkedHashMap<String,PropertyMetaData> ensuring that properties are installed uniquely and in order.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246287#4246287
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246287
More information about the jboss-dev-forums
mailing list