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

svn commit: r357758 - in /myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date: HtmlDateRenderer.java HtmlInputDate.java

Author: matzew
Date: Mon Dec 19 11:19:27 2005
New Revision: 357758

URL: http://svn.apache.org/viewcvs?rev=357758&view=rev
Log:
MYFACES-934

Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlDateRenderer.java
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlInputDate.java

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlDateRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlDateRenderer.java?rev=357758&r1=357757&r2=357758&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlDateRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlDateRenderer.java Mon Dec 19 11:19:27 2005
@@ -17,7 +17,6 @@
 
 import java.io.IOException;
 import java.text.DateFormatSymbols;
-import java.text.ParseException;
 import java.util.Calendar;
 import java.util.Locale;
 import java.util.Map;
@@ -323,7 +322,7 @@
         UserData userData = (UserData) submittedValue;
         try {
             return userData.parse();
-        } catch (ParseException e) {
+        } catch (NumberFormatException e) {
             Object[] args = {uiComponent.getId()};
             throw new ConverterException(MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR, DATE_MESSAGE_ID, args));
         }

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlInputDate.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlInputDate.java?rev=357758&r1=357757&r2=357758&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlInputDate.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/date/HtmlInputDate.java Mon Dec 19 11:19:27 2005
@@ -16,7 +16,6 @@
 package org.apache.myfaces.custom.date;
 
 import java.io.Serializable;
-import java.text.ParseException;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Locale;
@@ -215,7 +214,7 @@
             seconds = Integer.toString(calendar.get(Calendar.SECOND));
         }
 
-        public Date parse() throws ParseException{
+        public Date parse() throws NumberFormatException {
             Calendar tempCalendar=Calendar.getInstance();
             if (timeZone != null)
                    tempCalendar.setTimeZone(timeZone);