Re: XmlSerializer.java

2010-02-13 Thread Adrian Crum
Actually, this is turning out to be a little tougher than it seemed at first glance - because of SOAP. It's easy to check for XML serialization to/from the entity engine because the root element is always . It's easy to check for SOAP response serialization because the root element is always .

Re: svn commit: r908713 - in /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion: CollectionConverters.java test/MiscTests.java

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Adrian Crum wrote: > I'm working on the same concept here only with XML. I'm > created an XML class that represents and XML object. If you > want an XML string, you call XML.toString(). If you want a > DOM object, you call XML.toDOM(). If you want to deserialize > an object, y

Re: svn commit: r908713 - in /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion: CollectionConverters.java test/MiscTests.java

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Adam Heath wrote: > From: Adam Heath > Subject: Re: svn commit: r908713 - in > /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion: > CollectionConverters.java test/MiscTests.java > To: dev@ofbiz.apache.org > Date: Saturday, February 13, 2010, 10:26 PM > Adrian Crum w

Re: svn commit: r908713 - in /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion: CollectionConverters.java test/MiscTests.java

2010-02-13 Thread Adam Heath
Adrian Crum wrote: > --- On Wed, 2/10/10, Adam Heath wrote: >> From: Adam Heath >> Subject: Re: svn commit: r908713 - in >> /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion: >> CollectionConverters.java test/MiscTests.java >> To: dev@ofbiz.apache.org >> Date: Wednesday, February 10, 20

Re: XmlSerializer.java

2010-02-13 Thread Adrian Crum
I agree. That's exactly what I did in my local copy. :-) -Adrian --- On Sat, 2/13/10, David E Jones wrote: > From: David E Jones > Subject: Re: XmlSerializer.java > To: dev@ofbiz.apache.org > Date: Saturday, February 13, 2010, 7:58 PM > > We should at least keep the deserialization code aroun

Re: XmlSerializer.java

2010-02-13 Thread David E Jones
We should at least keep the deserialization code around forever for backward compatibility. You can select which deserializer to use based on the root element or something, that shouldn't be tough. -David On Feb 13, 2010, at 8:53 PM, Adrian Crum wrote: > I recently added the XStream library

XmlSerializer.java

2010-02-13 Thread Adrian Crum
I recently added the XStream library to the project - which enables serializing/deserializing Java objects to XML or JSON. With that addition, the XmlSerializer class is no longer needed. The XStream library is more sophisticated and extensible than the home-grown code. Switching XML serializer

Re: Conversion framework is not 'most specific' compatible

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Adam Heath wrote: > If you agree that we shouldn't throw an exception, then > I'll implement > the code.  I agree that the exception way sucks. The only real cost of a detailed class/interface analysis is the first time an unknown pair of classes request a converter. Once a

Re: Conversion framework is not 'most specific' compatible

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Adam Heath wrote: > From: Adam Heath > Subject: Re: Conversion framework is not 'most specific' compatible > To: dev@ofbiz.apache.org > Date: Saturday, February 13, 2010, 5:10 PM > Adrian Crum wrote: > > --- On Sat, 2/13/10, Adam Heath > wrote: > >> From: Adam Heath > >> Su

Re: Conversion framework is not 'most specific' compatible

2010-02-13 Thread Adam Heath
Adrian Crum wrote: > --- On Sat, 2/13/10, Adam Heath wrote: >> From: Adam Heath >> Subject: Re: Conversion framework is not 'most specific' compatible >> To: dev@ofbiz.apache.org >> Date: Saturday, February 13, 2010, 4:58 PM >> Adrian Crum wrote: >>> --- On Sat, 2/13/10, Adam Heath >> wrote: >>>

Re: Conversion framework is not 'most specific' compatible

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Adam Heath wrote: > From: Adam Heath > Subject: Re: Conversion framework is not 'most specific' compatible > To: dev@ofbiz.apache.org > Date: Saturday, February 13, 2010, 4:58 PM > Adrian Crum wrote: > > --- On Sat, 2/13/10, Adam Heath > wrote: > >> From: Adam Heath > >> Su

Re: AbstractConverter not thread safe

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Adam Heath wrote: > From: Adam Heath > Subject: Re: AbstractConverter not thread safe > To: dev@ofbiz.apache.org > Date: Saturday, February 13, 2010, 4:56 PM > Adam Heath wrote: > > Object creation can't be synchronized.  As such, > any variable > > assignments done in any ch

Re: Conversion framework is not 'most specific' compatible

2010-02-13 Thread Adam Heath
Adrian Crum wrote: > --- On Sat, 2/13/10, Adam Heath wrote: >> From: Adam Heath >> Subject: Conversion framework is not 'most specific' compatible >> To: dev@ofbiz.apache.org >> Date: Saturday, February 13, 2010, 1:09 PM >> When Converters.getConverter doesn't >> find an exact match for a >> conv

Re: AbstractConverter not thread safe

2010-02-13 Thread Adam Heath
Adam Heath wrote: > Object creation can't be synchronized. As such, any variable > assignments done in any chained constructors can be reordered at will > by the VM. The only guarantee you have is that when the new call is > finished, the object is constructed. > > AbstractConverter breaks this.

Re: Conversion framework is not 'most specific' compatible

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Adam Heath wrote: > From: Adam Heath > Subject: Conversion framework is not 'most specific' compatible > To: dev@ofbiz.apache.org > Date: Saturday, February 13, 2010, 1:09 PM > When Converters.getConverter doesn't > find an exact match for a > conversion request, it loops ove

AbstractConverter not thread safe

2010-02-13 Thread Adam Heath
Object creation can't be synchronized. As such, any variable assignments done in any chained constructors can be reordered at will by the VM. The only guarantee you have is that when the new call is finished, the object is constructed. AbstractConverter breaks this. In it's constructor, it regi

Re: svn commit: r909858 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java

2010-02-13 Thread Adrian Crum
--- On Sat, 2/13/10, Scott Gray wrote: > From: Scott Gray > Subject: Re: svn commit: r909858 - > /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java > To: dev@ofbiz.apache.org > Date: Saturday, February 13, 2010, 9:53 AM > > On 13/02/2010, at 10:45 AM, adri...@apache.or

[jira] Created: (OFBIZ-3477) Update (Edit) contact information throws missing screen error

2010-02-13 Thread Babu Sreekanth (JIRA)
Update (Edit) contact information throws missing screen error - Key: OFBIZ-3477 URL: https://issues.apache.org/jira/browse/OFBIZ-3477 Project: OFBiz Issue Type: Bug Compon

Conversion framework is not 'most specific' compatible

2010-02-13 Thread Adam Heath
When Converters.getConverter doesn't find an exact match for a conversion request, it loops over all registered converts, and asks then if they can handle it. However, this looping is not in any particular order, as it is based on Map.values(), which is mostly random. This means if there was a Co

[jira] Commented: (OFBIZ-1803) Product/Category pages link in Product/Category edit screens should link to the associated store

2010-02-13 Thread Bruno Busco (JIRA)
[ https://issues.apache.org/jira/browse/OFBIZ-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833451#action_12833451 ] Bruno Busco commented on OFBIZ-1803: We should also consider that this button actually

[jira] Commented: (OFBIZ-1803) Product/Category pages link in Product/Category edit screens should link to the associated store

2010-02-13 Thread BJ Freeman (JIRA)
[ https://issues.apache.org/jira/browse/OFBIZ-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833450#action_12833450 ] BJ Freeman commented on OFBIZ-1803: --- how would one get the url to bookmark when in the ca

[jira] Commented: (OFBIZ-1803) Product/Category pages link in Product/Category edit screens should link to the associated store

2010-02-13 Thread Jacques Le Roux (JIRA)
[ https://issues.apache.org/jira/browse/OFBIZ-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833438#action_12833438 ] Jacques Le Roux commented on OFBIZ-1803: Do we really need this link? We could be

Re: svn commit: r909858 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java

2010-02-13 Thread Scott Gray
On 13/02/2010, at 10:45 AM, adri...@apache.org wrote: > Author: adrianc > Date: Sat Feb 13 17:45:11 2010 > New Revision: 909858 > > URL: http://svn.apache.org/viewvc?rev=909858&view=rev > Log: > Test XStream serialization/deserialization of GenericValue. > > Modified: >ofbiz/trunk/framework

Re: svn commit: r908676 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java

2010-02-13 Thread Adam Heath
Adrian Crum wrote: > --- On Fri, 2/12/10, Adam Heath wrote: >> It's also why I throw UnsupportedOperationException, >> instead of >> ConversionException, during convert(obj). You >> shouldn't do doing >> unknown conversions, when dealing with enums. In >> those cases, you >> should know that an

Re: svn commit: r908676 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java

2010-02-13 Thread Adrian Crum
--- On Fri, 2/12/10, Adam Heath wrote: > It's also why I throw UnsupportedOperationException, > instead of > ConversionException, during convert(obj).  You > shouldn't do doing > unknown conversions, when dealing with enums.  In > those cases, you > should know that an enum is being requested, and