[ 
http://jira.nuxeo.org/browse/NXP-3069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48877#action_48877
 ] 

Alexandre Russel commented on NXP-3069:
---------------------------------------

set default max to 0 instead of 1 fixes it.

--- 
a/nuxeo-platform-search-api/src/main/java/org/nuxeo/ecm/core/search/api/client/querymodel/QueryModel.java
   Mon Jan 26 08:37:03 2009 +0100
+++ 
b/nuxeo-platform-search-api/src/main/java/org/nuxeo/ecm/core/search/api/client/querymodel/QueryModel.java
   Mon Jan 26 09:13:35 2009 +0100
@@ -78,7 +78,7 @@
         this.descriptor = descriptor;
         if (descriptor != null) {
             descriptorName = descriptor.getName();
-            max = descriptor.getMax() == null ? 0 : 
descriptor.getMax().intValue();
+            max = descriptor.getMax() == null ? 1 : 
descriptor.getMax().intValue();
         }
 
         this.documentModel = documentModel;




> getting a result impl throw a / by 0 exception
> ----------------------------------------------
>
>                 Key: NXP-3069
>                 URL: http://jira.nuxeo.org/browse/NXP-3069
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>            Reporter: Alexandre Russel
>            Assignee: Alexandre Russel
>
> Caused by: java.lang.ArithmeticException: / by zero
>       at 
> org.nuxeo.ecm.core.search.api.client.search.results.impl.ResultSetImpl.getPageNumber(ResultSetImpl.java:198)
>       at 
> org.nuxeo.ecm.core.search.api.client.search.results.impl.ResultSetImpl.goToPage(ResultSetImpl.java:123)
>       at 
> org.nuxeo.ecm.core.search.api.client.search.results.document.SearchPageProvider.goToPage(SearchPageProvider.java:214)
>       at 
> org.nuxeo.ecm.core.search.api.client.search.results.document.SearchPageProvider.rewind(SearchPageProvider.java:262)
>       at 
> org.nuxeo.ecm.platform.publishing.SelectionModelGetter.accumulateAvailableSections(SelectionModelGetter.java:143)
>       at 
> org.nuxeo.ecm.platform.publishing.SelectionModelGetter.<init>(SelectionModelGetter.java:88)
>       at 
> org.nuxeo.ecm.platform.publishing.PublishActionsBean.getSectionsSelectModel(PublishActionsBean.java:220)
>       at 
> org.nuxeo.ecm.platform.publishing.PublishActionsBean.getSectionsModel(PublishActionsBean.java:467)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to