jnan77 / jsonrpc4j

Automatically exported from code.google.com/p/jsonrpc4j
0 stars 0 forks source link

Exception while calling method with void return type #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. call a void method
2.
3.

What is the expected output? What do you see instead?
exception is 
Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize 
Class void (of type primitive) as a Bean

What version of the product are you using? On what operating system?
jsonrpc4j-0.19-SNAPSHOT

Please provide any additional information below.
That fix works for me:

JsonRPCClient.java
127c127
< 

---
>         
129c129,132
<         if (jsonObject.has("result")) {

---
>         if (jsonObject.has("result")
>               && jsonObject.get("result")!=null
>                       && !jsonObject.get("result").isNull()
>               ) {

like it is done for error detection above.

Original issue reported on code.google.com by pavel.bo...@gmail.com on 20 Jan 2012 at 3:02

GoogleCodeExporter commented 8 years ago
Thanks, I've committed a fix for this problem and it will be included in the 
next release.

Original comment by brian.di...@gmail.com on 8 Feb 2012 at 7:38

GoogleCodeExporter commented 8 years ago

Original comment by brian.di...@gmail.com on 25 May 2012 at 2:51

GoogleCodeExporter commented 8 years ago

Original comment by brian.di...@gmail.com on 26 May 2012 at 2:45