Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/util
In directory james.mmbase.org:/tmp/cvs-serv17217
Modified Files:
ContextContainer.java
Log Message:
generics bugfix, some methods unexpectedly did not override super, causing all
kind of troubles
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/util
Index: ContextContainer.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/util/ContextContainer.java,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- ContextContainer.java 23 Feb 2008 16:00:44 -0000 1.61
+++ ContextContainer.java 26 Jun 2008 10:28:29 -0000 1.62
@@ -25,7 +25,7 @@
* there is searched for HashMaps in the HashMap.
*
* @author Michiel Meeuwissen
- * @version $Id: ContextContainer.java,v 1.61 2008/02/23 16:00:44 michiel Exp $
+ * @version $Id: ContextContainer.java,v 1.62 2008/06/26 10:28:29 michiel Exp $
**/
public abstract class ContextContainer extends AbstractMap<String, Object>
implements Map<String, Object> {
@@ -122,6 +122,7 @@
}
+ @Override
public Set<Entry<String, Object>> entrySet() {
return getBacking().entrySet();
}
@@ -174,7 +175,7 @@
/**
* Not all Strings can be allowed as keys. Keys are like variable names.
*/
-
+ @Override
public Object put(String key, Object value) {
if (key.indexOf('.') != -1) {
throw new RuntimeException("Key may not contain dots (" + key +
")");
@@ -261,8 +262,14 @@
}
}
- public boolean containsKey(String key) throws JspTagException {
- return containsKey(key, true);
+ @Override
+ public boolean containsKey(Object key) {
+ try {
+ return containsKey((String) key, true);
+ } catch (Exception e) {
+ log.error(e);
+ return false;
+ }
}
/**
@@ -290,15 +297,17 @@
}
- public Object get(String key) {
+ @Override
+ public Object get(Object key) {
try {
- return get(key, true);
+ return get((String) key, true);
} catch (JspTagException e) {
log.warn("Exception when trying to get value '" + key + "': " + e,
e);
}
return null;
}
+ @Override
public Set<String> keySet() {
HashSet<String> result = new HashSet<String>(getBacking().keySet());
if (parent != null) {
@@ -741,7 +750,7 @@
if (id == null) {
return "the context without id " + getBacking().toString();
} else {
- return "context '" + id + "'" + getBacking().toString();
+ return "context '" + id + "'";
}
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs