You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by or...@apache.org on 2005/09/03 00:20:51 UTC
svn commit: r267338 -
/myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java
Author: oros
Date: Fri Sep 2 15:20:45 2005
New Revision: 267338
URL: http://svn.apache.org/viewcvs?rev=267338&view=rev
Log:
MYFACES-483: check converted value for Object[] before attempt to cast
Modified:
myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java
Modified: myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java?rev=267338&r1=267337&r2=267338&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java Fri Sep 2 15:20:45 2005
@@ -247,6 +247,15 @@
if (isValid() && convertedValue != null)
{
// all selected values must match to the values of the available options
+
+ if (! (convertedValue instanceof Object[])) {
+ _MessageUtils.addErrorMessage(context, this,
+ INVALID_MESSAGE_ID,
+ new Object[] {getId()});
+ setValid(false);
+ return;
+ }
+
Object[] values = (Object[]) convertedValue;
if (values.length > 0)
{