Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003356 [Hessian] major always 02-25-09 02:57 06-01-09 09:20
Reporter Peter Dettman View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 3.2.1
Summary 0003356: NPE calling no-arg method via HessianProxy (Hessian 2)
Description To reproduce, just use a HessianProxyFactory to create a proxy for an interface containing at least one no-arg method.

e.g.
HessianProxyFactory factory = new HessianProxyFactory();
factory.setHessian2Request(true);

Runnable runnable = (Runnable)factory.create(Runnable.class, URL);
runnable.run(); // NPE


This appears to have entered as of r4587.

The fix is straight-forward: Hessian2Output.call(String, Object[]) should use the local variable 'length' in the for-loop condition in place of 'args.length' (the same way it's done in HessianOutput.call).
Additional Information Relevant part of stack trace:
java.lang.NullPointerException
    at com.caucho.hessian.io.Hessian2Output.call(Hessian2Output.java:136)
    at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:333)
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:166)
    at $Proxy7.open(Unknown Source)
Attached Files  hessian_0003356.patch [^] (375 bytes) 02-27-09 02:28

- Relationships

- Notes
(0004070)
sphemy
06-09-09 00:49

how to add the patch to hessian-3.2.1.jar?
 
(0004089)
emil
06-01-09 09:20

hessian/3400, et al.
 

- Issue History
Date Modified Username Field Change
02-25-09 02:57 Peter Dettman New Issue
02-27-09 02:28 Peter Dettman File Added: hessian_0003356.patch
06-09-09 00:49 sphemy Note Added: 0004070
06-01-09 09:20 emil Status new => closed
06-01-09 09:20 emil Note Added: 0004089
06-01-09 09:20 emil Resolution open => fixed
06-01-09 09:20 emil Fixed in Version  => 4.0.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker