Mantis - Hessian
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
2878 | minor | always | 08-28-08 14:24 | 09-11-08 15:50 | |
|
|||||
Reporter: | ferg | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.2.1 | ||
|
|||||
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. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
There are no notes attached to this issue. |