Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004343 [Hessian] feature always 01-12-11 13:08 01-12-11 13:08
Reporter Aaron Pieper View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.7
  Product Build
Summary 0004343: Expose HessianConnection's underlying HttpURLConnection
Description We have some code which uses Hessian, and which also wants access to the HTTP connection's cookies. In older versions of Hessian (2.1.3 and such) HessianConnection extended HttpURLConnection, which allowed us to write code like this:

return ((HttpURLConnection)hessianConnection).getRequestProperty("Cookie");

In Hessian 4.0.7, HessianConnection does not extend HttpURLConnection, which is fine - I'm all for composition over inheritance. But it does make our code a lot uglier, as the HttpURLConnection can currently only be accessed via reflection:

try {
  Field connField = ReflectionUtils.getDeclaredField(HessianURLConnection.class, "_conn");
  connField.setAccessible(true);
  return ((HttpURLConnection)connField.get(obj)).getRequestProperty("Cookie");
} catch (IllegalArgumentException e) {
  throw new ReflectionException(e);
} catch (IllegalAccessException e) {
  throw new ReflectionException(e);
}

Could you consider exposing this field somehow? Perhaps with a getter?
Steps To Reproduce
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
01-12-11 13:08 Aaron Pieper New Issue


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