You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/08/31 12:29:31 UTC

svn commit: r265003 - /myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java

Author: mmarinschek
Date: Wed Aug 31 03:29:25 2005
New Revision: 265003

URL: http://svn.apache.org/viewcvs?rev=265003&view=rev
Log:
fix for MYFACES-458

Modified:
    myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java

Modified: myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java?rev=265003&r1=265002&r2=265003&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java Wed Aug 31 03:29:25 2005
@@ -75,7 +75,7 @@
 
     public boolean containsKey(Object key)
     {
-        checkKey(key);
+        checkKeyAndValue(key);
         if (getPropertyDescriptor((String)key) == null)
         {
             return _attributes.containsKey(key);
@@ -120,7 +120,7 @@
 
     public Object get(Object key)
     {
-        checkKey(key);
+        checkKeyAndValue(key);
         PropertyDescriptor propertyDescriptor
            = getPropertyDescriptor((String)key);
         if (propertyDescriptor != null)
@@ -142,7 +142,7 @@
 
     public Object remove(Object key)
     {
-        checkKey(key);
+        checkKeyAndValue(key);
         PropertyDescriptor propertyDescriptor = getPropertyDescriptor((String)key);
         if (propertyDescriptor != null)
         {
@@ -157,7 +157,7 @@
      */
     public Object put(Object key, Object value)
     {
-        checkKey(key);
+        checkKeyAndValue(key);
         PropertyDescriptor propertyDescriptor = getPropertyDescriptor((String)key);
         if (propertyDescriptor != null)
         {
@@ -247,9 +247,10 @@
     }
 
 
-    private void checkKey(Object key)
+    private void checkKeyAndValue(Object key, Object value)
     {
         if (key == null) throw new NullPointerException("key");
+        if (value == null) throw new NullPointerException("value");
         if (!(key instanceof String)) throw new ClassCastException("key is not a String");
     }