commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Salas" <>
Subject BeanUtils.copyProperties(dest, orig). Converting nulls to new Instances
Date Fri, 12 May 2006 13:50:10 GMT
Hello everyone,

I'm using the BeanUtils.copyProperties with null values. My problem is that
I have a Calendar property, if the property is null when copied it, it is
set to a new instance of a Calendar instead of just null. I looked around
and I found something about ConvertUtils. Is this the way to override the
default behavior?.

And just to know, why is this the default behavior?. Wouldn't it be easier
to just copy null?

Thanx for the help.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message