I've attached a patch to BeanPropertyComponentAdapter to allow it to handle real objects for parameters (such as Date objects, Calendars, etc).
3 Test Cases attached as well. The main one (for explanation's sake is
public void testSetBeanPropertiesWithValueObjects()
{
BeanPropertyComponentAdapterFactory factory = (BeanPropertyComponentAdapterFactory) createComponentAdapterFactory();
Map properties = new HashMap();
properties.put("lenient", Boolean.FALSE);
properties.put("2DigitYearStart", new Date(0));
BeanPropertyComponentAdapter adapter = (BeanPropertyComponentAdapter)factory.createComponentAdapter(SimpleDateFormat.class,SimpleDateFormat.class,null);
adapter.setProperties(properties);
picoContainer.registerComponent(adapter);
SimpleDateFormat dateFormat = (SimpleDateFormat)picoContainer.getComponentInstance(SimpleDateFormat.class);
assertNotNull(dateFormat);
assertEquals(false, dateFormat.isLenient());
assertEquals(new Date(0), dateFormat.get2DigitYearStart());
}
Updated patch for current state of the trunk