Re: svn commit: r688854 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r688854 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy

Adam Heath-2
[hidden email] wrote:
> Author: lektran
> Date: Mon Aug 25 12:58:12 2008
> New Revision: 688854
>
> URL: http://svn.apache.org/viewvc?rev=688854&view=rev
> Log:
> Another groovy fix, this is actually more of a problem with the ModelService class which implements the Map interface but when groovy tries to determine the size of the map, the entrySet() call unexpectedly returns null

I've got a slightly different 'fix' for this.  I needed proper
implementation of hashCode() and equals(); they also failed when
entrySet() returned null.

So, I implemented entrySet() properly.  But haven't yet checked it in.


>
> Modified:
>     ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
>
> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy?rev=688854&r1=688853&r2=688854&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy (original)
> +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy Mon Aug 25 12:58:12 2008
> @@ -482,7 +482,7 @@
>          curServiceModel = curDispatchContext.getModelService(serviceName);
>  
>          canIncludeService = true;
> -        if (constraint && curServiceModel) {
> +        if (constraint && curServiceModel != null) {
>              consArr = constraint.split("@");
>              constraintName = consArr[0];
>              constraintVal = consArr[1];
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r688854 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy

David E Jones


Adam Heath wrote:

> [hidden email] wrote:
>> Author: lektran
>> Date: Mon Aug 25 12:58:12 2008
>> New Revision: 688854
>>
>> URL: http://svn.apache.org/viewvc?rev=688854&view=rev
>> Log:
>> Another groovy fix, this is actually more of a problem with the
>> ModelService class which implements the Map interface but when groovy
>> tries to determine the size of the map, the entrySet() call
>> unexpectedly returns null
>
> I've got a slightly different 'fix' for this.  I needed proper
> implementation of hashCode() and equals(); they also failed when
> entrySet() returned null.
>
> So, I implemented entrySet() properly.  But haven't yet checked it in.

I like that idea, ie fix it in the more central place so we don't run into this again.

-David