tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fra...@apache.org
Subject svn commit: r553921 - /incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java
Date Fri, 06 Jul 2007 15:13:47 GMT
Author: frankb
Date: Fri Jul  6 08:13:47 2007
New Revision: 553921

URL: http://svn.apache.org/viewvc?view=rev&rev=553921
Log:
Fix for TUSCANY-1410

Modified:
    incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java

Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java?view=diff&rev=553921&r1=553920&r2=553921
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java
Fri Jul  6 08:13:47 2007
@@ -326,26 +326,12 @@
   
   public synchronized Calendar toCalendar(String dateString)
   {
-    if (dateString == null)
-    {
-      return null;
-    }
-    
-    Date date = toDate(dateString);
-    if (date == null)
-    {
-      return null;
-    }
-    
-    Calendar calendar = new GregorianCalendar();
-    calendar.setTime(date);
-    
-    return calendar;
+    return toCalendar(dateString, null);
   }
   
   public synchronized Calendar toCalendar(String dateString, Locale locale)
   {
-    if (dateString == null || locale == null)
+    if (dateString == null)
     {
       return null;
     }
@@ -356,7 +342,7 @@
       return null;
     }
     
-    Calendar calendar = new GregorianCalendar(locale);
+    Calendar calendar = locale != null ? new GregorianCalendar(locale) : new GregorianCalendar();
     calendar.setTime(date);
     return calendar;
   }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message