diff --git a/src/helma/framework/RequestTrans.java b/src/helma/framework/RequestTrans.java index 3b4e8ba9..c906bec1 100644 --- a/src/helma/framework/RequestTrans.java +++ b/src/helma/framework/RequestTrans.java @@ -18,6 +18,7 @@ package helma.framework; import helma.objectmodel.*; import helma.util.Base64; +import helma.util.SystemMap; import java.io.*; import java.util.*; @@ -59,7 +60,7 @@ public class RequestTrans implements Externalizable { */ public RequestTrans() { httpMethod = 0; - values = new HashMap(); + values = new SystemMap(); } /** @@ -67,7 +68,7 @@ public class RequestTrans implements Externalizable { */ public RequestTrans(byte method) { httpMethod = method; - values = new HashMap(); + values = new SystemMap(); } /** diff --git a/src/helma/framework/ResponseTrans.java b/src/helma/framework/ResponseTrans.java index c40b0c56..e26fd564 100644 --- a/src/helma/framework/ResponseTrans.java +++ b/src/helma/framework/ResponseTrans.java @@ -123,8 +123,8 @@ public final class ResponseTrans implements Externalizable { public ResponseTrans() { super(); message = error = null; - values = new HashMap(); - handlers = new HashMap(); + values = new SystemMap(); + handlers = new SystemMap(); } /** diff --git a/src/helma/framework/core/ApplicationBean.java b/src/helma/framework/core/ApplicationBean.java index 1f38cfa9..03475cb0 100644 --- a/src/helma/framework/core/ApplicationBean.java +++ b/src/helma/framework/core/ApplicationBean.java @@ -18,6 +18,7 @@ package helma.framework.core; import helma.objectmodel.INode; import helma.util.CronJob; +import helma.util.SystemMap; import java.io.File; import java.io.Serializable; import java.util.ArrayList; @@ -386,7 +387,7 @@ public class ApplicationBean implements Serializable { * @return ... */ public Map getproperties() { - return app.getProperties(); + return new SystemMap(app.getProperties()); } /** @@ -432,7 +433,7 @@ public class ApplicationBean implements Serializable { * @return ... */ public Map getSkinfiles() { - Map skinz = new HashMap(); + Map skinz = new SystemMap(); for (Iterator it = app.getPrototypes().iterator(); it.hasNext();) { Prototype p = (Prototype) it.next(); @@ -451,7 +452,7 @@ public class ApplicationBean implements Serializable { * @return ... */ public Map getSkinfilesInPath(Object[] skinpath) { - Map skinz = new HashMap(); + Map skinz = new SystemMap(); for (Iterator it = app.getPrototypes().iterator(); it.hasNext();) { Prototype p = (Prototype) it.next(); diff --git a/src/helma/framework/core/Prototype.java b/src/helma/framework/core/Prototype.java index 8a5b051c..73541fa3 100644 --- a/src/helma/framework/core/Prototype.java +++ b/src/helma/framework/core/Prototype.java @@ -21,6 +21,7 @@ import helma.objectmodel.*; import helma.objectmodel.db.DbMapping; import helma.scripting.*; import helma.util.Updatable; +import helma.util.SystemMap; import java.io.*; import java.util.*; @@ -447,7 +448,7 @@ public final class Prototype { } // a map that dynamically expands to all skins in this prototype - final class SkinMap extends HashMap { + final class SkinMap extends SystemMap { long lastSkinmapLoad = 0; Object[] skinpath; diff --git a/src/helma/framework/core/Skin.java b/src/helma/framework/core/Skin.java index bf561f54..1359334b 100644 --- a/src/helma/framework/core/Skin.java +++ b/src/helma/framework/core/Skin.java @@ -21,6 +21,7 @@ import helma.objectmodel.ConcurrencyException; import helma.objectmodel.INode; import helma.scripting.*; import helma.util.HtmlEncoder; +import helma.util.SystemMap; import java.io.*; import java.net.URLEncoder; import java.util.*; @@ -485,8 +486,8 @@ public final class Skin { // if (parameters == null) // parameters = new HashMap (); Object[] arguments = { - (parameters == null) ? new HashMap() - : new HashMap(parameters) + (parameters == null) ? new SystemMap() + : new SystemMap(parameters) }; Object value = reval.scriptingEngine.invoke(handlerObject, diff --git a/src/helma/util/SystemMap.java b/src/helma/util/SystemMap.java new file mode 100644 index 00000000..60580a79 --- /dev/null +++ b/src/helma/util/SystemMap.java @@ -0,0 +1,49 @@ +/* + * Helma License Notice + * + * The contents of this file are subject to the Helma License + * Version 2.0 (the "License"). You may not use this file except in + * compliance with the License. A copy of the License is available at + * http://adele.helma.org/download/helma/license.txt + * + * Copyright 1998-2003 Helma Software. All Rights Reserved. + * + * $RCSfile$ + * $Author$ + * $Revision$ + * $Date$ + */ + +package helma.util; + + +import java.util.*; + +/** + * Map class used internally by Helma. + */ +public class SystemMap extends HashMap { + + + /** + * Construct an empty SystemMap. + */ + public SystemMap() { + super(); + } + + /** + * Construct an empty SystemMap with the given initial capacity. + */ + public SystemMap(int initialCapacity) { + super(initialCapacity); + } + + /** + * Construct a SystemMap with the contents of Map map. + */ + public SystemMap(Map map) { + super(map); + } + +}