You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Rob Decker (JIRA)" <my...@incubator.apache.org> on 2005/04/15 17:58:16 UTC
[jira] Created: (MYFACES-194) inputCalendar throws IllegalArguementException when a ConversionException is supposed to be thrown
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
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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (MYFACES-194) inputCalendar throws IllegalArguementException when a ConversionException is supposed to be thrown
Posted by David Heffelfinger <dh...@gmail.com>.
I didn't read your previous message carefully. That day I was busy with some
stuff unrelated to MyFaces.
David
On 4/15/05, Rob Decker (JIRA) <my...@incubator.apache.org> wrote:
>
> [
> http://issues.apache.org/jira/browse/MYFACES-194?page=comments#action_62914]
>
> Rob Decker commented on MYFACES-194:
> ------------------------------------
>
> Yes it's fixed by 167. Wish you would of told me when I posted on the user
> list the other day.
>
> > 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
> > 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
> -
> If you want more information on JIRA, or have a bug to report see:
> http://www.atlassian.com/software/jira
>
>
[jira] Commented: (MYFACES-194) inputCalendar throws IllegalArguementException when a ConversionException is supposed to be thrown
Posted by "Rob Decker (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-194?page=comments#action_62914 ]
Rob Decker commented on MYFACES-194:
------------------------------------
Yes it's fixed by 167. Wish you would of told me when I posted on the user list the other day.
> 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
> 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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-194) inputCalendar throws IllegalArguementException when a ConversionException is supposed to be thrown
Posted by "David R. Heffelfinger (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-194?page=comments#action_62908 ]
David R. Heffelfinger commented on MYFACES-194:
-----------------------------------------------
Rob,
This seems like a duplicate of MYFACES-167. Can you get the latest nightly build from http://cvs.apache.org/builds/myfaces/nightly/ and verify that the problem still exists?
David
> 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
>
> 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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-194) inputCalendar throws IllegalArguementException when a ConversionException is supposed to be thrown
Posted by "Rob Decker (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-194?page=history ]
Rob Decker updated MYFACES-194:
-------------------------------
Attachment: cal_con.patch
This patch should fix the problem, although it needs to be tested.
> 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
> 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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira