Hi Sascha,
is this the right way to fix the test? Jacopo On Apr 19, 2012, at 7:58 AM, [hidden email] wrote: > Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1327835&r1=1327834&r2=1327835&view=diff > ============================================================================== > --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) > +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Thu Apr 19 05:58:29 2012 > @@ -379,10 +379,14 @@ public class WidgetWorker { > returnValue = df.format((java.util.Date) retVal); > } else { > try { > - returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("UTF-8").displayName()); > + returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("ISO-8859-1").displayName()); > } catch (UnsupportedEncodingException e) { > Debug.logError(e, module); > } > + > + //StringUtil.SimpleEncoder simpleEncoder = (StringUtil.SimpleEncoder) context.get("simpleEncoder"); > + //returnValue = simpleEncoder.encode(retVal.toString()); > + > } > return returnValue; > } else { > |
Hi Jacopo, year right, ups. The Widget Worker sneaked in the commit list ;-)
2012/4/19 Jacopo Cappellato <[hidden email]>: > Hi Sascha, > > is this the right way to fix the test? > > Jacopo > > On Apr 19, 2012, at 7:58 AM, [hidden email] wrote: > >> Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1327835&r1=1327834&r2=1327835&view=diff >> ============================================================================== >> --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) >> +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Thu Apr 19 05:58:29 2012 >> @@ -379,10 +379,14 @@ public class WidgetWorker { >> returnValue = df.format((java.util.Date) retVal); >> } else { >> try { >> - returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("UTF-8").displayName()); >> + returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("ISO-8859-1").displayName()); >> } catch (UnsupportedEncodingException e) { >> Debug.logError(e, module); >> } >> + >> + //StringUtil.SimpleEncoder simpleEncoder = (StringUtil.SimpleEncoder) context.get("simpleEncoder"); >> + //returnValue = simpleEncoder.encode(retVal.toString()); >> + >> } >> return returnValue; >> } else { >> > -- Sascha Rodekamp Visit the new german OFBiz Blog: http://www.ofbiz.biz Lynx-Consulting GmbH Johanniskirchplatz 6 D-33615 Bielefeld http://www.lynx.de |
In reply to this post by Jacopo Cappellato-4
On 04/19/2012 12:58 AM, [hidden email] wrote:
> Author: sascharodekamp > Date: Thu Apr 19 05:58:29 2012 > New Revision: 1327835 > > URL: http://svn.apache.org/viewvc?rev=1327835&view=rev > Log: > Fix jackrabbit unit testing. > > Modified: > ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java > > Modified: ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java?rev=1327835&r1=1327834&r2=1327835&view=diff > ============================================================================== > --- ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java (original) > +++ ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java Thu Apr 19 05:58:29 2012 > @@ -18,18 +18,13 @@ under the License. > */ > package org.ofbiz.jcr.test; > > -import java.io.File; > -import java.io.FileInputStream; > -import java.io.InputStream; > import java.util.GregorianCalendar; > -import java.util.List; > import java.util.Map; > > import javax.jcr.ItemExistsException; > import javax.jcr.PathNotFoundException; > import javax.jcr.RepositoryException; > import javax.jcr.Session; > -import javax.jcr.query.QueryResult; > > import javolution.util.FastMap; > import net.sf.json.JSONArray; > @@ -46,9 +41,7 @@ import org.ofbiz.jcr.access.JcrRepositor > import org.ofbiz.jcr.access.jackrabbit.ContentWriterJackrabbit; > import org.ofbiz.jcr.access.jackrabbit.JackrabbitRepositoryAccessor; > import org.ofbiz.jcr.api.JcrDataHelper; > -import org.ofbiz.jcr.api.JcrFileHelper; > import org.ofbiz.jcr.api.jackrabbit.JackrabbitArticleHelper; > -import org.ofbiz.jcr.api.jackrabbit.JackrabbitFileHelper; > import org.ofbiz.jcr.loader.JCRFactory; > import org.ofbiz.jcr.loader.JCRFactoryUtil; > import org.ofbiz.jcr.loader.jackrabbit.JCRFactoryImpl; This change doesn't fix the unit testing. It should be a separate commit. > > Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1327835&r1=1327834&r2=1327835&view=diff > ============================================================================== > --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) > +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Thu Apr 19 05:58:29 2012 > @@ -379,10 +379,14 @@ public class WidgetWorker { > returnValue = df.format((java.util.Date) retVal); > } else { > try { > - returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("UTF-8").displayName()); > + returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("ISO-8859-1").displayName()); Er, that can't be right. > } catch (UnsupportedEncodingException e) { > Debug.logError(e, module); > } > + > + //StringUtil.SimpleEncoder simpleEncoder = (StringUtil.SimpleEncoder) context.get("simpleEncoder"); > + //returnValue = simpleEncoder.encode(retVal.toString()); > + Why did you check this in? > } > return returnValue; > } else { > > |
Hi Adam, yea the Worker class sneaked accidentally in the commit list. It has been removed already.
Am 19.04.2012 um 17:11 schrieb Adam Heath <[hidden email]>: > On 04/19/2012 12:58 AM, [hidden email] wrote: >> Author: sascharodekamp >> Date: Thu Apr 19 05:58:29 2012 >> New Revision: 1327835 >> >> URL: http://svn.apache.org/viewvc?rev=1327835&view=rev >> Log: >> Fix jackrabbit unit testing. >> >> Modified: >> ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java >> >> Modified: ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java?rev=1327835&r1=1327834&r2=1327835&view=diff >> ============================================================================== >> --- ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java (original) >> +++ ofbiz/trunk/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTests.java Thu Apr 19 05:58:29 2012 >> @@ -18,18 +18,13 @@ under the License. >> */ >> package org.ofbiz.jcr.test; >> >> -import java.io.File; >> -import java.io.FileInputStream; >> -import java.io.InputStream; >> import java.util.GregorianCalendar; >> -import java.util.List; >> import java.util.Map; >> >> import javax.jcr.ItemExistsException; >> import javax.jcr.PathNotFoundException; >> import javax.jcr.RepositoryException; >> import javax.jcr.Session; >> -import javax.jcr.query.QueryResult; >> >> import javolution.util.FastMap; >> import net.sf.json.JSONArray; >> @@ -46,9 +41,7 @@ import org.ofbiz.jcr.access.JcrRepositor >> import org.ofbiz.jcr.access.jackrabbit.ContentWriterJackrabbit; >> import org.ofbiz.jcr.access.jackrabbit.JackrabbitRepositoryAccessor; >> import org.ofbiz.jcr.api.JcrDataHelper; >> -import org.ofbiz.jcr.api.JcrFileHelper; >> import org.ofbiz.jcr.api.jackrabbit.JackrabbitArticleHelper; >> -import org.ofbiz.jcr.api.jackrabbit.JackrabbitFileHelper; >> import org.ofbiz.jcr.loader.JCRFactory; >> import org.ofbiz.jcr.loader.JCRFactoryUtil; >> import org.ofbiz.jcr.loader.jackrabbit.JCRFactoryImpl; > > This change doesn't fix the unit testing. It should be a separate commit. > > >> >> Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1327835&r1=1327834&r2=1327835&view=diff >> ============================================================================== >> --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) >> +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Thu Apr 19 05:58:29 2012 >> @@ -379,10 +379,14 @@ public class WidgetWorker { >> returnValue = df.format((java.util.Date) retVal); >> } else { >> try { >> - returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("UTF-8").displayName()); >> + returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("ISO-8859-1").displayName()); > > Er, that can't be right. > >> } catch (UnsupportedEncodingException e) { >> Debug.logError(e, module); >> } >> + >> + //StringUtil.SimpleEncoder simpleEncoder = (StringUtil.SimpleEncoder) context.get("simpleEncoder"); >> + //returnValue = simpleEncoder.encode(retVal.toString()); >> + > > Why did you check this in? > > >> } >> return returnValue; >> } else { >> >> > |
Free forum by Nabble | Edit this page |