myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manol...@apache.org
Subject cvs commit: incubator-myfaces/src/jsfapi/javax/faces/component UISelectMany.java _SharedRendererUtils.java
Date Wed, 06 Apr 2005 10:21:56 GMT
manolito    2005/04/06 03:21:55

  Modified:    src/share/org/apache/myfaces/renderkit RendererUtils.java
                        _SharedRendererUtils.java
               src/jsfapi/javax/faces/component UISelectMany.java
                        _SharedRendererUtils.java
  Log:
  MYFACES-149 fix for NullPointerException in _SharedRendererUtils.getConvertedUISelectManyValue
  
  Revision  Changes    Path
  1.23      +14 -4     incubator-myfaces/src/share/org/apache/myfaces/renderkit/RendererUtils.java
  
  Index: RendererUtils.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/share/org/apache/myfaces/renderkit/RendererUtils.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- RendererUtils.java	26 Jan 2005 13:27:16 -0000	1.22
  +++ RendererUtils.java	6 Apr 2005 10:21:55 -0000	1.23
  @@ -38,6 +38,9 @@
    * @author Manfred Geiler (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.23  2005/04/06 10:21:55  manolito
  + * MYFACES-149 fix for NullPointerException in _SharedRendererUtils.getConvertedUISelectManyValue
  + *
    * Revision 1.22  2005/01/26 13:27:16  mmarinschek
    * The x:message tags are now extended to use the column-name as a label for all inputs
in an x:dataTable, without having to specify additional information.
    *
  @@ -784,10 +787,17 @@
                                                          Object submittedValue)
               throws ConverterException
       {
  -        if (submittedValue != null && !(submittedValue instanceof String[]))
  +        if (submittedValue == null)
           {
  -            throw new ConverterException("Submitted value of type String[] for component
: "+getPathToComponent(selectMany)+
  -                    "expected");
  +            return null;
  +        }
  +        else
  +        {
  +            if (!(submittedValue instanceof String[]))
  +            {
  +                throw new ConverterException("Submitted value of type String[] for component
: "
  +                                             + getPathToComponent(selectMany) + "expected");
  +            }
           }
           return _SharedRendererUtils.getConvertedUISelectManyValue(facesContext,
                                                                     selectMany,
  
  
  
  1.4       +7 -2      incubator-myfaces/src/share/org/apache/myfaces/renderkit/_SharedRendererUtils.java
  
  Index: _SharedRendererUtils.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/share/org/apache/myfaces/renderkit/_SharedRendererUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- _SharedRendererUtils.java	13 Oct 2004 11:51:01 -0000	1.3
  +++ _SharedRendererUtils.java	6 Apr 2005 10:21:55 -0000	1.4
  @@ -37,6 +37,9 @@
    * @author Manfred Geiler (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.4  2005/04/06 10:21:55  manolito
  + * MYFACES-149 fix for NullPointerException in _SharedRendererUtils.getConvertedUISelectManyValue
  + *
    * Revision 1.3  2004/10/13 11:51:01  matze
    * renamed packages to org.apache
    *
  @@ -88,6 +91,8 @@
           // This code is duplicated in jsfapi component package.
           // If you change something here please do the same in the other class!
   
  +        if (submittedValue == null) throw new NullPointerException("submittedValue");
  +
           ValueBinding vb = component.getValueBinding("value");
           Class valueType = null;
           Class arrayComponentType = null;
  
  
  
  1.18      +9 -1      incubator-myfaces/src/jsfapi/javax/faces/component/UISelectMany.java
  
  Index: UISelectMany.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/jsfapi/javax/faces/component/UISelectMany.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- UISelectMany.java	4 Mar 2005 00:41:40 -0000	1.17
  +++ UISelectMany.java	6 Apr 2005 10:21:55 -0000	1.18
  @@ -30,8 +30,11 @@
    * @author Manfred Geiler (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.18  2005/04/06 10:21:55  manolito
  + * MYFACES-149 fix for NullPointerException in _SharedRendererUtils.getConvertedUISelectManyValue
  + *
    * Revision 1.17  2005/03/04 00:41:40  mmarinschek
  - * fixed myfaces-
  + * fixed myfaces-
    * 116
    *
    * Revision 1.16  2005/03/04 00:28:45  mmarinschek
  @@ -294,6 +297,10 @@
               {
                   return renderer.getConvertedValue(context, this, submittedValue);
               }
  +            else if (submittedValue == null)
  +            {
  +                return null;
  +            }
               else if (submittedValue instanceof String[])
               {
                   return _SharedRendererUtils.getConvertedUISelectManyValue(context, this,
  
  
  
  1.5       +7 -2      incubator-myfaces/src/jsfapi/javax/faces/component/_SharedRendererUtils.java
  
  Index: _SharedRendererUtils.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/jsfapi/javax/faces/component/_SharedRendererUtils.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- _SharedRendererUtils.java	31 Mar 2005 22:47:14 -0000	1.4
  +++ _SharedRendererUtils.java	6 Apr 2005 10:21:55 -0000	1.5
  @@ -32,6 +32,9 @@
    * @author Manfred Geiler (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.5  2005/04/06 10:21:55  manolito
  + * MYFACES-149 fix for NullPointerException in _SharedRendererUtils.getConvertedUISelectManyValue
  + *
    * Revision 1.4  2005/03/31 22:47:14  schof
    * Whitney Hunter's patch for MYFACES-157
    *
  @@ -86,6 +89,8 @@
           // This code is duplicated in myfaces implementation renderkit package.
           // If you change something here please do the same in the other class!
   
  +        if (submittedValue == null) throw new NullPointerException("submittedValue");
  +
           ValueBinding vb = component.getValueBinding("value");
           Class valueType = null;
           Class arrayComponentType = null;
  
  
  

Mime
View raw message