On 5/25/05, Joe Germuska <[EMAIL PROTECTED]> wrote:
> I was wondering about this:
>
> > BeanUtils.copyProperties(copy, baseHandler);
> > this.addExceptionConfig(copy);
> >-
> >+ copy.setProperties(baseHandler.getProperties());
> >+
>
> doesn't the strategy you implemented clobber properties which are
> set on the extending/copy? Shouldn't this process somehow honor
> properties which were already set in the copy? I think it should go
> through the list of property names in the baseHandler and, where the
> property is not already defined in the copy, in those cases it should
> copy them.
>
This part of the code executes when the extending config object
(ActionConfig in this case) isn't overriding baseHandler:
// Do we have this handler?
ExceptionConfig copy =
this.findExceptionConfig(baseHandler.getType());
if (copy == null) {
// We don't have this, so let's copy it
copy = (ExceptionConfig) RequestUtils
.applicationInstance(baseHandler.getClass().getName());
BeanUtils.copyProperties(copy, baseHandler);
this.addExceptionConfig(copy);
copy.setProperties(baseHandler.getProperties());
} else {
// process any extension that this config might have
copy.processExtends(getModuleConfig(), this);
}
Hubert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]