commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36812] - [collections] Enhance ExtendedProperties to not choke on non-Vector elements being added
Date Mon, 26 Sep 2005 11:15:54 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36812>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36812





------- Additional Comments From ebourg@apache.org  2005-09-26 13:15 -------
(In reply to comment #0)
> This will lead to situations (and code) as shown in
>
http://svn.apache.org/viewcvs.cgi/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java?rev=221982&r1=221975&r2=221982
> because ExtendedProperties does accept the value but chokes later with a CCE.

This code will also copy a Vector value into a new Vector, this should be
slightly more efficient:

    if (value instanceof List && !(value instanceof Vector))
    {
        veloConfig.addProperty(key, new Vector((List) value));
    }
    else
    {
        veloConfig.addProperty(key, value);
    }

Btw, since Turbine already uses commons-configuration, why not replacing the
ExtendedProperties with PropertiesConfigurations ?



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message