Anonymous | Login | Signup for a new account | 12-17-2024 08:53 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 | ||||
0002878 | [Hessian] | minor | always | 08-28-08 14:24 | 09-11-08 15:50 | ||||
Reporter | ferg | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | |||||||
Summary | 0002878: Hessian proxy equals | ||||||||
Description |
(rep by Christian Campo) just today I fell across a piece of code in Hessian that I dont quite get. Its in the HessianProxy line 103ff public Object invoke(Object proxy, Method method, Object []args) throws Throwable { String mangleName; synchronized (_mangleMap) { mangleName = _mangleMap.get(method); } if (mangleName == null) { String methodName = method.getName(); Class []params = method.getParameterTypes(); // equals and hashCode are special cased if (methodName.equals("equals") && params.length == 1 && params[0].equals(Object.class)) { Object value = args[0]; if (value == null || ! Proxy.isProxyClass(value.getClass())) return new Boolean(false); HessianProxy handler = (HessianProxy) Proxy.getInvocationHandler(value); It happens when the "equals" is called on a HessianProxy object. The implementation seems to assume that when argument is not null but is also a Proxy it has to be of type HessianProxy. That can be true, but it does not have to be. I fully agree that this is a very specific case, but the ClassCastException that you get in the equals still sounds like a bug to me. |
||||||||
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. |