[
https://issues.jboss.org/browse/GTNPORTAL-3292?page=com.atlassian.jira.pl...
]
Peter Palaga commented on GTNPORTAL-3292:
-----------------------------------------
I improved the pull request in accordance with the proposal of [~nfilotto].
The propagation of errors to the client is fixed in
{{org.exoplatform.management.data.RestResource}} through making the methods return
{{RestResource}} rather than {{Object}}.
Further, I have added parameter checks throwinf {{IllegalArgumentException}} on "id
empty" and "object with the given id does not exist" in following methods:
* {{org.exoplatform.groovyscript.text.TemplateService.reloadTemplate(String)}}
* {{org.exoplatform.groovyscript.text.TemplateStatisticService.getMaxTime(String)}}
* {{org.exoplatform.groovyscript.text.TemplateStatisticService.getMinTime(String)}}
*
{{org.exoplatform.groovyscript.text.TemplateStatisticService.getExecutionCount(String)}}
* {{org.exoplatform.groovyscript.text.TemplateStatisticService.getAverageTime(String)}}
* {{org.exoplatform.portal.application.ApplicationStatisticService.getMaxTime(String)}}
* {{org.exoplatform.portal.application.ApplicationStatisticService.getMinTime(String)}}
*
{{org.exoplatform.portal.application.ApplicationStatisticService.getAverageTime(String)}}
*
{{org.exoplatform.portal.application.ApplicationStatisticService.getExecutionCount(String)}}
* {{org.exoplatform.portal.application.PortalStatisticService.getMaxTime(String)}}
* {{org.exoplatform.portal.application.PortalStatisticService.getMinTime(String)}}
* {{org.exoplatform.portal.application.PortalStatisticService.getAverageTime(String)}}
* {{org.exoplatform.portal.application.PortalStatisticService.getThroughput(String)}}
* {{org.exoplatform.portal.application.PortalStatisticService.getExecutionCount(String)}}
Finally, the in JavaScript on the client side, I have added a piece of code that shows the
error message (if available) to the user.
Services Management - Invalid parameters lead to methods failing with
exceptions
--------------------------------------------------------------------------------
Key: GTNPORTAL-3292
URL:
https://issues.jboss.org/browse/GTNPORTAL-3292
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.5.3.Final
Reporter: Miroslav Cupak
Assignee: Peter Palaga
Priority: Minor
Description of problem:
Methods in "templatestatistics" and "portalcontroller" section of the
Services Management gadget fail with exception (NPE/MalformedURLException) if they are
called with an invalid parameter. The exception is visible in the server log, but in the
UI, you only see the message "Method's executed, return no result", which
might be a bit confusing.
For example methods "reloadConfiguration" without a parameter and
"loadConfiguration" called with an invalid path both lead to the same message
being shown in the gadget, whereas only one of them really failed with exception.
Actual results:
Exception is logged, message "Method's executed, return no result" is
displayed.
Expected results:
It would be nice to have these two situations (failure/no return value) distinguished in
a consistent way (methods in other sections don't log an exception and usually return
at least some value).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira