You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2015/04/18 08:40:33 UTC
svn commit: r1674447 -
/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java
Author: deepak
Date: Sat Apr 18 06:40:32 2015
New Revision: 1674447
URL: http://svn.apache.org/r1674447
Log:
Applied patch from jira issue OFBIZ-4837 - Separator Error in data file tools.
Thanks Gil Portenseigne for reporting and providing the patch for the issue, Thanks Aditya for uploading the update patch and verifying it.
Modified:
ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java
Modified: ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java?rev=1674447&r1=1674446&r2=1674447&view=diff
==============================================================================
--- ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java (original)
+++ ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java Sat Apr 18 06:40:32 2015
@@ -580,7 +580,14 @@ public class Record implements Serializa
}
}
try {
- if (textDelimiter != null && (strVal.startsWith(textDelimiter) && strVal.endsWith(textDelimiter))) {
+ if (textDelimiter != null && strVal != null && (strVal.startsWith(textDelimiter) && (!strVal.endsWith(textDelimiter) || strVal.length()==1))) {
+ strVal = strVal.concat(""+delimiter);
+ while (!strVal.endsWith(textDelimiter)) {
+ strVal = strVal.concat(st.nextToken());
+ }
+ st.nextToken();
+ }
+ if (textDelimiter != null && strVal != null && (strVal.startsWith(textDelimiter) && strVal.endsWith(textDelimiter))) {
strVal = strVal.substring(textDelimiter.length(), strVal.length() - textDelimiter.length());
}
record.setString(modelField.name, strVal);