JIRA: BSF-35 Wrong parameter type for [Simple]Bindings.put - key must be a String, not an object.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/bsf/trunk@799789 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bsf3/bsf-api/src/main/java/javax/script/Bindings.java b/bsf3/bsf-api/src/main/java/javax/script/Bindings.java
index a38f2f7..de4eb0c 100644
--- a/bsf3/bsf-api/src/main/java/javax/script/Bindings.java
+++ b/bsf3/bsf-api/src/main/java/javax/script/Bindings.java
@@ -42,7 +42,7 @@
      * @throws ClassCastException if the key is not a String
      * @throws IllegalArgumentException if the key is an empty string
      */
-    public Object put(Object key,Object value);
+    public Object put(String key, Object value);
 
     /**
      * Copies all of the mappings from the specified map to this map.
@@ -57,7 +57,7 @@
      *         if some key in the map is an empty String
      * @throws ClassCastException if some key in the map is not a String 
      */
-    public void putAll(Map toMerge);
+    public void putAll(Map/*<? extends String,? extends Object>*/ toMerge);
 
      /**
       * Returns true if this map contains a mapping for the specified key.
diff --git a/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java b/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java
index 8bd8b33..bfedf75 100644
--- a/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java
+++ b/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java
@@ -87,12 +87,6 @@
         }
     }
 
-    /** {@inheritDoc} */
-    public Object put(Object key, Object value) {
-        validateKey(key);
-        return put((String) key, value);
-    }
-
     /**
      * Associates the specified value with the specified key in a 
      * java.util.Map. If the map previously contained a mapping for 
@@ -113,7 +107,7 @@
     }
 
     /** {@inheritDoc} */
-    public void putAll(Map toMerge) {
+    public void putAll(Map/*<? extends String,? extends Object>*/ toMerge) {
 
         Set keySet= toMerge.keySet();
         Iterator keys= keySet.iterator();
@@ -156,7 +150,7 @@
     }
 
     /** {@inheritDoc} */
-    public Set entrySet() {
+    public Set/*<Map.Entry<String,Object>>*/ entrySet() {
         return map.entrySet();
     }
 
@@ -167,7 +161,7 @@
     }
 
     /** {@inheritDoc} */
-    public Set keySet() {
+    public Set/*<String*/ keySet() {
         return map.keySet();
     }