Mantis - Hessian
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4343 | feature | always | 01-12-11 13:08 | 01-12-11 13:08 | |
|
|||||
Reporter: | Aaron Pieper | Platform: | |||
Assigned To: | OS: | ||||
Priority: | normal | OS Version: | |||
Status: | new | Product Version: | 4.0.7 | ||
Product Build: | Resolution: | open | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
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: | |||||
Relationships | |||||
Attached Files: |
There are no notes attached to this issue. |