[jboss-cvs] JBossAS SVN: r74689 - branches/JBPAPP_4_2_0_GA_CP/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 09:57:21 EDT 2008


Author: mmalina at redhat.com
Date: 2008-06-17 09:57:21 -0400 (Tue, 17 Jun 2008)
New Revision: 74689

Modified:
   branches/JBPAPP_4_2_0_GA_CP/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/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java	2008-06-17 13:52:54 UTC (rev 74688)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/util/test/PropertyEditorsUnitTestCase.java	2008-06-17 13:57:21 UTC (rev 74689)
@@ -358,10 +358,20 @@
          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);




More information about the jboss-cvs-commits mailing list