[jboss-cvs] JBossAS SVN: r74690 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 17 10:00:14 EDT 2008
Author: mmalina at redhat.com
Date: 2008-06-17 10:00:14 -0400 (Tue, 17 Jun 2008)
New Revision: 74690
Modified:
branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java
Log:
JBPAPP-888 Fixed a failure on Z-systems - a date couldn't be parsed.
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java 2008-06-17 13:57:21 UTC (rev 74689)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java 2008-06-17 14:00:14 UTC (rev 74690)
@@ -358,11 +358,21 @@
getLog().debug("Current Locale: " + Locale.getDefault());
DateEditor.initialize();
- // An important date
- text = "ven., 25 juin 1971 00:30:00 +0200";
- format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");
- date = format.parse(text);
-
+ try
+ {
+ // An important date
+ text = "ven., 25 juin 1971 00:30:00 +0200";
+ format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");
+ date = format.parse(text);
+ }
+ catch (java.text.ParseException pe)
+ {
+ // "ver." doesn't work correctly with JDK on Z-systems, wherefore using ven - see JBAS-5639
+ text = "ven, 25 juin 1971 00:30:00 +0200";
+ format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");
+ date = format.parse(text);
+ }
+
editor = new DateEditor();
editor.setAsText(text);
getLog().debug("setAsText('" + text + "') --> getValue() = '" + editor.getValue() + "'");
More information about the jboss-cvs-commits
mailing list