commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Orciuch" <>
Subject [CONFIGURATION] Handling of non-string properties occuring multiple times
Date Fri, 20 Dec 2002 22:15:20 GMT
Currently the string based properties are handled as follows: = aaa = bbb

Configuration object returns "aaa" when using the following call:
getString(""). However, in this scenario: = 1 = 2

... calling getInt("") will cause ClassCastException because multiple
instances of the same property are put in a Container object.

I propose that non-string properties (such as int, long, double, float,
byte) are handled the same way as strings. This is useful if you want to
keep the original property file intact and include it in a custom property
include =

In the above scenario, call to
getInt("services.TemplateService.layout.cache.size") should return 20 rather
than throw a ClassCastException. Attached patch implements my proposal.

Best regards,

Mark Orciuch -
Jakarta Jetspeed - Enterprise Portal in Java

View raw message