| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.wysiwyg.server; |
| 21 |
|
|
| 22 |
|
import java.lang.reflect.Type; |
| 23 |
|
|
| 24 |
|
import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException; |
| 25 |
|
import com.google.gwt.user.client.rpc.RemoteService; |
| 26 |
|
import com.google.gwt.user.client.rpc.SerializationException; |
| 27 |
|
import com.google.gwt.user.server.rpc.RPC; |
| 28 |
|
import com.google.gwt.user.server.rpc.RPCRequest; |
| 29 |
|
import com.google.gwt.user.server.rpc.RemoteServiceServlet; |
| 30 |
|
import com.xpn.xwiki.web.Utils; |
| 31 |
|
|
| 32 |
|
|
| 33 |
|
@link |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
@version |
| 39 |
|
|
| |
|
| 71.4% |
Uncovered Elements: 2 (7) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 40 |
|
public class XWikiRemoteServiceServlet extends RemoteServiceServlet |
| 41 |
|
{ |
| 42 |
|
|
| 43 |
|
@link |
| 44 |
|
|
| 45 |
|
private static final long serialVersionUID = 1911611911891893986L; |
| 46 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 47 |
3 |
@Override... |
| 48 |
|
public String processCall(String payload) throws SerializationException |
| 49 |
|
{ |
| 50 |
3 |
try { |
| 51 |
3 |
RPCRequest req = RPC.decodeRequest(payload, null, this); |
| 52 |
3 |
RemoteService service = (RemoteService) Utils.getComponent((Type) req.getMethod().getDeclaringClass()); |
| 53 |
3 |
return RPC.invokeAndEncodeResponse(service, req.getMethod(), req.getParameters(), |
| 54 |
|
req.getSerializationPolicy()); |
| 55 |
|
} catch (IncompatibleRemoteServiceException ex) { |
| 56 |
0 |
log("IncompatibleRemoteServiceException in the processCall(String) method.", ex); |
| 57 |
0 |
return RPC.encodeResponseForFailure(null, ex); |
| 58 |
|
} |
| 59 |
|
} |
| 60 |
|
} |