You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2008/01/11 10:29:01 UTC

svn commit: r611123 - /ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java

Author: jleroux
Date: Fri Jan 11 01:29:00 2008
New Revision: 611123

URL: http://svn.apache.org/viewvc?rev=611123&view=rev
Log:
Applied fix from trunk for revision: 611102

Modified:
    ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java

Modified: ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java?rev=611123&r1=611122&r2=611123&view=diff
==============================================================================
--- ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java (original)
+++ ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java Fri Jan 11 01:29:00 2008
@@ -645,6 +645,14 @@
                         return new java.sql.Timestamp(fieldDate.getTime());
                     } catch (ParseException e) {
                         throw new GeneralException("Could not convert " + str + " to " + type + ": ", e);
+                    } else {
+                        // DateFormat has a funny way of parsing milliseconds:
+                        // 00:00:00.2 parses to 00:00:00.002
+                        // so we'll add zeros to the end to get 00:00:00.200
+                        String[] timeSplit = str.split("[.]");
+                        if (timeSplit.length > 1 && timeSplit[1].length() < 3) {
+                            str = str + "000".substring(timeSplit[1].length());
+                        }
                     }
                 }
             } else if ("List".equals(type) || "java.util.List".equals(type)) {



Re: svn commit: r611123 -/ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Bilgin,

After checking, I totally reverted, it was not mergeable. I assumed it was ok since it was merged automatically without problems. I 
will know now that such things are possible...

Jacques

From: "Bilgin Ibryam" <bi...@iguanait.com>
> Hi Jacques,
>
> there is something wrong with this commit. The file do not compile.
>
> Bilgin
>
> 


Re: svn commit: r611123 - /ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/ObjectType.java

Posted by Bilgin Ibryam <bi...@iguanait.com>.
Hi Jacques,

there is something wrong with this commit. The file do not compile.

Bilgin