necessary?
-commons-configuration-1.0-dev
+commons-collections
------------------------------------------------
-version : 1.0-dev
+version : 2.1
url : http://jakarta.apache.org/commons/
description: needed for parsing the configuration
- properties file
-todo : moved into the Commons Collections as
- ExtendedProperties / replace with
- commons-collections
+ properties file and provides more useful collections
+ like a LRUCache
+todo :
commons-net20030111
import multex.Exc;
import multex.Failure;
+import org.apache.commons.collections.ExtendedProperties;
import org.apache.commons.configuration.PropertiesConfiguration;
import java.io.File;
/**
* @author idefix
*/
-public class MirPropertiesConfiguration extends PropertiesConfiguration {
+public class MirPropertiesConfiguration extends ExtendedProperties {
private static MirPropertiesConfiguration instance;
private static ServletContext context;
private static String contextPath;
while (iterator.hasNext()) {
String key = (String) iterator.next();
- Object o = this.getString(key);
+ Object o = this.getProperty(key);
if (o == null) {
o = new Object();
* @see org.apache.commons.configuration.Configuration#getString(java.lang.String)
*/
public String getString(String key) {
- if (super.getString(key) == null) {
+ Object object = getProperty(key);
+ if(object != null){
+ if (object instanceof String) {
+ return (String)object;
+ } else {
+ return object.toString();
+ }
+ } else {
return new String();
}
-
- return super.getString(key);
}
/**