Anonymous | Login | Signup for a new account | 11-22-2024 03:56 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ 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 | |||||||||
Status | new | Product Version | 4.0.7 | |||||||||
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? |
|||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
26 total queries executed. 24 unique queries executed. |