Hum, obviously you duplicated the code in gatein
https://github.com/ppalaga/gatein-portal/blob/754306903290b517db4c33c954a...
so I cannot test. So what you should do, is to apply the same fix on
your copy and tell me if it is fine with it.
Here is the fix to apply on your side
https://github.com/exodev/ws/commit/04e1f72b2c6bac9e91ca790acd3639e54a5230c0
On Wed, Dec 18, 2013 at 10:22 AM, Nicolas Filotto
<nfilotto(a)exoplatform.com <mailto:nfilotto@exoplatform.com>> wrote:
Thx for the PR, however it is not the correct fix. Please find more
details here
https://github.com/exoplatform/ws/pull/5#issuecomment-30830512.
How can I test my fix ?
On Tue, Dec 17, 2013 at 7:44 PM, Nicolas Filotto
<nfilotto(a)exoplatform.com <mailto:nfilotto@exoplatform.com>> wrote:
That sounds correct, please fill in a JIRA issue in the WS
project. I'll fix it asap
On Tue, Dec 17, 2013 at 5:02 PM, Peter Palaga
<ppalaga(a)redhat.com <mailto:ppalaga@redhat.com>> wrote:
Hi Nicolas,
I hope you are the best addressee for this question. I am
just solving [1], where:
(1) A NullPointerException is thrown in
TemplateStatisticService.__getExecutionCount(__TemplateStatisticService.java:__120)
(2) The NullPointerException is catched in
RestResource.safeInvoke(__MethodInvoker, Map<String,
List<String>>) where Response.serverError() is returned, see
[2]. This is probably incorrect,
Response.serverError().build()
or
Response.serverError().entity(__e.getMessage()).build()
would probably be better.
(3) But anyway, this return value is not handled properly in
RequestDispatcher.__processResponse(...). There, the result
is handled only based on the expected return type, in this
case java.lang.Object, which boils down to the last else,
see [3].
Hence, the main question is if this can be fixed in
RequestDispatcher. Could perhaps the Resource type check [4]
be applied also on o, like this:
else if (Response.class.__isAssignableFrom(returnType) || o
instanceof Response)
Or can you perhaps see other better possibilities to fix this?
Thanks,
Peter
[1]
https://issues.jboss.org/__browse/GTNPORTAL-3292
<
https://issues.jboss.org/browse/GTNPORTAL-3292>
[2]
https://github.com/gatein/__gatein-portal/blob/master/__component/managem...
<
https://github.com/gatein/gatein-portal/blob/master/component/management/...
[3]
https://github.com/__exoplatform/ws/blob/master/__exo.ws.rest.core/src/ma...
<
https://github.com/exoplatform/ws/blob/master/exo.ws.rest.core/src/main/j...
[4]
https://github.com/__exoplatform/ws/blob/master/__exo.ws.rest.core/src/ma...
<
https://github.com/exoplatform/ws/blob/master/exo.ws.rest.core/src/main/j...
--
Nicolas Filotto
Project Leader JCR
eXo Platform SAS
nfilotto(a)exoplatform.com <mailto:nfilotto@exoplatform.com>
--
Nicolas Filotto
Project Leader JCR
eXo Platform SAS
nfilotto(a)exoplatform.com <mailto:nfilotto@exoplatform.com>
--
Nicolas Filotto
Project Leader JCR
eXo Platform SAS
nfilotto(a)exoplatform.com <mailto:nfilotto@exoplatform.com>