Hi,
I am having a problem with populating a
Java Bean( with 4 fields) contents from a map which has 4 key, value pairs while using apache BeanUtils.populate(bean,map) that when my map has a key with upper case
string then my bean is not getting populated and i guess its because of Java reflection that BeanUtils.populate() uses and expectes the first letter of every map key should begin with a lower case letter and i am wondering if there is any fix for my problem.
Here is the sample code
And when i say
i get null. But when the map key starts with lower case then the value is copied from the map to bean using BeanUtils.populate().
How can i copy the map contents to my bean if the keys in the map start with upper case and i cant change that as my service is providing the xml in that format and i am converting the xml to HashMap and then using that to copy the contents to a bean.
Appreciate your suggestion and guidance.