jakarta-bsf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r800102 - /jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java
Date Sun, 02 Aug 2009 16:03:51 GMT
Author: sebb
Date: Sun Aug  2 16:03:50 2009
New Revision: 800102

URL: http://svn.apache.org/viewvc?rev=800102&view=rev
Log:
Restore put(Object, Object) removed in r799789 as needed for Java 1.4 compatibility

Modified:
    jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java

Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java
URL: http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java?rev=800102&r1=800101&r2=800102&view=diff
==============================================================================
--- jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java (original)
+++ jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/SimpleBindings.java Sun Aug
 2 16:03:50 2009
@@ -36,13 +36,13 @@
     /**
      * In which the key-value pairs are stored.
      */
-    private final Map map;
+    private final Map/*<String,Object>*/ map;
 
     /**
      * Constructs a SimpleBindings.
      */
     public SimpleBindings(){
-        map = new HashMap();
+        map = new HashMap/*<String,Object>*/();
     }
 
     /**
@@ -53,7 +53,7 @@
      *            SimpleBindings
      * @throws NullPointerException if the map is null
      */
-    public SimpleBindings(Map map){
+    public SimpleBindings(Map/*<String,Object>*/ map){
         if (map == null){
             throw new NullPointerException("parameter must not be null");
         }
@@ -106,6 +106,16 @@
         return map.put(key,value);
     }
 
+    /**
+     * This method is only needed for Java 1.4 compatibility.
+     * 
+     * @deprecated use put(String, Object) instead
+     */
+    public Object put(Object key, Object value) {
+        validateKey(key);
+        return map.put(key,value);
+    }
+
     /** {@inheritDoc} */
     public void putAll(Map/*<? extends String,? extends Object>*/ toMerge) {
 
@@ -161,7 +171,7 @@
     }
 
     /** {@inheritDoc} */
-    public Set/*<String*/ keySet() {
+    public Set/*<String>*/ keySet() {
         return map.keySet();
     }
 
@@ -171,4 +181,5 @@
         return map.remove(key);
     }
 
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org


Mime
View raw message