[ http://issues.apache.org/jira/browse/MYFACES-194?page=all ] Grant Smith closed MYFACES-194: -------------------------------
Resolution: Fixed Fix Version: Nightly Build > inputCalendar throws IllegalArguementException when a ConversionException is > supposed to be thrown > -------------------------------------------------------------------------------------------------- > > Key: MYFACES-194 > URL: http://issues.apache.org/jira/browse/MYFACES-194 > Project: MyFaces > Type: Bug > Versions: 1.0.9 beta > Environment: All > Reporter: Rob Decker > Priority: Critical > Fix For: Nightly Build > Attachments: cal_con.patch > > If the conversion fails for an inputCalendar the encodeEnd method does not > check if isValid is true and tries to get a date object to encode: > Date value = RendererUtils.getDateValue(inputCalendar); > which throws an IllegalArguementException even though a ConversionException > was already thrown and a message added. > This code should check isValid to determine what to encode: > String svalue; > if (isValid()) { > Date value = RendererUtils.getDateValue(inputCalendar); > svalue = converter.getAsString(value); > } else { > svalue = RendererUtils.getStringValue(inputCalendar); > } > While this isn't the exact fix a review of the encodeEnd method will make it > clear that when the calendar is a popup expecting the value to be a valid > date after a conversion failure already occured is causing this bug. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira